diff --git a/.changelog/05cc5ba76583439e8681b6a374bbccc2.json b/.changelog/05cc5ba76583439e8681b6a374bbccc2.json new file mode 100644 index 00000000000..eb8d5e32134 --- /dev/null +++ b/.changelog/05cc5ba76583439e8681b6a374bbccc2.json @@ -0,0 +1,8 @@ +{ + "id": "05cc5ba7-6583-439e-8681-b6a374bbccc2", + "type": "documentation", + "description": "ArchivePolicy attribute added to Archive and Replay feature", + "modules": [ + "service/sns" + ] +} \ No newline at end of file diff --git a/.changelog/146bad6a502d42c9a15c838151e39d30.json b/.changelog/146bad6a502d42c9a15c838151e39d30.json new file mode 100644 index 00000000000..abd1858991b --- /dev/null +++ b/.changelog/146bad6a502d42c9a15c838151e39d30.json @@ -0,0 +1,8 @@ +{ + "id": "146bad6a-502d-42c9-a15c-838151e39d30", + "type": "feature", + "description": "This release includes: Update APIs to support Image, Layer Map, font customization, and Plugin Visual. Add Identity center related information in ListNamsespace API. Update API for restrictedFolder support in topics and add API for SearchTopics, Describe/Update DashboardsQA Configration.", + "modules": [ + "service/quicksight" + ] +} \ No newline at end of file diff --git a/.changelog/3b19a58484634c3989e5e30303c28e66.json b/.changelog/3b19a58484634c3989e5e30303c28e66.json new file mode 100644 index 00000000000..98f970495c4 --- /dev/null +++ b/.changelog/3b19a58484634c3989e5e30303c28e66.json @@ -0,0 +1,8 @@ +{ + "id": "3b19a584-8463-4c39-89e5-e30303c28e66", + "type": "feature", + "description": "Advanced Scaling in Amazon EMR Managed Scaling", + "modules": [ + "service/emr" + ] +} \ No newline at end of file diff --git a/.changelog/3c56c5fbe31e4f3fb0a182721fb71726.json b/.changelog/3c56c5fbe31e4f3fb0a182721fb71726.json new file mode 100644 index 00000000000..73b1b26cb48 --- /dev/null +++ b/.changelog/3c56c5fbe31e4f3fb0a182721fb71726.json @@ -0,0 +1,8 @@ +{ + "id": "3c56c5fb-e31e-4f3f-b0a1-82721fb71726", + "type": "feature", + "description": "Now, Amazon EC2 Auto Scaling customers can enable target tracking policies to take quicker scaling decisions, enhancing their application performance and EC2 utilization. To get started, specify target tracking to monitor a metric that is available on Amazon CloudWatch at seconds-level interval.", + "modules": [ + "service/autoscaling" + ] +} \ No newline at end of file diff --git a/.changelog/41575353444b40ffbf474f4155544f00.json b/.changelog/41575353444b40ffbf474f4155544f00.json new file mode 100644 index 00000000000..e9595c904cb --- /dev/null +++ b/.changelog/41575353444b40ffbf474f4155544f00.json @@ -0,0 +1,8 @@ +{ + "id": "41575353-444b-40ff-bf47-4f4155544f00", + "type": "release", + "description": "New AWS service client module", + "modules": [ + "service/bcmpricingcalculator" + ] +} \ No newline at end of file diff --git a/.changelog/424e9cb7459e4fd892227a653b1e3746.json b/.changelog/424e9cb7459e4fd892227a653b1e3746.json new file mode 100644 index 00000000000..f4a07698ce0 --- /dev/null +++ b/.changelog/424e9cb7459e4fd892227a653b1e3746.json @@ -0,0 +1,8 @@ +{ + "id": "424e9cb7-459e-4fd8-9222-7a653b1e3746", + "type": "feature", + "description": "This release adds support for starting email contacts in your Amazon Connect instance as an email receiving action.", + "modules": [ + "service/ses" + ] +} \ No newline at end of file diff --git a/.changelog/44c5bb83bab84097836ef7d3265f008a.json b/.changelog/44c5bb83bab84097836ef7d3265f008a.json new file mode 100644 index 00000000000..17ff5278728 --- /dev/null +++ b/.changelog/44c5bb83bab84097836ef7d3265f008a.json @@ -0,0 +1,8 @@ +{ + "id": "44c5bb83-bab8-4097-836e-f7d3265f008a", + "type": "feature", + "description": "Add support for variables and JSONata in TestState, GetExecutionHistory, DescribeStateMachine, and DescribeStateMachineForExecution", + "modules": [ + "service/sfn" + ] +} \ No newline at end of file diff --git a/.changelog/50a6d189b7c041ce9b40d04adefaf62e.json b/.changelog/50a6d189b7c041ce9b40d04adefaf62e.json new file mode 100644 index 00000000000..872cd55f9c0 --- /dev/null +++ b/.changelog/50a6d189b7c041ce9b40d04adefaf62e.json @@ -0,0 +1,8 @@ +{ + "id": "50a6d189-b7c0-41ce-9b40-d04adefaf62e", + "type": "feature", + "description": "Added new \"DeliverToQBusiness\" rule action to MailManager RulesSet for ingesting email data into Amazon Q Business customer applications", + "modules": [ + "service/mailmanager" + ] +} \ No newline at end of file diff --git a/.changelog/65c8d73d89a04f0a8aa6ce62de98ff88.json b/.changelog/65c8d73d89a04f0a8aa6ce62de98ff88.json new file mode 100644 index 00000000000..35e25daaafd --- /dev/null +++ b/.changelog/65c8d73d89a04f0a8aa6ce62de98ff88.json @@ -0,0 +1,8 @@ +{ + "id": "65c8d73d-89a0-4f0a-8aa6-ce62de98ff88", + "type": "feature", + "description": "Add 4 new APIs to support new Export features, allowing Parquet and CSV formats. Add new arguments in Import APIs to support Parquet import. Add a new query \"neptune.read\" to run algorithms without loading data into database", + "modules": [ + "service/neptunegraph" + ] +} \ No newline at end of file diff --git a/.changelog/6ad85b3800cb4b69a4cb14f5e68989cd.json b/.changelog/6ad85b3800cb4b69a4cb14f5e68989cd.json new file mode 100644 index 00000000000..36682993d0e --- /dev/null +++ b/.changelog/6ad85b3800cb4b69a4cb14f5e68989cd.json @@ -0,0 +1,8 @@ +{ + "id": "6ad85b38-00cb-4b69-a4cb-14f5e68989cd", + "type": "feature", + "description": "InvokeInlineAgent API release to help invoke runtime agents without any dependency on preconfigured agents.", + "modules": [ + "service/bedrockagentruntime" + ] +} \ No newline at end of file diff --git a/.changelog/7d0afee4dfd4487aad8cf2f8ad2908d8.json b/.changelog/7d0afee4dfd4487aad8cf2f8ad2908d8.json new file mode 100644 index 00000000000..1ad30382009 --- /dev/null +++ b/.changelog/7d0afee4dfd4487aad8cf2f8ad2908d8.json @@ -0,0 +1,8 @@ +{ + "id": "7d0afee4-dfd4-487a-ad8c-f2f8ad2908d8", + "type": "feature", + "description": "This release adds APIs for new features for SageMaker endpoint to scale down to zero instances, native support for multi-adapter inference, and endpoint scaling improvements.", + "modules": [ + "service/sagemaker" + ] +} \ No newline at end of file diff --git a/.changelog/918f48abc8eb4f58a839977ff560663d.json b/.changelog/918f48abc8eb4f58a839977ff560663d.json new file mode 100644 index 00000000000..7511afa70d2 --- /dev/null +++ b/.changelog/918f48abc8eb4f58a839977ff560663d.json @@ -0,0 +1,8 @@ +{ + "id": "918f48ab-c8eb-4f58-a839-977ff560663d", + "type": "documentation", + "description": "While integrating WSP-DCV rebrand, a few mentions were erroneously renamed from WSP to DCV. This release reverts those mentions back to WSP.", + "modules": [ + "service/workspaces" + ] +} \ No newline at end of file diff --git a/.changelog/9771468749964950a5b2e3df34db344d.json b/.changelog/9771468749964950a5b2e3df34db344d.json new file mode 100644 index 00000000000..d2f577c6382 --- /dev/null +++ b/.changelog/9771468749964950a5b2e3df34db344d.json @@ -0,0 +1,8 @@ +{ + "id": "97714687-4996-4950-a5b2-e3df34db344d", + "type": "feature", + "description": "This release adds support for resource policy based cross account S3 access to sequence store read sets.", + "modules": [ + "service/omics" + ] +} \ No newline at end of file diff --git a/.changelog/9fc832cdc3db4d44a28844c6396e1d63.json b/.changelog/9fc832cdc3db4d44a28844c6396e1d63.json new file mode 100644 index 00000000000..c65772f83b7 --- /dev/null +++ b/.changelog/9fc832cdc3db4d44a28844c6396e1d63.json @@ -0,0 +1,8 @@ +{ + "id": "9fc832cd-c3db-4d44-a288-44c6396e1d63", + "type": "feature", + "description": "This release adds support for advertising trusted CA certificate names in associated trust stores.", + "modules": [ + "service/elasticloadbalancingv2" + ] +} \ No newline at end of file diff --git a/.changelog/a7a451e862c8449d98c7ba8af80cdb2c.json b/.changelog/a7a451e862c8449d98c7ba8af80cdb2c.json new file mode 100644 index 00000000000..1cde551e3eb --- /dev/null +++ b/.changelog/a7a451e862c8449d98c7ba8af80cdb2c.json @@ -0,0 +1,8 @@ +{ + "id": "a7a451e8-62c8-449d-98c7-ba8af80cdb2c", + "type": "feature", + "description": "Initial release of the AWS Billing and Cost Management Pricing Calculator API.", + "modules": [ + "service/bcmpricingcalculator" + ] +} \ No newline at end of file diff --git a/.changelog/a88ddcd7f3124dd495d136b81fa66919.json b/.changelog/a88ddcd7f3124dd495d136b81fa66919.json new file mode 100644 index 00000000000..4cb2302532e --- /dev/null +++ b/.changelog/a88ddcd7f3124dd495d136b81fa66919.json @@ -0,0 +1,8 @@ +{ + "id": "a88ddcd7-f312-4dd4-95d1-36b81fa66919", + "type": "feature", + "description": "Adds support for programmatic management of custom actions and aliases which can be associated with channel configurations.", + "modules": [ + "service/chatbot" + ] +} \ No newline at end of file diff --git a/.changelog/bba28518379d4b81aab99bd0b88ee642.json b/.changelog/bba28518379d4b81aab99bd0b88ee642.json new file mode 100644 index 00000000000..2dcb57b3974 --- /dev/null +++ b/.changelog/bba28518379d4b81aab99bd0b88ee642.json @@ -0,0 +1,8 @@ +{ + "id": "bba28518-379d-4b81-aab9-9bd0b88ee642", + "type": "feature", + "description": "Amazon Connect Service Feature: Add APIs for Amazon Connect Email Channel", + "modules": [ + "service/connect" + ] +} \ No newline at end of file diff --git a/.changelog/ca9a7f9bd9e84b4991c5b63528386c74.json b/.changelog/ca9a7f9bd9e84b4991c5b63528386c74.json new file mode 100644 index 00000000000..48b675879f7 --- /dev/null +++ b/.changelog/ca9a7f9bd9e84b4991c5b63528386c74.json @@ -0,0 +1,8 @@ +{ + "id": "ca9a7f9b-d9e8-4b49-91c5-b63528386c74", + "type": "feature", + "description": "This release adds the Impact field(contains Contribution field) to the GetAnomalies API response under RootCause", + "modules": [ + "service/costexplorer" + ] +} \ No newline at end of file diff --git a/.changelog/d1ded981cb3249fc856d2523dbd95584.json b/.changelog/d1ded981cb3249fc856d2523dbd95584.json new file mode 100644 index 00000000000..5fb80634cc4 --- /dev/null +++ b/.changelog/d1ded981cb3249fc856d2523dbd95584.json @@ -0,0 +1,8 @@ +{ + "id": "d1ded981-cb32-49fc-856d-2523dbd95584", + "type": "feature", + "description": "Add ProvisionedPollerConfig to Lambda event-source-mapping API.", + "modules": [ + "service/lambda" + ] +} \ No newline at end of file diff --git a/.changelog/dc789918de364787a9d261e03c53fb9c.json b/.changelog/dc789918de364787a9d261e03c53fb9c.json new file mode 100644 index 00000000000..dec35fb8fb7 --- /dev/null +++ b/.changelog/dc789918de364787a9d261e03c53fb9c.json @@ -0,0 +1,8 @@ +{ + "id": "dc789918-de36-4787-a9d2-61e03c53fb9c", + "type": "feature", + "description": "Extend inspector2 service model to include ServiceQuotaExceededException.", + "modules": [ + "service/inspector2" + ] +} \ No newline at end of file diff --git a/.changelog/de28be3fc3a646a8ae24d16ce870e6e0.json b/.changelog/de28be3fc3a646a8ae24d16ce870e6e0.json new file mode 100644 index 00000000000..79b08d6cd78 --- /dev/null +++ b/.changelog/de28be3fc3a646a8ae24d16ce870e6e0.json @@ -0,0 +1,8 @@ +{ + "id": "de28be3f-c3a6-46a8-ae24-d16ce870e6e0", + "type": "feature", + "description": "AWS CodePipeline V2 type pipelines now support ECRBuildAndPublish and InspectorScan actions.", + "modules": [ + "service/codepipeline" + ] +} \ No newline at end of file diff --git a/.changelog/fc1d2d1e647645a68f5695745fed848d.json b/.changelog/fc1d2d1e647645a68f5695745fed848d.json new file mode 100644 index 00000000000..67d83cf91a3 --- /dev/null +++ b/.changelog/fc1d2d1e647645a68f5695745fed848d.json @@ -0,0 +1,8 @@ +{ + "id": "fc1d2d1e-6476-45a6-8f56-95745fed848d", + "type": "feature", + "description": "Add support for users to sign up and sign in without passwords, using email and SMS OTPs and Passkeys. Add support for Passkeys based on WebAuthn. Add support for enhanced branding customization for hosted authentication pages with Amazon Cognito Managed Login. Add feature tiers with new pricing.", + "modules": [ + "service/cognitoidentityprovider" + ] +} \ No newline at end of file diff --git a/service/autoscaling/deserializers.go b/service/autoscaling/deserializers.go index 266ddd38ac7..a7c0450659f 100644 --- a/service/autoscaling/deserializers.go +++ b/service/autoscaling/deserializers.go @@ -10393,6 +10393,23 @@ func awsAwsquery_deserializeDocumentCustomizedMetricSpecification(v **types.Cust sv.Namespace = ptr.String(xtv) } + case strings.EqualFold("Period", 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.Period = ptr.Int32(int32(i64)) + } + case strings.EqualFold("Statistic", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -17995,6 +18012,23 @@ func awsAwsquery_deserializeDocumentTargetTrackingMetricDataQuery(v **types.Targ return err } + case strings.EqualFold("Period", 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.Period = ptr.Int32(int32(i64)) + } + case strings.EqualFold("ReturnData", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -18053,6 +18087,23 @@ func awsAwsquery_deserializeDocumentTargetTrackingMetricStat(v **types.TargetTra return err } + case strings.EqualFold("Period", 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.Period = ptr.Int32(int32(i64)) + } + case strings.EqualFold("Stat", t.Name.Local): val, err := decoder.Value() if err != nil { diff --git a/service/autoscaling/serializers.go b/service/autoscaling/serializers.go index f4e004c9873..3a0568a0792 100644 --- a/service/autoscaling/serializers.go +++ b/service/autoscaling/serializers.go @@ -4910,6 +4910,11 @@ func awsAwsquery_serializeDocumentCustomizedMetricSpecification(v *types.Customi objectKey.String(*v.Namespace) } + if v.Period != nil { + objectKey := object.Key("Period") + objectKey.Integer(*v.Period) + } + if len(v.Statistic) > 0 { objectKey := object.Key("Statistic") objectKey.String(string(v.Statistic)) @@ -6397,6 +6402,11 @@ func awsAwsquery_serializeDocumentTargetTrackingMetricDataQuery(v *types.TargetT } } + if v.Period != nil { + objectKey := object.Key("Period") + objectKey.Integer(*v.Period) + } + if v.ReturnData != nil { objectKey := object.Key("ReturnData") objectKey.Boolean(*v.ReturnData) @@ -6416,6 +6426,11 @@ func awsAwsquery_serializeDocumentTargetTrackingMetricStat(v *types.TargetTracki } } + if v.Period != nil { + objectKey := object.Key("Period") + objectKey.Integer(*v.Period) + } + if v.Stat != nil { objectKey := object.Key("Stat") objectKey.String(*v.Stat) diff --git a/service/autoscaling/types/types.go b/service/autoscaling/types/types.go index 0a40210701f..fc8642d2d1c 100644 --- a/service/autoscaling/types/types.go +++ b/service/autoscaling/types/types.go @@ -559,6 +559,13 @@ type CustomizedMetricSpecification struct { // The namespace of the metric. Namespace *string + // The period of the metric in seconds. The default value is 60. Accepted values + // are 10, 30, and 60. For high resolution metric, set the value to less than 60. + // For more information, see [Create a target tracking policy using high-resolution metrics for faster response]. + // + // [Create a target tracking policy using high-resolution metrics for faster response]: https://docs.aws.amazon.com/autoscaling/ec2/userguide/policy-creating-high-resolution-metrics.html + Period *int32 + // The statistic of the metric. Statistic MetricStatistic @@ -3204,6 +3211,13 @@ type TargetTrackingMetricDataQuery struct { // either Expression or MetricStat , but not both. MetricStat *TargetTrackingMetricStat + // The period of the metric in seconds. The default value is 60. Accepted values + // are 10, 30, and 60. For high resolution metric, set the value to less than 60. + // For more information, see [Create a target tracking policy using high-resolution metrics for faster response]. + // + // [Create a target tracking policy using high-resolution metrics for faster response]: https://docs.aws.amazon.com/autoscaling/ec2/userguide/policy-creating-high-resolution-metrics.html + Period *int32 + // Indicates whether to return the timestamps and raw data values of this metric. // // If you use any math expressions, specify true for this value for only the final @@ -3243,6 +3257,13 @@ type TargetTrackingMetricStat struct { // This member is required. Stat *string + // The period of the metric in seconds. The default value is 60. Accepted values + // are 10, 30, and 60. For high resolution metric, set the value to less than 60. + // For more information, see [Create a target tracking policy using high-resolution metrics for faster response]. + // + // [Create a target tracking policy using high-resolution metrics for faster response]: https://docs.aws.amazon.com/autoscaling/ec2/userguide/policy-creating-high-resolution-metrics.html + Period *int32 + // The unit to use for the returned data points. For a complete list of the units // that CloudWatch supports, see the [MetricDatum]data type in the Amazon CloudWatch API // Reference. diff --git a/service/bcmpricingcalculator/LICENSE.txt b/service/bcmpricingcalculator/LICENSE.txt new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/service/bcmpricingcalculator/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/service/bcmpricingcalculator/api_client.go b/service/bcmpricingcalculator/api_client.go new file mode 100644 index 00000000000..a4b1a74348f --- /dev/null +++ b/service/bcmpricingcalculator/api_client.go @@ -0,0 +1,929 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bcmpricingcalculator + +import ( + "context" + cryptorand "crypto/rand" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/aws/defaults" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/retry" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy" + internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" + internalmiddleware "github.com/aws/aws-sdk-go-v2/internal/middleware" + smithy "github.com/aws/smithy-go" + smithyauth "github.com/aws/smithy-go/auth" + smithydocument "github.com/aws/smithy-go/document" + "github.com/aws/smithy-go/logging" + "github.com/aws/smithy-go/metrics" + "github.com/aws/smithy-go/middleware" + smithyrand "github.com/aws/smithy-go/rand" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net" + "net/http" + "sync/atomic" + "time" +) + +const ServiceID = "BCM Pricing Calculator" +const ServiceAPIVersion = "2024-06-19" + +type operationMetrics struct { + Duration metrics.Float64Histogram + SerializeDuration metrics.Float64Histogram + ResolveIdentityDuration metrics.Float64Histogram + ResolveEndpointDuration metrics.Float64Histogram + SignRequestDuration metrics.Float64Histogram + DeserializeDuration metrics.Float64Histogram +} + +func (m *operationMetrics) histogramFor(name string) metrics.Float64Histogram { + switch name { + case "client.call.duration": + return m.Duration + case "client.call.serialization_duration": + return m.SerializeDuration + case "client.call.resolve_identity_duration": + return m.ResolveIdentityDuration + case "client.call.resolve_endpoint_duration": + return m.ResolveEndpointDuration + case "client.call.signing_duration": + return m.SignRequestDuration + case "client.call.deserialization_duration": + return m.DeserializeDuration + default: + panic("unrecognized operation metric") + } +} + +func timeOperationMetric[T any]( + ctx context.Context, metric string, fn func() (T, error), + opts ...metrics.RecordMetricOption, +) (T, error) { + instr := getOperationMetrics(ctx).histogramFor(metric) + opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) + + start := time.Now() + v, err := fn() + end := time.Now() + + elapsed := end.Sub(start) + instr.Record(ctx, float64(elapsed)/1e9, opts...) + return v, err +} + +func startMetricTimer(ctx context.Context, metric string, opts ...metrics.RecordMetricOption) func() { + instr := getOperationMetrics(ctx).histogramFor(metric) + opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) + + var ended bool + start := time.Now() + return func() { + if ended { + return + } + ended = true + + end := time.Now() + + elapsed := end.Sub(start) + instr.Record(ctx, float64(elapsed)/1e9, opts...) + } +} + +func withOperationMetadata(ctx context.Context) metrics.RecordMetricOption { + return func(o *metrics.RecordMetricOptions) { + o.Properties.Set("rpc.service", middleware.GetServiceID(ctx)) + o.Properties.Set("rpc.method", middleware.GetOperationName(ctx)) + } +} + +type operationMetricsKey struct{} + +func withOperationMetrics(parent context.Context, mp metrics.MeterProvider) (context.Context, error) { + meter := mp.Meter("github.com/aws/aws-sdk-go-v2/service/bcmpricingcalculator") + om := &operationMetrics{} + + var err error + + om.Duration, err = operationMetricTimer(meter, "client.call.duration", + "Overall call duration (including retries and time to send or receive request and response body)") + if err != nil { + return nil, err + } + om.SerializeDuration, err = operationMetricTimer(meter, "client.call.serialization_duration", + "The time it takes to serialize a message body") + if err != nil { + return nil, err + } + om.ResolveIdentityDuration, err = operationMetricTimer(meter, "client.call.auth.resolve_identity_duration", + "The time taken to acquire an identity (AWS credentials, bearer token, etc) from an Identity Provider") + if err != nil { + return nil, err + } + om.ResolveEndpointDuration, err = operationMetricTimer(meter, "client.call.resolve_endpoint_duration", + "The time it takes to resolve an endpoint (endpoint resolver, not DNS) for the request") + if err != nil { + return nil, err + } + om.SignRequestDuration, err = operationMetricTimer(meter, "client.call.auth.signing_duration", + "The time it takes to sign a request") + if err != nil { + return nil, err + } + om.DeserializeDuration, err = operationMetricTimer(meter, "client.call.deserialization_duration", + "The time it takes to deserialize a message body") + if err != nil { + return nil, err + } + + return context.WithValue(parent, operationMetricsKey{}, om), nil +} + +func operationMetricTimer(m metrics.Meter, name, desc string) (metrics.Float64Histogram, error) { + return m.Float64Histogram(name, func(o *metrics.InstrumentOptions) { + o.UnitLabel = "s" + o.Description = desc + }) +} + +func getOperationMetrics(ctx context.Context) *operationMetrics { + return ctx.Value(operationMetricsKey{}).(*operationMetrics) +} + +func operationTracer(p tracing.TracerProvider) tracing.Tracer { + return p.Tracer("github.com/aws/aws-sdk-go-v2/service/bcmpricingcalculator") +} + +// Client provides the API client to make operations call for AWS Billing and Cost +// Management Pricing Calculator. +type Client struct { + options Options + + // Difference between the time reported by the server and the client + timeOffset *atomic.Int64 +} + +// New returns an initialized Client based on the functional options. Provide +// additional functional options to further configure the behavior of the client, +// such as changing the client's endpoint or adding custom middleware behavior. +func New(options Options, optFns ...func(*Options)) *Client { + options = options.Copy() + + resolveDefaultLogger(&options) + + setResolvedDefaultsMode(&options) + + resolveRetryer(&options) + + resolveHTTPClient(&options) + + resolveHTTPSignerV4(&options) + + resolveIdempotencyTokenProvider(&options) + + resolveEndpointResolverV2(&options) + + resolveTracerProvider(&options) + + resolveMeterProvider(&options) + + resolveAuthSchemeResolver(&options) + + for _, fn := range optFns { + fn(&options) + } + + finalizeRetryMaxAttempts(&options) + + ignoreAnonymousAuth(&options) + + wrapWithAnonymousAuth(&options) + + resolveAuthSchemes(&options) + + client := &Client{ + options: options, + } + + initializeTimeOffsetResolver(client) + + return client +} + +// Options returns a copy of the client configuration. +// +// Callers SHOULD NOT perform mutations on any inner structures within client +// config. Config overrides should instead be made on a per-operation basis through +// functional options. +func (c *Client) Options() Options { + return c.options.Copy() +} + +func (c *Client) invokeOperation( + ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error, +) ( + result interface{}, metadata middleware.Metadata, err error, +) { + ctx = middleware.ClearStackValues(ctx) + ctx = middleware.WithServiceID(ctx, ServiceID) + ctx = middleware.WithOperationName(ctx, opID) + + stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) + options := c.options.Copy() + + for _, fn := range optFns { + fn(&options) + } + + finalizeOperationRetryMaxAttempts(&options, *c) + + finalizeClientEndpointResolverOptions(&options) + + for _, fn := range stackFns { + if err := fn(stack, options); err != nil { + return nil, metadata, err + } + } + + for _, fn := range options.APIOptions { + if err := fn(stack); err != nil { + return nil, metadata, err + } + } + + ctx, err = withOperationMetrics(ctx, options.MeterProvider) + if err != nil { + return nil, metadata, err + } + + tracer := operationTracer(options.TracerProvider) + spanName := fmt.Sprintf("%s.%s", ServiceID, opID) + + ctx = tracing.WithOperationTracer(ctx, tracer) + + ctx, span := tracer.StartSpan(ctx, spanName, func(o *tracing.SpanOptions) { + o.Kind = tracing.SpanKindClient + o.Properties.Set("rpc.system", "aws-api") + o.Properties.Set("rpc.method", opID) + o.Properties.Set("rpc.service", ServiceID) + }) + endTimer := startMetricTimer(ctx, "client.call.duration") + defer endTimer() + defer span.End() + + handler := smithyhttp.NewClientHandlerWithOptions(options.HTTPClient, func(o *smithyhttp.ClientHandler) { + o.Meter = options.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/bcmpricingcalculator") + }) + decorated := middleware.DecorateHandler(handler, stack) + result, metadata, err = decorated.Handle(ctx, params) + if err != nil { + span.SetProperty("exception.type", fmt.Sprintf("%T", err)) + span.SetProperty("exception.message", err.Error()) + + var aerr smithy.APIError + if errors.As(err, &aerr) { + span.SetProperty("api.error_code", aerr.ErrorCode()) + span.SetProperty("api.error_message", aerr.ErrorMessage()) + span.SetProperty("api.error_fault", aerr.ErrorFault().String()) + } + + err = &smithy.OperationError{ + ServiceID: ServiceID, + OperationName: opID, + Err: err, + } + } + + span.SetProperty("error", err != nil) + if err == nil { + span.SetStatus(tracing.SpanStatusOK) + } else { + span.SetStatus(tracing.SpanStatusError) + } + + return result, metadata, err +} + +type operationInputKey struct{} + +func setOperationInput(ctx context.Context, input interface{}) context.Context { + return middleware.WithStackValue(ctx, operationInputKey{}, input) +} + +func getOperationInput(ctx context.Context) interface{} { + return middleware.GetStackValue(ctx, operationInputKey{}) +} + +type setOperationInputMiddleware struct { +} + +func (*setOperationInputMiddleware) ID() string { + return "setOperationInput" +} + +func (m *setOperationInputMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + ctx = setOperationInput(ctx, in.Parameters) + return next.HandleSerialize(ctx, in) +} + +func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, operation string) error { + if err := stack.Finalize.Add(&resolveAuthSchemeMiddleware{operation: operation, options: options}, middleware.Before); err != nil { + return fmt.Errorf("add ResolveAuthScheme: %w", err) + } + if err := stack.Finalize.Insert(&getIdentityMiddleware{options: options}, "ResolveAuthScheme", middleware.After); err != nil { + return fmt.Errorf("add GetIdentity: %v", err) + } + if err := stack.Finalize.Insert(&resolveEndpointV2Middleware{options: options}, "GetIdentity", middleware.After); err != nil { + return fmt.Errorf("add ResolveEndpointV2: %v", err) + } + if err := stack.Finalize.Insert(&signRequestMiddleware{options: options}, "ResolveEndpointV2", middleware.After); err != nil { + return fmt.Errorf("add Signing: %w", err) + } + return nil +} +func resolveAuthSchemeResolver(options *Options) { + if options.AuthSchemeResolver == nil { + options.AuthSchemeResolver = &defaultAuthSchemeResolver{} + } +} + +func resolveAuthSchemes(options *Options) { + if options.AuthSchemes == nil { + options.AuthSchemes = []smithyhttp.AuthScheme{ + internalauth.NewHTTPAuthScheme("aws.auth#sigv4", &internalauthsmithy.V4SignerAdapter{ + Signer: options.HTTPSignerV4, + Logger: options.Logger, + LogSigning: options.ClientLogMode.IsSigning(), + }), + } + } +} + +type noSmithyDocumentSerde = smithydocument.NoSerde + +type legacyEndpointContextSetter struct { + LegacyResolver EndpointResolver +} + +func (*legacyEndpointContextSetter) ID() string { + return "legacyEndpointContextSetter" +} + +func (m *legacyEndpointContextSetter) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.LegacyResolver != nil { + ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, true) + } + + return next.HandleInitialize(ctx, in) + +} +func addlegacyEndpointContextSetter(stack *middleware.Stack, o Options) error { + return stack.Initialize.Add(&legacyEndpointContextSetter{ + LegacyResolver: o.EndpointResolver, + }, middleware.Before) +} + +func resolveDefaultLogger(o *Options) { + if o.Logger != nil { + return + } + o.Logger = logging.Nop{} +} + +func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { + return middleware.AddSetLoggerMiddleware(stack, o.Logger) +} + +func setResolvedDefaultsMode(o *Options) { + if len(o.resolvedDefaultsMode) > 0 { + return + } + + var mode aws.DefaultsMode + mode.SetFromString(string(o.DefaultsMode)) + + if mode == aws.DefaultsModeAuto { + mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment) + } + + o.resolvedDefaultsMode = mode +} + +// NewFromConfig returns a new client from the provided config. +func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { + opts := Options{ + Region: cfg.Region, + DefaultsMode: cfg.DefaultsMode, + RuntimeEnvironment: cfg.RuntimeEnvironment, + HTTPClient: cfg.HTTPClient, + Credentials: cfg.Credentials, + APIOptions: cfg.APIOptions, + Logger: cfg.Logger, + ClientLogMode: cfg.ClientLogMode, + AppID: cfg.AppID, + } + resolveAWSRetryerProvider(cfg, &opts) + resolveAWSRetryMaxAttempts(cfg, &opts) + resolveAWSRetryMode(cfg, &opts) + resolveAWSEndpointResolver(cfg, &opts) + resolveUseDualStackEndpoint(cfg, &opts) + resolveUseFIPSEndpoint(cfg, &opts) + resolveBaseEndpoint(cfg, &opts) + return New(opts, optFns...) +} + +func resolveHTTPClient(o *Options) { + var buildable *awshttp.BuildableClient + + if o.HTTPClient != nil { + var ok bool + buildable, ok = o.HTTPClient.(*awshttp.BuildableClient) + if !ok { + return + } + } else { + buildable = awshttp.NewBuildableClient() + } + + modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) + if err == nil { + buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) { + if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok { + dialer.Timeout = dialerTimeout + } + }) + + buildable = buildable.WithTransportOptions(func(transport *http.Transport) { + if tlsHandshakeTimeout, ok := modeConfig.GetTLSNegotiationTimeout(); ok { + transport.TLSHandshakeTimeout = tlsHandshakeTimeout + } + }) + } + + o.HTTPClient = buildable +} + +func resolveRetryer(o *Options) { + if o.Retryer != nil { + return + } + + if len(o.RetryMode) == 0 { + modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) + if err == nil { + o.RetryMode = modeConfig.RetryMode + } + } + if len(o.RetryMode) == 0 { + o.RetryMode = aws.RetryModeStandard + } + + var standardOptions []func(*retry.StandardOptions) + if v := o.RetryMaxAttempts; v != 0 { + standardOptions = append(standardOptions, func(so *retry.StandardOptions) { + so.MaxAttempts = v + }) + } + + switch o.RetryMode { + case aws.RetryModeAdaptive: + var adaptiveOptions []func(*retry.AdaptiveModeOptions) + if len(standardOptions) != 0 { + adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) { + ao.StandardOptions = append(ao.StandardOptions, standardOptions...) + }) + } + o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...) + + default: + o.Retryer = retry.NewStandard(standardOptions...) + } +} + +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + +func resolveAWSRetryMode(cfg aws.Config, o *Options) { + if len(cfg.RetryMode) == 0 { + return + } + o.RetryMode = cfg.RetryMode +} +func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) { + if cfg.RetryMaxAttempts == 0 { + return + } + o.RetryMaxAttempts = cfg.RetryMaxAttempts +} + +func finalizeRetryMaxAttempts(o *Options) { + if o.RetryMaxAttempts == 0 { + return + } + + o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts) +} + +func finalizeOperationRetryMaxAttempts(o *Options, client Client) { + if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts { + return + } + + o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts) +} + +func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { + if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil { + return + } + o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions) +} + +func addClientUserAgent(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "bcmpricingcalculator", goModuleVersion) + if len(options.AppID) > 0 { + ua.AddSDKAgentKey(awsmiddleware.ApplicationIdentifier, options.AppID) + } + + return nil +} + +func getOrAddRequestUserAgent(stack *middleware.Stack) (*awsmiddleware.RequestUserAgent, error) { + id := (*awsmiddleware.RequestUserAgent)(nil).ID() + mw, ok := stack.Build.Get(id) + if !ok { + mw = awsmiddleware.NewRequestUserAgent() + if err := stack.Build.Add(mw, middleware.After); err != nil { + return nil, err + } + } + + ua, ok := mw.(*awsmiddleware.RequestUserAgent) + if !ok { + return nil, fmt.Errorf("%T for %s middleware did not match expected type", mw, id) + } + + return ua, nil +} + +type HTTPSignerV4 interface { + SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error +} + +func resolveHTTPSignerV4(o *Options) { + if o.HTTPSignerV4 != nil { + return + } + o.HTTPSignerV4 = newDefaultV4Signer(*o) +} + +func newDefaultV4Signer(o Options) *v4.Signer { + return v4.NewSigner(func(so *v4.SignerOptions) { + so.Logger = o.Logger + so.LogSigning = o.ClientLogMode.IsSigning() + }) +} + +func addClientRequestID(stack *middleware.Stack) error { + return stack.Build.Add(&awsmiddleware.ClientRequestID{}, middleware.After) +} + +func addComputeContentLength(stack *middleware.Stack) error { + return stack.Build.Add(&smithyhttp.ComputeContentLength{}, middleware.After) +} + +func addRawResponseToMetadata(stack *middleware.Stack) error { + return stack.Deserialize.Add(&awsmiddleware.AddRawResponse{}, middleware.Before) +} + +func addRecordResponseTiming(stack *middleware.Stack) error { + return stack.Deserialize.Add(&awsmiddleware.RecordResponseTiming{}, middleware.After) +} + +func addSpanRetryLoop(stack *middleware.Stack, options Options) error { + return stack.Finalize.Insert(&spanRetryLoop{options: options}, "Retry", middleware.Before) +} + +type spanRetryLoop struct { + options Options +} + +func (*spanRetryLoop) ID() string { + return "spanRetryLoop" +} + +func (m *spanRetryLoop) HandleFinalize( + ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, +) ( + middleware.FinalizeOutput, middleware.Metadata, error, +) { + tracer := operationTracer(m.options.TracerProvider) + ctx, span := tracer.StartSpan(ctx, "RetryLoop") + defer span.End() + + return next.HandleFinalize(ctx, in) +} +func addStreamingEventsPayload(stack *middleware.Stack) error { + return stack.Finalize.Add(&v4.StreamingEventsPayload{}, middleware.Before) +} + +func addUnsignedPayload(stack *middleware.Stack) error { + return stack.Finalize.Insert(&v4.UnsignedPayload{}, "ResolveEndpointV2", middleware.After) +} + +func addComputePayloadSHA256(stack *middleware.Stack) error { + return stack.Finalize.Insert(&v4.ComputePayloadSHA256{}, "ResolveEndpointV2", middleware.After) +} + +func addContentSHA256Header(stack *middleware.Stack) error { + return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) +} + +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + +func resolveIdempotencyTokenProvider(o *Options) { + if o.IdempotencyTokenProvider != nil { + return + } + o.IdempotencyTokenProvider = smithyrand.NewUUIDIdempotencyToken(cryptorand.Reader) +} + +func addRetry(stack *middleware.Stack, o Options) error { + attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { + m.LogAttempts = o.ClientLogMode.IsRetries() + m.OperationMeter = o.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/bcmpricingcalculator") + }) + if err := stack.Finalize.Insert(attempt, "Signing", middleware.Before); err != nil { + return err + } + if err := stack.Finalize.Insert(&retry.MetricsHeader{}, attempt.ID(), middleware.After); err != nil { + return err + } + return nil +} + +// resolves dual-stack endpoint configuration +func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error { + if len(cfg.ConfigSources) == 0 { + return nil + } + value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources) + if err != nil { + return err + } + if found { + o.EndpointOptions.UseDualStackEndpoint = value + } + return nil +} + +// resolves FIPS endpoint configuration +func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { + if len(cfg.ConfigSources) == 0 { + return nil + } + value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources) + if err != nil { + return err + } + if found { + o.EndpointOptions.UseFIPSEndpoint = value + } + return nil +} + +func resolveAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) *string { + if mode == aws.AccountIDEndpointModeDisabled { + return nil + } + + if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); ok && ca.Credentials.AccountID != "" { + return aws.String(ca.Credentials.AccountID) + } + + return nil +} + +func addTimeOffsetBuild(stack *middleware.Stack, c *Client) error { + mw := internalmiddleware.AddTimeOffsetMiddleware{Offset: c.timeOffset} + if err := stack.Build.Add(&mw, middleware.After); err != nil { + return err + } + return stack.Deserialize.Insert(&mw, "RecordResponseTiming", middleware.Before) +} +func initializeTimeOffsetResolver(c *Client) { + c.timeOffset = new(atomic.Int64) +} + +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + +func resolveTracerProvider(options *Options) { + if options.TracerProvider == nil { + options.TracerProvider = &tracing.NopTracerProvider{} + } +} + +func resolveMeterProvider(options *Options) { + if options.MeterProvider == nil { + options.MeterProvider = metrics.NopMeterProvider{} + } +} + +// IdempotencyTokenProvider interface for providing idempotency token +type IdempotencyTokenProvider interface { + GetIdempotencyToken() (string, error) +} + +func addRecursionDetection(stack *middleware.Stack) error { + return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) +} + +func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { + return stack.Deserialize.Insert(&awsmiddleware.RequestIDRetriever{}, "OperationDeserializer", middleware.Before) + +} + +func addResponseErrorMiddleware(stack *middleware.Stack) error { + return stack.Deserialize.Insert(&awshttp.ResponseErrorWrapper{}, "RequestIDRetriever", middleware.Before) + +} + +func addRequestResponseLogging(stack *middleware.Stack, o Options) error { + return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{ + LogRequest: o.ClientLogMode.IsRequest(), + LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(), + LogResponse: o.ClientLogMode.IsResponse(), + LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(), + }, middleware.After) +} + +type disableHTTPSMiddleware struct { + DisableHTTPS bool +} + +func (*disableHTTPSMiddleware) ID() string { + return "disableHTTPS" +} + +func (m *disableHTTPSMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.DisableHTTPS && !smithyhttp.GetHostnameImmutable(ctx) { + req.URL.Scheme = "http" + } + + return next.HandleFinalize(ctx, in) +} + +func addDisableHTTPSMiddleware(stack *middleware.Stack, o Options) error { + return stack.Finalize.Insert(&disableHTTPSMiddleware{ + DisableHTTPS: o.EndpointOptions.DisableHTTPS, + }, "ResolveEndpointV2", middleware.After) +} + +type spanInitializeStart struct { +} + +func (*spanInitializeStart) ID() string { + return "spanInitializeStart" +} + +func (m *spanInitializeStart) HandleInitialize( + ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, +) ( + middleware.InitializeOutput, middleware.Metadata, error, +) { + ctx, _ = tracing.StartSpan(ctx, "Initialize") + + return next.HandleInitialize(ctx, in) +} + +type spanInitializeEnd struct { +} + +func (*spanInitializeEnd) ID() string { + return "spanInitializeEnd" +} + +func (m *spanInitializeEnd) HandleInitialize( + ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, +) ( + middleware.InitializeOutput, middleware.Metadata, error, +) { + ctx, span := tracing.PopSpan(ctx) + span.End() + + return next.HandleInitialize(ctx, in) +} + +type spanBuildRequestStart struct { +} + +func (*spanBuildRequestStart) ID() string { + return "spanBuildRequestStart" +} + +func (m *spanBuildRequestStart) HandleSerialize( + ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler, +) ( + middleware.SerializeOutput, middleware.Metadata, error, +) { + ctx, _ = tracing.StartSpan(ctx, "BuildRequest") + + return next.HandleSerialize(ctx, in) +} + +type spanBuildRequestEnd struct { +} + +func (*spanBuildRequestEnd) ID() string { + return "spanBuildRequestEnd" +} + +func (m *spanBuildRequestEnd) HandleBuild( + ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler, +) ( + middleware.BuildOutput, middleware.Metadata, error, +) { + ctx, span := tracing.PopSpan(ctx) + span.End() + + return next.HandleBuild(ctx, in) +} + +func addSpanInitializeStart(stack *middleware.Stack) error { + return stack.Initialize.Add(&spanInitializeStart{}, middleware.Before) +} + +func addSpanInitializeEnd(stack *middleware.Stack) error { + return stack.Initialize.Add(&spanInitializeEnd{}, middleware.After) +} + +func addSpanBuildRequestStart(stack *middleware.Stack) error { + return stack.Serialize.Add(&spanBuildRequestStart{}, middleware.Before) +} + +func addSpanBuildRequestEnd(stack *middleware.Stack) error { + return stack.Build.Add(&spanBuildRequestEnd{}, middleware.After) +} diff --git a/service/bcmpricingcalculator/api_client_test.go b/service/bcmpricingcalculator/api_client_test.go new file mode 100644 index 00000000000..6c0effe8f6d --- /dev/null +++ b/service/bcmpricingcalculator/api_client_test.go @@ -0,0 +1,127 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bcmpricingcalculator + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "io/ioutil" + "net/http" + "strings" + "testing" +) + +func TestClient_resolveRetryOptions(t *testing.T) { + nopClient := smithyhttp.ClientDoFunc(func(_ *http.Request) (*http.Response, error) { + return &http.Response{ + StatusCode: 200, + Header: http.Header{}, + Body: ioutil.NopCloser(strings.NewReader("")), + }, nil + }) + + cases := map[string]struct { + defaultsMode aws.DefaultsMode + retryer aws.Retryer + retryMaxAttempts int + opRetryMaxAttempts *int + retryMode aws.RetryMode + expectClientRetryMode aws.RetryMode + expectClientMaxAttempts int + expectOpMaxAttempts int + }{ + "defaults": { + defaultsMode: aws.DefaultsModeStandard, + expectClientRetryMode: aws.RetryModeStandard, + expectClientMaxAttempts: 3, + expectOpMaxAttempts: 3, + }, + "custom default retry": { + retryMode: aws.RetryModeAdaptive, + retryMaxAttempts: 10, + expectClientRetryMode: aws.RetryModeAdaptive, + expectClientMaxAttempts: 10, + expectOpMaxAttempts: 10, + }, + "custom op max attempts": { + retryMode: aws.RetryModeAdaptive, + retryMaxAttempts: 10, + opRetryMaxAttempts: aws.Int(2), + expectClientRetryMode: aws.RetryModeAdaptive, + expectClientMaxAttempts: 10, + expectOpMaxAttempts: 2, + }, + "custom op no change max attempts": { + retryMode: aws.RetryModeAdaptive, + retryMaxAttempts: 10, + opRetryMaxAttempts: aws.Int(10), + expectClientRetryMode: aws.RetryModeAdaptive, + expectClientMaxAttempts: 10, + expectOpMaxAttempts: 10, + }, + "custom op 0 max attempts": { + retryMode: aws.RetryModeAdaptive, + retryMaxAttempts: 10, + opRetryMaxAttempts: aws.Int(0), + expectClientRetryMode: aws.RetryModeAdaptive, + expectClientMaxAttempts: 10, + expectOpMaxAttempts: 10, + }, + } + + for name, c := range cases { + t.Run(name, func(t *testing.T) { + client := NewFromConfig(aws.Config{ + DefaultsMode: c.defaultsMode, + Retryer: func() func() aws.Retryer { + if c.retryer == nil { + return nil + } + + return func() aws.Retryer { return c.retryer } + }(), + HTTPClient: nopClient, + RetryMaxAttempts: c.retryMaxAttempts, + RetryMode: c.retryMode, + }, func(o *Options) { + if o.Retryer == nil { + t.Errorf("retryer must not be nil in functional options") + } + }) + + if e, a := c.expectClientRetryMode, client.options.RetryMode; e != a { + t.Errorf("expect %v retry mode, got %v", e, a) + } + if e, a := c.expectClientMaxAttempts, client.options.Retryer.MaxAttempts(); e != a { + t.Errorf("expect %v max attempts, got %v", e, a) + } + + _, _, err := client.invokeOperation(context.Background(), "mockOperation", struct{}{}, + []func(*Options){ + func(o *Options) { + if c.opRetryMaxAttempts == nil { + return + } + o.RetryMaxAttempts = *c.opRetryMaxAttempts + }, + }, + func(s *middleware.Stack, o Options) error { + s.Initialize.Clear() + s.Serialize.Clear() + s.Build.Clear() + s.Finalize.Clear() + s.Deserialize.Clear() + + if e, a := c.expectOpMaxAttempts, o.Retryer.MaxAttempts(); e != a { + t.Errorf("expect %v op max attempts, got %v", e, a) + } + return nil + }) + if err != nil { + t.Fatalf("expect no operation error, got %v", err) + } + }) + } +} diff --git a/service/bcmpricingcalculator/api_op_BatchCreateBillScenarioCommitmentModification.go b/service/bcmpricingcalculator/api_op_BatchCreateBillScenarioCommitmentModification.go new file mode 100644 index 00000000000..655d6579b1b --- /dev/null +++ b/service/bcmpricingcalculator/api_op_BatchCreateBillScenarioCommitmentModification.go @@ -0,0 +1,210 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bcmpricingcalculator + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/bcmpricingcalculator/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Create Compute Savings Plans, EC2 Instance Savings Plans, or EC2 Reserved +// +// Instances commitments that you want to model in a Bill Scenario. +func (c *Client) BatchCreateBillScenarioCommitmentModification(ctx context.Context, params *BatchCreateBillScenarioCommitmentModificationInput, optFns ...func(*Options)) (*BatchCreateBillScenarioCommitmentModificationOutput, error) { + if params == nil { + params = &BatchCreateBillScenarioCommitmentModificationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "BatchCreateBillScenarioCommitmentModification", params, optFns, c.addOperationBatchCreateBillScenarioCommitmentModificationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*BatchCreateBillScenarioCommitmentModificationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type BatchCreateBillScenarioCommitmentModificationInput struct { + + // The ID of the Bill Scenario for which you want to create the modeled + // commitment. + // + // This member is required. + BillScenarioId *string + + // List of commitments that you want to model in the Bill Scenario. + // + // This member is required. + CommitmentModifications []types.BatchCreateBillScenarioCommitmentModificationEntry + + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. + ClientToken *string + + noSmithyDocumentSerde +} + +type BatchCreateBillScenarioCommitmentModificationOutput struct { + + // Returns the list of errors reason and the commitment item keys that cannot be + // created in the Bill Scenario. + Errors []types.BatchCreateBillScenarioCommitmentModificationError + + // Returns the list of successful commitment line items that were created for the + // Bill Scenario. + Items []types.BatchCreateBillScenarioCommitmentModificationItem + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationBatchCreateBillScenarioCommitmentModificationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpBatchCreateBillScenarioCommitmentModification{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpBatchCreateBillScenarioCommitmentModification{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "BatchCreateBillScenarioCommitmentModification"); 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_opBatchCreateBillScenarioCommitmentModificationMiddleware(stack, options); err != nil { + return err + } + if err = addOpBatchCreateBillScenarioCommitmentModificationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchCreateBillScenarioCommitmentModification(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_initializeOpBatchCreateBillScenarioCommitmentModification struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpBatchCreateBillScenarioCommitmentModification) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpBatchCreateBillScenarioCommitmentModification) 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.(*BatchCreateBillScenarioCommitmentModificationInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *BatchCreateBillScenarioCommitmentModificationInput ") + } + + 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_opBatchCreateBillScenarioCommitmentModificationMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpBatchCreateBillScenarioCommitmentModification{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opBatchCreateBillScenarioCommitmentModification(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "BatchCreateBillScenarioCommitmentModification", + } +} diff --git a/service/bcmpricingcalculator/api_op_BatchCreateBillScenarioUsageModification.go b/service/bcmpricingcalculator/api_op_BatchCreateBillScenarioUsageModification.go new file mode 100644 index 00000000000..1f94c4562ad --- /dev/null +++ b/service/bcmpricingcalculator/api_op_BatchCreateBillScenarioUsageModification.go @@ -0,0 +1,209 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bcmpricingcalculator + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/bcmpricingcalculator/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Create Amazon Web Services service usage that you want to model in a Bill +// +// Scenario. +func (c *Client) BatchCreateBillScenarioUsageModification(ctx context.Context, params *BatchCreateBillScenarioUsageModificationInput, optFns ...func(*Options)) (*BatchCreateBillScenarioUsageModificationOutput, error) { + if params == nil { + params = &BatchCreateBillScenarioUsageModificationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "BatchCreateBillScenarioUsageModification", params, optFns, c.addOperationBatchCreateBillScenarioUsageModificationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*BatchCreateBillScenarioUsageModificationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type BatchCreateBillScenarioUsageModificationInput struct { + + // The ID of the Bill Scenario for which you want to create the modeled usage. + // + // This member is required. + BillScenarioId *string + + // List of usage that you want to model in the Bill Scenario. + // + // This member is required. + UsageModifications []types.BatchCreateBillScenarioUsageModificationEntry + + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. + ClientToken *string + + noSmithyDocumentSerde +} + +type BatchCreateBillScenarioUsageModificationOutput struct { + + // Returns the list of errors reason and the usage item keys that cannot be + // created in the Bill Scenario. + Errors []types.BatchCreateBillScenarioUsageModificationError + + // Returns the list of successful usage line items that were created for the Bill + // Scenario. + Items []types.BatchCreateBillScenarioUsageModificationItem + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationBatchCreateBillScenarioUsageModificationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpBatchCreateBillScenarioUsageModification{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpBatchCreateBillScenarioUsageModification{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "BatchCreateBillScenarioUsageModification"); 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_opBatchCreateBillScenarioUsageModificationMiddleware(stack, options); err != nil { + return err + } + if err = addOpBatchCreateBillScenarioUsageModificationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchCreateBillScenarioUsageModification(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_initializeOpBatchCreateBillScenarioUsageModification struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpBatchCreateBillScenarioUsageModification) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpBatchCreateBillScenarioUsageModification) 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.(*BatchCreateBillScenarioUsageModificationInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *BatchCreateBillScenarioUsageModificationInput ") + } + + 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_opBatchCreateBillScenarioUsageModificationMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpBatchCreateBillScenarioUsageModification{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opBatchCreateBillScenarioUsageModification(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "BatchCreateBillScenarioUsageModification", + } +} diff --git a/service/bcmpricingcalculator/api_op_BatchCreateWorkloadEstimateUsage.go b/service/bcmpricingcalculator/api_op_BatchCreateWorkloadEstimateUsage.go new file mode 100644 index 00000000000..c0240f90194 --- /dev/null +++ b/service/bcmpricingcalculator/api_op_BatchCreateWorkloadEstimateUsage.go @@ -0,0 +1,210 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bcmpricingcalculator + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/bcmpricingcalculator/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Create Amazon Web Services service usage that you want to model in a Workload +// +// Estimate. +func (c *Client) BatchCreateWorkloadEstimateUsage(ctx context.Context, params *BatchCreateWorkloadEstimateUsageInput, optFns ...func(*Options)) (*BatchCreateWorkloadEstimateUsageOutput, error) { + if params == nil { + params = &BatchCreateWorkloadEstimateUsageInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "BatchCreateWorkloadEstimateUsage", params, optFns, c.addOperationBatchCreateWorkloadEstimateUsageMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*BatchCreateWorkloadEstimateUsageOutput) + out.ResultMetadata = metadata + return out, nil +} + +type BatchCreateWorkloadEstimateUsageInput struct { + + // List of usage that you want to model in the Workload estimate. + // + // This member is required. + Usage []types.BatchCreateWorkloadEstimateUsageEntry + + // The ID of the Workload estimate for which you want to create the modeled + // usage. + // + // This member is required. + WorkloadEstimateId *string + + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. + ClientToken *string + + noSmithyDocumentSerde +} + +type BatchCreateWorkloadEstimateUsageOutput struct { + + // Returns the list of errors reason and the usage item keys that cannot be + // created in the Workload estimate. + Errors []types.BatchCreateWorkloadEstimateUsageError + + // Returns the list of successful usage line items that were created for the + // Workload estimate. + Items []types.BatchCreateWorkloadEstimateUsageItem + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationBatchCreateWorkloadEstimateUsageMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpBatchCreateWorkloadEstimateUsage{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpBatchCreateWorkloadEstimateUsage{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "BatchCreateWorkloadEstimateUsage"); 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_opBatchCreateWorkloadEstimateUsageMiddleware(stack, options); err != nil { + return err + } + if err = addOpBatchCreateWorkloadEstimateUsageValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchCreateWorkloadEstimateUsage(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_initializeOpBatchCreateWorkloadEstimateUsage struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpBatchCreateWorkloadEstimateUsage) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpBatchCreateWorkloadEstimateUsage) 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.(*BatchCreateWorkloadEstimateUsageInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *BatchCreateWorkloadEstimateUsageInput ") + } + + 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_opBatchCreateWorkloadEstimateUsageMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpBatchCreateWorkloadEstimateUsage{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opBatchCreateWorkloadEstimateUsage(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "BatchCreateWorkloadEstimateUsage", + } +} diff --git a/service/bcmpricingcalculator/api_op_BatchDeleteBillScenarioCommitmentModification.go b/service/bcmpricingcalculator/api_op_BatchDeleteBillScenarioCommitmentModification.go new file mode 100644 index 00000000000..cd346528ece --- /dev/null +++ b/service/bcmpricingcalculator/api_op_BatchDeleteBillScenarioCommitmentModification.go @@ -0,0 +1,171 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bcmpricingcalculator + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/bcmpricingcalculator/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Delete commitment that you have created in a Bill Scenario. You can only +// +// delete a commitment that you had added and cannot model deletion (or removal) of +// a existing commitment. If you want model deletion of an existing commitment, see +// the negate [BillScenarioCommitmentModificationAction]of [BatchCreateBillScenarioCommitmentModification] operation. +// +// [BillScenarioCommitmentModificationAction]: https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_AWSBCMPricingCalculator_BillScenarioCommitmentModificationAction.html +// [BatchCreateBillScenarioCommitmentModification]: https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_AWSBCMPricingCalculator_BatchCreateBillScenarioUsageModification.html +func (c *Client) BatchDeleteBillScenarioCommitmentModification(ctx context.Context, params *BatchDeleteBillScenarioCommitmentModificationInput, optFns ...func(*Options)) (*BatchDeleteBillScenarioCommitmentModificationOutput, error) { + if params == nil { + params = &BatchDeleteBillScenarioCommitmentModificationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "BatchDeleteBillScenarioCommitmentModification", params, optFns, c.addOperationBatchDeleteBillScenarioCommitmentModificationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*BatchDeleteBillScenarioCommitmentModificationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type BatchDeleteBillScenarioCommitmentModificationInput struct { + + // The ID of the Bill Scenario for which you want to delete the modeled + // commitment. + // + // This member is required. + BillScenarioId *string + + // List of commitments that you want to delete from the Bill Scenario. + // + // This member is required. + Ids []string + + noSmithyDocumentSerde +} + +type BatchDeleteBillScenarioCommitmentModificationOutput struct { + + // Returns the list of errors reason and the commitment item keys that cannot be + // deleted from the Bill Scenario. + Errors []types.BatchDeleteBillScenarioCommitmentModificationError + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationBatchDeleteBillScenarioCommitmentModificationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpBatchDeleteBillScenarioCommitmentModification{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpBatchDeleteBillScenarioCommitmentModification{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "BatchDeleteBillScenarioCommitmentModification"); 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 = addOpBatchDeleteBillScenarioCommitmentModificationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchDeleteBillScenarioCommitmentModification(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_opBatchDeleteBillScenarioCommitmentModification(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "BatchDeleteBillScenarioCommitmentModification", + } +} diff --git a/service/bcmpricingcalculator/api_op_BatchDeleteBillScenarioUsageModification.go b/service/bcmpricingcalculator/api_op_BatchDeleteBillScenarioUsageModification.go new file mode 100644 index 00000000000..64d1d85ca2b --- /dev/null +++ b/service/bcmpricingcalculator/api_op_BatchDeleteBillScenarioUsageModification.go @@ -0,0 +1,168 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bcmpricingcalculator + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/bcmpricingcalculator/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Delete usage that you have created in a Bill Scenario. You can only delete +// +// usage that you had added and cannot model deletion (or removal) of a existing +// usage. If you want model removal of an existing usage, see [BatchUpdateBillScenarioUsageModification]. +// +// [BatchUpdateBillScenarioUsageModification]: https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_AWSBCMPricingCalculator_BatchUpdateBillScenarioUsageModification.html +func (c *Client) BatchDeleteBillScenarioUsageModification(ctx context.Context, params *BatchDeleteBillScenarioUsageModificationInput, optFns ...func(*Options)) (*BatchDeleteBillScenarioUsageModificationOutput, error) { + if params == nil { + params = &BatchDeleteBillScenarioUsageModificationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "BatchDeleteBillScenarioUsageModification", params, optFns, c.addOperationBatchDeleteBillScenarioUsageModificationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*BatchDeleteBillScenarioUsageModificationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type BatchDeleteBillScenarioUsageModificationInput struct { + + // The ID of the Bill Scenario for which you want to delete the modeled usage. + // + // This member is required. + BillScenarioId *string + + // List of usage that you want to delete from the Bill Scenario. + // + // This member is required. + Ids []string + + noSmithyDocumentSerde +} + +type BatchDeleteBillScenarioUsageModificationOutput struct { + + // Returns the list of errors reason and the usage item keys that cannot be + // deleted from the Bill Scenario. + Errors []types.BatchDeleteBillScenarioUsageModificationError + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationBatchDeleteBillScenarioUsageModificationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpBatchDeleteBillScenarioUsageModification{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpBatchDeleteBillScenarioUsageModification{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "BatchDeleteBillScenarioUsageModification"); 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 = addOpBatchDeleteBillScenarioUsageModificationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchDeleteBillScenarioUsageModification(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_opBatchDeleteBillScenarioUsageModification(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "BatchDeleteBillScenarioUsageModification", + } +} diff --git a/service/bcmpricingcalculator/api_op_BatchDeleteWorkloadEstimateUsage.go b/service/bcmpricingcalculator/api_op_BatchDeleteWorkloadEstimateUsage.go new file mode 100644 index 00000000000..a698faf9aaf --- /dev/null +++ b/service/bcmpricingcalculator/api_op_BatchDeleteWorkloadEstimateUsage.go @@ -0,0 +1,169 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bcmpricingcalculator + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/bcmpricingcalculator/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Delete usage that you have created in a Workload estimate. You can only delete +// +// usage that you had added and cannot model deletion (or removal) of a existing +// usage. If you want model removal of an existing usage, see [BatchUpdateWorkloadEstimateUsage]. +// +// [BatchUpdateWorkloadEstimateUsage]: https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_AWSBCMPricingCalculator_BatchUpdateWorkloadEstimateUsage.html +func (c *Client) BatchDeleteWorkloadEstimateUsage(ctx context.Context, params *BatchDeleteWorkloadEstimateUsageInput, optFns ...func(*Options)) (*BatchDeleteWorkloadEstimateUsageOutput, error) { + if params == nil { + params = &BatchDeleteWorkloadEstimateUsageInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "BatchDeleteWorkloadEstimateUsage", params, optFns, c.addOperationBatchDeleteWorkloadEstimateUsageMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*BatchDeleteWorkloadEstimateUsageOutput) + out.ResultMetadata = metadata + return out, nil +} + +type BatchDeleteWorkloadEstimateUsageInput struct { + + // List of usage that you want to delete from the Workload estimate. + // + // This member is required. + Ids []string + + // The ID of the Workload estimate for which you want to delete the modeled + // usage. + // + // This member is required. + WorkloadEstimateId *string + + noSmithyDocumentSerde +} + +type BatchDeleteWorkloadEstimateUsageOutput struct { + + // Returns the list of errors reason and the usage item keys that cannot be + // deleted from the Workload estimate. + Errors []types.BatchDeleteWorkloadEstimateUsageError + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationBatchDeleteWorkloadEstimateUsageMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpBatchDeleteWorkloadEstimateUsage{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpBatchDeleteWorkloadEstimateUsage{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "BatchDeleteWorkloadEstimateUsage"); 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 = addOpBatchDeleteWorkloadEstimateUsageValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchDeleteWorkloadEstimateUsage(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_opBatchDeleteWorkloadEstimateUsage(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "BatchDeleteWorkloadEstimateUsage", + } +} diff --git a/service/bcmpricingcalculator/api_op_BatchUpdateBillScenarioCommitmentModification.go b/service/bcmpricingcalculator/api_op_BatchUpdateBillScenarioCommitmentModification.go new file mode 100644 index 00000000000..756e096c39c --- /dev/null +++ b/service/bcmpricingcalculator/api_op_BatchUpdateBillScenarioCommitmentModification.go @@ -0,0 +1,170 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bcmpricingcalculator + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/bcmpricingcalculator/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Update a newly added or existing commitment. You can update the commitment +// +// group based on a commitment ID and a Bill scenario ID. +func (c *Client) BatchUpdateBillScenarioCommitmentModification(ctx context.Context, params *BatchUpdateBillScenarioCommitmentModificationInput, optFns ...func(*Options)) (*BatchUpdateBillScenarioCommitmentModificationOutput, error) { + if params == nil { + params = &BatchUpdateBillScenarioCommitmentModificationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "BatchUpdateBillScenarioCommitmentModification", params, optFns, c.addOperationBatchUpdateBillScenarioCommitmentModificationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*BatchUpdateBillScenarioCommitmentModificationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type BatchUpdateBillScenarioCommitmentModificationInput struct { + + // The ID of the Bill Scenario for which you want to modify the commitment group + // of a modeled commitment. + // + // This member is required. + BillScenarioId *string + + // List of commitments that you want to update in a Bill Scenario. + // + // This member is required. + CommitmentModifications []types.BatchUpdateBillScenarioCommitmentModificationEntry + + noSmithyDocumentSerde +} + +type BatchUpdateBillScenarioCommitmentModificationOutput struct { + + // Returns the list of error reasons and commitment line item IDs that could not + // be updated for the Bill Scenario. + Errors []types.BatchUpdateBillScenarioCommitmentModificationError + + // Returns the list of successful commitment line items that were updated for a + // Bill Scenario. + Items []types.BillScenarioCommitmentModificationItem + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationBatchUpdateBillScenarioCommitmentModificationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpBatchUpdateBillScenarioCommitmentModification{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpBatchUpdateBillScenarioCommitmentModification{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "BatchUpdateBillScenarioCommitmentModification"); 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 = addOpBatchUpdateBillScenarioCommitmentModificationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchUpdateBillScenarioCommitmentModification(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_opBatchUpdateBillScenarioCommitmentModification(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "BatchUpdateBillScenarioCommitmentModification", + } +} diff --git a/service/bcmpricingcalculator/api_op_BatchUpdateBillScenarioUsageModification.go b/service/bcmpricingcalculator/api_op_BatchUpdateBillScenarioUsageModification.go new file mode 100644 index 00000000000..66259fbffb6 --- /dev/null +++ b/service/bcmpricingcalculator/api_op_BatchUpdateBillScenarioUsageModification.go @@ -0,0 +1,170 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bcmpricingcalculator + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/bcmpricingcalculator/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Update a newly added or existing usage lines. You can update the usage +// +// amounts, usage hour, and usage group based on a usage ID and a Bill scenario ID. +func (c *Client) BatchUpdateBillScenarioUsageModification(ctx context.Context, params *BatchUpdateBillScenarioUsageModificationInput, optFns ...func(*Options)) (*BatchUpdateBillScenarioUsageModificationOutput, error) { + if params == nil { + params = &BatchUpdateBillScenarioUsageModificationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "BatchUpdateBillScenarioUsageModification", params, optFns, c.addOperationBatchUpdateBillScenarioUsageModificationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*BatchUpdateBillScenarioUsageModificationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type BatchUpdateBillScenarioUsageModificationInput struct { + + // The ID of the Bill Scenario for which you want to modify the usage lines. + // + // This member is required. + BillScenarioId *string + + // List of usage lines that you want to update in a Bill Scenario identified by + // the usage ID. + // + // This member is required. + UsageModifications []types.BatchUpdateBillScenarioUsageModificationEntry + + noSmithyDocumentSerde +} + +type BatchUpdateBillScenarioUsageModificationOutput struct { + + // Returns the list of error reasons and usage line item IDs that could not be + // updated for the Bill Scenario. + Errors []types.BatchUpdateBillScenarioUsageModificationError + + // Returns the list of successful usage line items that were updated for a Bill + // Scenario. + Items []types.BillScenarioUsageModificationItem + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationBatchUpdateBillScenarioUsageModificationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpBatchUpdateBillScenarioUsageModification{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpBatchUpdateBillScenarioUsageModification{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "BatchUpdateBillScenarioUsageModification"); 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 = addOpBatchUpdateBillScenarioUsageModificationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchUpdateBillScenarioUsageModification(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_opBatchUpdateBillScenarioUsageModification(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "BatchUpdateBillScenarioUsageModification", + } +} diff --git a/service/bcmpricingcalculator/api_op_BatchUpdateWorkloadEstimateUsage.go b/service/bcmpricingcalculator/api_op_BatchUpdateWorkloadEstimateUsage.go new file mode 100644 index 00000000000..d2a32d73cc0 --- /dev/null +++ b/service/bcmpricingcalculator/api_op_BatchUpdateWorkloadEstimateUsage.go @@ -0,0 +1,170 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bcmpricingcalculator + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/bcmpricingcalculator/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Update a newly added or existing usage lines. You can update the usage amounts +// +// and usage group based on a usage ID and a Workload estimate ID. +func (c *Client) BatchUpdateWorkloadEstimateUsage(ctx context.Context, params *BatchUpdateWorkloadEstimateUsageInput, optFns ...func(*Options)) (*BatchUpdateWorkloadEstimateUsageOutput, error) { + if params == nil { + params = &BatchUpdateWorkloadEstimateUsageInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "BatchUpdateWorkloadEstimateUsage", params, optFns, c.addOperationBatchUpdateWorkloadEstimateUsageMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*BatchUpdateWorkloadEstimateUsageOutput) + out.ResultMetadata = metadata + return out, nil +} + +type BatchUpdateWorkloadEstimateUsageInput struct { + + // List of usage line amounts and usage group that you want to update in a + // Workload estimate identified by the usage ID. + // + // This member is required. + Usage []types.BatchUpdateWorkloadEstimateUsageEntry + + // The ID of the Workload estimate for which you want to modify the usage lines. + // + // This member is required. + WorkloadEstimateId *string + + noSmithyDocumentSerde +} + +type BatchUpdateWorkloadEstimateUsageOutput struct { + + // Returns the list of error reasons and usage line item IDs that could not be + // updated for the Workload estimate. + Errors []types.BatchUpdateWorkloadEstimateUsageError + + // Returns the list of successful usage line items that were updated for a + // Workload estimate. + Items []types.WorkloadEstimateUsageItem + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationBatchUpdateWorkloadEstimateUsageMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpBatchUpdateWorkloadEstimateUsage{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpBatchUpdateWorkloadEstimateUsage{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "BatchUpdateWorkloadEstimateUsage"); 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 = addOpBatchUpdateWorkloadEstimateUsageValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchUpdateWorkloadEstimateUsage(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_opBatchUpdateWorkloadEstimateUsage(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "BatchUpdateWorkloadEstimateUsage", + } +} diff --git a/service/bcmpricingcalculator/api_op_CreateBillEstimate.go b/service/bcmpricingcalculator/api_op_CreateBillEstimate.go new file mode 100644 index 00000000000..9b535efe2dd --- /dev/null +++ b/service/bcmpricingcalculator/api_op_CreateBillEstimate.go @@ -0,0 +1,270 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bcmpricingcalculator + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/bcmpricingcalculator/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Create a Bill estimate from a Bill scenario. In the Bill scenario you can +// +// model usage addition, usage changes, and usage removal. You can also model +// commitment addition and commitment removal. After all changes in a Bill scenario +// is made satisfactorily, you can call this API with a Bill scenario ID to +// generate the Bill estimate. Bill estimate calculates the pre-tax cost for your +// consolidated billing family, incorporating all modeled usage and commitments +// alongside existing usage and commitments from your most recent completed +// anniversary bill, with any applicable discounts applied. +func (c *Client) CreateBillEstimate(ctx context.Context, params *CreateBillEstimateInput, optFns ...func(*Options)) (*CreateBillEstimateOutput, error) { + if params == nil { + params = &CreateBillEstimateInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateBillEstimate", params, optFns, c.addOperationCreateBillEstimateMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateBillEstimateOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateBillEstimateInput struct { + + // The ID of the Bill Scenario for which you want to create a Bill estimate. + // + // This member is required. + BillScenarioId *string + + // The name of the Bill estimate that will be created. Names must be unique for + // an account. + // + // This member is required. + Name *string + + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. + ClientToken *string + + // An optional list of tags to associate with the specified BillEstimate. You can + // use resource tags to control access to your BillEstimate using IAM policies. + // Each tag consists of a key and a value, and each key must be unique for the + // resource. The following restrictions apply to resource tags: + // + // - Although the maximum number of array members is 200, you can assign a + // maximum of 50 user-tags to one resource. The remaining are reserved for Amazon + // Web Services. + // + // - The maximum length of a key is 128 characters. + // + // - The maximum length of a value is 256 characters. + // + // - Keys and values can only contain alphanumeric characters, spaces, and any + // of the following: _.:/=+@- . + // + // - Keys and values are case sensitive. + // + // - Keys and values are trimmed for any leading or trailing whitespaces. + // + // - Don't use aws: as a prefix for your keys. This prefix is reserved for Amazon + // Web Services. + Tags map[string]string + + noSmithyDocumentSerde +} + +type CreateBillEstimateOutput struct { + + // The unique identifier of your newly created Bill estimate. + // + // This member is required. + Id *string + + // The bill month start and end timestamp that was used to create the Bill + // estimate. This is set to the last complete anniversary bill month start and end + // timestamp. + BillInterval *types.BillInterval + + // Returns summary-level cost information once a Bill estimate is successfully + // generated. This summary includes: 1) the total cost difference, showing the + // pre-tax cost change for the consolidated billing family between the completed + // anniversary bill and the estimated bill, and 2) total cost differences per + // service, detailing the pre-tax cost of each service, comparing the completed + // anniversary bill to the estimated bill on a per-service basis. + CostSummary *types.BillEstimateCostSummary + + // The timestamp of when the Bill estimate create process was started (not when + // it successfully completed or failed). + CreatedAt *time.Time + + // The timestamp of when the Bill estimate will expire. A Bill estimate becomes + // inaccessible after expiration. + ExpiresAt *time.Time + + // This attribute provides the reason if a Bill estimate result generation fails. + FailureMessage *string + + // The name of your newly created Bill estimate. + Name *string + + // The status of your newly created Bill estimate. Bill estimate creation can + // take anywhere between 8 to 12 hours. The status will allow you to identify when + // the Bill estimate is complete or has failed. + Status types.BillEstimateStatus + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateBillEstimateMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpCreateBillEstimate{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpCreateBillEstimate{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateBillEstimate"); 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_opCreateBillEstimateMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateBillEstimateValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateBillEstimate(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_initializeOpCreateBillEstimate struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateBillEstimate) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateBillEstimate) 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.(*CreateBillEstimateInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateBillEstimateInput ") + } + + 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_opCreateBillEstimateMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateBillEstimate{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateBillEstimate(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateBillEstimate", + } +} diff --git a/service/bcmpricingcalculator/api_op_CreateBillScenario.go b/service/bcmpricingcalculator/api_op_CreateBillScenario.go new file mode 100644 index 00000000000..aa0bbe5efa9 --- /dev/null +++ b/service/bcmpricingcalculator/api_op_CreateBillScenario.go @@ -0,0 +1,222 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bcmpricingcalculator + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/bcmpricingcalculator/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Creates a new bill scenario to model potential changes to Amazon Web Services +// +// usage and costs. +func (c *Client) CreateBillScenario(ctx context.Context, params *CreateBillScenarioInput, optFns ...func(*Options)) (*CreateBillScenarioOutput, error) { + if params == nil { + params = &CreateBillScenarioInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateBillScenario", params, optFns, c.addOperationCreateBillScenarioMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateBillScenarioOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateBillScenarioInput struct { + + // A descriptive name for the bill scenario. + // + // This member is required. + Name *string + + // A unique, case-sensitive identifier to ensure idempotency of the request. + ClientToken *string + + // The tags to apply to the bill scenario. + Tags map[string]string + + noSmithyDocumentSerde +} + +type CreateBillScenarioOutput struct { + + // The unique identifier for the created bill scenario. + // + // This member is required. + Id *string + + // The time period covered by the bill scenario. + BillInterval *types.BillInterval + + // The timestamp when the bill scenario was created. + CreatedAt *time.Time + + // The timestamp when the bill scenario will expire. + ExpiresAt *time.Time + + // An error message if the bill scenario creation failed. + FailureMessage *string + + // The name of the created bill scenario. + Name *string + + // The current status of the bill scenario. + Status types.BillScenarioStatus + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateBillScenarioMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpCreateBillScenario{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpCreateBillScenario{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateBillScenario"); 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_opCreateBillScenarioMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateBillScenarioValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateBillScenario(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_initializeOpCreateBillScenario struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateBillScenario) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateBillScenario) 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.(*CreateBillScenarioInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateBillScenarioInput ") + } + + 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_opCreateBillScenarioMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateBillScenario{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateBillScenario(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateBillScenario", + } +} diff --git a/service/bcmpricingcalculator/api_op_CreateWorkloadEstimate.go b/service/bcmpricingcalculator/api_op_CreateWorkloadEstimate.go new file mode 100644 index 00000000000..21cee052282 --- /dev/null +++ b/service/bcmpricingcalculator/api_op_CreateWorkloadEstimate.go @@ -0,0 +1,233 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bcmpricingcalculator + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/bcmpricingcalculator/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Creates a new workload estimate to model costs for a specific workload. +func (c *Client) CreateWorkloadEstimate(ctx context.Context, params *CreateWorkloadEstimateInput, optFns ...func(*Options)) (*CreateWorkloadEstimateOutput, error) { + if params == nil { + params = &CreateWorkloadEstimateInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateWorkloadEstimate", params, optFns, c.addOperationCreateWorkloadEstimateMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateWorkloadEstimateOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateWorkloadEstimateInput struct { + + // A descriptive name for the workload estimate. + // + // This member is required. + Name *string + + // A unique, case-sensitive identifier to ensure idempotency of the request. + ClientToken *string + + // The type of pricing rates to use for the estimate. + RateType types.WorkloadEstimateRateType + + // The tags to apply to the workload estimate. + Tags map[string]string + + noSmithyDocumentSerde +} + +// Mixin for common fields returned by CRUD APIs +type CreateWorkloadEstimateOutput struct { + + // The unique identifier for the created workload estimate. + // + // This member is required. + Id *string + + // The currency of the estimated cost. + CostCurrency types.CurrencyCode + + // The timestamp when the workload estimate was created. + CreatedAt *time.Time + + // The timestamp when the workload estimate will expire. + ExpiresAt *time.Time + + // An error message if the workload estimate creation failed. + FailureMessage *string + + // The name of the created workload estimate. + Name *string + + // The timestamp of the pricing rates used for the estimate. + RateTimestamp *time.Time + + // The type of pricing rates used for the estimate. + RateType types.WorkloadEstimateRateType + + // The current status of the workload estimate. + Status types.WorkloadEstimateStatus + + // The total estimated cost for the workload. + TotalCost *float64 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateWorkloadEstimateMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpCreateWorkloadEstimate{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpCreateWorkloadEstimate{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateWorkloadEstimate"); 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_opCreateWorkloadEstimateMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateWorkloadEstimateValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateWorkloadEstimate(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_initializeOpCreateWorkloadEstimate struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateWorkloadEstimate) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateWorkloadEstimate) 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.(*CreateWorkloadEstimateInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateWorkloadEstimateInput ") + } + + 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_opCreateWorkloadEstimateMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateWorkloadEstimate{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateWorkloadEstimate(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateWorkloadEstimate", + } +} diff --git a/service/bcmpricingcalculator/api_op_DeleteBillEstimate.go b/service/bcmpricingcalculator/api_op_DeleteBillEstimate.go new file mode 100644 index 00000000000..24e7c9afc81 --- /dev/null +++ b/service/bcmpricingcalculator/api_op_DeleteBillEstimate.go @@ -0,0 +1,152 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bcmpricingcalculator + +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 existing bill estimate. +func (c *Client) DeleteBillEstimate(ctx context.Context, params *DeleteBillEstimateInput, optFns ...func(*Options)) (*DeleteBillEstimateOutput, error) { + if params == nil { + params = &DeleteBillEstimateInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteBillEstimate", params, optFns, c.addOperationDeleteBillEstimateMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteBillEstimateOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteBillEstimateInput struct { + + // The unique identifier of the bill estimate to delete. + // + // This member is required. + Identifier *string + + noSmithyDocumentSerde +} + +type DeleteBillEstimateOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteBillEstimateMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpDeleteBillEstimate{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpDeleteBillEstimate{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteBillEstimate"); 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 = addOpDeleteBillEstimateValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteBillEstimate(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_opDeleteBillEstimate(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteBillEstimate", + } +} diff --git a/service/bcmpricingcalculator/api_op_DeleteBillScenario.go b/service/bcmpricingcalculator/api_op_DeleteBillScenario.go new file mode 100644 index 00000000000..9c2f6304445 --- /dev/null +++ b/service/bcmpricingcalculator/api_op_DeleteBillScenario.go @@ -0,0 +1,152 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bcmpricingcalculator + +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 existing bill scenario. +func (c *Client) DeleteBillScenario(ctx context.Context, params *DeleteBillScenarioInput, optFns ...func(*Options)) (*DeleteBillScenarioOutput, error) { + if params == nil { + params = &DeleteBillScenarioInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteBillScenario", params, optFns, c.addOperationDeleteBillScenarioMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteBillScenarioOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteBillScenarioInput struct { + + // The unique identifier of the bill scenario to delete. + // + // This member is required. + Identifier *string + + noSmithyDocumentSerde +} + +type DeleteBillScenarioOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteBillScenarioMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpDeleteBillScenario{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpDeleteBillScenario{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteBillScenario"); 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 = addOpDeleteBillScenarioValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteBillScenario(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_opDeleteBillScenario(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteBillScenario", + } +} diff --git a/service/bcmpricingcalculator/api_op_DeleteWorkloadEstimate.go b/service/bcmpricingcalculator/api_op_DeleteWorkloadEstimate.go new file mode 100644 index 00000000000..cd4c14a1034 --- /dev/null +++ b/service/bcmpricingcalculator/api_op_DeleteWorkloadEstimate.go @@ -0,0 +1,152 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bcmpricingcalculator + +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 existing workload estimate. +func (c *Client) DeleteWorkloadEstimate(ctx context.Context, params *DeleteWorkloadEstimateInput, optFns ...func(*Options)) (*DeleteWorkloadEstimateOutput, error) { + if params == nil { + params = &DeleteWorkloadEstimateInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteWorkloadEstimate", params, optFns, c.addOperationDeleteWorkloadEstimateMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteWorkloadEstimateOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteWorkloadEstimateInput struct { + + // The unique identifier of the workload estimate to delete. + // + // This member is required. + Identifier *string + + noSmithyDocumentSerde +} + +type DeleteWorkloadEstimateOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteWorkloadEstimateMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpDeleteWorkloadEstimate{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpDeleteWorkloadEstimate{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteWorkloadEstimate"); 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 = addOpDeleteWorkloadEstimateValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteWorkloadEstimate(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_opDeleteWorkloadEstimate(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteWorkloadEstimate", + } +} diff --git a/service/bcmpricingcalculator/api_op_GetBillEstimate.go b/service/bcmpricingcalculator/api_op_GetBillEstimate.go new file mode 100644 index 00000000000..1f8886f09fa --- /dev/null +++ b/service/bcmpricingcalculator/api_op_GetBillEstimate.go @@ -0,0 +1,181 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bcmpricingcalculator + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/bcmpricingcalculator/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Retrieves details of a specific bill estimate. +func (c *Client) GetBillEstimate(ctx context.Context, params *GetBillEstimateInput, optFns ...func(*Options)) (*GetBillEstimateOutput, error) { + if params == nil { + params = &GetBillEstimateInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetBillEstimate", params, optFns, c.addOperationGetBillEstimateMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetBillEstimateOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetBillEstimateInput struct { + + // The unique identifier of the bill estimate to retrieve. + // + // This member is required. + Identifier *string + + noSmithyDocumentSerde +} + +type GetBillEstimateOutput struct { + + // The unique identifier of the retrieved bill estimate. + // + // This member is required. + Id *string + + // The time period covered by the bill estimate. + BillInterval *types.BillInterval + + // A summary of the estimated costs. + CostSummary *types.BillEstimateCostSummary + + // The timestamp when the bill estimate was created. + CreatedAt *time.Time + + // The timestamp when the bill estimate will expire. + ExpiresAt *time.Time + + // An error message if the bill estimate retrieval failed. + FailureMessage *string + + // The name of the retrieved bill estimate. + Name *string + + // The current status of the bill estimate. + Status types.BillEstimateStatus + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetBillEstimateMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpGetBillEstimate{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpGetBillEstimate{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetBillEstimate"); 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 = addOpGetBillEstimateValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetBillEstimate(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_opGetBillEstimate(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetBillEstimate", + } +} diff --git a/service/bcmpricingcalculator/api_op_GetBillScenario.go b/service/bcmpricingcalculator/api_op_GetBillScenario.go new file mode 100644 index 00000000000..0d929ea11a6 --- /dev/null +++ b/service/bcmpricingcalculator/api_op_GetBillScenario.go @@ -0,0 +1,178 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bcmpricingcalculator + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/bcmpricingcalculator/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Retrieves details of a specific bill scenario. +func (c *Client) GetBillScenario(ctx context.Context, params *GetBillScenarioInput, optFns ...func(*Options)) (*GetBillScenarioOutput, error) { + if params == nil { + params = &GetBillScenarioInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetBillScenario", params, optFns, c.addOperationGetBillScenarioMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetBillScenarioOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetBillScenarioInput struct { + + // The unique identifier of the bill scenario to retrieve. + // + // This member is required. + Identifier *string + + noSmithyDocumentSerde +} + +type GetBillScenarioOutput struct { + + // The unique identifier of the retrieved bill scenario. + // + // This member is required. + Id *string + + // The time period covered by the bill scenario. + BillInterval *types.BillInterval + + // The timestamp when the bill scenario was created. + CreatedAt *time.Time + + // The timestamp when the bill scenario will expire. + ExpiresAt *time.Time + + // An error message if the bill scenario retrieval failed. + FailureMessage *string + + // The name of the retrieved bill scenario. + Name *string + + // The current status of the bill scenario. + Status types.BillScenarioStatus + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetBillScenarioMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpGetBillScenario{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpGetBillScenario{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetBillScenario"); 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 = addOpGetBillScenarioValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetBillScenario(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_opGetBillScenario(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetBillScenario", + } +} diff --git a/service/bcmpricingcalculator/api_op_GetPreferences.go b/service/bcmpricingcalculator/api_op_GetPreferences.go new file mode 100644 index 00000000000..0502096fad4 --- /dev/null +++ b/service/bcmpricingcalculator/api_op_GetPreferences.go @@ -0,0 +1,153 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bcmpricingcalculator + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/bcmpricingcalculator/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the current preferences for the Amazon Web Services Cost Explorer +// +// service. +func (c *Client) GetPreferences(ctx context.Context, params *GetPreferencesInput, optFns ...func(*Options)) (*GetPreferencesOutput, error) { + if params == nil { + params = &GetPreferencesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetPreferences", params, optFns, c.addOperationGetPreferencesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetPreferencesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetPreferencesInput struct { + noSmithyDocumentSerde +} + +type GetPreferencesOutput struct { + + // The preferred rate types for the management account. + ManagementAccountRateTypeSelections []types.RateType + + // The preferred rate types for member accounts. + MemberAccountRateTypeSelections []types.RateType + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetPreferencesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpGetPreferences{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpGetPreferences{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetPreferences"); 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_opGetPreferences(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_opGetPreferences(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetPreferences", + } +} diff --git a/service/bcmpricingcalculator/api_op_GetWorkloadEstimate.go b/service/bcmpricingcalculator/api_op_GetWorkloadEstimate.go new file mode 100644 index 00000000000..fba0116b145 --- /dev/null +++ b/service/bcmpricingcalculator/api_op_GetWorkloadEstimate.go @@ -0,0 +1,188 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bcmpricingcalculator + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/bcmpricingcalculator/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Retrieves details of a specific workload estimate. +func (c *Client) GetWorkloadEstimate(ctx context.Context, params *GetWorkloadEstimateInput, optFns ...func(*Options)) (*GetWorkloadEstimateOutput, error) { + if params == nil { + params = &GetWorkloadEstimateInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetWorkloadEstimate", params, optFns, c.addOperationGetWorkloadEstimateMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetWorkloadEstimateOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetWorkloadEstimateInput struct { + + // The unique identifier of the workload estimate to retrieve. + // + // This member is required. + Identifier *string + + noSmithyDocumentSerde +} + +// Mixin for common fields returned by CRUD APIs +type GetWorkloadEstimateOutput struct { + + // The unique identifier of the retrieved workload estimate. + // + // This member is required. + Id *string + + // The currency of the estimated cost. + CostCurrency types.CurrencyCode + + // The timestamp when the workload estimate was created. + CreatedAt *time.Time + + // The timestamp when the workload estimate will expire. + ExpiresAt *time.Time + + // An error message if the workload estimate retrieval failed. + FailureMessage *string + + // The name of the retrieved workload estimate. + Name *string + + // The timestamp of the pricing rates used for the estimate. + RateTimestamp *time.Time + + // The type of pricing rates used for the estimate. + RateType types.WorkloadEstimateRateType + + // The current status of the workload estimate. + Status types.WorkloadEstimateStatus + + // The total estimated cost for the workload. + TotalCost *float64 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetWorkloadEstimateMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpGetWorkloadEstimate{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpGetWorkloadEstimate{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetWorkloadEstimate"); 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 = addOpGetWorkloadEstimateValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetWorkloadEstimate(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_opGetWorkloadEstimate(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetWorkloadEstimate", + } +} diff --git a/service/bcmpricingcalculator/api_op_ListBillEstimateCommitments.go b/service/bcmpricingcalculator/api_op_ListBillEstimateCommitments.go new file mode 100644 index 00000000000..8a85849894a --- /dev/null +++ b/service/bcmpricingcalculator/api_op_ListBillEstimateCommitments.go @@ -0,0 +1,262 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bcmpricingcalculator + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/bcmpricingcalculator/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the commitments associated with a bill estimate. +func (c *Client) ListBillEstimateCommitments(ctx context.Context, params *ListBillEstimateCommitmentsInput, optFns ...func(*Options)) (*ListBillEstimateCommitmentsOutput, error) { + if params == nil { + params = &ListBillEstimateCommitmentsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListBillEstimateCommitments", params, optFns, c.addOperationListBillEstimateCommitmentsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListBillEstimateCommitmentsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListBillEstimateCommitmentsInput struct { + + // The unique identifier of the bill estimate to list commitments for. + // + // This member is required. + BillEstimateId *string + + // The maximum number of results to return per page. + MaxResults *int32 + + // A token to retrieve the next page of results. + NextToken *string + + noSmithyDocumentSerde +} + +type ListBillEstimateCommitmentsOutput struct { + + // The list of commitments associated with the bill estimate. + Items []types.BillEstimateCommitmentSummary + + // A token to retrieve the next page of results, if any. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListBillEstimateCommitmentsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpListBillEstimateCommitments{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListBillEstimateCommitments{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListBillEstimateCommitments"); 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 = addOpListBillEstimateCommitmentsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListBillEstimateCommitments(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 +} + +// ListBillEstimateCommitmentsPaginatorOptions is the paginator options for +// ListBillEstimateCommitments +type ListBillEstimateCommitmentsPaginatorOptions struct { + // The maximum number of results to return per page. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListBillEstimateCommitmentsPaginator is a paginator for +// ListBillEstimateCommitments +type ListBillEstimateCommitmentsPaginator struct { + options ListBillEstimateCommitmentsPaginatorOptions + client ListBillEstimateCommitmentsAPIClient + params *ListBillEstimateCommitmentsInput + nextToken *string + firstPage bool +} + +// NewListBillEstimateCommitmentsPaginator returns a new +// ListBillEstimateCommitmentsPaginator +func NewListBillEstimateCommitmentsPaginator(client ListBillEstimateCommitmentsAPIClient, params *ListBillEstimateCommitmentsInput, optFns ...func(*ListBillEstimateCommitmentsPaginatorOptions)) *ListBillEstimateCommitmentsPaginator { + if params == nil { + params = &ListBillEstimateCommitmentsInput{} + } + + options := ListBillEstimateCommitmentsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListBillEstimateCommitmentsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListBillEstimateCommitmentsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListBillEstimateCommitments page. +func (p *ListBillEstimateCommitmentsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListBillEstimateCommitmentsOutput, 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.ListBillEstimateCommitments(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 +} + +// ListBillEstimateCommitmentsAPIClient is a client that implements the +// ListBillEstimateCommitments operation. +type ListBillEstimateCommitmentsAPIClient interface { + ListBillEstimateCommitments(context.Context, *ListBillEstimateCommitmentsInput, ...func(*Options)) (*ListBillEstimateCommitmentsOutput, error) +} + +var _ ListBillEstimateCommitmentsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListBillEstimateCommitments(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListBillEstimateCommitments", + } +} diff --git a/service/bcmpricingcalculator/api_op_ListBillEstimateInputCommitmentModifications.go b/service/bcmpricingcalculator/api_op_ListBillEstimateInputCommitmentModifications.go new file mode 100644 index 00000000000..64fd5cd88ff --- /dev/null +++ b/service/bcmpricingcalculator/api_op_ListBillEstimateInputCommitmentModifications.go @@ -0,0 +1,263 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bcmpricingcalculator + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/bcmpricingcalculator/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the input commitment modifications associated with a bill estimate. +func (c *Client) ListBillEstimateInputCommitmentModifications(ctx context.Context, params *ListBillEstimateInputCommitmentModificationsInput, optFns ...func(*Options)) (*ListBillEstimateInputCommitmentModificationsOutput, error) { + if params == nil { + params = &ListBillEstimateInputCommitmentModificationsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListBillEstimateInputCommitmentModifications", params, optFns, c.addOperationListBillEstimateInputCommitmentModificationsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListBillEstimateInputCommitmentModificationsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListBillEstimateInputCommitmentModificationsInput struct { + + // The unique identifier of the bill estimate to list input commitment + // modifications for. + // + // This member is required. + BillEstimateId *string + + // The maximum number of results to return per page. + MaxResults *int32 + + // A token to retrieve the next page of results. + NextToken *string + + noSmithyDocumentSerde +} + +type ListBillEstimateInputCommitmentModificationsOutput struct { + + // The list of input commitment modifications associated with the bill estimate. + Items []types.BillEstimateInputCommitmentModificationSummary + + // A token to retrieve the next page of results, if any. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListBillEstimateInputCommitmentModificationsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpListBillEstimateInputCommitmentModifications{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListBillEstimateInputCommitmentModifications{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListBillEstimateInputCommitmentModifications"); 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 = addOpListBillEstimateInputCommitmentModificationsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListBillEstimateInputCommitmentModifications(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 +} + +// ListBillEstimateInputCommitmentModificationsPaginatorOptions is the paginator +// options for ListBillEstimateInputCommitmentModifications +type ListBillEstimateInputCommitmentModificationsPaginatorOptions struct { + // The maximum number of results to return per page. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListBillEstimateInputCommitmentModificationsPaginator is a paginator for +// ListBillEstimateInputCommitmentModifications +type ListBillEstimateInputCommitmentModificationsPaginator struct { + options ListBillEstimateInputCommitmentModificationsPaginatorOptions + client ListBillEstimateInputCommitmentModificationsAPIClient + params *ListBillEstimateInputCommitmentModificationsInput + nextToken *string + firstPage bool +} + +// NewListBillEstimateInputCommitmentModificationsPaginator returns a new +// ListBillEstimateInputCommitmentModificationsPaginator +func NewListBillEstimateInputCommitmentModificationsPaginator(client ListBillEstimateInputCommitmentModificationsAPIClient, params *ListBillEstimateInputCommitmentModificationsInput, optFns ...func(*ListBillEstimateInputCommitmentModificationsPaginatorOptions)) *ListBillEstimateInputCommitmentModificationsPaginator { + if params == nil { + params = &ListBillEstimateInputCommitmentModificationsInput{} + } + + options := ListBillEstimateInputCommitmentModificationsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListBillEstimateInputCommitmentModificationsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListBillEstimateInputCommitmentModificationsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListBillEstimateInputCommitmentModifications page. +func (p *ListBillEstimateInputCommitmentModificationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListBillEstimateInputCommitmentModificationsOutput, 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.ListBillEstimateInputCommitmentModifications(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 +} + +// ListBillEstimateInputCommitmentModificationsAPIClient is a client that +// implements the ListBillEstimateInputCommitmentModifications operation. +type ListBillEstimateInputCommitmentModificationsAPIClient interface { + ListBillEstimateInputCommitmentModifications(context.Context, *ListBillEstimateInputCommitmentModificationsInput, ...func(*Options)) (*ListBillEstimateInputCommitmentModificationsOutput, error) +} + +var _ ListBillEstimateInputCommitmentModificationsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListBillEstimateInputCommitmentModifications(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListBillEstimateInputCommitmentModifications", + } +} diff --git a/service/bcmpricingcalculator/api_op_ListBillEstimateInputUsageModifications.go b/service/bcmpricingcalculator/api_op_ListBillEstimateInputUsageModifications.go new file mode 100644 index 00000000000..d1b97215203 --- /dev/null +++ b/service/bcmpricingcalculator/api_op_ListBillEstimateInputUsageModifications.go @@ -0,0 +1,266 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bcmpricingcalculator + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/bcmpricingcalculator/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the input usage modifications associated with a bill estimate. +func (c *Client) ListBillEstimateInputUsageModifications(ctx context.Context, params *ListBillEstimateInputUsageModificationsInput, optFns ...func(*Options)) (*ListBillEstimateInputUsageModificationsOutput, error) { + if params == nil { + params = &ListBillEstimateInputUsageModificationsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListBillEstimateInputUsageModifications", params, optFns, c.addOperationListBillEstimateInputUsageModificationsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListBillEstimateInputUsageModificationsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListBillEstimateInputUsageModificationsInput struct { + + // The unique identifier of the bill estimate to list input usage modifications + // for. + // + // This member is required. + BillEstimateId *string + + // Filters to apply to the list of input usage modifications. + Filters []types.ListUsageFilter + + // The maximum number of results to return per page. + MaxResults *int32 + + // A token to retrieve the next page of results. + NextToken *string + + noSmithyDocumentSerde +} + +type ListBillEstimateInputUsageModificationsOutput struct { + + // The list of input usage modifications associated with the bill estimate. + Items []types.BillEstimateInputUsageModificationSummary + + // A token to retrieve the next page of results, if any. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListBillEstimateInputUsageModificationsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpListBillEstimateInputUsageModifications{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListBillEstimateInputUsageModifications{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListBillEstimateInputUsageModifications"); 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 = addOpListBillEstimateInputUsageModificationsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListBillEstimateInputUsageModifications(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 +} + +// ListBillEstimateInputUsageModificationsPaginatorOptions is the paginator +// options for ListBillEstimateInputUsageModifications +type ListBillEstimateInputUsageModificationsPaginatorOptions struct { + // The maximum number of results to return per page. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListBillEstimateInputUsageModificationsPaginator is a paginator for +// ListBillEstimateInputUsageModifications +type ListBillEstimateInputUsageModificationsPaginator struct { + options ListBillEstimateInputUsageModificationsPaginatorOptions + client ListBillEstimateInputUsageModificationsAPIClient + params *ListBillEstimateInputUsageModificationsInput + nextToken *string + firstPage bool +} + +// NewListBillEstimateInputUsageModificationsPaginator returns a new +// ListBillEstimateInputUsageModificationsPaginator +func NewListBillEstimateInputUsageModificationsPaginator(client ListBillEstimateInputUsageModificationsAPIClient, params *ListBillEstimateInputUsageModificationsInput, optFns ...func(*ListBillEstimateInputUsageModificationsPaginatorOptions)) *ListBillEstimateInputUsageModificationsPaginator { + if params == nil { + params = &ListBillEstimateInputUsageModificationsInput{} + } + + options := ListBillEstimateInputUsageModificationsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListBillEstimateInputUsageModificationsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListBillEstimateInputUsageModificationsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListBillEstimateInputUsageModifications page. +func (p *ListBillEstimateInputUsageModificationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListBillEstimateInputUsageModificationsOutput, 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.ListBillEstimateInputUsageModifications(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 +} + +// ListBillEstimateInputUsageModificationsAPIClient is a client that implements +// the ListBillEstimateInputUsageModifications operation. +type ListBillEstimateInputUsageModificationsAPIClient interface { + ListBillEstimateInputUsageModifications(context.Context, *ListBillEstimateInputUsageModificationsInput, ...func(*Options)) (*ListBillEstimateInputUsageModificationsOutput, error) +} + +var _ ListBillEstimateInputUsageModificationsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListBillEstimateInputUsageModifications(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListBillEstimateInputUsageModifications", + } +} diff --git a/service/bcmpricingcalculator/api_op_ListBillEstimateLineItems.go b/service/bcmpricingcalculator/api_op_ListBillEstimateLineItems.go new file mode 100644 index 00000000000..5d12b7bc331 --- /dev/null +++ b/service/bcmpricingcalculator/api_op_ListBillEstimateLineItems.go @@ -0,0 +1,264 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bcmpricingcalculator + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/bcmpricingcalculator/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the line items associated with a bill estimate. +func (c *Client) ListBillEstimateLineItems(ctx context.Context, params *ListBillEstimateLineItemsInput, optFns ...func(*Options)) (*ListBillEstimateLineItemsOutput, error) { + if params == nil { + params = &ListBillEstimateLineItemsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListBillEstimateLineItems", params, optFns, c.addOperationListBillEstimateLineItemsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListBillEstimateLineItemsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListBillEstimateLineItemsInput struct { + + // The unique identifier of the bill estimate to list line items for. + // + // This member is required. + BillEstimateId *string + + // Filters to apply to the list of line items. + Filters []types.ListBillEstimateLineItemsFilter + + // The maximum number of results to return per page. + MaxResults *int32 + + // A token to retrieve the next page of results. + NextToken *string + + noSmithyDocumentSerde +} + +type ListBillEstimateLineItemsOutput struct { + + // The list of line items associated with the bill estimate. + Items []types.BillEstimateLineItemSummary + + // A token to retrieve the next page of results, if any. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListBillEstimateLineItemsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpListBillEstimateLineItems{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListBillEstimateLineItems{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListBillEstimateLineItems"); 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 = addOpListBillEstimateLineItemsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListBillEstimateLineItems(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 +} + +// ListBillEstimateLineItemsPaginatorOptions is the paginator options for +// ListBillEstimateLineItems +type ListBillEstimateLineItemsPaginatorOptions struct { + // The maximum number of results to return per page. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListBillEstimateLineItemsPaginator is a paginator for ListBillEstimateLineItems +type ListBillEstimateLineItemsPaginator struct { + options ListBillEstimateLineItemsPaginatorOptions + client ListBillEstimateLineItemsAPIClient + params *ListBillEstimateLineItemsInput + nextToken *string + firstPage bool +} + +// NewListBillEstimateLineItemsPaginator returns a new +// ListBillEstimateLineItemsPaginator +func NewListBillEstimateLineItemsPaginator(client ListBillEstimateLineItemsAPIClient, params *ListBillEstimateLineItemsInput, optFns ...func(*ListBillEstimateLineItemsPaginatorOptions)) *ListBillEstimateLineItemsPaginator { + if params == nil { + params = &ListBillEstimateLineItemsInput{} + } + + options := ListBillEstimateLineItemsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListBillEstimateLineItemsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListBillEstimateLineItemsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListBillEstimateLineItems page. +func (p *ListBillEstimateLineItemsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListBillEstimateLineItemsOutput, 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.ListBillEstimateLineItems(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 +} + +// ListBillEstimateLineItemsAPIClient is a client that implements the +// ListBillEstimateLineItems operation. +type ListBillEstimateLineItemsAPIClient interface { + ListBillEstimateLineItems(context.Context, *ListBillEstimateLineItemsInput, ...func(*Options)) (*ListBillEstimateLineItemsOutput, error) +} + +var _ ListBillEstimateLineItemsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListBillEstimateLineItems(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListBillEstimateLineItems", + } +} diff --git a/service/bcmpricingcalculator/api_op_ListBillEstimates.go b/service/bcmpricingcalculator/api_op_ListBillEstimates.go new file mode 100644 index 00000000000..5cc85d4d28c --- /dev/null +++ b/service/bcmpricingcalculator/api_op_ListBillEstimates.go @@ -0,0 +1,263 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bcmpricingcalculator + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/bcmpricingcalculator/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all bill estimates for the account. +func (c *Client) ListBillEstimates(ctx context.Context, params *ListBillEstimatesInput, optFns ...func(*Options)) (*ListBillEstimatesOutput, error) { + if params == nil { + params = &ListBillEstimatesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListBillEstimates", params, optFns, c.addOperationListBillEstimatesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListBillEstimatesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListBillEstimatesInput struct { + + // Filter bill estimates based on their creation date. + CreatedAtFilter *types.FilterTimestamp + + // Filter bill estimates based on their expiration date. + ExpiresAtFilter *types.FilterTimestamp + + // Filters to apply to the list of bill estimates. + Filters []types.ListBillEstimatesFilter + + // The maximum number of results to return per page. + MaxResults *int32 + + // A token to retrieve the next page of results. + NextToken *string + + noSmithyDocumentSerde +} + +type ListBillEstimatesOutput struct { + + // The list of bill estimates for the account. + Items []types.BillEstimateSummary + + // A token to retrieve the next page of results, if any. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListBillEstimatesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpListBillEstimates{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListBillEstimates{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListBillEstimates"); 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 = addOpListBillEstimatesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListBillEstimates(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 +} + +// ListBillEstimatesPaginatorOptions is the paginator options for ListBillEstimates +type ListBillEstimatesPaginatorOptions struct { + // The maximum number of results to return per page. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListBillEstimatesPaginator is a paginator for ListBillEstimates +type ListBillEstimatesPaginator struct { + options ListBillEstimatesPaginatorOptions + client ListBillEstimatesAPIClient + params *ListBillEstimatesInput + nextToken *string + firstPage bool +} + +// NewListBillEstimatesPaginator returns a new ListBillEstimatesPaginator +func NewListBillEstimatesPaginator(client ListBillEstimatesAPIClient, params *ListBillEstimatesInput, optFns ...func(*ListBillEstimatesPaginatorOptions)) *ListBillEstimatesPaginator { + if params == nil { + params = &ListBillEstimatesInput{} + } + + options := ListBillEstimatesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListBillEstimatesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListBillEstimatesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListBillEstimates page. +func (p *ListBillEstimatesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListBillEstimatesOutput, 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.ListBillEstimates(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 +} + +// ListBillEstimatesAPIClient is a client that implements the ListBillEstimates +// operation. +type ListBillEstimatesAPIClient interface { + ListBillEstimates(context.Context, *ListBillEstimatesInput, ...func(*Options)) (*ListBillEstimatesOutput, error) +} + +var _ ListBillEstimatesAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListBillEstimates(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListBillEstimates", + } +} diff --git a/service/bcmpricingcalculator/api_op_ListBillScenarioCommitmentModifications.go b/service/bcmpricingcalculator/api_op_ListBillScenarioCommitmentModifications.go new file mode 100644 index 00000000000..c9a13afe950 --- /dev/null +++ b/service/bcmpricingcalculator/api_op_ListBillScenarioCommitmentModifications.go @@ -0,0 +1,263 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bcmpricingcalculator + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/bcmpricingcalculator/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the commitment modifications associated with a bill scenario. +func (c *Client) ListBillScenarioCommitmentModifications(ctx context.Context, params *ListBillScenarioCommitmentModificationsInput, optFns ...func(*Options)) (*ListBillScenarioCommitmentModificationsOutput, error) { + if params == nil { + params = &ListBillScenarioCommitmentModificationsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListBillScenarioCommitmentModifications", params, optFns, c.addOperationListBillScenarioCommitmentModificationsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListBillScenarioCommitmentModificationsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListBillScenarioCommitmentModificationsInput struct { + + // The unique identifier of the bill scenario to list commitment modifications + // for. + // + // This member is required. + BillScenarioId *string + + // The maximum number of results to return per page. + MaxResults *int32 + + // A token to retrieve the next page of results. + NextToken *string + + noSmithyDocumentSerde +} + +type ListBillScenarioCommitmentModificationsOutput struct { + + // The list of commitment modifications associated with the bill scenario. + Items []types.BillScenarioCommitmentModificationItem + + // A token to retrieve the next page of results, if any. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListBillScenarioCommitmentModificationsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpListBillScenarioCommitmentModifications{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListBillScenarioCommitmentModifications{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListBillScenarioCommitmentModifications"); 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 = addOpListBillScenarioCommitmentModificationsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListBillScenarioCommitmentModifications(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 +} + +// ListBillScenarioCommitmentModificationsPaginatorOptions is the paginator +// options for ListBillScenarioCommitmentModifications +type ListBillScenarioCommitmentModificationsPaginatorOptions struct { + // The maximum number of results to return per page. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListBillScenarioCommitmentModificationsPaginator is a paginator for +// ListBillScenarioCommitmentModifications +type ListBillScenarioCommitmentModificationsPaginator struct { + options ListBillScenarioCommitmentModificationsPaginatorOptions + client ListBillScenarioCommitmentModificationsAPIClient + params *ListBillScenarioCommitmentModificationsInput + nextToken *string + firstPage bool +} + +// NewListBillScenarioCommitmentModificationsPaginator returns a new +// ListBillScenarioCommitmentModificationsPaginator +func NewListBillScenarioCommitmentModificationsPaginator(client ListBillScenarioCommitmentModificationsAPIClient, params *ListBillScenarioCommitmentModificationsInput, optFns ...func(*ListBillScenarioCommitmentModificationsPaginatorOptions)) *ListBillScenarioCommitmentModificationsPaginator { + if params == nil { + params = &ListBillScenarioCommitmentModificationsInput{} + } + + options := ListBillScenarioCommitmentModificationsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListBillScenarioCommitmentModificationsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListBillScenarioCommitmentModificationsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListBillScenarioCommitmentModifications page. +func (p *ListBillScenarioCommitmentModificationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListBillScenarioCommitmentModificationsOutput, 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.ListBillScenarioCommitmentModifications(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 +} + +// ListBillScenarioCommitmentModificationsAPIClient is a client that implements +// the ListBillScenarioCommitmentModifications operation. +type ListBillScenarioCommitmentModificationsAPIClient interface { + ListBillScenarioCommitmentModifications(context.Context, *ListBillScenarioCommitmentModificationsInput, ...func(*Options)) (*ListBillScenarioCommitmentModificationsOutput, error) +} + +var _ ListBillScenarioCommitmentModificationsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListBillScenarioCommitmentModifications(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListBillScenarioCommitmentModifications", + } +} diff --git a/service/bcmpricingcalculator/api_op_ListBillScenarioUsageModifications.go b/service/bcmpricingcalculator/api_op_ListBillScenarioUsageModifications.go new file mode 100644 index 00000000000..bdb93e77e14 --- /dev/null +++ b/service/bcmpricingcalculator/api_op_ListBillScenarioUsageModifications.go @@ -0,0 +1,265 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bcmpricingcalculator + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/bcmpricingcalculator/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the usage modifications associated with a bill scenario. +func (c *Client) ListBillScenarioUsageModifications(ctx context.Context, params *ListBillScenarioUsageModificationsInput, optFns ...func(*Options)) (*ListBillScenarioUsageModificationsOutput, error) { + if params == nil { + params = &ListBillScenarioUsageModificationsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListBillScenarioUsageModifications", params, optFns, c.addOperationListBillScenarioUsageModificationsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListBillScenarioUsageModificationsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListBillScenarioUsageModificationsInput struct { + + // The unique identifier of the bill scenario to list usage modifications for. + // + // This member is required. + BillScenarioId *string + + // Filters to apply to the list of usage modifications. + Filters []types.ListUsageFilter + + // The maximum number of results to return per page. + MaxResults *int32 + + // A token to retrieve the next page of results. + NextToken *string + + noSmithyDocumentSerde +} + +type ListBillScenarioUsageModificationsOutput struct { + + // The list of usage modifications associated with the bill scenario. + Items []types.BillScenarioUsageModificationItem + + // A token to retrieve the next page of results, if any. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListBillScenarioUsageModificationsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpListBillScenarioUsageModifications{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListBillScenarioUsageModifications{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListBillScenarioUsageModifications"); 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 = addOpListBillScenarioUsageModificationsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListBillScenarioUsageModifications(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 +} + +// ListBillScenarioUsageModificationsPaginatorOptions is the paginator options for +// ListBillScenarioUsageModifications +type ListBillScenarioUsageModificationsPaginatorOptions struct { + // The maximum number of results to return per page. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListBillScenarioUsageModificationsPaginator is a paginator for +// ListBillScenarioUsageModifications +type ListBillScenarioUsageModificationsPaginator struct { + options ListBillScenarioUsageModificationsPaginatorOptions + client ListBillScenarioUsageModificationsAPIClient + params *ListBillScenarioUsageModificationsInput + nextToken *string + firstPage bool +} + +// NewListBillScenarioUsageModificationsPaginator returns a new +// ListBillScenarioUsageModificationsPaginator +func NewListBillScenarioUsageModificationsPaginator(client ListBillScenarioUsageModificationsAPIClient, params *ListBillScenarioUsageModificationsInput, optFns ...func(*ListBillScenarioUsageModificationsPaginatorOptions)) *ListBillScenarioUsageModificationsPaginator { + if params == nil { + params = &ListBillScenarioUsageModificationsInput{} + } + + options := ListBillScenarioUsageModificationsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListBillScenarioUsageModificationsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListBillScenarioUsageModificationsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListBillScenarioUsageModifications page. +func (p *ListBillScenarioUsageModificationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListBillScenarioUsageModificationsOutput, 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.ListBillScenarioUsageModifications(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 +} + +// ListBillScenarioUsageModificationsAPIClient is a client that implements the +// ListBillScenarioUsageModifications operation. +type ListBillScenarioUsageModificationsAPIClient interface { + ListBillScenarioUsageModifications(context.Context, *ListBillScenarioUsageModificationsInput, ...func(*Options)) (*ListBillScenarioUsageModificationsOutput, error) +} + +var _ ListBillScenarioUsageModificationsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListBillScenarioUsageModifications(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListBillScenarioUsageModifications", + } +} diff --git a/service/bcmpricingcalculator/api_op_ListBillScenarios.go b/service/bcmpricingcalculator/api_op_ListBillScenarios.go new file mode 100644 index 00000000000..e2e8a636140 --- /dev/null +++ b/service/bcmpricingcalculator/api_op_ListBillScenarios.go @@ -0,0 +1,263 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bcmpricingcalculator + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/bcmpricingcalculator/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all bill scenarios for the account. +func (c *Client) ListBillScenarios(ctx context.Context, params *ListBillScenariosInput, optFns ...func(*Options)) (*ListBillScenariosOutput, error) { + if params == nil { + params = &ListBillScenariosInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListBillScenarios", params, optFns, c.addOperationListBillScenariosMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListBillScenariosOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListBillScenariosInput struct { + + // Filter bill scenarios based on their creation date. + CreatedAtFilter *types.FilterTimestamp + + // Filter bill scenarios based on their expiration date. + ExpiresAtFilter *types.FilterTimestamp + + // Filters to apply to the list of bill scenarios. + Filters []types.ListBillScenariosFilter + + // The maximum number of results to return per page. + MaxResults *int32 + + // A token to retrieve the next page of results. + NextToken *string + + noSmithyDocumentSerde +} + +type ListBillScenariosOutput struct { + + // The list of bill scenarios for the account. + Items []types.BillScenarioSummary + + // A token to retrieve the next page of results, if any. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListBillScenariosMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpListBillScenarios{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListBillScenarios{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListBillScenarios"); 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 = addOpListBillScenariosValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListBillScenarios(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 +} + +// ListBillScenariosPaginatorOptions is the paginator options for ListBillScenarios +type ListBillScenariosPaginatorOptions struct { + // The maximum number of results to return per page. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListBillScenariosPaginator is a paginator for ListBillScenarios +type ListBillScenariosPaginator struct { + options ListBillScenariosPaginatorOptions + client ListBillScenariosAPIClient + params *ListBillScenariosInput + nextToken *string + firstPage bool +} + +// NewListBillScenariosPaginator returns a new ListBillScenariosPaginator +func NewListBillScenariosPaginator(client ListBillScenariosAPIClient, params *ListBillScenariosInput, optFns ...func(*ListBillScenariosPaginatorOptions)) *ListBillScenariosPaginator { + if params == nil { + params = &ListBillScenariosInput{} + } + + options := ListBillScenariosPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListBillScenariosPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListBillScenariosPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListBillScenarios page. +func (p *ListBillScenariosPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListBillScenariosOutput, 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.ListBillScenarios(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 +} + +// ListBillScenariosAPIClient is a client that implements the ListBillScenarios +// operation. +type ListBillScenariosAPIClient interface { + ListBillScenarios(context.Context, *ListBillScenariosInput, ...func(*Options)) (*ListBillScenariosOutput, error) +} + +var _ ListBillScenariosAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListBillScenarios(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListBillScenarios", + } +} diff --git a/service/bcmpricingcalculator/api_op_ListTagsForResource.go b/service/bcmpricingcalculator/api_op_ListTagsForResource.go new file mode 100644 index 00000000000..c8317a83b5a --- /dev/null +++ b/service/bcmpricingcalculator/api_op_ListTagsForResource.go @@ -0,0 +1,156 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bcmpricingcalculator + +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" +) + +// Lists all tags associated with a specified resource. +func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error) { + if params == nil { + params = &ListTagsForResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListTagsForResource", params, optFns, c.addOperationListTagsForResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListTagsForResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListTagsForResourceInput struct { + + // The Amazon Resource Name (ARN) of the resource to list tags for. + // + // This member is required. + Arn *string + + noSmithyDocumentSerde +} + +type ListTagsForResourceOutput struct { + + // The list of tags associated with the specified resource. + Tags map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpListTagsForResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListTagsForResource{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListTagsForResource"); 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 = addOpListTagsForResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagsForResource(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_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListTagsForResource", + } +} diff --git a/service/bcmpricingcalculator/api_op_ListWorkloadEstimateUsage.go b/service/bcmpricingcalculator/api_op_ListWorkloadEstimateUsage.go new file mode 100644 index 00000000000..abb3244c8f2 --- /dev/null +++ b/service/bcmpricingcalculator/api_op_ListWorkloadEstimateUsage.go @@ -0,0 +1,264 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bcmpricingcalculator + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/bcmpricingcalculator/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the usage associated with a workload estimate. +func (c *Client) ListWorkloadEstimateUsage(ctx context.Context, params *ListWorkloadEstimateUsageInput, optFns ...func(*Options)) (*ListWorkloadEstimateUsageOutput, error) { + if params == nil { + params = &ListWorkloadEstimateUsageInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListWorkloadEstimateUsage", params, optFns, c.addOperationListWorkloadEstimateUsageMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListWorkloadEstimateUsageOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListWorkloadEstimateUsageInput struct { + + // The unique identifier of the workload estimate to list usage for. + // + // This member is required. + WorkloadEstimateId *string + + // Filters to apply to the list of usage items. + Filters []types.ListUsageFilter + + // The maximum number of results to return per page. + MaxResults *int32 + + // A token to retrieve the next page of results. + NextToken *string + + noSmithyDocumentSerde +} + +type ListWorkloadEstimateUsageOutput struct { + + // The list of usage items associated with the workload estimate. + Items []types.WorkloadEstimateUsageItem + + // A token to retrieve the next page of results, if any. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListWorkloadEstimateUsageMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpListWorkloadEstimateUsage{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListWorkloadEstimateUsage{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListWorkloadEstimateUsage"); 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 = addOpListWorkloadEstimateUsageValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListWorkloadEstimateUsage(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 +} + +// ListWorkloadEstimateUsagePaginatorOptions is the paginator options for +// ListWorkloadEstimateUsage +type ListWorkloadEstimateUsagePaginatorOptions struct { + // The maximum number of results to return per page. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListWorkloadEstimateUsagePaginator is a paginator for ListWorkloadEstimateUsage +type ListWorkloadEstimateUsagePaginator struct { + options ListWorkloadEstimateUsagePaginatorOptions + client ListWorkloadEstimateUsageAPIClient + params *ListWorkloadEstimateUsageInput + nextToken *string + firstPage bool +} + +// NewListWorkloadEstimateUsagePaginator returns a new +// ListWorkloadEstimateUsagePaginator +func NewListWorkloadEstimateUsagePaginator(client ListWorkloadEstimateUsageAPIClient, params *ListWorkloadEstimateUsageInput, optFns ...func(*ListWorkloadEstimateUsagePaginatorOptions)) *ListWorkloadEstimateUsagePaginator { + if params == nil { + params = &ListWorkloadEstimateUsageInput{} + } + + options := ListWorkloadEstimateUsagePaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListWorkloadEstimateUsagePaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListWorkloadEstimateUsagePaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListWorkloadEstimateUsage page. +func (p *ListWorkloadEstimateUsagePaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListWorkloadEstimateUsageOutput, 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.ListWorkloadEstimateUsage(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 +} + +// ListWorkloadEstimateUsageAPIClient is a client that implements the +// ListWorkloadEstimateUsage operation. +type ListWorkloadEstimateUsageAPIClient interface { + ListWorkloadEstimateUsage(context.Context, *ListWorkloadEstimateUsageInput, ...func(*Options)) (*ListWorkloadEstimateUsageOutput, error) +} + +var _ ListWorkloadEstimateUsageAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListWorkloadEstimateUsage(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListWorkloadEstimateUsage", + } +} diff --git a/service/bcmpricingcalculator/api_op_ListWorkloadEstimates.go b/service/bcmpricingcalculator/api_op_ListWorkloadEstimates.go new file mode 100644 index 00000000000..db87ef71e4d --- /dev/null +++ b/service/bcmpricingcalculator/api_op_ListWorkloadEstimates.go @@ -0,0 +1,264 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bcmpricingcalculator + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/bcmpricingcalculator/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all workload estimates for the account. +func (c *Client) ListWorkloadEstimates(ctx context.Context, params *ListWorkloadEstimatesInput, optFns ...func(*Options)) (*ListWorkloadEstimatesOutput, error) { + if params == nil { + params = &ListWorkloadEstimatesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListWorkloadEstimates", params, optFns, c.addOperationListWorkloadEstimatesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListWorkloadEstimatesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListWorkloadEstimatesInput struct { + + // Filter workload estimates based on their creation date. + CreatedAtFilter *types.FilterTimestamp + + // Filter workload estimates based on their expiration date. + ExpiresAtFilter *types.FilterTimestamp + + // Filters to apply to the list of workload estimates. + Filters []types.ListWorkloadEstimatesFilter + + // The maximum number of results to return per page. + MaxResults *int32 + + // A token to retrieve the next page of results. + NextToken *string + + noSmithyDocumentSerde +} + +type ListWorkloadEstimatesOutput struct { + + // The list of workload estimates for the account. + Items []types.WorkloadEstimateSummary + + // A token to retrieve the next page of results, if any. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListWorkloadEstimatesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpListWorkloadEstimates{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListWorkloadEstimates{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListWorkloadEstimates"); 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 = addOpListWorkloadEstimatesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListWorkloadEstimates(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 +} + +// ListWorkloadEstimatesPaginatorOptions is the paginator options for +// ListWorkloadEstimates +type ListWorkloadEstimatesPaginatorOptions struct { + // The maximum number of results to return per page. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListWorkloadEstimatesPaginator is a paginator for ListWorkloadEstimates +type ListWorkloadEstimatesPaginator struct { + options ListWorkloadEstimatesPaginatorOptions + client ListWorkloadEstimatesAPIClient + params *ListWorkloadEstimatesInput + nextToken *string + firstPage bool +} + +// NewListWorkloadEstimatesPaginator returns a new ListWorkloadEstimatesPaginator +func NewListWorkloadEstimatesPaginator(client ListWorkloadEstimatesAPIClient, params *ListWorkloadEstimatesInput, optFns ...func(*ListWorkloadEstimatesPaginatorOptions)) *ListWorkloadEstimatesPaginator { + if params == nil { + params = &ListWorkloadEstimatesInput{} + } + + options := ListWorkloadEstimatesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListWorkloadEstimatesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListWorkloadEstimatesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListWorkloadEstimates page. +func (p *ListWorkloadEstimatesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListWorkloadEstimatesOutput, 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.ListWorkloadEstimates(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 +} + +// ListWorkloadEstimatesAPIClient is a client that implements the +// ListWorkloadEstimates operation. +type ListWorkloadEstimatesAPIClient interface { + ListWorkloadEstimates(context.Context, *ListWorkloadEstimatesInput, ...func(*Options)) (*ListWorkloadEstimatesOutput, error) +} + +var _ ListWorkloadEstimatesAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListWorkloadEstimates(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListWorkloadEstimates", + } +} diff --git a/service/bcmpricingcalculator/api_op_TagResource.go b/service/bcmpricingcalculator/api_op_TagResource.go new file mode 100644 index 00000000000..5cae986cfec --- /dev/null +++ b/service/bcmpricingcalculator/api_op_TagResource.go @@ -0,0 +1,157 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bcmpricingcalculator + +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" +) + +// Adds one or more tags to a specified resource. +func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error) { + if params == nil { + params = &TagResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "TagResource", params, optFns, c.addOperationTagResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*TagResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type TagResourceInput struct { + + // The Amazon Resource Name (ARN) of the resource to add tags to. + // + // This member is required. + Arn *string + + // The tags to add to the resource. + // + // This member is required. + Tags map[string]string + + noSmithyDocumentSerde +} + +type TagResourceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpTagResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpTagResource{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "TagResource"); 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 = addOpTagResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagResource(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_opTagResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "TagResource", + } +} diff --git a/service/bcmpricingcalculator/api_op_UntagResource.go b/service/bcmpricingcalculator/api_op_UntagResource.go new file mode 100644 index 00000000000..51339806d42 --- /dev/null +++ b/service/bcmpricingcalculator/api_op_UntagResource.go @@ -0,0 +1,157 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bcmpricingcalculator + +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" +) + +// Removes one or more tags from a specified resource. +func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error) { + if params == nil { + params = &UntagResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UntagResource", params, optFns, c.addOperationUntagResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UntagResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UntagResourceInput struct { + + // The Amazon Resource Name (ARN) of the resource to remove tags from. + // + // This member is required. + Arn *string + + // The keys of the tags to remove from the resource. + // + // This member is required. + TagKeys []string + + noSmithyDocumentSerde +} + +type UntagResourceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpUntagResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpUntagResource{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UntagResource"); 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 = addOpUntagResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagResource(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_opUntagResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UntagResource", + } +} diff --git a/service/bcmpricingcalculator/api_op_UpdateBillEstimate.go b/service/bcmpricingcalculator/api_op_UpdateBillEstimate.go new file mode 100644 index 00000000000..08819b8f384 --- /dev/null +++ b/service/bcmpricingcalculator/api_op_UpdateBillEstimate.go @@ -0,0 +1,187 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bcmpricingcalculator + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/bcmpricingcalculator/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Updates an existing bill estimate. +func (c *Client) UpdateBillEstimate(ctx context.Context, params *UpdateBillEstimateInput, optFns ...func(*Options)) (*UpdateBillEstimateOutput, error) { + if params == nil { + params = &UpdateBillEstimateInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateBillEstimate", params, optFns, c.addOperationUpdateBillEstimateMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateBillEstimateOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateBillEstimateInput struct { + + // The unique identifier of the bill estimate to update. + // + // This member is required. + Identifier *string + + // The new expiration date for the bill estimate. + ExpiresAt *time.Time + + // The new name for the bill estimate. + Name *string + + noSmithyDocumentSerde +} + +type UpdateBillEstimateOutput struct { + + // The unique identifier of the updated bill estimate. + // + // This member is required. + Id *string + + // The time period covered by the updated bill estimate. + BillInterval *types.BillInterval + + // A summary of the updated estimated costs. + CostSummary *types.BillEstimateCostSummary + + // The timestamp when the bill estimate was originally created. + CreatedAt *time.Time + + // The updated expiration timestamp for the bill estimate. + ExpiresAt *time.Time + + // An error message if the bill estimate update failed. + FailureMessage *string + + // The updated name of the bill estimate. + Name *string + + // The current status of the updated bill estimate. + Status types.BillEstimateStatus + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateBillEstimateMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpUpdateBillEstimate{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpUpdateBillEstimate{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateBillEstimate"); 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 = addOpUpdateBillEstimateValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateBillEstimate(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_opUpdateBillEstimate(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateBillEstimate", + } +} diff --git a/service/bcmpricingcalculator/api_op_UpdateBillScenario.go b/service/bcmpricingcalculator/api_op_UpdateBillScenario.go new file mode 100644 index 00000000000..41563b05e77 --- /dev/null +++ b/service/bcmpricingcalculator/api_op_UpdateBillScenario.go @@ -0,0 +1,184 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bcmpricingcalculator + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/bcmpricingcalculator/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Updates an existing bill scenario. +func (c *Client) UpdateBillScenario(ctx context.Context, params *UpdateBillScenarioInput, optFns ...func(*Options)) (*UpdateBillScenarioOutput, error) { + if params == nil { + params = &UpdateBillScenarioInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateBillScenario", params, optFns, c.addOperationUpdateBillScenarioMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateBillScenarioOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateBillScenarioInput struct { + + // The unique identifier of the bill scenario to update. + // + // This member is required. + Identifier *string + + // The new expiration date for the bill scenario. + ExpiresAt *time.Time + + // The new name for the bill scenario. + Name *string + + noSmithyDocumentSerde +} + +type UpdateBillScenarioOutput struct { + + // The unique identifier of the updated bill scenario. + // + // This member is required. + Id *string + + // The time period covered by the updated bill scenario. + BillInterval *types.BillInterval + + // The timestamp when the bill scenario was originally created. + CreatedAt *time.Time + + // The updated expiration timestamp for the bill scenario. + ExpiresAt *time.Time + + // An error message if the bill scenario update failed. + FailureMessage *string + + // The updated name of the bill scenario. + Name *string + + // The current status of the updated bill scenario. + Status types.BillScenarioStatus + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateBillScenarioMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpUpdateBillScenario{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpUpdateBillScenario{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateBillScenario"); 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 = addOpUpdateBillScenarioValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateBillScenario(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_opUpdateBillScenario(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateBillScenario", + } +} diff --git a/service/bcmpricingcalculator/api_op_UpdatePreferences.go b/service/bcmpricingcalculator/api_op_UpdatePreferences.go new file mode 100644 index 00000000000..ab62cffc11c --- /dev/null +++ b/service/bcmpricingcalculator/api_op_UpdatePreferences.go @@ -0,0 +1,158 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bcmpricingcalculator + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/bcmpricingcalculator/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates the preferences for the Amazon Web Services Cost Explorer service. +func (c *Client) UpdatePreferences(ctx context.Context, params *UpdatePreferencesInput, optFns ...func(*Options)) (*UpdatePreferencesOutput, error) { + if params == nil { + params = &UpdatePreferencesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdatePreferences", params, optFns, c.addOperationUpdatePreferencesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdatePreferencesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdatePreferencesInput struct { + + // The updated preferred rate types for the management account. + ManagementAccountRateTypeSelections []types.RateType + + // The updated preferred rate types for member accounts. + MemberAccountRateTypeSelections []types.RateType + + noSmithyDocumentSerde +} + +type UpdatePreferencesOutput struct { + + // The updated preferred rate types for the management account. + ManagementAccountRateTypeSelections []types.RateType + + // The updated preferred rate types for member accounts. + MemberAccountRateTypeSelections []types.RateType + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdatePreferencesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpUpdatePreferences{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpUpdatePreferences{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdatePreferences"); 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_opUpdatePreferences(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_opUpdatePreferences(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdatePreferences", + } +} diff --git a/service/bcmpricingcalculator/api_op_UpdateWorkloadEstimate.go b/service/bcmpricingcalculator/api_op_UpdateWorkloadEstimate.go new file mode 100644 index 00000000000..25328ac2a84 --- /dev/null +++ b/service/bcmpricingcalculator/api_op_UpdateWorkloadEstimate.go @@ -0,0 +1,194 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bcmpricingcalculator + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/bcmpricingcalculator/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Updates an existing workload estimate. +func (c *Client) UpdateWorkloadEstimate(ctx context.Context, params *UpdateWorkloadEstimateInput, optFns ...func(*Options)) (*UpdateWorkloadEstimateOutput, error) { + if params == nil { + params = &UpdateWorkloadEstimateInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateWorkloadEstimate", params, optFns, c.addOperationUpdateWorkloadEstimateMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateWorkloadEstimateOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateWorkloadEstimateInput struct { + + // The unique identifier of the workload estimate to update. + // + // This member is required. + Identifier *string + + // The new expiration date for the workload estimate. + ExpiresAt *time.Time + + // The new name for the workload estimate. + Name *string + + noSmithyDocumentSerde +} + +// Mixin for common fields returned by CRUD APIs +type UpdateWorkloadEstimateOutput struct { + + // The unique identifier of the updated workload estimate. + // + // This member is required. + Id *string + + // The currency of the updated estimated cost. + CostCurrency types.CurrencyCode + + // The timestamp when the workload estimate was originally created. + CreatedAt *time.Time + + // The updated expiration timestamp for the workload estimate. + ExpiresAt *time.Time + + // An error message if the workload estimate update failed. + FailureMessage *string + + // The updated name of the workload estimate. + Name *string + + // The timestamp of the pricing rates used for the updated estimate. + RateTimestamp *time.Time + + // The type of pricing rates used for the updated estimate. + RateType types.WorkloadEstimateRateType + + // The current status of the updated workload estimate. + Status types.WorkloadEstimateStatus + + // The updated total estimated cost for the workload. + TotalCost *float64 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateWorkloadEstimateMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpUpdateWorkloadEstimate{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpUpdateWorkloadEstimate{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateWorkloadEstimate"); 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 = addOpUpdateWorkloadEstimateValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateWorkloadEstimate(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_opUpdateWorkloadEstimate(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateWorkloadEstimate", + } +} diff --git a/service/bcmpricingcalculator/auth.go b/service/bcmpricingcalculator/auth.go new file mode 100644 index 00000000000..5f447557e1d --- /dev/null +++ b/service/bcmpricingcalculator/auth.go @@ -0,0 +1,313 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bcmpricingcalculator + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + smithy "github.com/aws/smithy-go" + smithyauth "github.com/aws/smithy-go/auth" + "github.com/aws/smithy-go/metrics" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +func bindAuthParamsRegion(_ interface{}, params *AuthResolverParameters, _ interface{}, options Options) { + params.Region = options.Region +} + +type setLegacyContextSigningOptionsMiddleware struct { +} + +func (*setLegacyContextSigningOptionsMiddleware) ID() string { + return "setLegacyContextSigningOptions" +} + +func (m *setLegacyContextSigningOptionsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + rscheme := getResolvedAuthScheme(ctx) + schemeID := rscheme.Scheme.SchemeID() + + if sn := awsmiddleware.GetSigningName(ctx); sn != "" { + if schemeID == "aws.auth#sigv4" { + smithyhttp.SetSigV4SigningName(&rscheme.SignerProperties, sn) + } else if schemeID == "aws.auth#sigv4a" { + smithyhttp.SetSigV4ASigningName(&rscheme.SignerProperties, sn) + } + } + + if sr := awsmiddleware.GetSigningRegion(ctx); sr != "" { + if schemeID == "aws.auth#sigv4" { + smithyhttp.SetSigV4SigningRegion(&rscheme.SignerProperties, sr) + } else if schemeID == "aws.auth#sigv4a" { + smithyhttp.SetSigV4ASigningRegions(&rscheme.SignerProperties, []string{sr}) + } + } + + return next.HandleFinalize(ctx, in) +} + +func addSetLegacyContextSigningOptionsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&setLegacyContextSigningOptionsMiddleware{}, "Signing", middleware.Before) +} + +type withAnonymous struct { + resolver AuthSchemeResolver +} + +var _ AuthSchemeResolver = (*withAnonymous)(nil) + +func (v *withAnonymous) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) { + opts, err := v.resolver.ResolveAuthSchemes(ctx, params) + if err != nil { + return nil, err + } + + opts = append(opts, &smithyauth.Option{ + SchemeID: smithyauth.SchemeIDAnonymous, + }) + return opts, nil +} + +func wrapWithAnonymousAuth(options *Options) { + if _, ok := options.AuthSchemeResolver.(*defaultAuthSchemeResolver); !ok { + return + } + + options.AuthSchemeResolver = &withAnonymous{ + resolver: options.AuthSchemeResolver, + } +} + +// AuthResolverParameters contains the set of inputs necessary for auth scheme +// resolution. +type AuthResolverParameters struct { + // The name of the operation being invoked. + Operation string + + // The region in which the operation is being invoked. + Region string +} + +func bindAuthResolverParams(ctx context.Context, operation string, input interface{}, options Options) *AuthResolverParameters { + params := &AuthResolverParameters{ + Operation: operation, + } + + bindAuthParamsRegion(ctx, params, input, options) + + return params +} + +// AuthSchemeResolver returns a set of possible authentication options for an +// operation. +type AuthSchemeResolver interface { + ResolveAuthSchemes(context.Context, *AuthResolverParameters) ([]*smithyauth.Option, error) +} + +type defaultAuthSchemeResolver struct{} + +var _ AuthSchemeResolver = (*defaultAuthSchemeResolver)(nil) + +func (*defaultAuthSchemeResolver) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) { + if overrides, ok := operationAuthOptions[params.Operation]; ok { + return overrides(params), nil + } + return serviceAuthOptions(params), nil +} + +var operationAuthOptions = map[string]func(*AuthResolverParameters) []*smithyauth.Option{} + +func serviceAuthOptions(params *AuthResolverParameters) []*smithyauth.Option { + return []*smithyauth.Option{ + { + SchemeID: smithyauth.SchemeIDSigV4, + SignerProperties: func() smithy.Properties { + var props smithy.Properties + smithyhttp.SetSigV4SigningName(&props, "bcm-pricing-calculator") + smithyhttp.SetSigV4SigningRegion(&props, params.Region) + return props + }(), + }, + } +} + +type resolveAuthSchemeMiddleware struct { + operation string + options Options +} + +func (*resolveAuthSchemeMiddleware) ID() string { + return "ResolveAuthScheme" +} + +func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "ResolveAuthScheme") + defer span.End() + + params := bindAuthResolverParams(ctx, m.operation, getOperationInput(ctx), m.options) + options, err := m.options.AuthSchemeResolver.ResolveAuthSchemes(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("resolve auth scheme: %w", err) + } + + scheme, ok := m.selectScheme(options) + if !ok { + return out, metadata, fmt.Errorf("could not select an auth scheme") + } + + ctx = setResolvedAuthScheme(ctx, scheme) + + span.SetProperty("auth.scheme_id", scheme.Scheme.SchemeID()) + span.End() + return next.HandleFinalize(ctx, in) +} + +func (m *resolveAuthSchemeMiddleware) selectScheme(options []*smithyauth.Option) (*resolvedAuthScheme, bool) { + for _, option := range options { + if option.SchemeID == smithyauth.SchemeIDAnonymous { + return newResolvedAuthScheme(smithyhttp.NewAnonymousScheme(), option), true + } + + for _, scheme := range m.options.AuthSchemes { + if scheme.SchemeID() != option.SchemeID { + continue + } + + if scheme.IdentityResolver(m.options) != nil { + return newResolvedAuthScheme(scheme, option), true + } + } + } + + return nil, false +} + +type resolvedAuthSchemeKey struct{} + +type resolvedAuthScheme struct { + Scheme smithyhttp.AuthScheme + IdentityProperties smithy.Properties + SignerProperties smithy.Properties +} + +func newResolvedAuthScheme(scheme smithyhttp.AuthScheme, option *smithyauth.Option) *resolvedAuthScheme { + return &resolvedAuthScheme{ + Scheme: scheme, + IdentityProperties: option.IdentityProperties, + SignerProperties: option.SignerProperties, + } +} + +func setResolvedAuthScheme(ctx context.Context, scheme *resolvedAuthScheme) context.Context { + return middleware.WithStackValue(ctx, resolvedAuthSchemeKey{}, scheme) +} + +func getResolvedAuthScheme(ctx context.Context) *resolvedAuthScheme { + v, _ := middleware.GetStackValue(ctx, resolvedAuthSchemeKey{}).(*resolvedAuthScheme) + return v +} + +type getIdentityMiddleware struct { + options Options +} + +func (*getIdentityMiddleware) ID() string { + return "GetIdentity" +} + +func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + innerCtx, span := tracing.StartSpan(ctx, "GetIdentity") + defer span.End() + + rscheme := getResolvedAuthScheme(innerCtx) + if rscheme == nil { + return out, metadata, fmt.Errorf("no resolved auth scheme") + } + + resolver := rscheme.Scheme.IdentityResolver(m.options) + if resolver == nil { + return out, metadata, fmt.Errorf("no identity resolver") + } + + identity, err := timeOperationMetric(ctx, "client.call.resolve_identity_duration", + func() (smithyauth.Identity, error) { + return resolver.GetIdentity(innerCtx, rscheme.IdentityProperties) + }, + func(o *metrics.RecordMetricOptions) { + o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID()) + }) + if err != nil { + return out, metadata, fmt.Errorf("get identity: %w", err) + } + + ctx = setIdentity(ctx, identity) + + span.End() + return next.HandleFinalize(ctx, in) +} + +type identityKey struct{} + +func setIdentity(ctx context.Context, identity smithyauth.Identity) context.Context { + return middleware.WithStackValue(ctx, identityKey{}, identity) +} + +func getIdentity(ctx context.Context) smithyauth.Identity { + v, _ := middleware.GetStackValue(ctx, identityKey{}).(smithyauth.Identity) + return v +} + +type signRequestMiddleware struct { + options Options +} + +func (*signRequestMiddleware) ID() string { + return "Signing" +} + +func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "SignRequest") + defer span.End() + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unexpected transport type %T", in.Request) + } + + rscheme := getResolvedAuthScheme(ctx) + if rscheme == nil { + return out, metadata, fmt.Errorf("no resolved auth scheme") + } + + identity := getIdentity(ctx) + if identity == nil { + return out, metadata, fmt.Errorf("no identity") + } + + signer := rscheme.Scheme.Signer() + if signer == nil { + return out, metadata, fmt.Errorf("no signer") + } + + _, err = timeOperationMetric(ctx, "client.call.signing_duration", func() (any, error) { + return nil, signer.SignRequest(ctx, req, identity, rscheme.SignerProperties) + }, func(o *metrics.RecordMetricOptions) { + o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID()) + }) + if err != nil { + return out, metadata, fmt.Errorf("sign request: %w", err) + } + + span.End() + return next.HandleFinalize(ctx, in) +} diff --git a/service/bcmpricingcalculator/deserializers.go b/service/bcmpricingcalculator/deserializers.go new file mode 100644 index 00000000000..9d1dd966a94 --- /dev/null +++ b/service/bcmpricingcalculator/deserializers.go @@ -0,0 +1,11575 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bcmpricingcalculator + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" + "github.com/aws/aws-sdk-go-v2/service/bcmpricingcalculator/types" + smithy "github.com/aws/smithy-go" + smithyio "github.com/aws/smithy-go/io" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" + smithytime "github.com/aws/smithy-go/time" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" + "io" + "math" + "strings" + "time" +) + +func deserializeS3Expires(v string) (*time.Time, error) { + t, err := smithytime.ParseHTTPDate(v) + if err != nil { + return nil, nil + } + return &t, nil +} + +type awsAwsjson10_deserializeOpBatchCreateBillScenarioCommitmentModification struct { +} + +func (*awsAwsjson10_deserializeOpBatchCreateBillScenarioCommitmentModification) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpBatchCreateBillScenarioCommitmentModification) HandleDeserialize(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_deserializeOpErrorBatchCreateBillScenarioCommitmentModification(response, &metadata) + } + output := &BatchCreateBillScenarioCommitmentModificationOutput{} + 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_deserializeOpDocumentBatchCreateBillScenarioCommitmentModificationOutput(&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_deserializeOpErrorBatchCreateBillScenarioCommitmentModification(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("DataUnavailableException", errorCode): + return awsAwsjson10_deserializeErrorDataUnavailableException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpBatchCreateBillScenarioUsageModification struct { +} + +func (*awsAwsjson10_deserializeOpBatchCreateBillScenarioUsageModification) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpBatchCreateBillScenarioUsageModification) HandleDeserialize(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_deserializeOpErrorBatchCreateBillScenarioUsageModification(response, &metadata) + } + output := &BatchCreateBillScenarioUsageModificationOutput{} + 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_deserializeOpDocumentBatchCreateBillScenarioUsageModificationOutput(&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_deserializeOpErrorBatchCreateBillScenarioUsageModification(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("DataUnavailableException", errorCode): + return awsAwsjson10_deserializeErrorDataUnavailableException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpBatchCreateWorkloadEstimateUsage struct { +} + +func (*awsAwsjson10_deserializeOpBatchCreateWorkloadEstimateUsage) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpBatchCreateWorkloadEstimateUsage) HandleDeserialize(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_deserializeOpErrorBatchCreateWorkloadEstimateUsage(response, &metadata) + } + output := &BatchCreateWorkloadEstimateUsageOutput{} + 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_deserializeOpDocumentBatchCreateWorkloadEstimateUsageOutput(&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_deserializeOpErrorBatchCreateWorkloadEstimateUsage(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("DataUnavailableException", errorCode): + return awsAwsjson10_deserializeErrorDataUnavailableException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpBatchDeleteBillScenarioCommitmentModification struct { +} + +func (*awsAwsjson10_deserializeOpBatchDeleteBillScenarioCommitmentModification) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpBatchDeleteBillScenarioCommitmentModification) HandleDeserialize(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_deserializeOpErrorBatchDeleteBillScenarioCommitmentModification(response, &metadata) + } + output := &BatchDeleteBillScenarioCommitmentModificationOutput{} + 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_deserializeOpDocumentBatchDeleteBillScenarioCommitmentModificationOutput(&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_deserializeOpErrorBatchDeleteBillScenarioCommitmentModification(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("DataUnavailableException", errorCode): + return awsAwsjson10_deserializeErrorDataUnavailableException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpBatchDeleteBillScenarioUsageModification struct { +} + +func (*awsAwsjson10_deserializeOpBatchDeleteBillScenarioUsageModification) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpBatchDeleteBillScenarioUsageModification) HandleDeserialize(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_deserializeOpErrorBatchDeleteBillScenarioUsageModification(response, &metadata) + } + output := &BatchDeleteBillScenarioUsageModificationOutput{} + 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_deserializeOpDocumentBatchDeleteBillScenarioUsageModificationOutput(&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_deserializeOpErrorBatchDeleteBillScenarioUsageModification(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("DataUnavailableException", errorCode): + return awsAwsjson10_deserializeErrorDataUnavailableException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpBatchDeleteWorkloadEstimateUsage struct { +} + +func (*awsAwsjson10_deserializeOpBatchDeleteWorkloadEstimateUsage) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpBatchDeleteWorkloadEstimateUsage) HandleDeserialize(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_deserializeOpErrorBatchDeleteWorkloadEstimateUsage(response, &metadata) + } + output := &BatchDeleteWorkloadEstimateUsageOutput{} + 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_deserializeOpDocumentBatchDeleteWorkloadEstimateUsageOutput(&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_deserializeOpErrorBatchDeleteWorkloadEstimateUsage(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("DataUnavailableException", errorCode): + return awsAwsjson10_deserializeErrorDataUnavailableException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpBatchUpdateBillScenarioCommitmentModification struct { +} + +func (*awsAwsjson10_deserializeOpBatchUpdateBillScenarioCommitmentModification) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpBatchUpdateBillScenarioCommitmentModification) HandleDeserialize(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_deserializeOpErrorBatchUpdateBillScenarioCommitmentModification(response, &metadata) + } + output := &BatchUpdateBillScenarioCommitmentModificationOutput{} + 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_deserializeOpDocumentBatchUpdateBillScenarioCommitmentModificationOutput(&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_deserializeOpErrorBatchUpdateBillScenarioCommitmentModification(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("DataUnavailableException", errorCode): + return awsAwsjson10_deserializeErrorDataUnavailableException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpBatchUpdateBillScenarioUsageModification struct { +} + +func (*awsAwsjson10_deserializeOpBatchUpdateBillScenarioUsageModification) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpBatchUpdateBillScenarioUsageModification) HandleDeserialize(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_deserializeOpErrorBatchUpdateBillScenarioUsageModification(response, &metadata) + } + output := &BatchUpdateBillScenarioUsageModificationOutput{} + 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_deserializeOpDocumentBatchUpdateBillScenarioUsageModificationOutput(&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_deserializeOpErrorBatchUpdateBillScenarioUsageModification(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("DataUnavailableException", errorCode): + return awsAwsjson10_deserializeErrorDataUnavailableException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpBatchUpdateWorkloadEstimateUsage struct { +} + +func (*awsAwsjson10_deserializeOpBatchUpdateWorkloadEstimateUsage) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpBatchUpdateWorkloadEstimateUsage) HandleDeserialize(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_deserializeOpErrorBatchUpdateWorkloadEstimateUsage(response, &metadata) + } + output := &BatchUpdateWorkloadEstimateUsageOutput{} + 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_deserializeOpDocumentBatchUpdateWorkloadEstimateUsageOutput(&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_deserializeOpErrorBatchUpdateWorkloadEstimateUsage(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("DataUnavailableException", errorCode): + return awsAwsjson10_deserializeErrorDataUnavailableException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpCreateBillEstimate struct { +} + +func (*awsAwsjson10_deserializeOpCreateBillEstimate) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpCreateBillEstimate) HandleDeserialize(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_deserializeOpErrorCreateBillEstimate(response, &metadata) + } + output := &CreateBillEstimateOutput{} + 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_deserializeOpDocumentCreateBillEstimateOutput(&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_deserializeOpErrorCreateBillEstimate(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("DataUnavailableException", errorCode): + return awsAwsjson10_deserializeErrorDataUnavailableException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpCreateBillScenario struct { +} + +func (*awsAwsjson10_deserializeOpCreateBillScenario) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpCreateBillScenario) HandleDeserialize(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_deserializeOpErrorCreateBillScenario(response, &metadata) + } + output := &CreateBillScenarioOutput{} + 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_deserializeOpDocumentCreateBillScenarioOutput(&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_deserializeOpErrorCreateBillScenario(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("DataUnavailableException", errorCode): + return awsAwsjson10_deserializeErrorDataUnavailableException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpCreateWorkloadEstimate struct { +} + +func (*awsAwsjson10_deserializeOpCreateWorkloadEstimate) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpCreateWorkloadEstimate) HandleDeserialize(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_deserializeOpErrorCreateWorkloadEstimate(response, &metadata) + } + output := &CreateWorkloadEstimateOutput{} + 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_deserializeOpDocumentCreateWorkloadEstimateOutput(&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_deserializeOpErrorCreateWorkloadEstimate(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("DataUnavailableException", errorCode): + return awsAwsjson10_deserializeErrorDataUnavailableException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpDeleteBillEstimate struct { +} + +func (*awsAwsjson10_deserializeOpDeleteBillEstimate) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpDeleteBillEstimate) HandleDeserialize(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_deserializeOpErrorDeleteBillEstimate(response, &metadata) + } + output := &DeleteBillEstimateOutput{} + 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_deserializeOpDocumentDeleteBillEstimateOutput(&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_deserializeOpErrorDeleteBillEstimate(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("DataUnavailableException", errorCode): + return awsAwsjson10_deserializeErrorDataUnavailableException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpDeleteBillScenario struct { +} + +func (*awsAwsjson10_deserializeOpDeleteBillScenario) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpDeleteBillScenario) HandleDeserialize(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_deserializeOpErrorDeleteBillScenario(response, &metadata) + } + output := &DeleteBillScenarioOutput{} + 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_deserializeOpDocumentDeleteBillScenarioOutput(&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_deserializeOpErrorDeleteBillScenario(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("DataUnavailableException", errorCode): + return awsAwsjson10_deserializeErrorDataUnavailableException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpDeleteWorkloadEstimate struct { +} + +func (*awsAwsjson10_deserializeOpDeleteWorkloadEstimate) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpDeleteWorkloadEstimate) HandleDeserialize(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_deserializeOpErrorDeleteWorkloadEstimate(response, &metadata) + } + output := &DeleteWorkloadEstimateOutput{} + 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_deserializeOpDocumentDeleteWorkloadEstimateOutput(&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_deserializeOpErrorDeleteWorkloadEstimate(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("DataUnavailableException", errorCode): + return awsAwsjson10_deserializeErrorDataUnavailableException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpGetBillEstimate struct { +} + +func (*awsAwsjson10_deserializeOpGetBillEstimate) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpGetBillEstimate) HandleDeserialize(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_deserializeOpErrorGetBillEstimate(response, &metadata) + } + output := &GetBillEstimateOutput{} + 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_deserializeOpDocumentGetBillEstimateOutput(&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_deserializeOpErrorGetBillEstimate(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("DataUnavailableException", errorCode): + return awsAwsjson10_deserializeErrorDataUnavailableException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpGetBillScenario struct { +} + +func (*awsAwsjson10_deserializeOpGetBillScenario) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpGetBillScenario) HandleDeserialize(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_deserializeOpErrorGetBillScenario(response, &metadata) + } + output := &GetBillScenarioOutput{} + 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_deserializeOpDocumentGetBillScenarioOutput(&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_deserializeOpErrorGetBillScenario(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("DataUnavailableException", errorCode): + return awsAwsjson10_deserializeErrorDataUnavailableException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpGetPreferences struct { +} + +func (*awsAwsjson10_deserializeOpGetPreferences) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpGetPreferences) HandleDeserialize(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_deserializeOpErrorGetPreferences(response, &metadata) + } + output := &GetPreferencesOutput{} + 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_deserializeOpDocumentGetPreferencesOutput(&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_deserializeOpErrorGetPreferences(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("DataUnavailableException", errorCode): + return awsAwsjson10_deserializeErrorDataUnavailableException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpGetWorkloadEstimate struct { +} + +func (*awsAwsjson10_deserializeOpGetWorkloadEstimate) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpGetWorkloadEstimate) HandleDeserialize(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_deserializeOpErrorGetWorkloadEstimate(response, &metadata) + } + output := &GetWorkloadEstimateOutput{} + 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_deserializeOpDocumentGetWorkloadEstimateOutput(&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_deserializeOpErrorGetWorkloadEstimate(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("DataUnavailableException", errorCode): + return awsAwsjson10_deserializeErrorDataUnavailableException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpListBillEstimateCommitments struct { +} + +func (*awsAwsjson10_deserializeOpListBillEstimateCommitments) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpListBillEstimateCommitments) HandleDeserialize(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_deserializeOpErrorListBillEstimateCommitments(response, &metadata) + } + output := &ListBillEstimateCommitmentsOutput{} + 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_deserializeOpDocumentListBillEstimateCommitmentsOutput(&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_deserializeOpErrorListBillEstimateCommitments(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("DataUnavailableException", errorCode): + return awsAwsjson10_deserializeErrorDataUnavailableException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpListBillEstimateInputCommitmentModifications struct { +} + +func (*awsAwsjson10_deserializeOpListBillEstimateInputCommitmentModifications) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpListBillEstimateInputCommitmentModifications) HandleDeserialize(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_deserializeOpErrorListBillEstimateInputCommitmentModifications(response, &metadata) + } + output := &ListBillEstimateInputCommitmentModificationsOutput{} + 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_deserializeOpDocumentListBillEstimateInputCommitmentModificationsOutput(&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_deserializeOpErrorListBillEstimateInputCommitmentModifications(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("DataUnavailableException", errorCode): + return awsAwsjson10_deserializeErrorDataUnavailableException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpListBillEstimateInputUsageModifications struct { +} + +func (*awsAwsjson10_deserializeOpListBillEstimateInputUsageModifications) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpListBillEstimateInputUsageModifications) HandleDeserialize(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_deserializeOpErrorListBillEstimateInputUsageModifications(response, &metadata) + } + output := &ListBillEstimateInputUsageModificationsOutput{} + 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_deserializeOpDocumentListBillEstimateInputUsageModificationsOutput(&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_deserializeOpErrorListBillEstimateInputUsageModifications(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("DataUnavailableException", errorCode): + return awsAwsjson10_deserializeErrorDataUnavailableException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpListBillEstimateLineItems struct { +} + +func (*awsAwsjson10_deserializeOpListBillEstimateLineItems) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpListBillEstimateLineItems) HandleDeserialize(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_deserializeOpErrorListBillEstimateLineItems(response, &metadata) + } + output := &ListBillEstimateLineItemsOutput{} + 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_deserializeOpDocumentListBillEstimateLineItemsOutput(&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_deserializeOpErrorListBillEstimateLineItems(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("DataUnavailableException", errorCode): + return awsAwsjson10_deserializeErrorDataUnavailableException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpListBillEstimates struct { +} + +func (*awsAwsjson10_deserializeOpListBillEstimates) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpListBillEstimates) HandleDeserialize(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_deserializeOpErrorListBillEstimates(response, &metadata) + } + output := &ListBillEstimatesOutput{} + 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_deserializeOpDocumentListBillEstimatesOutput(&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_deserializeOpErrorListBillEstimates(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("DataUnavailableException", errorCode): + return awsAwsjson10_deserializeErrorDataUnavailableException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpListBillScenarioCommitmentModifications struct { +} + +func (*awsAwsjson10_deserializeOpListBillScenarioCommitmentModifications) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpListBillScenarioCommitmentModifications) HandleDeserialize(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_deserializeOpErrorListBillScenarioCommitmentModifications(response, &metadata) + } + output := &ListBillScenarioCommitmentModificationsOutput{} + 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_deserializeOpDocumentListBillScenarioCommitmentModificationsOutput(&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_deserializeOpErrorListBillScenarioCommitmentModifications(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("DataUnavailableException", errorCode): + return awsAwsjson10_deserializeErrorDataUnavailableException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpListBillScenarios struct { +} + +func (*awsAwsjson10_deserializeOpListBillScenarios) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpListBillScenarios) HandleDeserialize(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_deserializeOpErrorListBillScenarios(response, &metadata) + } + output := &ListBillScenariosOutput{} + 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_deserializeOpDocumentListBillScenariosOutput(&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_deserializeOpErrorListBillScenarios(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("DataUnavailableException", errorCode): + return awsAwsjson10_deserializeErrorDataUnavailableException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpListBillScenarioUsageModifications struct { +} + +func (*awsAwsjson10_deserializeOpListBillScenarioUsageModifications) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpListBillScenarioUsageModifications) HandleDeserialize(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_deserializeOpErrorListBillScenarioUsageModifications(response, &metadata) + } + output := &ListBillScenarioUsageModificationsOutput{} + 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_deserializeOpDocumentListBillScenarioUsageModificationsOutput(&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_deserializeOpErrorListBillScenarioUsageModifications(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("DataUnavailableException", errorCode): + return awsAwsjson10_deserializeErrorDataUnavailableException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpListTagsForResource struct { +} + +func (*awsAwsjson10_deserializeOpListTagsForResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, 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_deserializeOpErrorListTagsForResource(response, &metadata) + } + output := &ListTagsForResourceOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentListTagsForResourceOutput(&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_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + 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("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpListWorkloadEstimates struct { +} + +func (*awsAwsjson10_deserializeOpListWorkloadEstimates) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpListWorkloadEstimates) HandleDeserialize(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_deserializeOpErrorListWorkloadEstimates(response, &metadata) + } + output := &ListWorkloadEstimatesOutput{} + 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_deserializeOpDocumentListWorkloadEstimatesOutput(&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_deserializeOpErrorListWorkloadEstimates(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("DataUnavailableException", errorCode): + return awsAwsjson10_deserializeErrorDataUnavailableException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpListWorkloadEstimateUsage struct { +} + +func (*awsAwsjson10_deserializeOpListWorkloadEstimateUsage) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpListWorkloadEstimateUsage) HandleDeserialize(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_deserializeOpErrorListWorkloadEstimateUsage(response, &metadata) + } + output := &ListWorkloadEstimateUsageOutput{} + 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_deserializeOpDocumentListWorkloadEstimateUsageOutput(&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_deserializeOpErrorListWorkloadEstimateUsage(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("DataUnavailableException", errorCode): + return awsAwsjson10_deserializeErrorDataUnavailableException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpTagResource struct { +} + +func (*awsAwsjson10_deserializeOpTagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_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, awsAwsjson10_deserializeOpErrorTagResource(response, &metadata) + } + output := &TagResourceOutput{} + 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_deserializeOpDocumentTagResourceOutput(&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_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + 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("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpUntagResource struct { +} + +func (*awsAwsjson10_deserializeOpUntagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_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, awsAwsjson10_deserializeOpErrorUntagResource(response, &metadata) + } + output := &UntagResourceOutput{} + 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_deserializeOpDocumentUntagResourceOutput(&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_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + 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("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpUpdateBillEstimate struct { +} + +func (*awsAwsjson10_deserializeOpUpdateBillEstimate) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpUpdateBillEstimate) HandleDeserialize(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_deserializeOpErrorUpdateBillEstimate(response, &metadata) + } + output := &UpdateBillEstimateOutput{} + 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_deserializeOpDocumentUpdateBillEstimateOutput(&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_deserializeOpErrorUpdateBillEstimate(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("DataUnavailableException", errorCode): + return awsAwsjson10_deserializeErrorDataUnavailableException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpUpdateBillScenario struct { +} + +func (*awsAwsjson10_deserializeOpUpdateBillScenario) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpUpdateBillScenario) HandleDeserialize(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_deserializeOpErrorUpdateBillScenario(response, &metadata) + } + output := &UpdateBillScenarioOutput{} + 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_deserializeOpDocumentUpdateBillScenarioOutput(&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_deserializeOpErrorUpdateBillScenario(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("DataUnavailableException", errorCode): + return awsAwsjson10_deserializeErrorDataUnavailableException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpUpdatePreferences struct { +} + +func (*awsAwsjson10_deserializeOpUpdatePreferences) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpUpdatePreferences) HandleDeserialize(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_deserializeOpErrorUpdatePreferences(response, &metadata) + } + output := &UpdatePreferencesOutput{} + 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_deserializeOpDocumentUpdatePreferencesOutput(&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_deserializeOpErrorUpdatePreferences(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("DataUnavailableException", errorCode): + return awsAwsjson10_deserializeErrorDataUnavailableException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpUpdateWorkloadEstimate struct { +} + +func (*awsAwsjson10_deserializeOpUpdateWorkloadEstimate) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpUpdateWorkloadEstimate) HandleDeserialize(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_deserializeOpErrorUpdateWorkloadEstimate(response, &metadata) + } + output := &UpdateWorkloadEstimateOutput{} + 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_deserializeOpDocumentUpdateWorkloadEstimateOutput(&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_deserializeOpErrorUpdateWorkloadEstimate(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("DataUnavailableException", errorCode): + return awsAwsjson10_deserializeErrorDataUnavailableException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsAwsjson10_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.AccessDeniedException{} + err := awsAwsjson10_deserializeDocumentAccessDeniedException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ConflictException{} + err := awsAwsjson10_deserializeDocumentConflictException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeErrorDataUnavailableException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.DataUnavailableException{} + err := awsAwsjson10_deserializeDocumentDataUnavailableException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InternalServerException{} + err := awsAwsjson10_deserializeDocumentInternalServerException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ResourceNotFoundException{} + err := awsAwsjson10_deserializeDocumentResourceNotFoundException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeErrorServiceQuotaExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ServiceQuotaExceededException{} + err := awsAwsjson10_deserializeDocumentServiceQuotaExceededException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ThrottlingException{} + err := awsAwsjson10_deserializeDocumentThrottlingException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ValidationException{} + err := awsAwsjson10_deserializeDocumentValidationException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AccessDeniedException + if *v == nil { + sv = &types.AccessDeniedException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "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 awsAwsjson10_deserializeDocumentAddReservedInstanceAction(v **types.AddReservedInstanceAction, 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.AddReservedInstanceAction + if *v == nil { + sv = &types.AddReservedInstanceAction{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "instanceCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ReservedInstanceInstanceCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.InstanceCount = ptr.Int32(int32(i64)) + } + + case "reservedInstancesOfferingId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Uuid to be of type string, got %T instead", value) + } + sv.ReservedInstancesOfferingId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentAddSavingsPlanAction(v **types.AddSavingsPlanAction, 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.AddSavingsPlanAction + if *v == nil { + sv = &types.AddSavingsPlanAction{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "commitment": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Commitment = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.Commitment = ptr.Float64(f64) + + default: + return fmt.Errorf("expected SavingsPlanCommitment to be a JSON Number, got %T instead", value) + + } + } + + case "savingsPlanOfferingId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Uuid to be of type string, got %T instead", value) + } + sv.SavingsPlanOfferingId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentBatchCreateBillScenarioCommitmentModificationError(v **types.BatchCreateBillScenarioCommitmentModificationError, 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.BatchCreateBillScenarioCommitmentModificationError + if *v == nil { + sv = &types.BatchCreateBillScenarioCommitmentModificationError{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "errorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BatchCreateBillScenarioCommitmentModificationErrorCode to be of type string, got %T instead", value) + } + sv.ErrorCode = types.BatchCreateBillScenarioCommitmentModificationErrorCode(jtv) + } + + case "errorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ErrorMessage = ptr.String(jtv) + } + + case "key": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Key to be of type string, got %T instead", value) + } + sv.Key = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentBatchCreateBillScenarioCommitmentModificationErrors(v *[]types.BatchCreateBillScenarioCommitmentModificationError, 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.BatchCreateBillScenarioCommitmentModificationError + if *v == nil { + cv = []types.BatchCreateBillScenarioCommitmentModificationError{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.BatchCreateBillScenarioCommitmentModificationError + destAddr := &col + if err := awsAwsjson10_deserializeDocumentBatchCreateBillScenarioCommitmentModificationError(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentBatchCreateBillScenarioCommitmentModificationItem(v **types.BatchCreateBillScenarioCommitmentModificationItem, 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.BatchCreateBillScenarioCommitmentModificationItem + if *v == nil { + sv = &types.BatchCreateBillScenarioCommitmentModificationItem{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "commitmentAction": + if err := awsAwsjson10_deserializeDocumentBillScenarioCommitmentModificationAction(&sv.CommitmentAction, value); err != nil { + return err + } + + case "group": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UsageGroup to be of type string, got %T instead", value) + } + sv.Group = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "key": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Key to be of type string, got %T instead", value) + } + sv.Key = ptr.String(jtv) + } + + case "usageAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.UsageAccountId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentBatchCreateBillScenarioCommitmentModificationItems(v *[]types.BatchCreateBillScenarioCommitmentModificationItem, 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.BatchCreateBillScenarioCommitmentModificationItem + if *v == nil { + cv = []types.BatchCreateBillScenarioCommitmentModificationItem{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.BatchCreateBillScenarioCommitmentModificationItem + destAddr := &col + if err := awsAwsjson10_deserializeDocumentBatchCreateBillScenarioCommitmentModificationItem(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentBatchCreateBillScenarioUsageModificationError(v **types.BatchCreateBillScenarioUsageModificationError, 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.BatchCreateBillScenarioUsageModificationError + if *v == nil { + sv = &types.BatchCreateBillScenarioUsageModificationError{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "errorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BatchCreateBillScenarioUsageModificationErrorCode to be of type string, got %T instead", value) + } + sv.ErrorCode = types.BatchCreateBillScenarioUsageModificationErrorCode(jtv) + } + + case "errorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ErrorMessage = ptr.String(jtv) + } + + case "key": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Key to be of type string, got %T instead", value) + } + sv.Key = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentBatchCreateBillScenarioUsageModificationErrors(v *[]types.BatchCreateBillScenarioUsageModificationError, 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.BatchCreateBillScenarioUsageModificationError + if *v == nil { + cv = []types.BatchCreateBillScenarioUsageModificationError{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.BatchCreateBillScenarioUsageModificationError + destAddr := &col + if err := awsAwsjson10_deserializeDocumentBatchCreateBillScenarioUsageModificationError(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentBatchCreateBillScenarioUsageModificationItem(v **types.BatchCreateBillScenarioUsageModificationItem, 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.BatchCreateBillScenarioUsageModificationItem + if *v == nil { + sv = &types.BatchCreateBillScenarioUsageModificationItem{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "availabilityZone": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AvailabilityZone to be of type string, got %T instead", value) + } + sv.AvailabilityZone = ptr.String(jtv) + } + + case "group": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UsageGroup to be of type string, got %T instead", value) + } + sv.Group = ptr.String(jtv) + } + + case "historicalUsage": + if err := awsAwsjson10_deserializeDocumentHistoricalUsageEntity(&sv.HistoricalUsage, value); err != nil { + return err + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "key": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Key to be of type string, got %T instead", value) + } + sv.Key = ptr.String(jtv) + } + + case "location": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Location = ptr.String(jtv) + } + + case "operation": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Operation to be of type string, got %T instead", value) + } + sv.Operation = ptr.String(jtv) + } + + case "quantities": + if err := awsAwsjson10_deserializeDocumentUsageQuantities(&sv.Quantities, value); err != nil { + return err + } + + case "serviceCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServiceCode to be of type string, got %T instead", value) + } + sv.ServiceCode = ptr.String(jtv) + } + + case "usageAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.UsageAccountId = ptr.String(jtv) + } + + case "usageType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UsageType to be of type string, got %T instead", value) + } + sv.UsageType = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentBatchCreateBillScenarioUsageModificationItems(v *[]types.BatchCreateBillScenarioUsageModificationItem, 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.BatchCreateBillScenarioUsageModificationItem + if *v == nil { + cv = []types.BatchCreateBillScenarioUsageModificationItem{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.BatchCreateBillScenarioUsageModificationItem + destAddr := &col + if err := awsAwsjson10_deserializeDocumentBatchCreateBillScenarioUsageModificationItem(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentBatchCreateWorkloadEstimateUsageError(v **types.BatchCreateWorkloadEstimateUsageError, 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.BatchCreateWorkloadEstimateUsageError + if *v == nil { + sv = &types.BatchCreateWorkloadEstimateUsageError{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "errorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BatchCreateWorkloadEstimateUsageCode to be of type string, got %T instead", value) + } + sv.ErrorCode = types.BatchCreateWorkloadEstimateUsageCode(jtv) + } + + case "errorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ErrorMessage = ptr.String(jtv) + } + + case "key": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Key to be of type string, got %T instead", value) + } + sv.Key = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentBatchCreateWorkloadEstimateUsageErrors(v *[]types.BatchCreateWorkloadEstimateUsageError, 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.BatchCreateWorkloadEstimateUsageError + if *v == nil { + cv = []types.BatchCreateWorkloadEstimateUsageError{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.BatchCreateWorkloadEstimateUsageError + destAddr := &col + if err := awsAwsjson10_deserializeDocumentBatchCreateWorkloadEstimateUsageError(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentBatchCreateWorkloadEstimateUsageItem(v **types.BatchCreateWorkloadEstimateUsageItem, 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.BatchCreateWorkloadEstimateUsageItem + if *v == nil { + sv = &types.BatchCreateWorkloadEstimateUsageItem{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "cost": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Cost = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.Cost = ptr.Float64(f64) + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + + case "currency": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CurrencyCode to be of type string, got %T instead", value) + } + sv.Currency = types.CurrencyCode(jtv) + } + + case "group": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UsageGroup to be of type string, got %T instead", value) + } + sv.Group = ptr.String(jtv) + } + + case "historicalUsage": + if err := awsAwsjson10_deserializeDocumentHistoricalUsageEntity(&sv.HistoricalUsage, value); err != nil { + return err + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "key": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Key to be of type string, got %T instead", value) + } + sv.Key = ptr.String(jtv) + } + + case "location": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Location = ptr.String(jtv) + } + + case "operation": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Operation to be of type string, got %T instead", value) + } + sv.Operation = ptr.String(jtv) + } + + case "quantity": + if err := awsAwsjson10_deserializeDocumentWorkloadEstimateUsageQuantity(&sv.Quantity, value); err != nil { + return err + } + + case "serviceCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServiceCode to be of type string, got %T instead", value) + } + sv.ServiceCode = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WorkloadEstimateCostStatus to be of type string, got %T instead", value) + } + sv.Status = types.WorkloadEstimateCostStatus(jtv) + } + + case "usageAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.UsageAccountId = ptr.String(jtv) + } + + case "usageType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UsageType to be of type string, got %T instead", value) + } + sv.UsageType = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentBatchCreateWorkloadEstimateUsageItems(v *[]types.BatchCreateWorkloadEstimateUsageItem, 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.BatchCreateWorkloadEstimateUsageItem + if *v == nil { + cv = []types.BatchCreateWorkloadEstimateUsageItem{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.BatchCreateWorkloadEstimateUsageItem + destAddr := &col + if err := awsAwsjson10_deserializeDocumentBatchCreateWorkloadEstimateUsageItem(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentBatchDeleteBillScenarioCommitmentModificationError(v **types.BatchDeleteBillScenarioCommitmentModificationError, 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.BatchDeleteBillScenarioCommitmentModificationError + if *v == nil { + sv = &types.BatchDeleteBillScenarioCommitmentModificationError{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "errorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BatchDeleteBillScenarioCommitmentModificationErrorCode to be of type string, got %T instead", value) + } + sv.ErrorCode = types.BatchDeleteBillScenarioCommitmentModificationErrorCode(jtv) + } + + case "errorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ErrorMessage = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentBatchDeleteBillScenarioCommitmentModificationErrors(v *[]types.BatchDeleteBillScenarioCommitmentModificationError, 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.BatchDeleteBillScenarioCommitmentModificationError + if *v == nil { + cv = []types.BatchDeleteBillScenarioCommitmentModificationError{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.BatchDeleteBillScenarioCommitmentModificationError + destAddr := &col + if err := awsAwsjson10_deserializeDocumentBatchDeleteBillScenarioCommitmentModificationError(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentBatchDeleteBillScenarioUsageModificationError(v **types.BatchDeleteBillScenarioUsageModificationError, 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.BatchDeleteBillScenarioUsageModificationError + if *v == nil { + sv = &types.BatchDeleteBillScenarioUsageModificationError{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "errorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BatchDeleteBillScenarioUsageModificationErrorCode to be of type string, got %T instead", value) + } + sv.ErrorCode = types.BatchDeleteBillScenarioUsageModificationErrorCode(jtv) + } + + case "errorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ErrorMessage = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentBatchDeleteBillScenarioUsageModificationErrors(v *[]types.BatchDeleteBillScenarioUsageModificationError, 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.BatchDeleteBillScenarioUsageModificationError + if *v == nil { + cv = []types.BatchDeleteBillScenarioUsageModificationError{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.BatchDeleteBillScenarioUsageModificationError + destAddr := &col + if err := awsAwsjson10_deserializeDocumentBatchDeleteBillScenarioUsageModificationError(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentBatchDeleteWorkloadEstimateUsageError(v **types.BatchDeleteWorkloadEstimateUsageError, 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.BatchDeleteWorkloadEstimateUsageError + if *v == nil { + sv = &types.BatchDeleteWorkloadEstimateUsageError{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "errorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WorkloadEstimateUpdateUsageErrorCode to be of type string, got %T instead", value) + } + sv.ErrorCode = types.WorkloadEstimateUpdateUsageErrorCode(jtv) + } + + case "errorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ErrorMessage = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentBatchDeleteWorkloadEstimateUsageErrors(v *[]types.BatchDeleteWorkloadEstimateUsageError, 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.BatchDeleteWorkloadEstimateUsageError + if *v == nil { + cv = []types.BatchDeleteWorkloadEstimateUsageError{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.BatchDeleteWorkloadEstimateUsageError + destAddr := &col + if err := awsAwsjson10_deserializeDocumentBatchDeleteWorkloadEstimateUsageError(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentBatchUpdateBillScenarioCommitmentModificationError(v **types.BatchUpdateBillScenarioCommitmentModificationError, 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.BatchUpdateBillScenarioCommitmentModificationError + if *v == nil { + sv = &types.BatchUpdateBillScenarioCommitmentModificationError{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "errorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BatchUpdateBillScenarioCommitmentModificationErrorCode to be of type string, got %T instead", value) + } + sv.ErrorCode = types.BatchUpdateBillScenarioCommitmentModificationErrorCode(jtv) + } + + case "errorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ErrorMessage = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentBatchUpdateBillScenarioCommitmentModificationErrors(v *[]types.BatchUpdateBillScenarioCommitmentModificationError, 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.BatchUpdateBillScenarioCommitmentModificationError + if *v == nil { + cv = []types.BatchUpdateBillScenarioCommitmentModificationError{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.BatchUpdateBillScenarioCommitmentModificationError + destAddr := &col + if err := awsAwsjson10_deserializeDocumentBatchUpdateBillScenarioCommitmentModificationError(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentBatchUpdateBillScenarioUsageModificationError(v **types.BatchUpdateBillScenarioUsageModificationError, 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.BatchUpdateBillScenarioUsageModificationError + if *v == nil { + sv = &types.BatchUpdateBillScenarioUsageModificationError{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "errorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BatchUpdateBillScenarioUsageModificationErrorCode to be of type string, got %T instead", value) + } + sv.ErrorCode = types.BatchUpdateBillScenarioUsageModificationErrorCode(jtv) + } + + case "errorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ErrorMessage = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentBatchUpdateBillScenarioUsageModificationErrors(v *[]types.BatchUpdateBillScenarioUsageModificationError, 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.BatchUpdateBillScenarioUsageModificationError + if *v == nil { + cv = []types.BatchUpdateBillScenarioUsageModificationError{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.BatchUpdateBillScenarioUsageModificationError + destAddr := &col + if err := awsAwsjson10_deserializeDocumentBatchUpdateBillScenarioUsageModificationError(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentBatchUpdateWorkloadEstimateUsageError(v **types.BatchUpdateWorkloadEstimateUsageError, 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.BatchUpdateWorkloadEstimateUsageError + if *v == nil { + sv = &types.BatchUpdateWorkloadEstimateUsageError{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "errorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WorkloadEstimateUpdateUsageErrorCode to be of type string, got %T instead", value) + } + sv.ErrorCode = types.WorkloadEstimateUpdateUsageErrorCode(jtv) + } + + case "errorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ErrorMessage = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentBatchUpdateWorkloadEstimateUsageErrors(v *[]types.BatchUpdateWorkloadEstimateUsageError, 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.BatchUpdateWorkloadEstimateUsageError + if *v == nil { + cv = []types.BatchUpdateWorkloadEstimateUsageError{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.BatchUpdateWorkloadEstimateUsageError + destAddr := &col + if err := awsAwsjson10_deserializeDocumentBatchUpdateWorkloadEstimateUsageError(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentBillEstimateCommitmentSummaries(v *[]types.BillEstimateCommitmentSummary, 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.BillEstimateCommitmentSummary + if *v == nil { + cv = []types.BillEstimateCommitmentSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.BillEstimateCommitmentSummary + destAddr := &col + if err := awsAwsjson10_deserializeDocumentBillEstimateCommitmentSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentBillEstimateCommitmentSummary(v **types.BillEstimateCommitmentSummary, 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.BillEstimateCommitmentSummary + if *v == nil { + sv = &types.BillEstimateCommitmentSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "monthlyPayment": + if err := awsAwsjson10_deserializeDocumentCostAmount(&sv.MonthlyPayment, value); err != nil { + return err + } + + case "offeringId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Uuid to be of type string, got %T instead", value) + } + sv.OfferingId = ptr.String(jtv) + } + + case "paymentOption": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.PaymentOption = ptr.String(jtv) + } + + case "purchaseAgreementType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PurchaseAgreementType to be of type string, got %T instead", value) + } + sv.PurchaseAgreementType = types.PurchaseAgreementType(jtv) + } + + case "region": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Region = ptr.String(jtv) + } + + case "termLength": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.TermLength = ptr.String(jtv) + } + + case "upfrontPayment": + if err := awsAwsjson10_deserializeDocumentCostAmount(&sv.UpfrontPayment, value); err != nil { + return err + } + + case "usageAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.UsageAccountId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentBillEstimateCostSummary(v **types.BillEstimateCostSummary, 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.BillEstimateCostSummary + if *v == nil { + sv = &types.BillEstimateCostSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "serviceCostDifferences": + if err := awsAwsjson10_deserializeDocumentServiceCostDifferenceMap(&sv.ServiceCostDifferences, value); err != nil { + return err + } + + case "totalCostDifference": + if err := awsAwsjson10_deserializeDocumentCostDifference(&sv.TotalCostDifference, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentBillEstimateInputCommitmentModificationSummaries(v *[]types.BillEstimateInputCommitmentModificationSummary, 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.BillEstimateInputCommitmentModificationSummary + if *v == nil { + cv = []types.BillEstimateInputCommitmentModificationSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.BillEstimateInputCommitmentModificationSummary + destAddr := &col + if err := awsAwsjson10_deserializeDocumentBillEstimateInputCommitmentModificationSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentBillEstimateInputCommitmentModificationSummary(v **types.BillEstimateInputCommitmentModificationSummary, 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.BillEstimateInputCommitmentModificationSummary + if *v == nil { + sv = &types.BillEstimateInputCommitmentModificationSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "commitmentAction": + if err := awsAwsjson10_deserializeDocumentBillScenarioCommitmentModificationAction(&sv.CommitmentAction, value); err != nil { + return err + } + + case "group": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UsageGroup to be of type string, got %T instead", value) + } + sv.Group = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "usageAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.UsageAccountId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentBillEstimateInputUsageModificationSummaries(v *[]types.BillEstimateInputUsageModificationSummary, 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.BillEstimateInputUsageModificationSummary + if *v == nil { + cv = []types.BillEstimateInputUsageModificationSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.BillEstimateInputUsageModificationSummary + destAddr := &col + if err := awsAwsjson10_deserializeDocumentBillEstimateInputUsageModificationSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentBillEstimateInputUsageModificationSummary(v **types.BillEstimateInputUsageModificationSummary, 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.BillEstimateInputUsageModificationSummary + if *v == nil { + sv = &types.BillEstimateInputUsageModificationSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "availabilityZone": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AvailabilityZone to be of type string, got %T instead", value) + } + sv.AvailabilityZone = ptr.String(jtv) + } + + case "group": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UsageGroup to be of type string, got %T instead", value) + } + sv.Group = ptr.String(jtv) + } + + case "historicalUsage": + if err := awsAwsjson10_deserializeDocumentHistoricalUsageEntity(&sv.HistoricalUsage, value); err != nil { + return err + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "location": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Location = ptr.String(jtv) + } + + case "operation": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Operation to be of type string, got %T instead", value) + } + sv.Operation = ptr.String(jtv) + } + + case "quantities": + if err := awsAwsjson10_deserializeDocumentUsageQuantities(&sv.Quantities, value); err != nil { + return err + } + + case "serviceCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServiceCode to be of type string, got %T instead", value) + } + sv.ServiceCode = ptr.String(jtv) + } + + case "usageAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.UsageAccountId = ptr.String(jtv) + } + + case "usageType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UsageType to be of type string, got %T instead", value) + } + sv.UsageType = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentBillEstimateLineItemSummaries(v *[]types.BillEstimateLineItemSummary, 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.BillEstimateLineItemSummary + if *v == nil { + cv = []types.BillEstimateLineItemSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.BillEstimateLineItemSummary + destAddr := &col + if err := awsAwsjson10_deserializeDocumentBillEstimateLineItemSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentBillEstimateLineItemSummary(v **types.BillEstimateLineItemSummary, 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.BillEstimateLineItemSummary + if *v == nil { + sv = &types.BillEstimateLineItemSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "availabilityZone": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AvailabilityZone to be of type string, got %T instead", value) + } + sv.AvailabilityZone = ptr.String(jtv) + } + + case "estimatedCost": + if err := awsAwsjson10_deserializeDocumentCostAmount(&sv.EstimatedCost, value); err != nil { + return err + } + + case "estimatedUsageQuantity": + if err := awsAwsjson10_deserializeDocumentUsageQuantityResult(&sv.EstimatedUsageQuantity, value); err != nil { + return err + } + + case "historicalCost": + if err := awsAwsjson10_deserializeDocumentCostAmount(&sv.HistoricalCost, value); err != nil { + return err + } + + case "historicalUsageQuantity": + if err := awsAwsjson10_deserializeDocumentUsageQuantityResult(&sv.HistoricalUsageQuantity, value); err != nil { + return err + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "lineItemId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.LineItemId = ptr.String(jtv) + } + + case "lineItemType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.LineItemType = ptr.String(jtv) + } + + case "location": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Location = ptr.String(jtv) + } + + case "operation": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Operation to be of type string, got %T instead", value) + } + sv.Operation = ptr.String(jtv) + } + + case "payerAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.PayerAccountId = ptr.String(jtv) + } + + case "savingsPlanArns": + if err := awsAwsjson10_deserializeDocumentSavingsPlanArns(&sv.SavingsPlanArns, value); err != nil { + return err + } + + case "serviceCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServiceCode to be of type string, got %T instead", value) + } + sv.ServiceCode = ptr.String(jtv) + } + + case "usageAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.UsageAccountId = ptr.String(jtv) + } + + case "usageType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UsageType to be of type string, got %T instead", value) + } + sv.UsageType = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentBillEstimateSummaries(v *[]types.BillEstimateSummary, 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.BillEstimateSummary + if *v == nil { + cv = []types.BillEstimateSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.BillEstimateSummary + destAddr := &col + if err := awsAwsjson10_deserializeDocumentBillEstimateSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentBillEstimateSummary(v **types.BillEstimateSummary, 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.BillEstimateSummary + if *v == nil { + sv = &types.BillEstimateSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "billInterval": + if err := awsAwsjson10_deserializeDocumentBillInterval(&sv.BillInterval, 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 Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "expiresAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ExpiresAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId 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 BillEstimateName 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 BillEstimateStatus to be of type string, got %T instead", value) + } + sv.Status = types.BillEstimateStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentBillInterval(v **types.BillInterval, 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.BillInterval + if *v == nil { + sv = &types.BillInterval{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "end": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.End = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "start": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Start = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentBillScenarioCommitmentModificationAction(v *types.BillScenarioCommitmentModificationAction, 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.BillScenarioCommitmentModificationAction +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "addReservedInstanceAction": + var mv types.AddReservedInstanceAction + destAddr := &mv + if err := awsAwsjson10_deserializeDocumentAddReservedInstanceAction(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.BillScenarioCommitmentModificationActionMemberAddReservedInstanceAction{Value: mv} + break loop + + case "addSavingsPlanAction": + var mv types.AddSavingsPlanAction + destAddr := &mv + if err := awsAwsjson10_deserializeDocumentAddSavingsPlanAction(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.BillScenarioCommitmentModificationActionMemberAddSavingsPlanAction{Value: mv} + break loop + + case "negateReservedInstanceAction": + var mv types.NegateReservedInstanceAction + destAddr := &mv + if err := awsAwsjson10_deserializeDocumentNegateReservedInstanceAction(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.BillScenarioCommitmentModificationActionMemberNegateReservedInstanceAction{Value: mv} + break loop + + case "negateSavingsPlanAction": + var mv types.NegateSavingsPlanAction + destAddr := &mv + if err := awsAwsjson10_deserializeDocumentNegateSavingsPlanAction(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.BillScenarioCommitmentModificationActionMemberNegateSavingsPlanAction{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + return nil +} + +func awsAwsjson10_deserializeDocumentBillScenarioCommitmentModificationItem(v **types.BillScenarioCommitmentModificationItem, 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.BillScenarioCommitmentModificationItem + if *v == nil { + sv = &types.BillScenarioCommitmentModificationItem{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "commitmentAction": + if err := awsAwsjson10_deserializeDocumentBillScenarioCommitmentModificationAction(&sv.CommitmentAction, value); err != nil { + return err + } + + case "group": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UsageGroup to be of type string, got %T instead", value) + } + sv.Group = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "usageAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.UsageAccountId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentBillScenarioCommitmentModificationItems(v *[]types.BillScenarioCommitmentModificationItem, 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.BillScenarioCommitmentModificationItem + if *v == nil { + cv = []types.BillScenarioCommitmentModificationItem{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.BillScenarioCommitmentModificationItem + destAddr := &col + if err := awsAwsjson10_deserializeDocumentBillScenarioCommitmentModificationItem(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentBillScenarioSummaries(v *[]types.BillScenarioSummary, 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.BillScenarioSummary + if *v == nil { + cv = []types.BillScenarioSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.BillScenarioSummary + destAddr := &col + if err := awsAwsjson10_deserializeDocumentBillScenarioSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentBillScenarioSummary(v **types.BillScenarioSummary, 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.BillScenarioSummary + if *v == nil { + sv = &types.BillScenarioSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "billInterval": + if err := awsAwsjson10_deserializeDocumentBillInterval(&sv.BillInterval, 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 Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "expiresAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ExpiresAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "failureMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.FailureMessage = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId 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 BillScenarioName 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 BillScenarioStatus to be of type string, got %T instead", value) + } + sv.Status = types.BillScenarioStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentBillScenarioUsageModificationItem(v **types.BillScenarioUsageModificationItem, 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.BillScenarioUsageModificationItem + if *v == nil { + sv = &types.BillScenarioUsageModificationItem{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "availabilityZone": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AvailabilityZone to be of type string, got %T instead", value) + } + sv.AvailabilityZone = ptr.String(jtv) + } + + case "group": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UsageGroup to be of type string, got %T instead", value) + } + sv.Group = ptr.String(jtv) + } + + case "historicalUsage": + if err := awsAwsjson10_deserializeDocumentHistoricalUsageEntity(&sv.HistoricalUsage, value); err != nil { + return err + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "location": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Location = ptr.String(jtv) + } + + case "operation": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Operation to be of type string, got %T instead", value) + } + sv.Operation = ptr.String(jtv) + } + + case "quantities": + if err := awsAwsjson10_deserializeDocumentUsageQuantities(&sv.Quantities, value); err != nil { + return err + } + + case "serviceCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServiceCode to be of type string, got %T instead", value) + } + sv.ServiceCode = ptr.String(jtv) + } + + case "usageAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.UsageAccountId = ptr.String(jtv) + } + + case "usageType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UsageType to be of type string, got %T instead", value) + } + sv.UsageType = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentBillScenarioUsageModificationItems(v *[]types.BillScenarioUsageModificationItem, 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.BillScenarioUsageModificationItem + if *v == nil { + cv = []types.BillScenarioUsageModificationItem{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.BillScenarioUsageModificationItem + destAddr := &col + if err := awsAwsjson10_deserializeDocumentBillScenarioUsageModificationItem(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ConflictException + if *v == nil { + sv = &types.ConflictException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "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 "resourceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String 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 String to be of type string, got %T instead", value) + } + sv.ResourceType = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentCostAmount(v **types.CostAmount, 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.CostAmount + if *v == nil { + sv = &types.CostAmount{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "amount": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Amount = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.Amount = ptr.Float64(f64) + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + + case "currency": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CurrencyCode to be of type string, got %T instead", value) + } + sv.Currency = types.CurrencyCode(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentCostDifference(v **types.CostDifference, 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.CostDifference + if *v == nil { + sv = &types.CostDifference{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "estimatedCost": + if err := awsAwsjson10_deserializeDocumentCostAmount(&sv.EstimatedCost, value); err != nil { + return err + } + + case "historicalCost": + if err := awsAwsjson10_deserializeDocumentCostAmount(&sv.HistoricalCost, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentDataUnavailableException(v **types.DataUnavailableException, 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.DataUnavailableException + if *v == nil { + sv = &types.DataUnavailableException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "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 awsAwsjson10_deserializeDocumentExpression(v **types.Expression, 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.Expression + if *v == nil { + sv = &types.Expression{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "and": + if err := awsAwsjson10_deserializeDocumentExpressionList(&sv.And, value); err != nil { + return err + } + + case "costCategories": + if err := awsAwsjson10_deserializeDocumentExpressionFilter(&sv.CostCategories, value); err != nil { + return err + } + + case "dimensions": + if err := awsAwsjson10_deserializeDocumentExpressionFilter(&sv.Dimensions, value); err != nil { + return err + } + + case "not": + if err := awsAwsjson10_deserializeDocumentExpression(&sv.Not, value); err != nil { + return err + } + + case "or": + if err := awsAwsjson10_deserializeDocumentExpressionList(&sv.Or, value); err != nil { + return err + } + + case "tags": + if err := awsAwsjson10_deserializeDocumentExpressionFilter(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentExpressionFilter(v **types.ExpressionFilter, 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.ExpressionFilter + if *v == nil { + sv = &types.ExpressionFilter{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "key": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Key = ptr.String(jtv) + } + + case "matchOptions": + if err := awsAwsjson10_deserializeDocumentStringList(&sv.MatchOptions, value); err != nil { + return err + } + + case "values": + if err := awsAwsjson10_deserializeDocumentStringList(&sv.Values, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentExpressionList(v *[]types.Expression, 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.Expression + if *v == nil { + cv = []types.Expression{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Expression + destAddr := &col + if err := awsAwsjson10_deserializeDocumentExpression(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentHistoricalUsageEntity(v **types.HistoricalUsageEntity, 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.HistoricalUsageEntity + if *v == nil { + sv = &types.HistoricalUsageEntity{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "billInterval": + if err := awsAwsjson10_deserializeDocumentBillInterval(&sv.BillInterval, value); err != nil { + return err + } + + case "filterExpression": + if err := awsAwsjson10_deserializeDocumentExpression(&sv.FilterExpression, value); err != nil { + return err + } + + case "location": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Location = ptr.String(jtv) + } + + case "operation": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Operation to be of type string, got %T instead", value) + } + sv.Operation = ptr.String(jtv) + } + + case "serviceCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServiceCode to be of type string, got %T instead", value) + } + sv.ServiceCode = ptr.String(jtv) + } + + case "usageAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.UsageAccountId = ptr.String(jtv) + } + + case "usageType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UsageType to be of type string, got %T instead", value) + } + sv.UsageType = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentInternalServerException(v **types.InternalServerException, 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.InternalServerException + if *v == nil { + sv = &types.InternalServerException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "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 "retryAfterSeconds": + 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.RetryAfterSeconds = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentNegateReservedInstanceAction(v **types.NegateReservedInstanceAction, 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.NegateReservedInstanceAction + if *v == nil { + sv = &types.NegateReservedInstanceAction{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "reservedInstancesId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Uuid to be of type string, got %T instead", value) + } + sv.ReservedInstancesId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentNegateSavingsPlanAction(v **types.NegateSavingsPlanAction, 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.NegateSavingsPlanAction + if *v == nil { + sv = &types.NegateSavingsPlanAction{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "savingsPlanId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Uuid to be of type string, got %T instead", value) + } + sv.SavingsPlanId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentRateTypes(v *[]types.RateType, 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.RateType + if *v == nil { + cv = []types.RateType{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RateType + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RateType to be of type string, got %T instead", value) + } + col = types.RateType(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, 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.ResourceNotFoundException + if *v == nil { + sv = &types.ResourceNotFoundException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "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 "resourceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String 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 String to be of type string, got %T instead", value) + } + sv.ResourceType = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentSavingsPlanArns(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentServiceCostDifferenceMap(v *map[string]types.CostDifference, 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]types.CostDifference + if *v == nil { + mv = map[string]types.CostDifference{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal types.CostDifference + mapVar := parsedVal + destAddr := &mapVar + if err := awsAwsjson10_deserializeDocumentCostDifference(&destAddr, value); err != nil { + return err + } + parsedVal = *destAddr + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsAwsjson10_deserializeDocumentServiceQuotaExceededException(v **types.ServiceQuotaExceededException, 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.ServiceQuotaExceededException + if *v == nil { + sv = &types.ServiceQuotaExceededException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "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 "quotaCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.QuotaCode = ptr.String(jtv) + } + + case "resourceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String 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 String to be of type string, got %T instead", value) + } + sv.ResourceType = ptr.String(jtv) + } + + case "serviceCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ServiceCode = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentStringList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentTags(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 ResourceTagValue to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsAwsjson10_deserializeDocumentThrottlingException(v **types.ThrottlingException, 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.ThrottlingException + if *v == nil { + sv = &types.ThrottlingException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "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 "quotaCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.QuotaCode = ptr.String(jtv) + } + + case "retryAfterSeconds": + 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.RetryAfterSeconds = ptr.Int32(int32(i64)) + } + + case "serviceCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ServiceCode = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentUsageQuantities(v *[]types.UsageQuantity, 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.UsageQuantity + if *v == nil { + cv = []types.UsageQuantity{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.UsageQuantity + destAddr := &col + if err := awsAwsjson10_deserializeDocumentUsageQuantity(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentUsageQuantity(v **types.UsageQuantity, 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.UsageQuantity + if *v == nil { + sv = &types.UsageQuantity{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "amount": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Amount = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.Amount = ptr.Float64(f64) + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + + case "startHour": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartHour = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "unit": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Unit = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentUsageQuantityResult(v **types.UsageQuantityResult, 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.UsageQuantityResult + if *v == nil { + sv = &types.UsageQuantityResult{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "amount": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Amount = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.Amount = ptr.Float64(f64) + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + + case "unit": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Unit = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentValidationException(v **types.ValidationException, 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.ValidationException + if *v == nil { + sv = &types.ValidationException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "fieldList": + if err := awsAwsjson10_deserializeDocumentValidationExceptionFieldList(&sv.FieldList, value); err != nil { + return err + } + + case "message", "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 "reason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ValidationExceptionReason to be of type string, got %T instead", value) + } + sv.Reason = types.ValidationExceptionReason(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentValidationExceptionField(v **types.ValidationExceptionField, 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.ValidationExceptionField + if *v == nil { + sv = &types.ValidationExceptionField{} + } 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) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentValidationExceptionFieldList(v *[]types.ValidationExceptionField, 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.ValidationExceptionField + if *v == nil { + cv = []types.ValidationExceptionField{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ValidationExceptionField + destAddr := &col + if err := awsAwsjson10_deserializeDocumentValidationExceptionField(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentWorkloadEstimateSummaries(v *[]types.WorkloadEstimateSummary, 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.WorkloadEstimateSummary + if *v == nil { + cv = []types.WorkloadEstimateSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.WorkloadEstimateSummary + destAddr := &col + if err := awsAwsjson10_deserializeDocumentWorkloadEstimateSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentWorkloadEstimateSummary(v **types.WorkloadEstimateSummary, 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.WorkloadEstimateSummary + if *v == nil { + sv = &types.WorkloadEstimateSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "costCurrency": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CurrencyCode to be of type string, got %T instead", value) + } + sv.CostCurrency = types.CurrencyCode(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 Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "expiresAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ExpiresAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "failureMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.FailureMessage = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId 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 WorkloadEstimateName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "rateTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.RateTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "rateType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WorkloadEstimateRateType to be of type string, got %T instead", value) + } + sv.RateType = types.WorkloadEstimateRateType(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WorkloadEstimateStatus to be of type string, got %T instead", value) + } + sv.Status = types.WorkloadEstimateStatus(jtv) + } + + case "totalCost": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.TotalCost = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.TotalCost = ptr.Float64(f64) + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentWorkloadEstimateUsageItem(v **types.WorkloadEstimateUsageItem, 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.WorkloadEstimateUsageItem + if *v == nil { + sv = &types.WorkloadEstimateUsageItem{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "cost": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Cost = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.Cost = ptr.Float64(f64) + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + + case "currency": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CurrencyCode to be of type string, got %T instead", value) + } + sv.Currency = types.CurrencyCode(jtv) + } + + case "group": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UsageGroup to be of type string, got %T instead", value) + } + sv.Group = ptr.String(jtv) + } + + case "historicalUsage": + if err := awsAwsjson10_deserializeDocumentHistoricalUsageEntity(&sv.HistoricalUsage, value); err != nil { + return err + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "location": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Location = ptr.String(jtv) + } + + case "operation": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Operation to be of type string, got %T instead", value) + } + sv.Operation = ptr.String(jtv) + } + + case "quantity": + if err := awsAwsjson10_deserializeDocumentWorkloadEstimateUsageQuantity(&sv.Quantity, value); err != nil { + return err + } + + case "serviceCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServiceCode to be of type string, got %T instead", value) + } + sv.ServiceCode = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WorkloadEstimateCostStatus to be of type string, got %T instead", value) + } + sv.Status = types.WorkloadEstimateCostStatus(jtv) + } + + case "usageAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.UsageAccountId = ptr.String(jtv) + } + + case "usageType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UsageType to be of type string, got %T instead", value) + } + sv.UsageType = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentWorkloadEstimateUsageItems(v *[]types.WorkloadEstimateUsageItem, 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.WorkloadEstimateUsageItem + if *v == nil { + cv = []types.WorkloadEstimateUsageItem{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.WorkloadEstimateUsageItem + destAddr := &col + if err := awsAwsjson10_deserializeDocumentWorkloadEstimateUsageItem(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentWorkloadEstimateUsageQuantity(v **types.WorkloadEstimateUsageQuantity, 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.WorkloadEstimateUsageQuantity + if *v == nil { + sv = &types.WorkloadEstimateUsageQuantity{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "amount": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Amount = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.Amount = ptr.Float64(f64) + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + + case "unit": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Unit = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentBatchCreateBillScenarioCommitmentModificationOutput(v **BatchCreateBillScenarioCommitmentModificationOutput, 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 *BatchCreateBillScenarioCommitmentModificationOutput + if *v == nil { + sv = &BatchCreateBillScenarioCommitmentModificationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "errors": + if err := awsAwsjson10_deserializeDocumentBatchCreateBillScenarioCommitmentModificationErrors(&sv.Errors, value); err != nil { + return err + } + + case "items": + if err := awsAwsjson10_deserializeDocumentBatchCreateBillScenarioCommitmentModificationItems(&sv.Items, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentBatchCreateBillScenarioUsageModificationOutput(v **BatchCreateBillScenarioUsageModificationOutput, 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 *BatchCreateBillScenarioUsageModificationOutput + if *v == nil { + sv = &BatchCreateBillScenarioUsageModificationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "errors": + if err := awsAwsjson10_deserializeDocumentBatchCreateBillScenarioUsageModificationErrors(&sv.Errors, value); err != nil { + return err + } + + case "items": + if err := awsAwsjson10_deserializeDocumentBatchCreateBillScenarioUsageModificationItems(&sv.Items, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentBatchCreateWorkloadEstimateUsageOutput(v **BatchCreateWorkloadEstimateUsageOutput, 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 *BatchCreateWorkloadEstimateUsageOutput + if *v == nil { + sv = &BatchCreateWorkloadEstimateUsageOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "errors": + if err := awsAwsjson10_deserializeDocumentBatchCreateWorkloadEstimateUsageErrors(&sv.Errors, value); err != nil { + return err + } + + case "items": + if err := awsAwsjson10_deserializeDocumentBatchCreateWorkloadEstimateUsageItems(&sv.Items, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentBatchDeleteBillScenarioCommitmentModificationOutput(v **BatchDeleteBillScenarioCommitmentModificationOutput, 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 *BatchDeleteBillScenarioCommitmentModificationOutput + if *v == nil { + sv = &BatchDeleteBillScenarioCommitmentModificationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "errors": + if err := awsAwsjson10_deserializeDocumentBatchDeleteBillScenarioCommitmentModificationErrors(&sv.Errors, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentBatchDeleteBillScenarioUsageModificationOutput(v **BatchDeleteBillScenarioUsageModificationOutput, 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 *BatchDeleteBillScenarioUsageModificationOutput + if *v == nil { + sv = &BatchDeleteBillScenarioUsageModificationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "errors": + if err := awsAwsjson10_deserializeDocumentBatchDeleteBillScenarioUsageModificationErrors(&sv.Errors, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentBatchDeleteWorkloadEstimateUsageOutput(v **BatchDeleteWorkloadEstimateUsageOutput, 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 *BatchDeleteWorkloadEstimateUsageOutput + if *v == nil { + sv = &BatchDeleteWorkloadEstimateUsageOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "errors": + if err := awsAwsjson10_deserializeDocumentBatchDeleteWorkloadEstimateUsageErrors(&sv.Errors, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentBatchUpdateBillScenarioCommitmentModificationOutput(v **BatchUpdateBillScenarioCommitmentModificationOutput, 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 *BatchUpdateBillScenarioCommitmentModificationOutput + if *v == nil { + sv = &BatchUpdateBillScenarioCommitmentModificationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "errors": + if err := awsAwsjson10_deserializeDocumentBatchUpdateBillScenarioCommitmentModificationErrors(&sv.Errors, value); err != nil { + return err + } + + case "items": + if err := awsAwsjson10_deserializeDocumentBillScenarioCommitmentModificationItems(&sv.Items, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentBatchUpdateBillScenarioUsageModificationOutput(v **BatchUpdateBillScenarioUsageModificationOutput, 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 *BatchUpdateBillScenarioUsageModificationOutput + if *v == nil { + sv = &BatchUpdateBillScenarioUsageModificationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "errors": + if err := awsAwsjson10_deserializeDocumentBatchUpdateBillScenarioUsageModificationErrors(&sv.Errors, value); err != nil { + return err + } + + case "items": + if err := awsAwsjson10_deserializeDocumentBillScenarioUsageModificationItems(&sv.Items, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentBatchUpdateWorkloadEstimateUsageOutput(v **BatchUpdateWorkloadEstimateUsageOutput, 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 *BatchUpdateWorkloadEstimateUsageOutput + if *v == nil { + sv = &BatchUpdateWorkloadEstimateUsageOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "errors": + if err := awsAwsjson10_deserializeDocumentBatchUpdateWorkloadEstimateUsageErrors(&sv.Errors, value); err != nil { + return err + } + + case "items": + if err := awsAwsjson10_deserializeDocumentWorkloadEstimateUsageItems(&sv.Items, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentCreateBillEstimateOutput(v **CreateBillEstimateOutput, 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 *CreateBillEstimateOutput + if *v == nil { + sv = &CreateBillEstimateOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "billInterval": + if err := awsAwsjson10_deserializeDocumentBillInterval(&sv.BillInterval, value); err != nil { + return err + } + + case "costSummary": + if err := awsAwsjson10_deserializeDocumentBillEstimateCostSummary(&sv.CostSummary, 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 Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "expiresAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ExpiresAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "failureMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.FailureMessage = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId 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 BillEstimateName 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 BillEstimateStatus to be of type string, got %T instead", value) + } + sv.Status = types.BillEstimateStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentCreateBillScenarioOutput(v **CreateBillScenarioOutput, 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 *CreateBillScenarioOutput + if *v == nil { + sv = &CreateBillScenarioOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "billInterval": + if err := awsAwsjson10_deserializeDocumentBillInterval(&sv.BillInterval, 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 Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "expiresAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ExpiresAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "failureMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.FailureMessage = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId 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 BillScenarioName 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 BillScenarioStatus to be of type string, got %T instead", value) + } + sv.Status = types.BillScenarioStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentCreateWorkloadEstimateOutput(v **CreateWorkloadEstimateOutput, 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 *CreateWorkloadEstimateOutput + if *v == nil { + sv = &CreateWorkloadEstimateOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "costCurrency": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CurrencyCode to be of type string, got %T instead", value) + } + sv.CostCurrency = types.CurrencyCode(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 Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "expiresAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ExpiresAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "failureMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.FailureMessage = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId 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 WorkloadEstimateName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "rateTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.RateTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "rateType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WorkloadEstimateRateType to be of type string, got %T instead", value) + } + sv.RateType = types.WorkloadEstimateRateType(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WorkloadEstimateStatus to be of type string, got %T instead", value) + } + sv.Status = types.WorkloadEstimateStatus(jtv) + } + + case "totalCost": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.TotalCost = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.TotalCost = ptr.Float64(f64) + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentDeleteBillEstimateOutput(v **DeleteBillEstimateOutput, 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 *DeleteBillEstimateOutput + if *v == nil { + sv = &DeleteBillEstimateOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentDeleteBillScenarioOutput(v **DeleteBillScenarioOutput, 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 *DeleteBillScenarioOutput + if *v == nil { + sv = &DeleteBillScenarioOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentDeleteWorkloadEstimateOutput(v **DeleteWorkloadEstimateOutput, 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 *DeleteWorkloadEstimateOutput + if *v == nil { + sv = &DeleteWorkloadEstimateOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentGetBillEstimateOutput(v **GetBillEstimateOutput, 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 *GetBillEstimateOutput + if *v == nil { + sv = &GetBillEstimateOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "billInterval": + if err := awsAwsjson10_deserializeDocumentBillInterval(&sv.BillInterval, value); err != nil { + return err + } + + case "costSummary": + if err := awsAwsjson10_deserializeDocumentBillEstimateCostSummary(&sv.CostSummary, 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 Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "expiresAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ExpiresAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "failureMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.FailureMessage = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId 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 BillEstimateName 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 BillEstimateStatus to be of type string, got %T instead", value) + } + sv.Status = types.BillEstimateStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentGetBillScenarioOutput(v **GetBillScenarioOutput, 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 *GetBillScenarioOutput + if *v == nil { + sv = &GetBillScenarioOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "billInterval": + if err := awsAwsjson10_deserializeDocumentBillInterval(&sv.BillInterval, 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 Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "expiresAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ExpiresAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "failureMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.FailureMessage = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId 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 BillScenarioName 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 BillScenarioStatus to be of type string, got %T instead", value) + } + sv.Status = types.BillScenarioStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentGetPreferencesOutput(v **GetPreferencesOutput, 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 *GetPreferencesOutput + if *v == nil { + sv = &GetPreferencesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "managementAccountRateTypeSelections": + if err := awsAwsjson10_deserializeDocumentRateTypes(&sv.ManagementAccountRateTypeSelections, value); err != nil { + return err + } + + case "memberAccountRateTypeSelections": + if err := awsAwsjson10_deserializeDocumentRateTypes(&sv.MemberAccountRateTypeSelections, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentGetWorkloadEstimateOutput(v **GetWorkloadEstimateOutput, 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 *GetWorkloadEstimateOutput + if *v == nil { + sv = &GetWorkloadEstimateOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "costCurrency": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CurrencyCode to be of type string, got %T instead", value) + } + sv.CostCurrency = types.CurrencyCode(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 Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "expiresAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ExpiresAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "failureMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.FailureMessage = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId 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 WorkloadEstimateName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "rateTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.RateTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "rateType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WorkloadEstimateRateType to be of type string, got %T instead", value) + } + sv.RateType = types.WorkloadEstimateRateType(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WorkloadEstimateStatus to be of type string, got %T instead", value) + } + sv.Status = types.WorkloadEstimateStatus(jtv) + } + + case "totalCost": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.TotalCost = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.TotalCost = ptr.Float64(f64) + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentListBillEstimateCommitmentsOutput(v **ListBillEstimateCommitmentsOutput, 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 *ListBillEstimateCommitmentsOutput + if *v == nil { + sv = &ListBillEstimateCommitmentsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "items": + if err := awsAwsjson10_deserializeDocumentBillEstimateCommitmentSummaries(&sv.Items, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextPageToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentListBillEstimateInputCommitmentModificationsOutput(v **ListBillEstimateInputCommitmentModificationsOutput, 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 *ListBillEstimateInputCommitmentModificationsOutput + if *v == nil { + sv = &ListBillEstimateInputCommitmentModificationsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "items": + if err := awsAwsjson10_deserializeDocumentBillEstimateInputCommitmentModificationSummaries(&sv.Items, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextPageToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentListBillEstimateInputUsageModificationsOutput(v **ListBillEstimateInputUsageModificationsOutput, 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 *ListBillEstimateInputUsageModificationsOutput + if *v == nil { + sv = &ListBillEstimateInputUsageModificationsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "items": + if err := awsAwsjson10_deserializeDocumentBillEstimateInputUsageModificationSummaries(&sv.Items, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextPageToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentListBillEstimateLineItemsOutput(v **ListBillEstimateLineItemsOutput, 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 *ListBillEstimateLineItemsOutput + if *v == nil { + sv = &ListBillEstimateLineItemsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "items": + if err := awsAwsjson10_deserializeDocumentBillEstimateLineItemSummaries(&sv.Items, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextPageToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentListBillEstimatesOutput(v **ListBillEstimatesOutput, 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 *ListBillEstimatesOutput + if *v == nil { + sv = &ListBillEstimatesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "items": + if err := awsAwsjson10_deserializeDocumentBillEstimateSummaries(&sv.Items, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextPageToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentListBillScenarioCommitmentModificationsOutput(v **ListBillScenarioCommitmentModificationsOutput, 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 *ListBillScenarioCommitmentModificationsOutput + if *v == nil { + sv = &ListBillScenarioCommitmentModificationsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "items": + if err := awsAwsjson10_deserializeDocumentBillScenarioCommitmentModificationItems(&sv.Items, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextPageToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentListBillScenariosOutput(v **ListBillScenariosOutput, 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 *ListBillScenariosOutput + if *v == nil { + sv = &ListBillScenariosOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "items": + if err := awsAwsjson10_deserializeDocumentBillScenarioSummaries(&sv.Items, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextPageToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentListBillScenarioUsageModificationsOutput(v **ListBillScenarioUsageModificationsOutput, 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 *ListBillScenarioUsageModificationsOutput + if *v == nil { + sv = &ListBillScenarioUsageModificationsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "items": + if err := awsAwsjson10_deserializeDocumentBillScenarioUsageModificationItems(&sv.Items, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextPageToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListTagsForResourceOutput + if *v == nil { + sv = &ListTagsForResourceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "tags": + if err := awsAwsjson10_deserializeDocumentTags(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentListWorkloadEstimatesOutput(v **ListWorkloadEstimatesOutput, 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 *ListWorkloadEstimatesOutput + if *v == nil { + sv = &ListWorkloadEstimatesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "items": + if err := awsAwsjson10_deserializeDocumentWorkloadEstimateSummaries(&sv.Items, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextPageToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentListWorkloadEstimateUsageOutput(v **ListWorkloadEstimateUsageOutput, 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 *ListWorkloadEstimateUsageOutput + if *v == nil { + sv = &ListWorkloadEstimateUsageOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "items": + if err := awsAwsjson10_deserializeDocumentWorkloadEstimateUsageItems(&sv.Items, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextPageToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentTagResourceOutput(v **TagResourceOutput, 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 *TagResourceOutput + if *v == nil { + sv = &TagResourceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentUntagResourceOutput(v **UntagResourceOutput, 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 *UntagResourceOutput + if *v == nil { + sv = &UntagResourceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentUpdateBillEstimateOutput(v **UpdateBillEstimateOutput, 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 *UpdateBillEstimateOutput + if *v == nil { + sv = &UpdateBillEstimateOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "billInterval": + if err := awsAwsjson10_deserializeDocumentBillInterval(&sv.BillInterval, value); err != nil { + return err + } + + case "costSummary": + if err := awsAwsjson10_deserializeDocumentBillEstimateCostSummary(&sv.CostSummary, 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 Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "expiresAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ExpiresAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "failureMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.FailureMessage = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId 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 BillEstimateName 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 BillEstimateStatus to be of type string, got %T instead", value) + } + sv.Status = types.BillEstimateStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentUpdateBillScenarioOutput(v **UpdateBillScenarioOutput, 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 *UpdateBillScenarioOutput + if *v == nil { + sv = &UpdateBillScenarioOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "billInterval": + if err := awsAwsjson10_deserializeDocumentBillInterval(&sv.BillInterval, 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 Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "expiresAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ExpiresAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "failureMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.FailureMessage = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId 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 BillScenarioName 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 BillScenarioStatus to be of type string, got %T instead", value) + } + sv.Status = types.BillScenarioStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentUpdatePreferencesOutput(v **UpdatePreferencesOutput, 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 *UpdatePreferencesOutput + if *v == nil { + sv = &UpdatePreferencesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "managementAccountRateTypeSelections": + if err := awsAwsjson10_deserializeDocumentRateTypes(&sv.ManagementAccountRateTypeSelections, value); err != nil { + return err + } + + case "memberAccountRateTypeSelections": + if err := awsAwsjson10_deserializeDocumentRateTypes(&sv.MemberAccountRateTypeSelections, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentUpdateWorkloadEstimateOutput(v **UpdateWorkloadEstimateOutput, 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 *UpdateWorkloadEstimateOutput + if *v == nil { + sv = &UpdateWorkloadEstimateOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "costCurrency": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CurrencyCode to be of type string, got %T instead", value) + } + sv.CostCurrency = types.CurrencyCode(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 Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "expiresAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ExpiresAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "failureMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.FailureMessage = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId 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 WorkloadEstimateName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "rateTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.RateTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "rateType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WorkloadEstimateRateType to be of type string, got %T instead", value) + } + sv.RateType = types.WorkloadEstimateRateType(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WorkloadEstimateStatus to be of type string, got %T instead", value) + } + sv.Status = types.WorkloadEstimateStatus(jtv) + } + + case "totalCost": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.TotalCost = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.TotalCost = ptr.Float64(f64) + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type protocolErrorInfo struct { + Type string `json:"__type"` + Message string + Code any // nonstandard for awsjson but some services do present the type here +} + +func getProtocolErrorInfo(decoder *json.Decoder) (protocolErrorInfo, error) { + var errInfo protocolErrorInfo + if err := decoder.Decode(&errInfo); err != nil { + if err == io.EOF { + return errInfo, nil + } + return errInfo, err + } + + return errInfo, nil +} + +func resolveProtocolErrorType(headerType string, bodyInfo protocolErrorInfo) (string, bool) { + if len(headerType) != 0 { + return headerType, true + } else if len(bodyInfo.Type) != 0 { + return bodyInfo.Type, true + } else if code, ok := bodyInfo.Code.(string); ok && len(code) != 0 { + return code, true + } + return "", false +} diff --git a/service/bcmpricingcalculator/doc.go b/service/bcmpricingcalculator/doc.go new file mode 100644 index 00000000000..540d3f9e9ba --- /dev/null +++ b/service/bcmpricingcalculator/doc.go @@ -0,0 +1,15 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +// Package bcmpricingcalculator provides the API client, operations, and parameter +// types for AWS Billing and Cost Management Pricing Calculator. +// +// You can use the Pricing Calculator API to programmatically create estimates +// +// for your planned cloud use. You can model usage and commitments such as Savings +// Plans and Reserved Instances, and generate estimated costs using your discounts +// and benefit sharing preferences. +// +// The Pricing Calculator API provides the following endpoint: +// +// - https://bcm-pricing-calculator.us-east-1.api.aws +package bcmpricingcalculator diff --git a/service/bcmpricingcalculator/endpoints.go b/service/bcmpricingcalculator/endpoints.go new file mode 100644 index 00000000000..b09089b6c8f --- /dev/null +++ b/service/bcmpricingcalculator/endpoints.go @@ -0,0 +1,491 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bcmpricingcalculator + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" + "github.com/aws/aws-sdk-go-v2/internal/endpoints" + "github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn" + internalendpoints "github.com/aws/aws-sdk-go-v2/service/bcmpricingcalculator/internal/endpoints" + smithy "github.com/aws/smithy-go" + smithyauth "github.com/aws/smithy-go/auth" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net/http" + "net/url" + "os" + "strings" +) + +// EndpointResolverOptions is the service endpoint resolver options +type EndpointResolverOptions = internalendpoints.Options + +// EndpointResolver interface for resolving service endpoints. +type EndpointResolver interface { + ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error) +} + +var _ EndpointResolver = &internalendpoints.Resolver{} + +// NewDefaultEndpointResolver constructs a new service endpoint resolver +func NewDefaultEndpointResolver() *internalendpoints.Resolver { + return internalendpoints.New() +} + +// EndpointResolverFunc is a helper utility that wraps a function so it satisfies +// the EndpointResolver interface. This is useful when you want to add additional +// endpoint resolving logic, or stub out specific endpoints with custom values. +type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error) + +func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { + return fn(region, options) +} + +// EndpointResolverFromURL returns an EndpointResolver configured using the +// provided endpoint url. By default, the resolved endpoint resolver uses the +// client region as signing region, and the endpoint source is set to +// EndpointSourceCustom.You can provide functional options to configure endpoint +// values for the resolved endpoint. +func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver { + e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom} + for _, fn := range optFns { + fn(&e) + } + + return EndpointResolverFunc( + func(region string, options EndpointResolverOptions) (aws.Endpoint, error) { + if len(e.SigningRegion) == 0 { + e.SigningRegion = region + } + return e, nil + }, + ) +} + +type ResolveEndpoint struct { + Resolver EndpointResolver + Options EndpointResolverOptions +} + +func (*ResolveEndpoint) ID() string { + return "ResolveEndpoint" +} + +func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if !awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.Resolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + eo := m.Options + eo.Logger = middleware.GetLogger(ctx) + + var endpoint aws.Endpoint + endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo) + if err != nil { + nf := (&aws.EndpointNotFoundError{}) + if errors.As(err, &nf) { + ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, false) + return next.HandleSerialize(ctx, in) + } + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL, err = url.Parse(endpoint.URL) + if err != nil { + return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err) + } + + if len(awsmiddleware.GetSigningName(ctx)) == 0 { + signingName := endpoint.SigningName + if len(signingName) == 0 { + signingName = "bcm-pricing-calculator" + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + } + ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source) + ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable) + ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion) + ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID) + return next.HandleSerialize(ctx, in) +} +func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error { + return stack.Serialize.Insert(&ResolveEndpoint{ + Resolver: o.EndpointResolver, + Options: o.EndpointOptions, + }, "OperationSerializer", middleware.Before) +} + +func removeResolveEndpointMiddleware(stack *middleware.Stack) error { + _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID()) + return err +} + +type wrappedEndpointResolver struct { + awsResolver aws.EndpointResolverWithOptions +} + +func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { + return w.awsResolver.ResolveEndpoint(ServiceID, region, options) +} + +type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error) + +func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) { + return a(service, region) +} + +var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil) + +// withEndpointResolver returns an aws.EndpointResolverWithOptions that first delegates endpoint resolution to the awsResolver. +// If awsResolver returns aws.EndpointNotFoundError error, the v1 resolver middleware will swallow the error, +// and set an appropriate context flag such that fallback will occur when EndpointResolverV2 is invoked +// via its middleware. +// +// If another error (besides aws.EndpointNotFoundError) is returned, then that error will be propagated. +func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions) EndpointResolver { + var resolver aws.EndpointResolverWithOptions + + if awsResolverWithOptions != nil { + resolver = awsResolverWithOptions + } else if awsResolver != nil { + resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint) + } + + return &wrappedEndpointResolver{ + awsResolver: resolver, + } +} + +func finalizeClientEndpointResolverOptions(options *Options) { + options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage() + + if len(options.EndpointOptions.ResolvedRegion) == 0 { + const fipsInfix = "-fips-" + const fipsPrefix = "fips-" + const fipsSuffix = "-fips" + + if strings.Contains(options.Region, fipsInfix) || + strings.Contains(options.Region, fipsPrefix) || + strings.Contains(options.Region, fipsSuffix) { + options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll( + options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "") + options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled + } + } + +} + +func resolveEndpointResolverV2(options *Options) { + if options.EndpointResolverV2 == nil { + options.EndpointResolverV2 = NewDefaultEndpointResolverV2() + } +} + +func resolveBaseEndpoint(cfg aws.Config, o *Options) { + if cfg.BaseEndpoint != nil { + o.BaseEndpoint = cfg.BaseEndpoint + } + + _, g := os.LookupEnv("AWS_ENDPOINT_URL") + _, s := os.LookupEnv("AWS_ENDPOINT_URL_BCM_PRICING_CALCULATOR") + + if g && !s { + return + } + + value, found, err := internalConfig.ResolveServiceBaseEndpoint(context.Background(), "BCM Pricing Calculator", cfg.ConfigSources) + if found && err == nil { + o.BaseEndpoint = &value + } +} + +func bindRegion(region string) *string { + if region == "" { + return nil + } + return aws.String(endpoints.MapFIPSRegion(region)) +} + +// EndpointParameters provides the parameters that influence how endpoints are +// resolved. +type EndpointParameters struct { + // When true, send this request to the FIPS-compliant regional endpoint. If the + // configured endpoint does not have a FIPS compliant endpoint, dispatching the + // request will return an error. + // + // Defaults to false if no value is + // provided. + // + // AWS::UseFIPS + UseFIPS *bool + + // Override the endpoint used to send this request + // + // Parameter is + // required. + // + // SDK::Endpoint + Endpoint *string + + // The AWS region used to dispatch the request. + // + // Parameter is + // required. + // + // AWS::Region + Region *string +} + +// ValidateRequired validates required parameters are set. +func (p EndpointParameters) ValidateRequired() error { + if p.UseFIPS == nil { + return fmt.Errorf("parameter UseFIPS is required") + } + + return nil +} + +// WithDefaults returns a shallow copy of EndpointParameterswith default values +// applied to members where applicable. +func (p EndpointParameters) WithDefaults() EndpointParameters { + if p.UseFIPS == nil { + p.UseFIPS = ptr.Bool(false) + } + return p +} + +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + +// EndpointResolverV2 provides the interface for resolving service endpoints. +type EndpointResolverV2 interface { + // ResolveEndpoint attempts to resolve the endpoint with the provided options, + // returning the endpoint if found. Otherwise an error is returned. + ResolveEndpoint(ctx context.Context, params EndpointParameters) ( + smithyendpoints.Endpoint, error, + ) +} + +// resolver provides the implementation for resolving endpoints. +type resolver struct{} + +func NewDefaultEndpointResolverV2() EndpointResolverV2 { + return &resolver{} +} + +// ResolveEndpoint attempts to resolve the endpoint with the provided options, +// returning the endpoint if found. Otherwise an error is returned. +func (r *resolver) ResolveEndpoint( + ctx context.Context, params EndpointParameters, +) ( + endpoint smithyendpoints.Endpoint, err error, +) { + params = params.WithDefaults() + if err = params.ValidateRequired(); err != nil { + return endpoint, fmt.Errorf("endpoint parameters are not valid, %w", err) + } + _UseFIPS := *params.UseFIPS + + if exprVal := params.Endpoint; exprVal != nil { + _Endpoint := *exprVal + _ = _Endpoint + if _UseFIPS == true { + return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: FIPS and custom endpoint are not supported") + } + uriString := _Endpoint + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + } + if exprVal := params.Region; exprVal != nil { + _Region := *exprVal + _ = _Region + if exprVal := awsrulesfn.GetPartition(_Region); exprVal != nil { + _PartitionResult := *exprVal + _ = _PartitionResult + if _UseFIPS == true { + uriString := func() string { + var out strings.Builder + out.WriteString("https://bcm-pricing-calculator-fips.") + out.WriteString(_PartitionResult.ImplicitGlobalRegion) + out.WriteString(".") + out.WriteString(_PartitionResult.DualStackDnsSuffix) + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningRegion(&sp, _PartitionResult.ImplicitGlobalRegion) + return sp + }(), + }, + }) + return out + }(), + }, nil + } + uriString := func() string { + var out strings.Builder + out.WriteString("https://bcm-pricing-calculator.") + out.WriteString(_PartitionResult.ImplicitGlobalRegion) + out.WriteString(".") + out.WriteString(_PartitionResult.DualStackDnsSuffix) + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningRegion(&sp, _PartitionResult.ImplicitGlobalRegion) + return sp + }(), + }, + }) + return out + }(), + }, nil + } + return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.") + } + return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Missing Region") +} + +type endpointParamsBinder interface { + bindEndpointParams(*EndpointParameters) +} + +func bindEndpointParams(ctx context.Context, input interface{}, options Options) *EndpointParameters { + params := &EndpointParameters{} + + params.UseFIPS = aws.Bool(options.EndpointOptions.UseFIPSEndpoint == aws.FIPSEndpointStateEnabled) + params.Endpoint = options.BaseEndpoint + params.Region = bindRegion(options.Region) + + if b, ok := input.(endpointParamsBinder); ok { + b.bindEndpointParams(params) + } + + return params +} + +type resolveEndpointV2Middleware struct { + options Options +} + +func (*resolveEndpointV2Middleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "ResolveEndpoint") + defer span.End() + + if awsmiddleware.GetRequiresLegacyEndpoints(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) + } + + if m.options.EndpointResolverV2 == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := bindEndpointParams(ctx, getOperationInput(ctx), m.options) + endpt, err := timeOperationMetric(ctx, "client.call.resolve_endpoint_duration", + func() (smithyendpoints.Endpoint, error) { + return m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params) + }) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + span.SetProperty("client.call.resolved_endpoint", endpt.URI.String()) + + if endpt.URI.RawPath == "" && req.URL.RawPath != "" { + endpt.URI.RawPath = endpt.URI.Path + } + req.URL.Scheme = endpt.URI.Scheme + req.URL.Host = endpt.URI.Host + req.URL.Path = smithyhttp.JoinPath(endpt.URI.Path, req.URL.Path) + req.URL.RawPath = smithyhttp.JoinPath(endpt.URI.RawPath, req.URL.RawPath) + for k := range endpt.Headers { + req.Header.Set(k, endpt.Headers.Get(k)) + } + + rscheme := getResolvedAuthScheme(ctx) + if rscheme == nil { + return out, metadata, fmt.Errorf("no resolved auth scheme") + } + + opts, _ := smithyauth.GetAuthOptions(&endpt.Properties) + for _, o := range opts { + rscheme.SignerProperties.SetAll(&o.SignerProperties) + } + + span.End() + return next.HandleFinalize(ctx, in) +} diff --git a/service/bcmpricingcalculator/endpoints_config_test.go b/service/bcmpricingcalculator/endpoints_config_test.go new file mode 100644 index 00000000000..a545fa7f0d5 --- /dev/null +++ b/service/bcmpricingcalculator/endpoints_config_test.go @@ -0,0 +1,139 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bcmpricingcalculator + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/aws" + "os" + "reflect" + "testing" +) + +type mockConfigSource struct { + global string + service string + ignore bool +} + +// GetIgnoreConfiguredEndpoints is used in knowing when to disable configured +// endpoints feature. +func (m mockConfigSource) GetIgnoreConfiguredEndpoints(context.Context) (bool, bool, error) { + return m.ignore, m.ignore, nil +} + +// GetServiceBaseEndpoint is used to retrieve a normalized SDK ID for use +// with configured endpoints. +func (m mockConfigSource) GetServiceBaseEndpoint(ctx context.Context, sdkID string) (string, bool, error) { + if m.service != "" { + return m.service, true, nil + } + return "", false, nil +} + +func TestResolveBaseEndpoint(t *testing.T) { + cases := map[string]struct { + envGlobal string + envService string + envIgnore bool + configGlobal string + configService string + configIgnore bool + clientEndpoint *string + expectURL *string + }{ + "env ignore": { + envGlobal: "https://env-global.dev", + envService: "https://env-bcm-pricing-calculator.dev", + envIgnore: true, + configGlobal: "http://config-global.dev", + configService: "http://config-bcm-pricing-calculator.dev", + expectURL: nil, + }, + "env global": { + envGlobal: "https://env-global.dev", + configGlobal: "http://config-global.dev", + configService: "http://config-bcm-pricing-calculator.dev", + expectURL: aws.String("https://env-global.dev"), + }, + "env service": { + envGlobal: "https://env-global.dev", + envService: "https://env-bcm-pricing-calculator.dev", + configGlobal: "http://config-global.dev", + configService: "http://config-bcm-pricing-calculator.dev", + expectURL: aws.String("https://env-bcm-pricing-calculator.dev"), + }, + "config ignore": { + envGlobal: "https://env-global.dev", + envService: "https://env-bcm-pricing-calculator.dev", + configGlobal: "http://config-global.dev", + configService: "http://config-bcm-pricing-calculator.dev", + configIgnore: true, + expectURL: nil, + }, + "config global": { + configGlobal: "http://config-global.dev", + expectURL: aws.String("http://config-global.dev"), + }, + "config service": { + configGlobal: "http://config-global.dev", + configService: "http://config-bcm-pricing-calculator.dev", + expectURL: aws.String("http://config-bcm-pricing-calculator.dev"), + }, + "client": { + envGlobal: "https://env-global.dev", + envService: "https://env-bcm-pricing-calculator.dev", + configGlobal: "http://config-global.dev", + configService: "http://config-bcm-pricing-calculator.dev", + clientEndpoint: aws.String("https://client-bcm-pricing-calculator.dev"), + expectURL: aws.String("https://client-bcm-pricing-calculator.dev"), + }, + } + + for name, c := range cases { + t.Run(name, func(t *testing.T) { + os.Clearenv() + + awsConfig := aws.Config{} + ignore := c.envIgnore || c.configIgnore + + if c.configGlobal != "" && !ignore { + awsConfig.BaseEndpoint = aws.String(c.configGlobal) + } + + if c.envGlobal != "" { + t.Setenv("AWS_ENDPOINT_URL", c.envGlobal) + if !ignore { + awsConfig.BaseEndpoint = aws.String(c.envGlobal) + } + } + + if c.envService != "" { + t.Setenv("AWS_ENDPOINT_URL_BCM_PRICING_CALCULATOR", c.envService) + } + + awsConfig.ConfigSources = []interface{}{ + mockConfigSource{ + global: c.envGlobal, + service: c.envService, + ignore: c.envIgnore, + }, + mockConfigSource{ + global: c.configGlobal, + service: c.configService, + ignore: c.configIgnore, + }, + } + + client := NewFromConfig(awsConfig, func(o *Options) { + if c.clientEndpoint != nil { + o.BaseEndpoint = c.clientEndpoint + } + }) + + if e, a := c.expectURL, client.options.BaseEndpoint; !reflect.DeepEqual(e, a) { + t.Errorf("expect endpoint %v , got %v", e, a) + } + }) + } +} diff --git a/service/bcmpricingcalculator/endpoints_test.go b/service/bcmpricingcalculator/endpoints_test.go new file mode 100644 index 00000000000..087816b54b6 --- /dev/null +++ b/service/bcmpricingcalculator/endpoints_test.go @@ -0,0 +1,774 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bcmpricingcalculator + +import ( + "context" + smithy "github.com/aws/smithy-go" + smithyauth "github.com/aws/smithy-go/auth" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/ptr" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net/http" + "net/url" + "reflect" + "strings" + "testing" +) + +// For custom endpoint with region not set and fips disabled +func TestEndpointCase0(t *testing.T) { + var params = EndpointParameters{ + Endpoint: ptr.String("https://example.com"), + UseFIPS: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://example.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For custom endpoint with fips enabled +func TestEndpointCase1(t *testing.T) { + var params = EndpointParameters{ + Endpoint: ptr.String("https://example.com"), + UseFIPS: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: FIPS and custom endpoint are not supported", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase2(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://bcm-pricing-calculator-fips.us-east-1.api.aws") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1") + return sp + }(), + }, + }) + return out + }(), + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region us-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase3(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://bcm-pricing-calculator.us-east-1.api.aws") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1") + return sp + }(), + }, + }) + return out + }(), + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region cn-northwest-1 with FIPS enabled and DualStack enabled +func TestEndpointCase4(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("cn-northwest-1"), + UseFIPS: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://bcm-pricing-calculator-fips.cn-northwest-1.api.amazonwebservices.com.cn") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningRegion(&sp, "cn-northwest-1") + return sp + }(), + }, + }) + return out + }(), + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region cn-northwest-1 with FIPS disabled and DualStack enabled +func TestEndpointCase5(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("cn-northwest-1"), + UseFIPS: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://bcm-pricing-calculator.cn-northwest-1.api.amazonwebservices.com.cn") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningRegion(&sp, "cn-northwest-1") + return sp + }(), + }, + }) + return out + }(), + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region us-gov-west-1 with FIPS enabled and DualStack enabled +func TestEndpointCase6(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-gov-west-1"), + UseFIPS: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://bcm-pricing-calculator-fips.us-gov-west-1.api.aws") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningRegion(&sp, "us-gov-west-1") + return sp + }(), + }, + }) + return out + }(), + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region us-gov-west-1 with FIPS disabled and DualStack enabled +func TestEndpointCase7(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-gov-west-1"), + UseFIPS: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://bcm-pricing-calculator.us-gov-west-1.api.aws") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningRegion(&sp, "us-gov-west-1") + return sp + }(), + }, + }) + return out + }(), + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase8(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://bcm-pricing-calculator-fips.us-iso-east-1.c2s.ic.gov") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningRegion(&sp, "us-iso-east-1") + return sp + }(), + }, + }) + return out + }(), + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase9(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://bcm-pricing-calculator.us-iso-east-1.c2s.ic.gov") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningRegion(&sp, "us-iso-east-1") + return sp + }(), + }, + }) + return out + }(), + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase10(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://bcm-pricing-calculator-fips.us-isob-east-1.sc2s.sgov.gov") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningRegion(&sp, "us-isob-east-1") + return sp + }(), + }, + }) + return out + }(), + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase11(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://bcm-pricing-calculator.us-isob-east-1.sc2s.sgov.gov") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningRegion(&sp, "us-isob-east-1") + return sp + }(), + }, + }) + return out + }(), + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region eu-isoe-west-1 with FIPS enabled and DualStack enabled +func TestEndpointCase12(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("eu-isoe-west-1"), + UseFIPS: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://bcm-pricing-calculator-fips.eu-isoe-west-1.cloud.adc-e.uk") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningRegion(&sp, "eu-isoe-west-1") + return sp + }(), + }, + }) + return out + }(), + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region eu-isoe-west-1 with FIPS disabled and DualStack enabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("eu-isoe-west-1"), + UseFIPS: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://bcm-pricing-calculator.eu-isoe-west-1.cloud.adc-e.uk") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningRegion(&sp, "eu-isoe-west-1") + return sp + }(), + }, + }) + return out + }(), + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region us-isof-south-1 with FIPS enabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isof-south-1"), + UseFIPS: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://bcm-pricing-calculator-fips.us-isof-south-1.csp.hci.ic.gov") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningRegion(&sp, "us-isof-south-1") + return sp + }(), + }, + }) + return out + }(), + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region us-isof-south-1 with FIPS disabled and DualStack enabled +func TestEndpointCase15(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isof-south-1"), + UseFIPS: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://bcm-pricing-calculator.us-isof-south-1.csp.hci.ic.gov") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningRegion(&sp, "us-isof-south-1") + return sp + }(), + }, + }) + return out + }(), + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// Missing region +func TestEndpointCase16(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/bcmpricingcalculator/generated.json b/service/bcmpricingcalculator/generated.json new file mode 100644 index 00000000000..2e9803213d3 --- /dev/null +++ b/service/bcmpricingcalculator/generated.json @@ -0,0 +1,69 @@ +{ + "dependencies": { + "github.com/aws/aws-sdk-go-v2": "v1.4.0", + "github.com/aws/aws-sdk-go-v2/internal/configsources": "v0.0.0-00010101000000-000000000000", + "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2": "v2.0.0-00010101000000-000000000000", + "github.com/aws/smithy-go": "v1.4.0" + }, + "files": [ + "api_client.go", + "api_client_test.go", + "api_op_BatchCreateBillScenarioCommitmentModification.go", + "api_op_BatchCreateBillScenarioUsageModification.go", + "api_op_BatchCreateWorkloadEstimateUsage.go", + "api_op_BatchDeleteBillScenarioCommitmentModification.go", + "api_op_BatchDeleteBillScenarioUsageModification.go", + "api_op_BatchDeleteWorkloadEstimateUsage.go", + "api_op_BatchUpdateBillScenarioCommitmentModification.go", + "api_op_BatchUpdateBillScenarioUsageModification.go", + "api_op_BatchUpdateWorkloadEstimateUsage.go", + "api_op_CreateBillEstimate.go", + "api_op_CreateBillScenario.go", + "api_op_CreateWorkloadEstimate.go", + "api_op_DeleteBillEstimate.go", + "api_op_DeleteBillScenario.go", + "api_op_DeleteWorkloadEstimate.go", + "api_op_GetBillEstimate.go", + "api_op_GetBillScenario.go", + "api_op_GetPreferences.go", + "api_op_GetWorkloadEstimate.go", + "api_op_ListBillEstimateCommitments.go", + "api_op_ListBillEstimateInputCommitmentModifications.go", + "api_op_ListBillEstimateInputUsageModifications.go", + "api_op_ListBillEstimateLineItems.go", + "api_op_ListBillEstimates.go", + "api_op_ListBillScenarioCommitmentModifications.go", + "api_op_ListBillScenarioUsageModifications.go", + "api_op_ListBillScenarios.go", + "api_op_ListTagsForResource.go", + "api_op_ListWorkloadEstimateUsage.go", + "api_op_ListWorkloadEstimates.go", + "api_op_TagResource.go", + "api_op_UntagResource.go", + "api_op_UpdateBillEstimate.go", + "api_op_UpdateBillScenario.go", + "api_op_UpdatePreferences.go", + "api_op_UpdateWorkloadEstimate.go", + "auth.go", + "deserializers.go", + "doc.go", + "endpoints.go", + "endpoints_config_test.go", + "endpoints_test.go", + "generated.json", + "internal/endpoints/endpoints.go", + "internal/endpoints/endpoints_test.go", + "options.go", + "protocol_test.go", + "serializers.go", + "snapshot_test.go", + "types/enums.go", + "types/errors.go", + "types/types.go", + "types/types_exported_test.go", + "validators.go" + ], + "go": "1.15", + "module": "github.com/aws/aws-sdk-go-v2/service/bcmpricingcalculator", + "unstable": false +} diff --git a/service/bcmpricingcalculator/go.mod b/service/bcmpricingcalculator/go.mod new file mode 100644 index 00000000000..e54c80cae71 --- /dev/null +++ b/service/bcmpricingcalculator/go.mod @@ -0,0 +1,16 @@ +module github.com/aws/aws-sdk-go-v2/service/bcmpricingcalculator + +go 1.21 + +require ( + github.com/aws/aws-sdk-go-v2 v1.32.5 + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.24 + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.24 + github.com/aws/smithy-go v1.22.1 +) + +replace github.com/aws/aws-sdk-go-v2 => ../../ + +replace github.com/aws/aws-sdk-go-v2/internal/configsources => ../../internal/configsources/ + +replace github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 => ../../internal/endpoints/v2/ diff --git a/service/bcmpricingcalculator/go.sum b/service/bcmpricingcalculator/go.sum new file mode 100644 index 00000000000..bd2678891af --- /dev/null +++ b/service/bcmpricingcalculator/go.sum @@ -0,0 +1,2 @@ +github.com/aws/smithy-go v1.22.1 h1:/HPHZQ0g7f4eUeK6HKglFz8uwVfZKgoI25rb/J+dnro= +github.com/aws/smithy-go v1.22.1/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= diff --git a/service/bcmpricingcalculator/go_module_metadata.go b/service/bcmpricingcalculator/go_module_metadata.go new file mode 100644 index 00000000000..4181fc52210 --- /dev/null +++ b/service/bcmpricingcalculator/go_module_metadata.go @@ -0,0 +1,6 @@ +// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. + +package bcmpricingcalculator + +// goModuleVersion is the tagged release for this module +const goModuleVersion = "tip" diff --git a/service/bcmpricingcalculator/internal/endpoints/endpoints.go b/service/bcmpricingcalculator/internal/endpoints/endpoints.go new file mode 100644 index 00000000000..1ff432ea321 --- /dev/null +++ b/service/bcmpricingcalculator/internal/endpoints/endpoints.go @@ -0,0 +1,296 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package endpoints + +import ( + "github.com/aws/aws-sdk-go-v2/aws" + endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2" + "github.com/aws/smithy-go/logging" + "regexp" +) + +// Options is the endpoint resolver configuration options +type Options struct { + // Logger is a logging implementation that log events should be sent to. + Logger logging.Logger + + // LogDeprecated indicates that deprecated endpoints should be logged to the + // provided logger. + LogDeprecated bool + + // ResolvedRegion is used to override the region to be resolved, rather then the + // using the value passed to the ResolveEndpoint method. This value is used by the + // SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative + // name. You must not set this value directly in your application. + ResolvedRegion string + + // DisableHTTPS informs the resolver to return an endpoint that does not use the + // HTTPS scheme. + DisableHTTPS bool + + // UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint. + UseDualStackEndpoint aws.DualStackEndpointState + + // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint. + UseFIPSEndpoint aws.FIPSEndpointState +} + +func (o Options) GetResolvedRegion() string { + return o.ResolvedRegion +} + +func (o Options) GetDisableHTTPS() bool { + return o.DisableHTTPS +} + +func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState { + return o.UseDualStackEndpoint +} + +func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState { + return o.UseFIPSEndpoint +} + +func transformToSharedOptions(options Options) endpoints.Options { + return endpoints.Options{ + Logger: options.Logger, + LogDeprecated: options.LogDeprecated, + ResolvedRegion: options.ResolvedRegion, + DisableHTTPS: options.DisableHTTPS, + UseDualStackEndpoint: options.UseDualStackEndpoint, + UseFIPSEndpoint: options.UseFIPSEndpoint, + } +} + +// Resolver BCM Pricing Calculator endpoint resolver +type Resolver struct { + partitions endpoints.Partitions +} + +// ResolveEndpoint resolves the service endpoint for the given region and options +func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) { + if len(region) == 0 { + return endpoint, &aws.MissingRegionError{} + } + + opt := transformToSharedOptions(options) + return r.partitions.ResolveEndpoint(region, opt) +} + +// New returns a new Resolver +func New() *Resolver { + return &Resolver{ + partitions: defaultPartitions, + } +} + +var partitionRegexp = struct { + Aws *regexp.Regexp + AwsCn *regexp.Regexp + AwsIso *regexp.Regexp + AwsIsoB *regexp.Regexp + AwsIsoE *regexp.Regexp + AwsIsoF *regexp.Regexp + AwsUsGov *regexp.Regexp +}{ + + Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$"), + AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), + AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), + AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), + AwsIsoE: regexp.MustCompile("^eu\\-isoe\\-\\w+\\-\\d+$"), + AwsIsoF: regexp.MustCompile("^us\\-isof\\-\\w+\\-\\d+$"), + AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"), +} + +var defaultPartitions = endpoints.Partitions{ + { + ID: "aws", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "bcm-pricing-calculator.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "bcm-pricing-calculator-fips.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "bcm-pricing-calculator-fips.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "bcm-pricing-calculator.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.Aws, + IsRegionalized: true, + }, + { + ID: "aws-cn", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "bcm-pricing-calculator.{region}.api.amazonwebservices.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "bcm-pricing-calculator-fips.{region}.amazonaws.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "bcm-pricing-calculator-fips.{region}.api.amazonwebservices.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "bcm-pricing-calculator.{region}.amazonaws.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsCn, + IsRegionalized: true, + }, + { + ID: "aws-iso", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "bcm-pricing-calculator-fips.{region}.c2s.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "bcm-pricing-calculator.{region}.c2s.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIso, + IsRegionalized: true, + }, + { + ID: "aws-iso-b", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "bcm-pricing-calculator-fips.{region}.sc2s.sgov.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "bcm-pricing-calculator.{region}.sc2s.sgov.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIsoB, + IsRegionalized: true, + }, + { + ID: "aws-iso-e", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "bcm-pricing-calculator-fips.{region}.cloud.adc-e.uk", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "bcm-pricing-calculator.{region}.cloud.adc-e.uk", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIsoE, + IsRegionalized: true, + }, + { + ID: "aws-iso-f", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "bcm-pricing-calculator-fips.{region}.csp.hci.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "bcm-pricing-calculator.{region}.csp.hci.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIsoF, + IsRegionalized: true, + }, + { + ID: "aws-us-gov", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "bcm-pricing-calculator.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "bcm-pricing-calculator-fips.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "bcm-pricing-calculator-fips.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "bcm-pricing-calculator.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsUsGov, + IsRegionalized: true, + }, +} diff --git a/service/bcmpricingcalculator/internal/endpoints/endpoints_test.go b/service/bcmpricingcalculator/internal/endpoints/endpoints_test.go new file mode 100644 index 00000000000..08e5da2d833 --- /dev/null +++ b/service/bcmpricingcalculator/internal/endpoints/endpoints_test.go @@ -0,0 +1,11 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package endpoints + +import ( + "testing" +) + +func TestRegexCompile(t *testing.T) { + _ = defaultPartitions +} diff --git a/service/bcmpricingcalculator/options.go b/service/bcmpricingcalculator/options.go new file mode 100644 index 00000000000..9af199a980b --- /dev/null +++ b/service/bcmpricingcalculator/options.go @@ -0,0 +1,236 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bcmpricingcalculator + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy" + smithyauth "github.com/aws/smithy-go/auth" + "github.com/aws/smithy-go/logging" + "github.com/aws/smithy-go/metrics" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net/http" +) + +type HTTPClient interface { + Do(*http.Request) (*http.Response, error) +} + +type Options struct { + // Set of options to modify how an operation is invoked. These apply to all + // operations invoked for this client. Use functional options on operation call to + // modify this list for per operation behavior. + APIOptions []func(*middleware.Stack) error + + // The optional application specific identifier appended to the User-Agent header. + AppID string + + // This endpoint will be given as input to an EndpointResolverV2. It is used for + // providing a custom base endpoint that is subject to modifications by the + // processing EndpointResolverV2. + BaseEndpoint *string + + // Configures the events that will be sent to the configured logger. + ClientLogMode aws.ClientLogMode + + // The credentials object to use when signing requests. + Credentials aws.CredentialsProvider + + // The configuration DefaultsMode that the SDK should use when constructing the + // clients initial default settings. + DefaultsMode aws.DefaultsMode + + // The endpoint options to be used when attempting to resolve an endpoint. + EndpointOptions EndpointResolverOptions + + // The service endpoint resolver. + // + // Deprecated: Deprecated: EndpointResolver and WithEndpointResolver. Providing a + // value for this field will likely prevent you from using any endpoint-related + // service features released after the introduction of EndpointResolverV2 and + // BaseEndpoint. + // + // To migrate an EndpointResolver implementation that uses a custom endpoint, set + // the client option BaseEndpoint instead. + EndpointResolver EndpointResolver + + // Resolves the endpoint used for a particular service operation. This should be + // used over the deprecated EndpointResolver. + EndpointResolverV2 EndpointResolverV2 + + // Signature Version 4 (SigV4) Signer + HTTPSignerV4 HTTPSignerV4 + + // Provides idempotency tokens values that will be automatically populated into + // idempotent API operations. + IdempotencyTokenProvider IdempotencyTokenProvider + + // The logger writer interface to write logging messages to. + Logger logging.Logger + + // The client meter provider. + MeterProvider metrics.MeterProvider + + // The region to send requests to. (Required) + Region string + + // RetryMaxAttempts specifies the maximum number attempts an API client will call + // an operation that fails with a retryable error. A value of 0 is ignored, and + // will not be used to configure the API client created default retryer, or modify + // per operation call's retry max attempts. + // + // If specified in an operation call's functional options with a value that is + // different than the constructed client's Options, the Client's Retryer will be + // wrapped to use the operation's specific RetryMaxAttempts value. + RetryMaxAttempts int + + // RetryMode specifies the retry mode the API client will be created with, if + // Retryer option is not also specified. + // + // When creating a new API Clients this member will only be used if the Retryer + // Options member is nil. This value will be ignored if Retryer is not nil. + // + // Currently does not support per operation call overrides, may in the future. + RetryMode aws.RetryMode + + // Retryer guides how HTTP requests should be retried in case of recoverable + // failures. When nil the API client will use a default retryer. The kind of + // default retry created by the API client can be changed with the RetryMode + // option. + Retryer aws.Retryer + + // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set + // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig . You + // should not populate this structure programmatically, or rely on the values here + // within your applications. + RuntimeEnvironment aws.RuntimeEnvironment + + // The client tracer provider. + TracerProvider tracing.TracerProvider + + // The initial DefaultsMode used when the client options were constructed. If the + // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved + // value was at that point in time. + // + // Currently does not support per operation call overrides, may in the future. + resolvedDefaultsMode aws.DefaultsMode + + // The HTTP client to invoke API calls with. Defaults to client's default HTTP + // implementation if nil. + HTTPClient HTTPClient + + // The auth scheme resolver which determines how to authenticate for each + // operation. + AuthSchemeResolver AuthSchemeResolver + + // The list of auth schemes supported by the client. + AuthSchemes []smithyhttp.AuthScheme +} + +// Copy creates a clone where the APIOptions list is deep copied. +func (o Options) Copy() Options { + to := o + to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions)) + copy(to.APIOptions, o.APIOptions) + + return to +} + +func (o Options) GetIdentityResolver(schemeID string) smithyauth.IdentityResolver { + if schemeID == "aws.auth#sigv4" { + return getSigV4IdentityResolver(o) + } + if schemeID == "smithy.api#noAuth" { + return &smithyauth.AnonymousIdentityResolver{} + } + return nil +} + +// WithAPIOptions returns a functional option for setting the Client's APIOptions +// option. +func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) { + return func(o *Options) { + o.APIOptions = append(o.APIOptions, optFns...) + } +} + +// Deprecated: EndpointResolver and WithEndpointResolver. Providing a value for +// this field will likely prevent you from using any endpoint-related service +// features released after the introduction of EndpointResolverV2 and BaseEndpoint. +// +// To migrate an EndpointResolver implementation that uses a custom endpoint, set +// the client option BaseEndpoint instead. +func WithEndpointResolver(v EndpointResolver) func(*Options) { + return func(o *Options) { + o.EndpointResolver = v + } +} + +// WithEndpointResolverV2 returns a functional option for setting the Client's +// EndpointResolverV2 option. +func WithEndpointResolverV2(v EndpointResolverV2) func(*Options) { + return func(o *Options) { + o.EndpointResolverV2 = v + } +} + +func getSigV4IdentityResolver(o Options) smithyauth.IdentityResolver { + if o.Credentials != nil { + return &internalauthsmithy.CredentialsProviderAdapter{Provider: o.Credentials} + } + return nil +} + +// WithSigV4SigningName applies an override to the authentication workflow to +// use the given signing name for SigV4-authenticated operations. +// +// This is an advanced setting. The value here is FINAL, taking precedence over +// the resolved signing name from both auth scheme resolution and endpoint +// resolution. +func WithSigV4SigningName(name string) func(*Options) { + fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, + ) { + return next.HandleInitialize(awsmiddleware.SetSigningName(ctx, name), in) + } + return func(o *Options) { + o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error { + return s.Initialize.Add( + middleware.InitializeMiddlewareFunc("withSigV4SigningName", fn), + middleware.Before, + ) + }) + } +} + +// WithSigV4SigningRegion applies an override to the authentication workflow to +// use the given signing region for SigV4-authenticated operations. +// +// This is an advanced setting. The value here is FINAL, taking precedence over +// the resolved signing region from both auth scheme resolution and endpoint +// resolution. +func WithSigV4SigningRegion(region string) func(*Options) { + fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, + ) { + return next.HandleInitialize(awsmiddleware.SetSigningRegion(ctx, region), in) + } + return func(o *Options) { + o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error { + return s.Initialize.Add( + middleware.InitializeMiddlewareFunc("withSigV4SigningRegion", fn), + middleware.Before, + ) + }) + } +} + +func ignoreAnonymousAuth(options *Options) { + if aws.IsCredentialsProvider(options.Credentials, (*aws.AnonymousCredentials)(nil)) { + options.Credentials = nil + } +} diff --git a/service/bcmpricingcalculator/protocol_test.go b/service/bcmpricingcalculator/protocol_test.go new file mode 100644 index 00000000000..7130349ec72 --- /dev/null +++ b/service/bcmpricingcalculator/protocol_test.go @@ -0,0 +1,3 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bcmpricingcalculator diff --git a/service/bcmpricingcalculator/serializers.go b/service/bcmpricingcalculator/serializers.go new file mode 100644 index 00000000000..dd401d8e099 --- /dev/null +++ b/service/bcmpricingcalculator/serializers.go @@ -0,0 +1,3930 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bcmpricingcalculator + +import ( + "bytes" + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/bcmpricingcalculator/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/encoding/httpbinding" + smithyjson "github.com/aws/smithy-go/encoding/json" + "github.com/aws/smithy-go/middleware" + smithytime "github.com/aws/smithy-go/time" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" + "math" + "path" +) + +type awsAwsjson10_serializeOpBatchCreateBillScenarioCommitmentModification struct { +} + +func (*awsAwsjson10_serializeOpBatchCreateBillScenarioCommitmentModification) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpBatchCreateBillScenarioCommitmentModification) 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.(*BatchCreateBillScenarioCommitmentModificationInput) + _ = 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("AWSBCMPricingCalculator.BatchCreateBillScenarioCommitmentModification") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentBatchCreateBillScenarioCommitmentModificationInput(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_serializeOpBatchCreateBillScenarioUsageModification struct { +} + +func (*awsAwsjson10_serializeOpBatchCreateBillScenarioUsageModification) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpBatchCreateBillScenarioUsageModification) 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.(*BatchCreateBillScenarioUsageModificationInput) + _ = 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("AWSBCMPricingCalculator.BatchCreateBillScenarioUsageModification") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentBatchCreateBillScenarioUsageModificationInput(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_serializeOpBatchCreateWorkloadEstimateUsage struct { +} + +func (*awsAwsjson10_serializeOpBatchCreateWorkloadEstimateUsage) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpBatchCreateWorkloadEstimateUsage) 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.(*BatchCreateWorkloadEstimateUsageInput) + _ = 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("AWSBCMPricingCalculator.BatchCreateWorkloadEstimateUsage") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentBatchCreateWorkloadEstimateUsageInput(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_serializeOpBatchDeleteBillScenarioCommitmentModification struct { +} + +func (*awsAwsjson10_serializeOpBatchDeleteBillScenarioCommitmentModification) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpBatchDeleteBillScenarioCommitmentModification) 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.(*BatchDeleteBillScenarioCommitmentModificationInput) + _ = 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("AWSBCMPricingCalculator.BatchDeleteBillScenarioCommitmentModification") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentBatchDeleteBillScenarioCommitmentModificationInput(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_serializeOpBatchDeleteBillScenarioUsageModification struct { +} + +func (*awsAwsjson10_serializeOpBatchDeleteBillScenarioUsageModification) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpBatchDeleteBillScenarioUsageModification) 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.(*BatchDeleteBillScenarioUsageModificationInput) + _ = 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("AWSBCMPricingCalculator.BatchDeleteBillScenarioUsageModification") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentBatchDeleteBillScenarioUsageModificationInput(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_serializeOpBatchDeleteWorkloadEstimateUsage struct { +} + +func (*awsAwsjson10_serializeOpBatchDeleteWorkloadEstimateUsage) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpBatchDeleteWorkloadEstimateUsage) 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.(*BatchDeleteWorkloadEstimateUsageInput) + _ = 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("AWSBCMPricingCalculator.BatchDeleteWorkloadEstimateUsage") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentBatchDeleteWorkloadEstimateUsageInput(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_serializeOpBatchUpdateBillScenarioCommitmentModification struct { +} + +func (*awsAwsjson10_serializeOpBatchUpdateBillScenarioCommitmentModification) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpBatchUpdateBillScenarioCommitmentModification) 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.(*BatchUpdateBillScenarioCommitmentModificationInput) + _ = 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("AWSBCMPricingCalculator.BatchUpdateBillScenarioCommitmentModification") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentBatchUpdateBillScenarioCommitmentModificationInput(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_serializeOpBatchUpdateBillScenarioUsageModification struct { +} + +func (*awsAwsjson10_serializeOpBatchUpdateBillScenarioUsageModification) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpBatchUpdateBillScenarioUsageModification) 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.(*BatchUpdateBillScenarioUsageModificationInput) + _ = 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("AWSBCMPricingCalculator.BatchUpdateBillScenarioUsageModification") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentBatchUpdateBillScenarioUsageModificationInput(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_serializeOpBatchUpdateWorkloadEstimateUsage struct { +} + +func (*awsAwsjson10_serializeOpBatchUpdateWorkloadEstimateUsage) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpBatchUpdateWorkloadEstimateUsage) 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.(*BatchUpdateWorkloadEstimateUsageInput) + _ = 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("AWSBCMPricingCalculator.BatchUpdateWorkloadEstimateUsage") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentBatchUpdateWorkloadEstimateUsageInput(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_serializeOpCreateBillEstimate struct { +} + +func (*awsAwsjson10_serializeOpCreateBillEstimate) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpCreateBillEstimate) 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.(*CreateBillEstimateInput) + _ = 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("AWSBCMPricingCalculator.CreateBillEstimate") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentCreateBillEstimateInput(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_serializeOpCreateBillScenario struct { +} + +func (*awsAwsjson10_serializeOpCreateBillScenario) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpCreateBillScenario) 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.(*CreateBillScenarioInput) + _ = 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("AWSBCMPricingCalculator.CreateBillScenario") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentCreateBillScenarioInput(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_serializeOpCreateWorkloadEstimate struct { +} + +func (*awsAwsjson10_serializeOpCreateWorkloadEstimate) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpCreateWorkloadEstimate) 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.(*CreateWorkloadEstimateInput) + _ = 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("AWSBCMPricingCalculator.CreateWorkloadEstimate") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentCreateWorkloadEstimateInput(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_serializeOpDeleteBillEstimate struct { +} + +func (*awsAwsjson10_serializeOpDeleteBillEstimate) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpDeleteBillEstimate) 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.(*DeleteBillEstimateInput) + _ = 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("AWSBCMPricingCalculator.DeleteBillEstimate") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentDeleteBillEstimateInput(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_serializeOpDeleteBillScenario struct { +} + +func (*awsAwsjson10_serializeOpDeleteBillScenario) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpDeleteBillScenario) 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.(*DeleteBillScenarioInput) + _ = 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("AWSBCMPricingCalculator.DeleteBillScenario") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentDeleteBillScenarioInput(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_serializeOpDeleteWorkloadEstimate struct { +} + +func (*awsAwsjson10_serializeOpDeleteWorkloadEstimate) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpDeleteWorkloadEstimate) 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.(*DeleteWorkloadEstimateInput) + _ = 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("AWSBCMPricingCalculator.DeleteWorkloadEstimate") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentDeleteWorkloadEstimateInput(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_serializeOpGetBillEstimate struct { +} + +func (*awsAwsjson10_serializeOpGetBillEstimate) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpGetBillEstimate) 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.(*GetBillEstimateInput) + _ = 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("AWSBCMPricingCalculator.GetBillEstimate") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentGetBillEstimateInput(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_serializeOpGetBillScenario struct { +} + +func (*awsAwsjson10_serializeOpGetBillScenario) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpGetBillScenario) 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.(*GetBillScenarioInput) + _ = 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("AWSBCMPricingCalculator.GetBillScenario") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentGetBillScenarioInput(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_serializeOpGetPreferences struct { +} + +func (*awsAwsjson10_serializeOpGetPreferences) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpGetPreferences) 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.(*GetPreferencesInput) + _ = 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("AWSBCMPricingCalculator.GetPreferences") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentGetPreferencesInput(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_serializeOpGetWorkloadEstimate struct { +} + +func (*awsAwsjson10_serializeOpGetWorkloadEstimate) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpGetWorkloadEstimate) 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.(*GetWorkloadEstimateInput) + _ = 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("AWSBCMPricingCalculator.GetWorkloadEstimate") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentGetWorkloadEstimateInput(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_serializeOpListBillEstimateCommitments struct { +} + +func (*awsAwsjson10_serializeOpListBillEstimateCommitments) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpListBillEstimateCommitments) 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.(*ListBillEstimateCommitmentsInput) + _ = 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("AWSBCMPricingCalculator.ListBillEstimateCommitments") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentListBillEstimateCommitmentsInput(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_serializeOpListBillEstimateInputCommitmentModifications struct { +} + +func (*awsAwsjson10_serializeOpListBillEstimateInputCommitmentModifications) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpListBillEstimateInputCommitmentModifications) 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.(*ListBillEstimateInputCommitmentModificationsInput) + _ = 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("AWSBCMPricingCalculator.ListBillEstimateInputCommitmentModifications") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentListBillEstimateInputCommitmentModificationsInput(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_serializeOpListBillEstimateInputUsageModifications struct { +} + +func (*awsAwsjson10_serializeOpListBillEstimateInputUsageModifications) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpListBillEstimateInputUsageModifications) 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.(*ListBillEstimateInputUsageModificationsInput) + _ = 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("AWSBCMPricingCalculator.ListBillEstimateInputUsageModifications") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentListBillEstimateInputUsageModificationsInput(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_serializeOpListBillEstimateLineItems struct { +} + +func (*awsAwsjson10_serializeOpListBillEstimateLineItems) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpListBillEstimateLineItems) 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.(*ListBillEstimateLineItemsInput) + _ = 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("AWSBCMPricingCalculator.ListBillEstimateLineItems") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentListBillEstimateLineItemsInput(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_serializeOpListBillEstimates struct { +} + +func (*awsAwsjson10_serializeOpListBillEstimates) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpListBillEstimates) 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.(*ListBillEstimatesInput) + _ = 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("AWSBCMPricingCalculator.ListBillEstimates") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentListBillEstimatesInput(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_serializeOpListBillScenarioCommitmentModifications struct { +} + +func (*awsAwsjson10_serializeOpListBillScenarioCommitmentModifications) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpListBillScenarioCommitmentModifications) 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.(*ListBillScenarioCommitmentModificationsInput) + _ = 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("AWSBCMPricingCalculator.ListBillScenarioCommitmentModifications") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentListBillScenarioCommitmentModificationsInput(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_serializeOpListBillScenarios struct { +} + +func (*awsAwsjson10_serializeOpListBillScenarios) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpListBillScenarios) 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.(*ListBillScenariosInput) + _ = 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("AWSBCMPricingCalculator.ListBillScenarios") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentListBillScenariosInput(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_serializeOpListBillScenarioUsageModifications struct { +} + +func (*awsAwsjson10_serializeOpListBillScenarioUsageModifications) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpListBillScenarioUsageModifications) 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.(*ListBillScenarioUsageModificationsInput) + _ = 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("AWSBCMPricingCalculator.ListBillScenarioUsageModifications") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentListBillScenarioUsageModificationsInput(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_serializeOpListTagsForResource struct { +} + +func (*awsAwsjson10_serializeOpListTagsForResource) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_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)} + } + + 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("AWSBCMPricingCalculator.ListTagsForResource") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentListTagsForResourceInput(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_serializeOpListWorkloadEstimates struct { +} + +func (*awsAwsjson10_serializeOpListWorkloadEstimates) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpListWorkloadEstimates) 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.(*ListWorkloadEstimatesInput) + _ = 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("AWSBCMPricingCalculator.ListWorkloadEstimates") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentListWorkloadEstimatesInput(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_serializeOpListWorkloadEstimateUsage struct { +} + +func (*awsAwsjson10_serializeOpListWorkloadEstimateUsage) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpListWorkloadEstimateUsage) 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.(*ListWorkloadEstimateUsageInput) + _ = 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("AWSBCMPricingCalculator.ListWorkloadEstimateUsage") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentListWorkloadEstimateUsageInput(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_serializeOpTagResource struct { +} + +func (*awsAwsjson10_serializeOpTagResource) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpTagResource) 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.(*TagResourceInput) + _ = 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("AWSBCMPricingCalculator.TagResource") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentTagResourceInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = 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_serializeOpUntagResource struct { +} + +func (*awsAwsjson10_serializeOpUntagResource) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpUntagResource) 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.(*UntagResourceInput) + _ = 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("AWSBCMPricingCalculator.UntagResource") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentUntagResourceInput(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_serializeOpUpdateBillEstimate struct { +} + +func (*awsAwsjson10_serializeOpUpdateBillEstimate) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpUpdateBillEstimate) 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.(*UpdateBillEstimateInput) + _ = 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("AWSBCMPricingCalculator.UpdateBillEstimate") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentUpdateBillEstimateInput(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_serializeOpUpdateBillScenario struct { +} + +func (*awsAwsjson10_serializeOpUpdateBillScenario) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpUpdateBillScenario) 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.(*UpdateBillScenarioInput) + _ = 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("AWSBCMPricingCalculator.UpdateBillScenario") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentUpdateBillScenarioInput(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_serializeOpUpdatePreferences struct { +} + +func (*awsAwsjson10_serializeOpUpdatePreferences) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpUpdatePreferences) 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.(*UpdatePreferencesInput) + _ = 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("AWSBCMPricingCalculator.UpdatePreferences") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentUpdatePreferencesInput(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_serializeOpUpdateWorkloadEstimate struct { +} + +func (*awsAwsjson10_serializeOpUpdateWorkloadEstimate) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpUpdateWorkloadEstimate) 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.(*UpdateWorkloadEstimateInput) + _ = 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("AWSBCMPricingCalculator.UpdateWorkloadEstimate") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentUpdateWorkloadEstimateInput(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) +} +func awsAwsjson10_serializeDocumentAddReservedInstanceAction(v *types.AddReservedInstanceAction, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.InstanceCount != nil { + ok := object.Key("instanceCount") + ok.Integer(*v.InstanceCount) + } + + if v.ReservedInstancesOfferingId != nil { + ok := object.Key("reservedInstancesOfferingId") + ok.String(*v.ReservedInstancesOfferingId) + } + + return nil +} + +func awsAwsjson10_serializeDocumentAddSavingsPlanAction(v *types.AddSavingsPlanAction, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Commitment != nil { + ok := object.Key("commitment") + switch { + case math.IsNaN(*v.Commitment): + ok.String("NaN") + + case math.IsInf(*v.Commitment, 1): + ok.String("Infinity") + + case math.IsInf(*v.Commitment, -1): + ok.String("-Infinity") + + default: + ok.Double(*v.Commitment) + + } + } + + if v.SavingsPlanOfferingId != nil { + ok := object.Key("savingsPlanOfferingId") + ok.String(*v.SavingsPlanOfferingId) + } + + return nil +} + +func awsAwsjson10_serializeDocumentBatchCreateBillScenarioCommitmentModificationEntries(v []types.BatchCreateBillScenarioCommitmentModificationEntry, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson10_serializeDocumentBatchCreateBillScenarioCommitmentModificationEntry(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson10_serializeDocumentBatchCreateBillScenarioCommitmentModificationEntry(v *types.BatchCreateBillScenarioCommitmentModificationEntry, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CommitmentAction != nil { + ok := object.Key("commitmentAction") + if err := awsAwsjson10_serializeDocumentBillScenarioCommitmentModificationAction(v.CommitmentAction, ok); err != nil { + return err + } + } + + if v.Group != nil { + ok := object.Key("group") + ok.String(*v.Group) + } + + if v.Key != nil { + ok := object.Key("key") + ok.String(*v.Key) + } + + if v.UsageAccountId != nil { + ok := object.Key("usageAccountId") + ok.String(*v.UsageAccountId) + } + + return nil +} + +func awsAwsjson10_serializeDocumentBatchCreateBillScenarioUsageModificationEntries(v []types.BatchCreateBillScenarioUsageModificationEntry, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson10_serializeDocumentBatchCreateBillScenarioUsageModificationEntry(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson10_serializeDocumentBatchCreateBillScenarioUsageModificationEntry(v *types.BatchCreateBillScenarioUsageModificationEntry, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Amounts != nil { + ok := object.Key("amounts") + if err := awsAwsjson10_serializeDocumentUsageAmounts(v.Amounts, ok); err != nil { + return err + } + } + + if v.AvailabilityZone != nil { + ok := object.Key("availabilityZone") + ok.String(*v.AvailabilityZone) + } + + if v.Group != nil { + ok := object.Key("group") + ok.String(*v.Group) + } + + if v.HistoricalUsage != nil { + ok := object.Key("historicalUsage") + if err := awsAwsjson10_serializeDocumentHistoricalUsageEntity(v.HistoricalUsage, ok); err != nil { + return err + } + } + + if v.Key != nil { + ok := object.Key("key") + ok.String(*v.Key) + } + + if v.Operation != nil { + ok := object.Key("operation") + ok.String(*v.Operation) + } + + if v.ServiceCode != nil { + ok := object.Key("serviceCode") + ok.String(*v.ServiceCode) + } + + if v.UsageAccountId != nil { + ok := object.Key("usageAccountId") + ok.String(*v.UsageAccountId) + } + + if v.UsageType != nil { + ok := object.Key("usageType") + ok.String(*v.UsageType) + } + + return nil +} + +func awsAwsjson10_serializeDocumentBatchCreateWorkloadEstimateUsageEntries(v []types.BatchCreateWorkloadEstimateUsageEntry, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson10_serializeDocumentBatchCreateWorkloadEstimateUsageEntry(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson10_serializeDocumentBatchCreateWorkloadEstimateUsageEntry(v *types.BatchCreateWorkloadEstimateUsageEntry, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Amount != nil { + ok := object.Key("amount") + switch { + case math.IsNaN(*v.Amount): + ok.String("NaN") + + case math.IsInf(*v.Amount, 1): + ok.String("Infinity") + + case math.IsInf(*v.Amount, -1): + ok.String("-Infinity") + + default: + ok.Double(*v.Amount) + + } + } + + if v.Group != nil { + ok := object.Key("group") + ok.String(*v.Group) + } + + if v.HistoricalUsage != nil { + ok := object.Key("historicalUsage") + if err := awsAwsjson10_serializeDocumentHistoricalUsageEntity(v.HistoricalUsage, ok); err != nil { + return err + } + } + + if v.Key != nil { + ok := object.Key("key") + ok.String(*v.Key) + } + + if v.Operation != nil { + ok := object.Key("operation") + ok.String(*v.Operation) + } + + if v.ServiceCode != nil { + ok := object.Key("serviceCode") + ok.String(*v.ServiceCode) + } + + if v.UsageAccountId != nil { + ok := object.Key("usageAccountId") + ok.String(*v.UsageAccountId) + } + + if v.UsageType != nil { + ok := object.Key("usageType") + ok.String(*v.UsageType) + } + + return nil +} + +func awsAwsjson10_serializeDocumentBatchDeleteBillScenarioCommitmentModificationEntries(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 awsAwsjson10_serializeDocumentBatchDeleteBillScenarioUsageModificationEntries(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 awsAwsjson10_serializeDocumentBatchDeleteWorkloadEstimateUsageEntries(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 awsAwsjson10_serializeDocumentBatchUpdateBillScenarioCommitmentModificationEntries(v []types.BatchUpdateBillScenarioCommitmentModificationEntry, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson10_serializeDocumentBatchUpdateBillScenarioCommitmentModificationEntry(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson10_serializeDocumentBatchUpdateBillScenarioCommitmentModificationEntry(v *types.BatchUpdateBillScenarioCommitmentModificationEntry, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Group != nil { + ok := object.Key("group") + ok.String(*v.Group) + } + + if v.Id != nil { + ok := object.Key("id") + ok.String(*v.Id) + } + + return nil +} + +func awsAwsjson10_serializeDocumentBatchUpdateBillScenarioUsageModificationEntries(v []types.BatchUpdateBillScenarioUsageModificationEntry, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson10_serializeDocumentBatchUpdateBillScenarioUsageModificationEntry(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson10_serializeDocumentBatchUpdateBillScenarioUsageModificationEntry(v *types.BatchUpdateBillScenarioUsageModificationEntry, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Amounts != nil { + ok := object.Key("amounts") + if err := awsAwsjson10_serializeDocumentUsageAmounts(v.Amounts, ok); err != nil { + return err + } + } + + if v.Group != nil { + ok := object.Key("group") + ok.String(*v.Group) + } + + if v.Id != nil { + ok := object.Key("id") + ok.String(*v.Id) + } + + return nil +} + +func awsAwsjson10_serializeDocumentBatchUpdateWorkloadEstimateUsageEntries(v []types.BatchUpdateWorkloadEstimateUsageEntry, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson10_serializeDocumentBatchUpdateWorkloadEstimateUsageEntry(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson10_serializeDocumentBatchUpdateWorkloadEstimateUsageEntry(v *types.BatchUpdateWorkloadEstimateUsageEntry, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Amount != nil { + ok := object.Key("amount") + switch { + case math.IsNaN(*v.Amount): + ok.String("NaN") + + case math.IsInf(*v.Amount, 1): + ok.String("Infinity") + + case math.IsInf(*v.Amount, -1): + ok.String("-Infinity") + + default: + ok.Double(*v.Amount) + + } + } + + if v.Group != nil { + ok := object.Key("group") + ok.String(*v.Group) + } + + if v.Id != nil { + ok := object.Key("id") + ok.String(*v.Id) + } + + return nil +} + +func awsAwsjson10_serializeDocumentBillInterval(v *types.BillInterval, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.End != nil { + ok := object.Key("end") + ok.Double(smithytime.FormatEpochSeconds(*v.End)) + } + + if v.Start != nil { + ok := object.Key("start") + ok.Double(smithytime.FormatEpochSeconds(*v.Start)) + } + + return nil +} + +func awsAwsjson10_serializeDocumentBillScenarioCommitmentModificationAction(v types.BillScenarioCommitmentModificationAction, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.BillScenarioCommitmentModificationActionMemberAddReservedInstanceAction: + av := object.Key("addReservedInstanceAction") + if err := awsAwsjson10_serializeDocumentAddReservedInstanceAction(&uv.Value, av); err != nil { + return err + } + + case *types.BillScenarioCommitmentModificationActionMemberAddSavingsPlanAction: + av := object.Key("addSavingsPlanAction") + if err := awsAwsjson10_serializeDocumentAddSavingsPlanAction(&uv.Value, av); err != nil { + return err + } + + case *types.BillScenarioCommitmentModificationActionMemberNegateReservedInstanceAction: + av := object.Key("negateReservedInstanceAction") + if err := awsAwsjson10_serializeDocumentNegateReservedInstanceAction(&uv.Value, av); err != nil { + return err + } + + case *types.BillScenarioCommitmentModificationActionMemberNegateSavingsPlanAction: + av := object.Key("negateSavingsPlanAction") + if err := awsAwsjson10_serializeDocumentNegateSavingsPlanAction(&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 awsAwsjson10_serializeDocumentExpression(v *types.Expression, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.And != nil { + ok := object.Key("and") + if err := awsAwsjson10_serializeDocumentExpressionList(v.And, ok); err != nil { + return err + } + } + + if v.CostCategories != nil { + ok := object.Key("costCategories") + if err := awsAwsjson10_serializeDocumentExpressionFilter(v.CostCategories, ok); err != nil { + return err + } + } + + if v.Dimensions != nil { + ok := object.Key("dimensions") + if err := awsAwsjson10_serializeDocumentExpressionFilter(v.Dimensions, ok); err != nil { + return err + } + } + + if v.Not != nil { + ok := object.Key("not") + if err := awsAwsjson10_serializeDocumentExpression(v.Not, ok); err != nil { + return err + } + } + + if v.Or != nil { + ok := object.Key("or") + if err := awsAwsjson10_serializeDocumentExpressionList(v.Or, ok); err != nil { + return err + } + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsAwsjson10_serializeDocumentExpressionFilter(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson10_serializeDocumentExpressionFilter(v *types.ExpressionFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Key != nil { + ok := object.Key("key") + ok.String(*v.Key) + } + + if v.MatchOptions != nil { + ok := object.Key("matchOptions") + if err := awsAwsjson10_serializeDocumentStringList(v.MatchOptions, ok); err != nil { + return err + } + } + + if v.Values != nil { + ok := object.Key("values") + if err := awsAwsjson10_serializeDocumentStringList(v.Values, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson10_serializeDocumentExpressionList(v []types.Expression, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson10_serializeDocumentExpression(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson10_serializeDocumentFilterTimestamp(v *types.FilterTimestamp, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AfterTimestamp != nil { + ok := object.Key("afterTimestamp") + ok.Double(smithytime.FormatEpochSeconds(*v.AfterTimestamp)) + } + + if v.BeforeTimestamp != nil { + ok := object.Key("beforeTimestamp") + ok.Double(smithytime.FormatEpochSeconds(*v.BeforeTimestamp)) + } + + return nil +} + +func awsAwsjson10_serializeDocumentHistoricalUsageEntity(v *types.HistoricalUsageEntity, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BillInterval != nil { + ok := object.Key("billInterval") + if err := awsAwsjson10_serializeDocumentBillInterval(v.BillInterval, ok); err != nil { + return err + } + } + + if v.FilterExpression != nil { + ok := object.Key("filterExpression") + if err := awsAwsjson10_serializeDocumentExpression(v.FilterExpression, ok); err != nil { + return err + } + } + + if v.Location != nil { + ok := object.Key("location") + ok.String(*v.Location) + } + + if v.Operation != nil { + ok := object.Key("operation") + ok.String(*v.Operation) + } + + if v.ServiceCode != nil { + ok := object.Key("serviceCode") + ok.String(*v.ServiceCode) + } + + if v.UsageAccountId != nil { + ok := object.Key("usageAccountId") + ok.String(*v.UsageAccountId) + } + + if v.UsageType != nil { + ok := object.Key("usageType") + ok.String(*v.UsageType) + } + + return nil +} + +func awsAwsjson10_serializeDocumentListBillEstimateLineItemsFilter(v *types.ListBillEstimateLineItemsFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.MatchOption) > 0 { + ok := object.Key("matchOption") + ok.String(string(v.MatchOption)) + } + + 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_serializeDocumentListBillEstimateLineItemsFilterValues(v.Values, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson10_serializeDocumentListBillEstimateLineItemsFilters(v []types.ListBillEstimateLineItemsFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson10_serializeDocumentListBillEstimateLineItemsFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson10_serializeDocumentListBillEstimateLineItemsFilterValues(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 awsAwsjson10_serializeDocumentListBillEstimatesFilter(v *types.ListBillEstimatesFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.MatchOption) > 0 { + ok := object.Key("matchOption") + ok.String(string(v.MatchOption)) + } + + 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_serializeDocumentListBillEstimatesFilterValues(v.Values, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson10_serializeDocumentListBillEstimatesFilters(v []types.ListBillEstimatesFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson10_serializeDocumentListBillEstimatesFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson10_serializeDocumentListBillEstimatesFilterValues(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 awsAwsjson10_serializeDocumentListBillScenariosFilter(v *types.ListBillScenariosFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.MatchOption) > 0 { + ok := object.Key("matchOption") + ok.String(string(v.MatchOption)) + } + + 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_serializeDocumentListBillScenariosFilterValues(v.Values, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson10_serializeDocumentListBillScenariosFilters(v []types.ListBillScenariosFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson10_serializeDocumentListBillScenariosFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson10_serializeDocumentListBillScenariosFilterValues(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 awsAwsjson10_serializeDocumentListUsageFilter(v *types.ListUsageFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.MatchOption) > 0 { + ok := object.Key("matchOption") + ok.String(string(v.MatchOption)) + } + + 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_serializeDocumentListUsageFilterValues(v.Values, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson10_serializeDocumentListUsageFilters(v []types.ListUsageFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson10_serializeDocumentListUsageFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson10_serializeDocumentListUsageFilterValues(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 awsAwsjson10_serializeDocumentListWorkloadEstimatesFilter(v *types.ListWorkloadEstimatesFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.MatchOption) > 0 { + ok := object.Key("matchOption") + ok.String(string(v.MatchOption)) + } + + 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_serializeDocumentListWorkloadEstimatesFilterValues(v.Values, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson10_serializeDocumentListWorkloadEstimatesFilters(v []types.ListWorkloadEstimatesFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson10_serializeDocumentListWorkloadEstimatesFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson10_serializeDocumentListWorkloadEstimatesFilterValues(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 awsAwsjson10_serializeDocumentNegateReservedInstanceAction(v *types.NegateReservedInstanceAction, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ReservedInstancesId != nil { + ok := object.Key("reservedInstancesId") + ok.String(*v.ReservedInstancesId) + } + + return nil +} + +func awsAwsjson10_serializeDocumentNegateSavingsPlanAction(v *types.NegateSavingsPlanAction, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.SavingsPlanId != nil { + ok := object.Key("savingsPlanId") + ok.String(*v.SavingsPlanId) + } + + return nil +} + +func awsAwsjson10_serializeDocumentRateTypes(v []types.RateType, 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_serializeDocumentResourceTagKeys(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 awsAwsjson10_serializeDocumentStringList(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 awsAwsjson10_serializeDocumentTags(v map[string]string, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + om.String(v[key]) + } + return nil +} + +func awsAwsjson10_serializeDocumentUsageAmount(v *types.UsageAmount, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Amount != nil { + ok := object.Key("amount") + switch { + case math.IsNaN(*v.Amount): + ok.String("NaN") + + case math.IsInf(*v.Amount, 1): + ok.String("Infinity") + + case math.IsInf(*v.Amount, -1): + ok.String("-Infinity") + + default: + ok.Double(*v.Amount) + + } + } + + if v.StartHour != nil { + ok := object.Key("startHour") + ok.Double(smithytime.FormatEpochSeconds(*v.StartHour)) + } + + return nil +} + +func awsAwsjson10_serializeDocumentUsageAmounts(v []types.UsageAmount, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson10_serializeDocumentUsageAmount(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson10_serializeOpDocumentBatchCreateBillScenarioCommitmentModificationInput(v *BatchCreateBillScenarioCommitmentModificationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BillScenarioId != nil { + ok := object.Key("billScenarioId") + ok.String(*v.BillScenarioId) + } + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.CommitmentModifications != nil { + ok := object.Key("commitmentModifications") + if err := awsAwsjson10_serializeDocumentBatchCreateBillScenarioCommitmentModificationEntries(v.CommitmentModifications, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentBatchCreateBillScenarioUsageModificationInput(v *BatchCreateBillScenarioUsageModificationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BillScenarioId != nil { + ok := object.Key("billScenarioId") + ok.String(*v.BillScenarioId) + } + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.UsageModifications != nil { + ok := object.Key("usageModifications") + if err := awsAwsjson10_serializeDocumentBatchCreateBillScenarioUsageModificationEntries(v.UsageModifications, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentBatchCreateWorkloadEstimateUsageInput(v *BatchCreateWorkloadEstimateUsageInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.Usage != nil { + ok := object.Key("usage") + if err := awsAwsjson10_serializeDocumentBatchCreateWorkloadEstimateUsageEntries(v.Usage, ok); err != nil { + return err + } + } + + if v.WorkloadEstimateId != nil { + ok := object.Key("workloadEstimateId") + ok.String(*v.WorkloadEstimateId) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentBatchDeleteBillScenarioCommitmentModificationInput(v *BatchDeleteBillScenarioCommitmentModificationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BillScenarioId != nil { + ok := object.Key("billScenarioId") + ok.String(*v.BillScenarioId) + } + + if v.Ids != nil { + ok := object.Key("ids") + if err := awsAwsjson10_serializeDocumentBatchDeleteBillScenarioCommitmentModificationEntries(v.Ids, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentBatchDeleteBillScenarioUsageModificationInput(v *BatchDeleteBillScenarioUsageModificationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BillScenarioId != nil { + ok := object.Key("billScenarioId") + ok.String(*v.BillScenarioId) + } + + if v.Ids != nil { + ok := object.Key("ids") + if err := awsAwsjson10_serializeDocumentBatchDeleteBillScenarioUsageModificationEntries(v.Ids, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentBatchDeleteWorkloadEstimateUsageInput(v *BatchDeleteWorkloadEstimateUsageInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Ids != nil { + ok := object.Key("ids") + if err := awsAwsjson10_serializeDocumentBatchDeleteWorkloadEstimateUsageEntries(v.Ids, ok); err != nil { + return err + } + } + + if v.WorkloadEstimateId != nil { + ok := object.Key("workloadEstimateId") + ok.String(*v.WorkloadEstimateId) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentBatchUpdateBillScenarioCommitmentModificationInput(v *BatchUpdateBillScenarioCommitmentModificationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BillScenarioId != nil { + ok := object.Key("billScenarioId") + ok.String(*v.BillScenarioId) + } + + if v.CommitmentModifications != nil { + ok := object.Key("commitmentModifications") + if err := awsAwsjson10_serializeDocumentBatchUpdateBillScenarioCommitmentModificationEntries(v.CommitmentModifications, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentBatchUpdateBillScenarioUsageModificationInput(v *BatchUpdateBillScenarioUsageModificationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BillScenarioId != nil { + ok := object.Key("billScenarioId") + ok.String(*v.BillScenarioId) + } + + if v.UsageModifications != nil { + ok := object.Key("usageModifications") + if err := awsAwsjson10_serializeDocumentBatchUpdateBillScenarioUsageModificationEntries(v.UsageModifications, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentBatchUpdateWorkloadEstimateUsageInput(v *BatchUpdateWorkloadEstimateUsageInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Usage != nil { + ok := object.Key("usage") + if err := awsAwsjson10_serializeDocumentBatchUpdateWorkloadEstimateUsageEntries(v.Usage, ok); err != nil { + return err + } + } + + if v.WorkloadEstimateId != nil { + ok := object.Key("workloadEstimateId") + ok.String(*v.WorkloadEstimateId) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentCreateBillEstimateInput(v *CreateBillEstimateInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BillScenarioId != nil { + ok := object.Key("billScenarioId") + ok.String(*v.BillScenarioId) + } + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsAwsjson10_serializeDocumentTags(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentCreateBillScenarioInput(v *CreateBillScenarioInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsAwsjson10_serializeDocumentTags(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentCreateWorkloadEstimateInput(v *CreateWorkloadEstimateInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if len(v.RateType) > 0 { + ok := object.Key("rateType") + ok.String(string(v.RateType)) + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsAwsjson10_serializeDocumentTags(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentDeleteBillEstimateInput(v *DeleteBillEstimateInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Identifier != nil { + ok := object.Key("identifier") + ok.String(*v.Identifier) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentDeleteBillScenarioInput(v *DeleteBillScenarioInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Identifier != nil { + ok := object.Key("identifier") + ok.String(*v.Identifier) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentDeleteWorkloadEstimateInput(v *DeleteWorkloadEstimateInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Identifier != nil { + ok := object.Key("identifier") + ok.String(*v.Identifier) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentGetBillEstimateInput(v *GetBillEstimateInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Identifier != nil { + ok := object.Key("identifier") + ok.String(*v.Identifier) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentGetBillScenarioInput(v *GetBillScenarioInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Identifier != nil { + ok := object.Key("identifier") + ok.String(*v.Identifier) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentGetPreferencesInput(v *GetPreferencesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + return nil +} + +func awsAwsjson10_serializeOpDocumentGetWorkloadEstimateInput(v *GetWorkloadEstimateInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Identifier != nil { + ok := object.Key("identifier") + ok.String(*v.Identifier) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentListBillEstimateCommitmentsInput(v *ListBillEstimateCommitmentsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BillEstimateId != nil { + ok := object.Key("billEstimateId") + ok.String(*v.BillEstimateId) + } + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentListBillEstimateInputCommitmentModificationsInput(v *ListBillEstimateInputCommitmentModificationsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BillEstimateId != nil { + ok := object.Key("billEstimateId") + ok.String(*v.BillEstimateId) + } + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentListBillEstimateInputUsageModificationsInput(v *ListBillEstimateInputUsageModificationsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BillEstimateId != nil { + ok := object.Key("billEstimateId") + ok.String(*v.BillEstimateId) + } + + if v.Filters != nil { + ok := object.Key("filters") + if err := awsAwsjson10_serializeDocumentListUsageFilters(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) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentListBillEstimateLineItemsInput(v *ListBillEstimateLineItemsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BillEstimateId != nil { + ok := object.Key("billEstimateId") + ok.String(*v.BillEstimateId) + } + + if v.Filters != nil { + ok := object.Key("filters") + if err := awsAwsjson10_serializeDocumentListBillEstimateLineItemsFilters(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) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentListBillEstimatesInput(v *ListBillEstimatesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CreatedAtFilter != nil { + ok := object.Key("createdAtFilter") + if err := awsAwsjson10_serializeDocumentFilterTimestamp(v.CreatedAtFilter, ok); err != nil { + return err + } + } + + if v.ExpiresAtFilter != nil { + ok := object.Key("expiresAtFilter") + if err := awsAwsjson10_serializeDocumentFilterTimestamp(v.ExpiresAtFilter, ok); err != nil { + return err + } + } + + if v.Filters != nil { + ok := object.Key("filters") + if err := awsAwsjson10_serializeDocumentListBillEstimatesFilters(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) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentListBillScenarioCommitmentModificationsInput(v *ListBillScenarioCommitmentModificationsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BillScenarioId != nil { + ok := object.Key("billScenarioId") + ok.String(*v.BillScenarioId) + } + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentListBillScenariosInput(v *ListBillScenariosInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CreatedAtFilter != nil { + ok := object.Key("createdAtFilter") + if err := awsAwsjson10_serializeDocumentFilterTimestamp(v.CreatedAtFilter, ok); err != nil { + return err + } + } + + if v.ExpiresAtFilter != nil { + ok := object.Key("expiresAtFilter") + if err := awsAwsjson10_serializeDocumentFilterTimestamp(v.ExpiresAtFilter, ok); err != nil { + return err + } + } + + if v.Filters != nil { + ok := object.Key("filters") + if err := awsAwsjson10_serializeDocumentListBillScenariosFilters(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) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentListBillScenarioUsageModificationsInput(v *ListBillScenarioUsageModificationsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BillScenarioId != nil { + ok := object.Key("billScenarioId") + ok.String(*v.BillScenarioId) + } + + if v.Filters != nil { + ok := object.Key("filters") + if err := awsAwsjson10_serializeDocumentListUsageFilters(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) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentListTagsForResourceInput(v *ListTagsForResourceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Arn != nil { + ok := object.Key("arn") + ok.String(*v.Arn) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentListWorkloadEstimatesInput(v *ListWorkloadEstimatesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CreatedAtFilter != nil { + ok := object.Key("createdAtFilter") + if err := awsAwsjson10_serializeDocumentFilterTimestamp(v.CreatedAtFilter, ok); err != nil { + return err + } + } + + if v.ExpiresAtFilter != nil { + ok := object.Key("expiresAtFilter") + if err := awsAwsjson10_serializeDocumentFilterTimestamp(v.ExpiresAtFilter, ok); err != nil { + return err + } + } + + if v.Filters != nil { + ok := object.Key("filters") + if err := awsAwsjson10_serializeDocumentListWorkloadEstimatesFilters(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) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentListWorkloadEstimateUsageInput(v *ListWorkloadEstimateUsageInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("filters") + if err := awsAwsjson10_serializeDocumentListUsageFilters(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.WorkloadEstimateId != nil { + ok := object.Key("workloadEstimateId") + ok.String(*v.WorkloadEstimateId) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Arn != nil { + ok := object.Key("arn") + ok.String(*v.Arn) + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsAwsjson10_serializeDocumentTags(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentUntagResourceInput(v *UntagResourceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Arn != nil { + ok := object.Key("arn") + ok.String(*v.Arn) + } + + if v.TagKeys != nil { + ok := object.Key("tagKeys") + if err := awsAwsjson10_serializeDocumentResourceTagKeys(v.TagKeys, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentUpdateBillEstimateInput(v *UpdateBillEstimateInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ExpiresAt != nil { + ok := object.Key("expiresAt") + ok.Double(smithytime.FormatEpochSeconds(*v.ExpiresAt)) + } + + if v.Identifier != nil { + ok := object.Key("identifier") + ok.String(*v.Identifier) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentUpdateBillScenarioInput(v *UpdateBillScenarioInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ExpiresAt != nil { + ok := object.Key("expiresAt") + ok.Double(smithytime.FormatEpochSeconds(*v.ExpiresAt)) + } + + if v.Identifier != nil { + ok := object.Key("identifier") + ok.String(*v.Identifier) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentUpdatePreferencesInput(v *UpdatePreferencesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ManagementAccountRateTypeSelections != nil { + ok := object.Key("managementAccountRateTypeSelections") + if err := awsAwsjson10_serializeDocumentRateTypes(v.ManagementAccountRateTypeSelections, ok); err != nil { + return err + } + } + + if v.MemberAccountRateTypeSelections != nil { + ok := object.Key("memberAccountRateTypeSelections") + if err := awsAwsjson10_serializeDocumentRateTypes(v.MemberAccountRateTypeSelections, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentUpdateWorkloadEstimateInput(v *UpdateWorkloadEstimateInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ExpiresAt != nil { + ok := object.Key("expiresAt") + ok.Double(smithytime.FormatEpochSeconds(*v.ExpiresAt)) + } + + if v.Identifier != nil { + ok := object.Key("identifier") + ok.String(*v.Identifier) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + return nil +} diff --git a/service/bcmpricingcalculator/snapshot/api_op_BatchCreateBillScenarioCommitmentModification.go.snap b/service/bcmpricingcalculator/snapshot/api_op_BatchCreateBillScenarioCommitmentModification.go.snap new file mode 100644 index 00000000000..3426930f714 --- /dev/null +++ b/service/bcmpricingcalculator/snapshot/api_op_BatchCreateBillScenarioCommitmentModification.go.snap @@ -0,0 +1,42 @@ +BatchCreateBillScenarioCommitmentModification + 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/bcmpricingcalculator/snapshot/api_op_BatchCreateBillScenarioUsageModification.go.snap b/service/bcmpricingcalculator/snapshot/api_op_BatchCreateBillScenarioUsageModification.go.snap new file mode 100644 index 00000000000..ae26e1eac8d --- /dev/null +++ b/service/bcmpricingcalculator/snapshot/api_op_BatchCreateBillScenarioUsageModification.go.snap @@ -0,0 +1,42 @@ +BatchCreateBillScenarioUsageModification + 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/bcmpricingcalculator/snapshot/api_op_BatchCreateWorkloadEstimateUsage.go.snap b/service/bcmpricingcalculator/snapshot/api_op_BatchCreateWorkloadEstimateUsage.go.snap new file mode 100644 index 00000000000..e0987009755 --- /dev/null +++ b/service/bcmpricingcalculator/snapshot/api_op_BatchCreateWorkloadEstimateUsage.go.snap @@ -0,0 +1,42 @@ +BatchCreateWorkloadEstimateUsage + 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/bcmpricingcalculator/snapshot/api_op_BatchDeleteBillScenarioCommitmentModification.go.snap b/service/bcmpricingcalculator/snapshot/api_op_BatchDeleteBillScenarioCommitmentModification.go.snap new file mode 100644 index 00000000000..87f9ad12cd1 --- /dev/null +++ b/service/bcmpricingcalculator/snapshot/api_op_BatchDeleteBillScenarioCommitmentModification.go.snap @@ -0,0 +1,41 @@ +BatchDeleteBillScenarioCommitmentModification + 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/bcmpricingcalculator/snapshot/api_op_BatchDeleteBillScenarioUsageModification.go.snap b/service/bcmpricingcalculator/snapshot/api_op_BatchDeleteBillScenarioUsageModification.go.snap new file mode 100644 index 00000000000..94bc50fd005 --- /dev/null +++ b/service/bcmpricingcalculator/snapshot/api_op_BatchDeleteBillScenarioUsageModification.go.snap @@ -0,0 +1,41 @@ +BatchDeleteBillScenarioUsageModification + 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/bcmpricingcalculator/snapshot/api_op_BatchDeleteWorkloadEstimateUsage.go.snap b/service/bcmpricingcalculator/snapshot/api_op_BatchDeleteWorkloadEstimateUsage.go.snap new file mode 100644 index 00000000000..5c104d6acb7 --- /dev/null +++ b/service/bcmpricingcalculator/snapshot/api_op_BatchDeleteWorkloadEstimateUsage.go.snap @@ -0,0 +1,41 @@ +BatchDeleteWorkloadEstimateUsage + 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/bcmpricingcalculator/snapshot/api_op_BatchUpdateBillScenarioCommitmentModification.go.snap b/service/bcmpricingcalculator/snapshot/api_op_BatchUpdateBillScenarioCommitmentModification.go.snap new file mode 100644 index 00000000000..b4ba1c2d322 --- /dev/null +++ b/service/bcmpricingcalculator/snapshot/api_op_BatchUpdateBillScenarioCommitmentModification.go.snap @@ -0,0 +1,41 @@ +BatchUpdateBillScenarioCommitmentModification + 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/bcmpricingcalculator/snapshot/api_op_BatchUpdateBillScenarioUsageModification.go.snap b/service/bcmpricingcalculator/snapshot/api_op_BatchUpdateBillScenarioUsageModification.go.snap new file mode 100644 index 00000000000..339821c4f55 --- /dev/null +++ b/service/bcmpricingcalculator/snapshot/api_op_BatchUpdateBillScenarioUsageModification.go.snap @@ -0,0 +1,41 @@ +BatchUpdateBillScenarioUsageModification + 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/bcmpricingcalculator/snapshot/api_op_BatchUpdateWorkloadEstimateUsage.go.snap b/service/bcmpricingcalculator/snapshot/api_op_BatchUpdateWorkloadEstimateUsage.go.snap new file mode 100644 index 00000000000..0e3e1e64e52 --- /dev/null +++ b/service/bcmpricingcalculator/snapshot/api_op_BatchUpdateWorkloadEstimateUsage.go.snap @@ -0,0 +1,41 @@ +BatchUpdateWorkloadEstimateUsage + 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/bcmpricingcalculator/snapshot/api_op_CreateBillEstimate.go.snap b/service/bcmpricingcalculator/snapshot/api_op_CreateBillEstimate.go.snap new file mode 100644 index 00000000000..943d8174b24 --- /dev/null +++ b/service/bcmpricingcalculator/snapshot/api_op_CreateBillEstimate.go.snap @@ -0,0 +1,42 @@ +CreateBillEstimate + 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/bcmpricingcalculator/snapshot/api_op_CreateBillScenario.go.snap b/service/bcmpricingcalculator/snapshot/api_op_CreateBillScenario.go.snap new file mode 100644 index 00000000000..0e29da14209 --- /dev/null +++ b/service/bcmpricingcalculator/snapshot/api_op_CreateBillScenario.go.snap @@ -0,0 +1,42 @@ +CreateBillScenario + 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/bcmpricingcalculator/snapshot/api_op_CreateWorkloadEstimate.go.snap b/service/bcmpricingcalculator/snapshot/api_op_CreateWorkloadEstimate.go.snap new file mode 100644 index 00000000000..7a5d9a6ed1d --- /dev/null +++ b/service/bcmpricingcalculator/snapshot/api_op_CreateWorkloadEstimate.go.snap @@ -0,0 +1,42 @@ +CreateWorkloadEstimate + 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/bcmpricingcalculator/snapshot/api_op_DeleteBillEstimate.go.snap b/service/bcmpricingcalculator/snapshot/api_op_DeleteBillEstimate.go.snap new file mode 100644 index 00000000000..694b8addca0 --- /dev/null +++ b/service/bcmpricingcalculator/snapshot/api_op_DeleteBillEstimate.go.snap @@ -0,0 +1,41 @@ +DeleteBillEstimate + 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/bcmpricingcalculator/snapshot/api_op_DeleteBillScenario.go.snap b/service/bcmpricingcalculator/snapshot/api_op_DeleteBillScenario.go.snap new file mode 100644 index 00000000000..494292e012f --- /dev/null +++ b/service/bcmpricingcalculator/snapshot/api_op_DeleteBillScenario.go.snap @@ -0,0 +1,41 @@ +DeleteBillScenario + 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/bcmpricingcalculator/snapshot/api_op_DeleteWorkloadEstimate.go.snap b/service/bcmpricingcalculator/snapshot/api_op_DeleteWorkloadEstimate.go.snap new file mode 100644 index 00000000000..d33d32d9ebd --- /dev/null +++ b/service/bcmpricingcalculator/snapshot/api_op_DeleteWorkloadEstimate.go.snap @@ -0,0 +1,41 @@ +DeleteWorkloadEstimate + 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/bcmpricingcalculator/snapshot/api_op_GetBillEstimate.go.snap b/service/bcmpricingcalculator/snapshot/api_op_GetBillEstimate.go.snap new file mode 100644 index 00000000000..3e60c82a2f8 --- /dev/null +++ b/service/bcmpricingcalculator/snapshot/api_op_GetBillEstimate.go.snap @@ -0,0 +1,41 @@ +GetBillEstimate + 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/bcmpricingcalculator/snapshot/api_op_GetBillScenario.go.snap b/service/bcmpricingcalculator/snapshot/api_op_GetBillScenario.go.snap new file mode 100644 index 00000000000..94ac800611e --- /dev/null +++ b/service/bcmpricingcalculator/snapshot/api_op_GetBillScenario.go.snap @@ -0,0 +1,41 @@ +GetBillScenario + 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/bcmpricingcalculator/snapshot/api_op_GetPreferences.go.snap b/service/bcmpricingcalculator/snapshot/api_op_GetPreferences.go.snap new file mode 100644 index 00000000000..3012a254a96 --- /dev/null +++ b/service/bcmpricingcalculator/snapshot/api_op_GetPreferences.go.snap @@ -0,0 +1,40 @@ +GetPreferences + 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/bcmpricingcalculator/snapshot/api_op_GetWorkloadEstimate.go.snap b/service/bcmpricingcalculator/snapshot/api_op_GetWorkloadEstimate.go.snap new file mode 100644 index 00000000000..2f4bdb21b83 --- /dev/null +++ b/service/bcmpricingcalculator/snapshot/api_op_GetWorkloadEstimate.go.snap @@ -0,0 +1,41 @@ +GetWorkloadEstimate + 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/bcmpricingcalculator/snapshot/api_op_ListBillEstimateCommitments.go.snap b/service/bcmpricingcalculator/snapshot/api_op_ListBillEstimateCommitments.go.snap new file mode 100644 index 00000000000..355cc79757d --- /dev/null +++ b/service/bcmpricingcalculator/snapshot/api_op_ListBillEstimateCommitments.go.snap @@ -0,0 +1,41 @@ +ListBillEstimateCommitments + 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/bcmpricingcalculator/snapshot/api_op_ListBillEstimateInputCommitmentModifications.go.snap b/service/bcmpricingcalculator/snapshot/api_op_ListBillEstimateInputCommitmentModifications.go.snap new file mode 100644 index 00000000000..d74fc99d495 --- /dev/null +++ b/service/bcmpricingcalculator/snapshot/api_op_ListBillEstimateInputCommitmentModifications.go.snap @@ -0,0 +1,41 @@ +ListBillEstimateInputCommitmentModifications + 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/bcmpricingcalculator/snapshot/api_op_ListBillEstimateInputUsageModifications.go.snap b/service/bcmpricingcalculator/snapshot/api_op_ListBillEstimateInputUsageModifications.go.snap new file mode 100644 index 00000000000..1dc8e2c61fe --- /dev/null +++ b/service/bcmpricingcalculator/snapshot/api_op_ListBillEstimateInputUsageModifications.go.snap @@ -0,0 +1,41 @@ +ListBillEstimateInputUsageModifications + 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/bcmpricingcalculator/snapshot/api_op_ListBillEstimateLineItems.go.snap b/service/bcmpricingcalculator/snapshot/api_op_ListBillEstimateLineItems.go.snap new file mode 100644 index 00000000000..51aa19d645c --- /dev/null +++ b/service/bcmpricingcalculator/snapshot/api_op_ListBillEstimateLineItems.go.snap @@ -0,0 +1,41 @@ +ListBillEstimateLineItems + 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/bcmpricingcalculator/snapshot/api_op_ListBillEstimates.go.snap b/service/bcmpricingcalculator/snapshot/api_op_ListBillEstimates.go.snap new file mode 100644 index 00000000000..7d7b36db3c0 --- /dev/null +++ b/service/bcmpricingcalculator/snapshot/api_op_ListBillEstimates.go.snap @@ -0,0 +1,41 @@ +ListBillEstimates + 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/bcmpricingcalculator/snapshot/api_op_ListBillScenarioCommitmentModifications.go.snap b/service/bcmpricingcalculator/snapshot/api_op_ListBillScenarioCommitmentModifications.go.snap new file mode 100644 index 00000000000..e97c198be20 --- /dev/null +++ b/service/bcmpricingcalculator/snapshot/api_op_ListBillScenarioCommitmentModifications.go.snap @@ -0,0 +1,41 @@ +ListBillScenarioCommitmentModifications + 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/bcmpricingcalculator/snapshot/api_op_ListBillScenarioUsageModifications.go.snap b/service/bcmpricingcalculator/snapshot/api_op_ListBillScenarioUsageModifications.go.snap new file mode 100644 index 00000000000..0adcb18ba24 --- /dev/null +++ b/service/bcmpricingcalculator/snapshot/api_op_ListBillScenarioUsageModifications.go.snap @@ -0,0 +1,41 @@ +ListBillScenarioUsageModifications + 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/bcmpricingcalculator/snapshot/api_op_ListBillScenarios.go.snap b/service/bcmpricingcalculator/snapshot/api_op_ListBillScenarios.go.snap new file mode 100644 index 00000000000..c02543e378c --- /dev/null +++ b/service/bcmpricingcalculator/snapshot/api_op_ListBillScenarios.go.snap @@ -0,0 +1,41 @@ +ListBillScenarios + 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/bcmpricingcalculator/snapshot/api_op_ListTagsForResource.go.snap b/service/bcmpricingcalculator/snapshot/api_op_ListTagsForResource.go.snap new file mode 100644 index 00000000000..071d3ac4e96 --- /dev/null +++ b/service/bcmpricingcalculator/snapshot/api_op_ListTagsForResource.go.snap @@ -0,0 +1,41 @@ +ListTagsForResource + 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/bcmpricingcalculator/snapshot/api_op_ListWorkloadEstimateUsage.go.snap b/service/bcmpricingcalculator/snapshot/api_op_ListWorkloadEstimateUsage.go.snap new file mode 100644 index 00000000000..2f98f704d4e --- /dev/null +++ b/service/bcmpricingcalculator/snapshot/api_op_ListWorkloadEstimateUsage.go.snap @@ -0,0 +1,41 @@ +ListWorkloadEstimateUsage + 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/bcmpricingcalculator/snapshot/api_op_ListWorkloadEstimates.go.snap b/service/bcmpricingcalculator/snapshot/api_op_ListWorkloadEstimates.go.snap new file mode 100644 index 00000000000..73d7647c7f8 --- /dev/null +++ b/service/bcmpricingcalculator/snapshot/api_op_ListWorkloadEstimates.go.snap @@ -0,0 +1,41 @@ +ListWorkloadEstimates + 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/bcmpricingcalculator/snapshot/api_op_TagResource.go.snap b/service/bcmpricingcalculator/snapshot/api_op_TagResource.go.snap new file mode 100644 index 00000000000..ae6f8e0846c --- /dev/null +++ b/service/bcmpricingcalculator/snapshot/api_op_TagResource.go.snap @@ -0,0 +1,41 @@ +TagResource + 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/bcmpricingcalculator/snapshot/api_op_UntagResource.go.snap b/service/bcmpricingcalculator/snapshot/api_op_UntagResource.go.snap new file mode 100644 index 00000000000..c7bbe038d98 --- /dev/null +++ b/service/bcmpricingcalculator/snapshot/api_op_UntagResource.go.snap @@ -0,0 +1,41 @@ +UntagResource + 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/bcmpricingcalculator/snapshot/api_op_UpdateBillEstimate.go.snap b/service/bcmpricingcalculator/snapshot/api_op_UpdateBillEstimate.go.snap new file mode 100644 index 00000000000..2680c0bafa0 --- /dev/null +++ b/service/bcmpricingcalculator/snapshot/api_op_UpdateBillEstimate.go.snap @@ -0,0 +1,41 @@ +UpdateBillEstimate + 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/bcmpricingcalculator/snapshot/api_op_UpdateBillScenario.go.snap b/service/bcmpricingcalculator/snapshot/api_op_UpdateBillScenario.go.snap new file mode 100644 index 00000000000..1ac94065411 --- /dev/null +++ b/service/bcmpricingcalculator/snapshot/api_op_UpdateBillScenario.go.snap @@ -0,0 +1,41 @@ +UpdateBillScenario + 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/bcmpricingcalculator/snapshot/api_op_UpdatePreferences.go.snap b/service/bcmpricingcalculator/snapshot/api_op_UpdatePreferences.go.snap new file mode 100644 index 00000000000..99742bcb042 --- /dev/null +++ b/service/bcmpricingcalculator/snapshot/api_op_UpdatePreferences.go.snap @@ -0,0 +1,40 @@ +UpdatePreferences + 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/bcmpricingcalculator/snapshot/api_op_UpdateWorkloadEstimate.go.snap b/service/bcmpricingcalculator/snapshot/api_op_UpdateWorkloadEstimate.go.snap new file mode 100644 index 00000000000..e9a6646537b --- /dev/null +++ b/service/bcmpricingcalculator/snapshot/api_op_UpdateWorkloadEstimate.go.snap @@ -0,0 +1,41 @@ +UpdateWorkloadEstimate + 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/bcmpricingcalculator/snapshot_test.go b/service/bcmpricingcalculator/snapshot_test.go new file mode 100644 index 00000000000..05ecc7cb45d --- /dev/null +++ b/service/bcmpricingcalculator/snapshot_test.go @@ -0,0 +1,926 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +//go:build snapshot + +package bcmpricingcalculator + +import ( + "context" + "errors" + "fmt" + "github.com/aws/smithy-go/middleware" + "io" + "io/fs" + "os" + "testing" +) + +const ssprefix = "snapshot" + +type snapshotOK struct{} + +func (snapshotOK) Error() string { return "error: success" } + +func createp(path string) (*os.File, error) { + if err := os.Mkdir(ssprefix, 0700); err != nil && !errors.Is(err, fs.ErrExist) { + return nil, err + } + return os.Create(path) +} + +func sspath(op string) string { + return fmt.Sprintf("%s/api_op_%s.go.snap", ssprefix, op) +} + +func updateSnapshot(stack *middleware.Stack, operation string) error { + f, err := createp(sspath(operation)) + if err != nil { + return err + } + defer f.Close() + if _, err := f.Write([]byte(stack.String())); err != nil { + return err + } + return snapshotOK{} +} + +func testSnapshot(stack *middleware.Stack, operation string) error { + f, err := os.Open(sspath(operation)) + if errors.Is(err, fs.ErrNotExist) { + return snapshotOK{} + } + if err != nil { + return err + } + defer f.Close() + expected, err := io.ReadAll(f) + if err != nil { + return err + } + if actual := stack.String(); actual != string(expected) { + return fmt.Errorf("%s != %s", expected, actual) + } + return snapshotOK{} +} +func TestCheckSnapshot_BatchCreateBillScenarioCommitmentModification(t *testing.T) { + svc := New(Options{}) + _, err := svc.BatchCreateBillScenarioCommitmentModification(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "BatchCreateBillScenarioCommitmentModification") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_BatchCreateBillScenarioUsageModification(t *testing.T) { + svc := New(Options{}) + _, err := svc.BatchCreateBillScenarioUsageModification(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "BatchCreateBillScenarioUsageModification") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_BatchCreateWorkloadEstimateUsage(t *testing.T) { + svc := New(Options{}) + _, err := svc.BatchCreateWorkloadEstimateUsage(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "BatchCreateWorkloadEstimateUsage") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_BatchDeleteBillScenarioCommitmentModification(t *testing.T) { + svc := New(Options{}) + _, err := svc.BatchDeleteBillScenarioCommitmentModification(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "BatchDeleteBillScenarioCommitmentModification") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_BatchDeleteBillScenarioUsageModification(t *testing.T) { + svc := New(Options{}) + _, err := svc.BatchDeleteBillScenarioUsageModification(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "BatchDeleteBillScenarioUsageModification") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_BatchDeleteWorkloadEstimateUsage(t *testing.T) { + svc := New(Options{}) + _, err := svc.BatchDeleteWorkloadEstimateUsage(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "BatchDeleteWorkloadEstimateUsage") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_BatchUpdateBillScenarioCommitmentModification(t *testing.T) { + svc := New(Options{}) + _, err := svc.BatchUpdateBillScenarioCommitmentModification(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "BatchUpdateBillScenarioCommitmentModification") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_BatchUpdateBillScenarioUsageModification(t *testing.T) { + svc := New(Options{}) + _, err := svc.BatchUpdateBillScenarioUsageModification(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "BatchUpdateBillScenarioUsageModification") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_BatchUpdateWorkloadEstimateUsage(t *testing.T) { + svc := New(Options{}) + _, err := svc.BatchUpdateWorkloadEstimateUsage(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "BatchUpdateWorkloadEstimateUsage") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_CreateBillEstimate(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateBillEstimate(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CreateBillEstimate") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_CreateBillScenario(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateBillScenario(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CreateBillScenario") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_CreateWorkloadEstimate(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateWorkloadEstimate(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CreateWorkloadEstimate") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_DeleteBillEstimate(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteBillEstimate(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeleteBillEstimate") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_DeleteBillScenario(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteBillScenario(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeleteBillScenario") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_DeleteWorkloadEstimate(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteWorkloadEstimate(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeleteWorkloadEstimate") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_GetBillEstimate(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetBillEstimate(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetBillEstimate") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_GetBillScenario(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetBillScenario(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetBillScenario") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_GetPreferences(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetPreferences(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetPreferences") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_GetWorkloadEstimate(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetWorkloadEstimate(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetWorkloadEstimate") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_ListBillEstimateCommitments(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListBillEstimateCommitments(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListBillEstimateCommitments") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_ListBillEstimateInputCommitmentModifications(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListBillEstimateInputCommitmentModifications(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListBillEstimateInputCommitmentModifications") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_ListBillEstimateInputUsageModifications(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListBillEstimateInputUsageModifications(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListBillEstimateInputUsageModifications") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_ListBillEstimateLineItems(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListBillEstimateLineItems(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListBillEstimateLineItems") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_ListBillEstimates(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListBillEstimates(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListBillEstimates") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_ListBillScenarioCommitmentModifications(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListBillScenarioCommitmentModifications(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListBillScenarioCommitmentModifications") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_ListBillScenarios(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListBillScenarios(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListBillScenarios") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_ListBillScenarioUsageModifications(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListBillScenarioUsageModifications(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListBillScenarioUsageModifications") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_ListTagsForResource(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListTagsForResource(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListTagsForResource") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_ListWorkloadEstimates(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListWorkloadEstimates(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListWorkloadEstimates") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_ListWorkloadEstimateUsage(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListWorkloadEstimateUsage(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListWorkloadEstimateUsage") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_TagResource(t *testing.T) { + svc := New(Options{}) + _, err := svc.TagResource(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "TagResource") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_UntagResource(t *testing.T) { + svc := New(Options{}) + _, err := svc.UntagResource(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "UntagResource") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_UpdateBillEstimate(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateBillEstimate(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "UpdateBillEstimate") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_UpdateBillScenario(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateBillScenario(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "UpdateBillScenario") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_UpdatePreferences(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdatePreferences(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "UpdatePreferences") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_UpdateWorkloadEstimate(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateWorkloadEstimate(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "UpdateWorkloadEstimate") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} +func TestUpdateSnapshot_BatchCreateBillScenarioCommitmentModification(t *testing.T) { + svc := New(Options{}) + _, err := svc.BatchCreateBillScenarioCommitmentModification(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "BatchCreateBillScenarioCommitmentModification") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_BatchCreateBillScenarioUsageModification(t *testing.T) { + svc := New(Options{}) + _, err := svc.BatchCreateBillScenarioUsageModification(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "BatchCreateBillScenarioUsageModification") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_BatchCreateWorkloadEstimateUsage(t *testing.T) { + svc := New(Options{}) + _, err := svc.BatchCreateWorkloadEstimateUsage(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "BatchCreateWorkloadEstimateUsage") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_BatchDeleteBillScenarioCommitmentModification(t *testing.T) { + svc := New(Options{}) + _, err := svc.BatchDeleteBillScenarioCommitmentModification(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "BatchDeleteBillScenarioCommitmentModification") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_BatchDeleteBillScenarioUsageModification(t *testing.T) { + svc := New(Options{}) + _, err := svc.BatchDeleteBillScenarioUsageModification(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "BatchDeleteBillScenarioUsageModification") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_BatchDeleteWorkloadEstimateUsage(t *testing.T) { + svc := New(Options{}) + _, err := svc.BatchDeleteWorkloadEstimateUsage(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "BatchDeleteWorkloadEstimateUsage") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_BatchUpdateBillScenarioCommitmentModification(t *testing.T) { + svc := New(Options{}) + _, err := svc.BatchUpdateBillScenarioCommitmentModification(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "BatchUpdateBillScenarioCommitmentModification") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_BatchUpdateBillScenarioUsageModification(t *testing.T) { + svc := New(Options{}) + _, err := svc.BatchUpdateBillScenarioUsageModification(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "BatchUpdateBillScenarioUsageModification") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_BatchUpdateWorkloadEstimateUsage(t *testing.T) { + svc := New(Options{}) + _, err := svc.BatchUpdateWorkloadEstimateUsage(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "BatchUpdateWorkloadEstimateUsage") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_CreateBillEstimate(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateBillEstimate(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CreateBillEstimate") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_CreateBillScenario(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateBillScenario(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CreateBillScenario") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_CreateWorkloadEstimate(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateWorkloadEstimate(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CreateWorkloadEstimate") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_DeleteBillEstimate(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteBillEstimate(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeleteBillEstimate") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_DeleteBillScenario(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteBillScenario(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeleteBillScenario") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_DeleteWorkloadEstimate(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteWorkloadEstimate(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeleteWorkloadEstimate") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_GetBillEstimate(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetBillEstimate(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetBillEstimate") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_GetBillScenario(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetBillScenario(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetBillScenario") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_GetPreferences(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetPreferences(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetPreferences") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_GetWorkloadEstimate(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetWorkloadEstimate(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetWorkloadEstimate") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_ListBillEstimateCommitments(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListBillEstimateCommitments(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListBillEstimateCommitments") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_ListBillEstimateInputCommitmentModifications(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListBillEstimateInputCommitmentModifications(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListBillEstimateInputCommitmentModifications") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_ListBillEstimateInputUsageModifications(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListBillEstimateInputUsageModifications(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListBillEstimateInputUsageModifications") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_ListBillEstimateLineItems(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListBillEstimateLineItems(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListBillEstimateLineItems") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_ListBillEstimates(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListBillEstimates(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListBillEstimates") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_ListBillScenarioCommitmentModifications(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListBillScenarioCommitmentModifications(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListBillScenarioCommitmentModifications") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_ListBillScenarios(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListBillScenarios(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListBillScenarios") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_ListBillScenarioUsageModifications(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListBillScenarioUsageModifications(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListBillScenarioUsageModifications") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_ListTagsForResource(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListTagsForResource(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListTagsForResource") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_ListWorkloadEstimates(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListWorkloadEstimates(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListWorkloadEstimates") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_ListWorkloadEstimateUsage(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListWorkloadEstimateUsage(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListWorkloadEstimateUsage") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_TagResource(t *testing.T) { + svc := New(Options{}) + _, err := svc.TagResource(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "TagResource") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_UntagResource(t *testing.T) { + svc := New(Options{}) + _, err := svc.UntagResource(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "UntagResource") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_UpdateBillEstimate(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateBillEstimate(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "UpdateBillEstimate") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_UpdateBillScenario(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateBillScenario(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "UpdateBillScenario") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_UpdatePreferences(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdatePreferences(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "UpdatePreferences") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_UpdateWorkloadEstimate(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateWorkloadEstimate(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "UpdateWorkloadEstimate") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} diff --git a/service/bcmpricingcalculator/types/enums.go b/service/bcmpricingcalculator/types/enums.go new file mode 100644 index 00000000000..f5d4645a554 --- /dev/null +++ b/service/bcmpricingcalculator/types/enums.go @@ -0,0 +1,520 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +type BatchCreateBillScenarioCommitmentModificationErrorCode string + +// Enum values for BatchCreateBillScenarioCommitmentModificationErrorCode +const ( + BatchCreateBillScenarioCommitmentModificationErrorCodeConflict BatchCreateBillScenarioCommitmentModificationErrorCode = "CONFLICT" + BatchCreateBillScenarioCommitmentModificationErrorCodeInternalServerError BatchCreateBillScenarioCommitmentModificationErrorCode = "INTERNAL_SERVER_ERROR" + BatchCreateBillScenarioCommitmentModificationErrorCodeInvalidAccount BatchCreateBillScenarioCommitmentModificationErrorCode = "INVALID_ACCOUNT" +) + +// Values returns all known values for +// BatchCreateBillScenarioCommitmentModificationErrorCode. 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 (BatchCreateBillScenarioCommitmentModificationErrorCode) Values() []BatchCreateBillScenarioCommitmentModificationErrorCode { + return []BatchCreateBillScenarioCommitmentModificationErrorCode{ + "CONFLICT", + "INTERNAL_SERVER_ERROR", + "INVALID_ACCOUNT", + } +} + +type BatchCreateBillScenarioUsageModificationErrorCode string + +// Enum values for BatchCreateBillScenarioUsageModificationErrorCode +const ( + BatchCreateBillScenarioUsageModificationErrorCodeBadRequest BatchCreateBillScenarioUsageModificationErrorCode = "BAD_REQUEST" + BatchCreateBillScenarioUsageModificationErrorCodeNotFound BatchCreateBillScenarioUsageModificationErrorCode = "NOT_FOUND" + BatchCreateBillScenarioUsageModificationErrorCodeConflict BatchCreateBillScenarioUsageModificationErrorCode = "CONFLICT" + BatchCreateBillScenarioUsageModificationErrorCodeInternalServerError BatchCreateBillScenarioUsageModificationErrorCode = "INTERNAL_SERVER_ERROR" +) + +// Values returns all known values for +// BatchCreateBillScenarioUsageModificationErrorCode. 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 (BatchCreateBillScenarioUsageModificationErrorCode) Values() []BatchCreateBillScenarioUsageModificationErrorCode { + return []BatchCreateBillScenarioUsageModificationErrorCode{ + "BAD_REQUEST", + "NOT_FOUND", + "CONFLICT", + "INTERNAL_SERVER_ERROR", + } +} + +type BatchCreateWorkloadEstimateUsageCode string + +// Enum values for BatchCreateWorkloadEstimateUsageCode +const ( + BatchCreateWorkloadEstimateUsageCodeBadRequest BatchCreateWorkloadEstimateUsageCode = "BAD_REQUEST" + BatchCreateWorkloadEstimateUsageCodeNotFound BatchCreateWorkloadEstimateUsageCode = "NOT_FOUND" + BatchCreateWorkloadEstimateUsageCodeConflict BatchCreateWorkloadEstimateUsageCode = "CONFLICT" + BatchCreateWorkloadEstimateUsageCodeInternalServerError BatchCreateWorkloadEstimateUsageCode = "INTERNAL_SERVER_ERROR" +) + +// Values returns all known values for BatchCreateWorkloadEstimateUsageCode. 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 (BatchCreateWorkloadEstimateUsageCode) Values() []BatchCreateWorkloadEstimateUsageCode { + return []BatchCreateWorkloadEstimateUsageCode{ + "BAD_REQUEST", + "NOT_FOUND", + "CONFLICT", + "INTERNAL_SERVER_ERROR", + } +} + +type BatchDeleteBillScenarioCommitmentModificationErrorCode string + +// Enum values for BatchDeleteBillScenarioCommitmentModificationErrorCode +const ( + BatchDeleteBillScenarioCommitmentModificationErrorCodeBadRequest BatchDeleteBillScenarioCommitmentModificationErrorCode = "BAD_REQUEST" + BatchDeleteBillScenarioCommitmentModificationErrorCodeConflict BatchDeleteBillScenarioCommitmentModificationErrorCode = "CONFLICT" + BatchDeleteBillScenarioCommitmentModificationErrorCodeInternalServerError BatchDeleteBillScenarioCommitmentModificationErrorCode = "INTERNAL_SERVER_ERROR" +) + +// Values returns all known values for +// BatchDeleteBillScenarioCommitmentModificationErrorCode. 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 (BatchDeleteBillScenarioCommitmentModificationErrorCode) Values() []BatchDeleteBillScenarioCommitmentModificationErrorCode { + return []BatchDeleteBillScenarioCommitmentModificationErrorCode{ + "BAD_REQUEST", + "CONFLICT", + "INTERNAL_SERVER_ERROR", + } +} + +type BatchDeleteBillScenarioUsageModificationErrorCode string + +// Enum values for BatchDeleteBillScenarioUsageModificationErrorCode +const ( + BatchDeleteBillScenarioUsageModificationErrorCodeBadRequest BatchDeleteBillScenarioUsageModificationErrorCode = "BAD_REQUEST" + BatchDeleteBillScenarioUsageModificationErrorCodeConflict BatchDeleteBillScenarioUsageModificationErrorCode = "CONFLICT" + BatchDeleteBillScenarioUsageModificationErrorCodeInternalServerError BatchDeleteBillScenarioUsageModificationErrorCode = "INTERNAL_SERVER_ERROR" +) + +// Values returns all known values for +// BatchDeleteBillScenarioUsageModificationErrorCode. 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 (BatchDeleteBillScenarioUsageModificationErrorCode) Values() []BatchDeleteBillScenarioUsageModificationErrorCode { + return []BatchDeleteBillScenarioUsageModificationErrorCode{ + "BAD_REQUEST", + "CONFLICT", + "INTERNAL_SERVER_ERROR", + } +} + +type BatchUpdateBillScenarioCommitmentModificationErrorCode string + +// Enum values for BatchUpdateBillScenarioCommitmentModificationErrorCode +const ( + BatchUpdateBillScenarioCommitmentModificationErrorCodeBadRequest BatchUpdateBillScenarioCommitmentModificationErrorCode = "BAD_REQUEST" + BatchUpdateBillScenarioCommitmentModificationErrorCodeNotFound BatchUpdateBillScenarioCommitmentModificationErrorCode = "NOT_FOUND" + BatchUpdateBillScenarioCommitmentModificationErrorCodeConflict BatchUpdateBillScenarioCommitmentModificationErrorCode = "CONFLICT" + BatchUpdateBillScenarioCommitmentModificationErrorCodeInternalServerError BatchUpdateBillScenarioCommitmentModificationErrorCode = "INTERNAL_SERVER_ERROR" +) + +// Values returns all known values for +// BatchUpdateBillScenarioCommitmentModificationErrorCode. 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 (BatchUpdateBillScenarioCommitmentModificationErrorCode) Values() []BatchUpdateBillScenarioCommitmentModificationErrorCode { + return []BatchUpdateBillScenarioCommitmentModificationErrorCode{ + "BAD_REQUEST", + "NOT_FOUND", + "CONFLICT", + "INTERNAL_SERVER_ERROR", + } +} + +type BatchUpdateBillScenarioUsageModificationErrorCode string + +// Enum values for BatchUpdateBillScenarioUsageModificationErrorCode +const ( + BatchUpdateBillScenarioUsageModificationErrorCodeBadRequest BatchUpdateBillScenarioUsageModificationErrorCode = "BAD_REQUEST" + BatchUpdateBillScenarioUsageModificationErrorCodeNotFound BatchUpdateBillScenarioUsageModificationErrorCode = "NOT_FOUND" + BatchUpdateBillScenarioUsageModificationErrorCodeConflict BatchUpdateBillScenarioUsageModificationErrorCode = "CONFLICT" + BatchUpdateBillScenarioUsageModificationErrorCodeInternalServerError BatchUpdateBillScenarioUsageModificationErrorCode = "INTERNAL_SERVER_ERROR" +) + +// Values returns all known values for +// BatchUpdateBillScenarioUsageModificationErrorCode. 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 (BatchUpdateBillScenarioUsageModificationErrorCode) Values() []BatchUpdateBillScenarioUsageModificationErrorCode { + return []BatchUpdateBillScenarioUsageModificationErrorCode{ + "BAD_REQUEST", + "NOT_FOUND", + "CONFLICT", + "INTERNAL_SERVER_ERROR", + } +} + +type BillEstimateStatus string + +// Enum values for BillEstimateStatus +const ( + BillEstimateStatusInProgress BillEstimateStatus = "IN_PROGRESS" + BillEstimateStatusComplete BillEstimateStatus = "COMPLETE" + BillEstimateStatusFailed BillEstimateStatus = "FAILED" +) + +// Values returns all known values for BillEstimateStatus. 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 (BillEstimateStatus) Values() []BillEstimateStatus { + return []BillEstimateStatus{ + "IN_PROGRESS", + "COMPLETE", + "FAILED", + } +} + +type BillScenarioStatus string + +// Enum values for BillScenarioStatus +const ( + BillScenarioStatusReady BillScenarioStatus = "READY" + BillScenarioStatusLocked BillScenarioStatus = "LOCKED" + BillScenarioStatusFailed BillScenarioStatus = "FAILED" +) + +// Values returns all known values for BillScenarioStatus. 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 (BillScenarioStatus) Values() []BillScenarioStatus { + return []BillScenarioStatus{ + "READY", + "LOCKED", + "FAILED", + } +} + +type CurrencyCode string + +// Enum values for CurrencyCode +const ( + CurrencyCodeUsd CurrencyCode = "USD" +) + +// Values returns all known values for CurrencyCode. 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 (CurrencyCode) Values() []CurrencyCode { + return []CurrencyCode{ + "USD", + } +} + +type ListBillEstimateLineItemsFilterName string + +// Enum values for ListBillEstimateLineItemsFilterName +const ( + ListBillEstimateLineItemsFilterNameUsageAccountId ListBillEstimateLineItemsFilterName = "USAGE_ACCOUNT_ID" + ListBillEstimateLineItemsFilterNameServiceCode ListBillEstimateLineItemsFilterName = "SERVICE_CODE" + ListBillEstimateLineItemsFilterNameUsageType ListBillEstimateLineItemsFilterName = "USAGE_TYPE" + ListBillEstimateLineItemsFilterNameOperation ListBillEstimateLineItemsFilterName = "OPERATION" + ListBillEstimateLineItemsFilterNameLocation ListBillEstimateLineItemsFilterName = "LOCATION" + ListBillEstimateLineItemsFilterNameLineItemType ListBillEstimateLineItemsFilterName = "LINE_ITEM_TYPE" +) + +// Values returns all known values for ListBillEstimateLineItemsFilterName. 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 (ListBillEstimateLineItemsFilterName) Values() []ListBillEstimateLineItemsFilterName { + return []ListBillEstimateLineItemsFilterName{ + "USAGE_ACCOUNT_ID", + "SERVICE_CODE", + "USAGE_TYPE", + "OPERATION", + "LOCATION", + "LINE_ITEM_TYPE", + } +} + +type ListBillEstimatesFilterName string + +// Enum values for ListBillEstimatesFilterName +const ( + ListBillEstimatesFilterNameStatus ListBillEstimatesFilterName = "STATUS" + ListBillEstimatesFilterNameName ListBillEstimatesFilterName = "NAME" +) + +// Values returns all known values for ListBillEstimatesFilterName. 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 (ListBillEstimatesFilterName) Values() []ListBillEstimatesFilterName { + return []ListBillEstimatesFilterName{ + "STATUS", + "NAME", + } +} + +type ListBillScenariosFilterName string + +// Enum values for ListBillScenariosFilterName +const ( + ListBillScenariosFilterNameStatus ListBillScenariosFilterName = "STATUS" + ListBillScenariosFilterNameName ListBillScenariosFilterName = "NAME" +) + +// Values returns all known values for ListBillScenariosFilterName. 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 (ListBillScenariosFilterName) Values() []ListBillScenariosFilterName { + return []ListBillScenariosFilterName{ + "STATUS", + "NAME", + } +} + +type ListUsageFilterName string + +// Enum values for ListUsageFilterName +const ( + ListUsageFilterNameUsageAccountId ListUsageFilterName = "USAGE_ACCOUNT_ID" + ListUsageFilterNameServiceCode ListUsageFilterName = "SERVICE_CODE" + ListUsageFilterNameUsageType ListUsageFilterName = "USAGE_TYPE" + ListUsageFilterNameOperation ListUsageFilterName = "OPERATION" + ListUsageFilterNameLocation ListUsageFilterName = "LOCATION" + ListUsageFilterNameUsageGroup ListUsageFilterName = "USAGE_GROUP" + ListUsageFilterNameHistoricalUsageAccountId ListUsageFilterName = "HISTORICAL_USAGE_ACCOUNT_ID" + ListUsageFilterNameHistoricalServiceCode ListUsageFilterName = "HISTORICAL_SERVICE_CODE" + ListUsageFilterNameHistoricalUsageType ListUsageFilterName = "HISTORICAL_USAGE_TYPE" + ListUsageFilterNameHistoricalOperation ListUsageFilterName = "HISTORICAL_OPERATION" + ListUsageFilterNameHistoricalLocation ListUsageFilterName = "HISTORICAL_LOCATION" +) + +// Values returns all known values for ListUsageFilterName. 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 (ListUsageFilterName) Values() []ListUsageFilterName { + return []ListUsageFilterName{ + "USAGE_ACCOUNT_ID", + "SERVICE_CODE", + "USAGE_TYPE", + "OPERATION", + "LOCATION", + "USAGE_GROUP", + "HISTORICAL_USAGE_ACCOUNT_ID", + "HISTORICAL_SERVICE_CODE", + "HISTORICAL_USAGE_TYPE", + "HISTORICAL_OPERATION", + "HISTORICAL_LOCATION", + } +} + +type ListWorkloadEstimatesFilterName string + +// Enum values for ListWorkloadEstimatesFilterName +const ( + ListWorkloadEstimatesFilterNameStatus ListWorkloadEstimatesFilterName = "STATUS" + ListWorkloadEstimatesFilterNameName ListWorkloadEstimatesFilterName = "NAME" +) + +// Values returns all known values for ListWorkloadEstimatesFilterName. 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 (ListWorkloadEstimatesFilterName) Values() []ListWorkloadEstimatesFilterName { + return []ListWorkloadEstimatesFilterName{ + "STATUS", + "NAME", + } +} + +type MatchOption string + +// Enum values for MatchOption +const ( + MatchOptionEquals MatchOption = "EQUALS" + MatchOptionStartsWith MatchOption = "STARTS_WITH" + MatchOptionContains MatchOption = "CONTAINS" +) + +// Values returns all known values for MatchOption. 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 (MatchOption) Values() []MatchOption { + return []MatchOption{ + "EQUALS", + "STARTS_WITH", + "CONTAINS", + } +} + +type PurchaseAgreementType string + +// Enum values for PurchaseAgreementType +const ( + PurchaseAgreementTypeSavingsPlans PurchaseAgreementType = "SAVINGS_PLANS" + PurchaseAgreementTypeReservedInstance PurchaseAgreementType = "RESERVED_INSTANCE" +) + +// Values returns all known values for PurchaseAgreementType. 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 (PurchaseAgreementType) Values() []PurchaseAgreementType { + return []PurchaseAgreementType{ + "SAVINGS_PLANS", + "RESERVED_INSTANCE", + } +} + +type RateType string + +// Enum values for RateType +const ( + RateTypeBeforeDiscounts RateType = "BEFORE_DISCOUNTS" + RateTypeAfterDiscounts RateType = "AFTER_DISCOUNTS" +) + +// Values returns all known values for RateType. 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 (RateType) Values() []RateType { + return []RateType{ + "BEFORE_DISCOUNTS", + "AFTER_DISCOUNTS", + } +} + +type ValidationExceptionReason string + +// Enum values for ValidationExceptionReason +const ( + ValidationExceptionReasonUnknownOperation ValidationExceptionReason = "unknownOperation" + ValidationExceptionReasonCannotParse ValidationExceptionReason = "cannotParse" + ValidationExceptionReasonFieldValidationFailed ValidationExceptionReason = "fieldValidationFailed" + ValidationExceptionReasonInvalidRequestFromMember ValidationExceptionReason = "invalidRequestFromMember" + ValidationExceptionReasonDisallowedRate ValidationExceptionReason = "disallowedRate" + ValidationExceptionReasonOther ValidationExceptionReason = "other" +) + +// Values returns all known values for ValidationExceptionReason. 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 (ValidationExceptionReason) Values() []ValidationExceptionReason { + return []ValidationExceptionReason{ + "unknownOperation", + "cannotParse", + "fieldValidationFailed", + "invalidRequestFromMember", + "disallowedRate", + "other", + } +} + +type WorkloadEstimateCostStatus string + +// Enum values for WorkloadEstimateCostStatus +const ( + WorkloadEstimateCostStatusValid WorkloadEstimateCostStatus = "VALID" + WorkloadEstimateCostStatusInvalid WorkloadEstimateCostStatus = "INVALID" + WorkloadEstimateCostStatusStale WorkloadEstimateCostStatus = "STALE" +) + +// Values returns all known values for WorkloadEstimateCostStatus. 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 (WorkloadEstimateCostStatus) Values() []WorkloadEstimateCostStatus { + return []WorkloadEstimateCostStatus{ + "VALID", + "INVALID", + "STALE", + } +} + +type WorkloadEstimateRateType string + +// Enum values for WorkloadEstimateRateType +const ( + WorkloadEstimateRateTypeBeforeDiscounts WorkloadEstimateRateType = "BEFORE_DISCOUNTS" + WorkloadEstimateRateTypeAfterDiscounts WorkloadEstimateRateType = "AFTER_DISCOUNTS" +) + +// Values returns all known values for WorkloadEstimateRateType. 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 (WorkloadEstimateRateType) Values() []WorkloadEstimateRateType { + return []WorkloadEstimateRateType{ + "BEFORE_DISCOUNTS", + "AFTER_DISCOUNTS", + } +} + +type WorkloadEstimateStatus string + +// Enum values for WorkloadEstimateStatus +const ( + WorkloadEstimateStatusUpdating WorkloadEstimateStatus = "UPDATING" + WorkloadEstimateStatusValid WorkloadEstimateStatus = "VALID" + WorkloadEstimateStatusInvalid WorkloadEstimateStatus = "INVALID" + WorkloadEstimateStatusActionNeeded WorkloadEstimateStatus = "ACTION_NEEDED" +) + +// Values returns all known values for WorkloadEstimateStatus. 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 (WorkloadEstimateStatus) Values() []WorkloadEstimateStatus { + return []WorkloadEstimateStatus{ + "UPDATING", + "VALID", + "INVALID", + "ACTION_NEEDED", + } +} + +type WorkloadEstimateUpdateUsageErrorCode string + +// Enum values for WorkloadEstimateUpdateUsageErrorCode +const ( + WorkloadEstimateUpdateUsageErrorCodeBadRequest WorkloadEstimateUpdateUsageErrorCode = "BAD_REQUEST" + WorkloadEstimateUpdateUsageErrorCodeNotFound WorkloadEstimateUpdateUsageErrorCode = "NOT_FOUND" + WorkloadEstimateUpdateUsageErrorCodeConflict WorkloadEstimateUpdateUsageErrorCode = "CONFLICT" + WorkloadEstimateUpdateUsageErrorCodeInternalServerError WorkloadEstimateUpdateUsageErrorCode = "INTERNAL_SERVER_ERROR" +) + +// Values returns all known values for WorkloadEstimateUpdateUsageErrorCode. 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 (WorkloadEstimateUpdateUsageErrorCode) Values() []WorkloadEstimateUpdateUsageErrorCode { + return []WorkloadEstimateUpdateUsageErrorCode{ + "BAD_REQUEST", + "NOT_FOUND", + "CONFLICT", + "INTERNAL_SERVER_ERROR", + } +} diff --git a/service/bcmpricingcalculator/types/errors.go b/service/bcmpricingcalculator/types/errors.go new file mode 100644 index 00000000000..b5ff1678bab --- /dev/null +++ b/service/bcmpricingcalculator/types/errors.go @@ -0,0 +1,242 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + "fmt" + smithy "github.com/aws/smithy-go" +) + +// You do not have sufficient access to perform this action. +type AccessDeniedException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *AccessDeniedException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *AccessDeniedException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *AccessDeniedException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "AccessDeniedException" + } + return *e.ErrorCodeOverride +} +func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request could not be processed because of conflict in the current state of +// +// the resource. +type ConflictException struct { + Message *string + + ErrorCodeOverride *string + + ResourceId *string + ResourceType *string + + noSmithyDocumentSerde +} + +func (e *ConflictException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ConflictException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ConflictException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ConflictException" + } + return *e.ErrorCodeOverride +} +func (e *ConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The requested data is currently unavailable. +type DataUnavailableException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *DataUnavailableException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *DataUnavailableException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *DataUnavailableException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "DataUnavailableException" + } + return *e.ErrorCodeOverride +} +func (e *DataUnavailableException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// An internal error has occurred. Retry your request, but if the problem +// +// persists, contact Amazon Web Services support. +type InternalServerException struct { + Message *string + + ErrorCodeOverride *string + + RetryAfterSeconds *int32 + + noSmithyDocumentSerde +} + +func (e *InternalServerException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InternalServerException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InternalServerException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InternalServerException" + } + return *e.ErrorCodeOverride +} +func (e *InternalServerException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } + +// The specified resource was not found. +type ResourceNotFoundException struct { + Message *string + + ErrorCodeOverride *string + + ResourceId *string + ResourceType *string + + noSmithyDocumentSerde +} + +func (e *ResourceNotFoundException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ResourceNotFoundException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ResourceNotFoundException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ResourceNotFoundException" + } + return *e.ErrorCodeOverride +} +func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request would cause you to exceed your service quota. +type ServiceQuotaExceededException struct { + Message *string + + ErrorCodeOverride *string + + ResourceId *string + ResourceType *string + ServiceCode *string + QuotaCode *string + + noSmithyDocumentSerde +} + +func (e *ServiceQuotaExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ServiceQuotaExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ServiceQuotaExceededException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ServiceQuotaExceededException" + } + return *e.ErrorCodeOverride +} +func (e *ServiceQuotaExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request was denied due to request throttling. +type ThrottlingException struct { + Message *string + + ErrorCodeOverride *string + + ServiceCode *string + QuotaCode *string + RetryAfterSeconds *int32 + + noSmithyDocumentSerde +} + +func (e *ThrottlingException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ThrottlingException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ThrottlingException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ThrottlingException" + } + return *e.ErrorCodeOverride +} +func (e *ThrottlingException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The input provided fails to satisfy the constraints specified by an Amazon Web +// +// Services service. +type ValidationException struct { + Message *string + + ErrorCodeOverride *string + + Reason ValidationExceptionReason + FieldList []ValidationExceptionField + + noSmithyDocumentSerde +} + +func (e *ValidationException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ValidationException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ValidationException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ValidationException" + } + return *e.ErrorCodeOverride +} +func (e *ValidationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } diff --git a/service/bcmpricingcalculator/types/types.go b/service/bcmpricingcalculator/types/types.go new file mode 100644 index 00000000000..9694a33f347 --- /dev/null +++ b/service/bcmpricingcalculator/types/types.go @@ -0,0 +1,1232 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + smithydocument "github.com/aws/smithy-go/document" + "time" +) + +// Represents an action to add a Reserved Instance to a bill scenario. +type AddReservedInstanceAction struct { + + // The number of instances to add for this Reserved Instance offering. + InstanceCount *int32 + + // The ID of the Reserved Instance offering to add. For more information, see [DescribeReservedInstancesOfferings]. + // + // [DescribeReservedInstancesOfferings]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeReservedInstancesOfferings.html + ReservedInstancesOfferingId *string + + noSmithyDocumentSerde +} + +// Represents an action to add a Savings Plan to a bill scenario. +type AddSavingsPlanAction struct { + + // The hourly commitment, in the same currency of the savingsPlanOfferingId . This + // is a value between 0.001 and 1 million. You cannot specify more than five digits + // after the decimal point. + Commitment *float64 + + // The ID of the Savings Plan offering to add. For more information, see [DescribeSavingsPlansOfferings]. + // + // [DescribeSavingsPlansOfferings]: https://docs.aws.amazon.com/savingsplans/latest/APIReference/API_DescribeSavingsPlansOfferings.html + SavingsPlanOfferingId *string + + noSmithyDocumentSerde +} + +// Represents an entry object in the batch operation to create bill scenario +// +// commitment modifications. +type BatchCreateBillScenarioCommitmentModificationEntry struct { + + // The specific commitment action to be taken (e.g., adding a Reserved Instance + // or Savings Plan). + // + // This member is required. + CommitmentAction BillScenarioCommitmentModificationAction + + // A unique identifier for this entry in the batch operation. This can be any + // valid string. This key is useful to identify errors associated with any + // commitment entry as any error is returned with this key. + // + // This member is required. + Key *string + + // The Amazon Web Services account ID to which this commitment will be applied + // to. + // + // This member is required. + UsageAccountId *string + + // An optional group identifier for the commitment modification. + Group *string + + noSmithyDocumentSerde +} + +// Represents an error that occurred during a batch create operation for bill +// +// scenario commitment modifications. +type BatchCreateBillScenarioCommitmentModificationError struct { + + // The error code associated with the failed operation. + ErrorCode BatchCreateBillScenarioCommitmentModificationErrorCode + + // A descriptive message for the error that occurred. + ErrorMessage *string + + // The key of the entry that caused the error. + Key *string + + noSmithyDocumentSerde +} + +// Represents a successfully created item in a batch operation for bill scenario +// +// commitment modifications. +type BatchCreateBillScenarioCommitmentModificationItem struct { + + // The specific commitment action that was taken. + CommitmentAction BillScenarioCommitmentModificationAction + + // The group identifier for the created commitment modification. + Group *string + + // The unique identifier assigned to the created commitment modification. + Id *string + + // The key of the successfully created entry. This can be any valid string. This + // key is useful to identify errors associated with any commitment entry as any + // error is returned with this key. + Key *string + + // The Amazon Web Services account ID associated with the created commitment + // modification. + UsageAccountId *string + + noSmithyDocumentSerde +} + +// Represents an entry in a batch operation to create bill scenario usage +// +// modifications. +type BatchCreateBillScenarioUsageModificationEntry struct { + + // A unique identifier for this entry in the batch operation. This can be any + // valid string. This key is useful to identify errors associated with any usage + // entry as any error is returned with this key. + // + // This member is required. + Key *string + + // The specific operation associated with this usage modification. Describes the + // specific Amazon Web Services operation that this usage line models. For example, + // RunInstances indicates the operation of an Amazon EC2 instance. + // + // This member is required. + Operation *string + + // The Amazon Web Services service code for this usage modification. This + // identifies the specific Amazon Web Services service to the customer as a unique + // short abbreviation. For example, AmazonEC2 and AWSKMS . + // + // This member is required. + ServiceCode *string + + // The Amazon Web Services account ID to which this usage will be applied to. + // + // This member is required. + UsageAccountId *string + + // Describes the usage details of the usage line item. + // + // This member is required. + UsageType *string + + // The amount of usage you want to create for the service use you are modeling. + Amounts []UsageAmount + + // The Availability Zone that this usage line uses. + AvailabilityZone *string + + // An optional group identifier for the usage modification. + Group *string + + // Historical usage data associated with this modification, if available. + HistoricalUsage *HistoricalUsageEntity + + noSmithyDocumentSerde +} + +// Represents an error that occurred during a batch create operation for bill +// +// scenario usage modifications. +type BatchCreateBillScenarioUsageModificationError struct { + + // The error code associated with the failed operation. + ErrorCode BatchCreateBillScenarioUsageModificationErrorCode + + // A descriptive message for the error that occurred. + ErrorMessage *string + + // The key of the entry that caused the error. + Key *string + + noSmithyDocumentSerde +} + +// Represents a successfully created item in a batch operation for bill scenario +// +// usage modifications. +type BatchCreateBillScenarioUsageModificationItem struct { + + // The specific operation associated with this usage modification. + // + // This member is required. + Operation *string + + // The Amazon Web Services service code for this usage modification. + // + // This member is required. + ServiceCode *string + + // The type of usage that was modified. + // + // This member is required. + UsageType *string + + // The availability zone associated with this usage modification, if applicable. + AvailabilityZone *string + + // The group identifier for the created usage modification. + Group *string + + // Historical usage data associated with this modification, if available. + HistoricalUsage *HistoricalUsageEntity + + // The unique identifier assigned to the created usage modification. + Id *string + + // The key of the successfully created entry. + Key *string + + // The location associated with this usage modification. + Location *string + + // The modified usage quantities. + Quantities []UsageQuantity + + // The Amazon Web Services account ID associated with the created usage + // modification. + UsageAccountId *string + + noSmithyDocumentSerde +} + +// Represents an entry in a batch operation to create workload estimate usage. +type BatchCreateWorkloadEstimateUsageEntry struct { + + // The estimated usage amount. + // + // This member is required. + Amount *float64 + + // A unique identifier for this entry in the batch operation. + // + // This member is required. + Key *string + + // The specific operation associated with this usage estimate. + // + // This member is required. + Operation *string + + // The Amazon Web Services service code for this usage estimate. + // + // This member is required. + ServiceCode *string + + // The Amazon Web Services account ID associated with this usage estimate. + // + // This member is required. + UsageAccountId *string + + // The type of usage being estimated. + // + // This member is required. + UsageType *string + + // An optional group identifier for the usage estimate. + Group *string + + // Historical usage data associated with this estimate, if available. + HistoricalUsage *HistoricalUsageEntity + + noSmithyDocumentSerde +} + +// Represents an error that occurred during a batch create operation for workload +// +// estimate usage. +type BatchCreateWorkloadEstimateUsageError struct { + + // The error code associated with the failed operation. + ErrorCode BatchCreateWorkloadEstimateUsageCode + + // A descriptive message for the error that occurred. + ErrorMessage *string + + // The key of the entry that caused the error. + Key *string + + noSmithyDocumentSerde +} + +// Represents a successfully created item in a batch operation for workload +// +// estimate usage. +type BatchCreateWorkloadEstimateUsageItem struct { + + // The specific operation associated with this usage estimate. + // + // This member is required. + Operation *string + + // The Amazon Web Services service code for this usage estimate. + // + // This member is required. + ServiceCode *string + + // The type of usage that was estimated. + // + // This member is required. + UsageType *string + + // The estimated cost associated with this usage. + Cost *float64 + + // The currency of the estimated cost. + Currency CurrencyCode + + // The group identifier for the created usage estimate. + Group *string + + // Historical usage data associated with this estimate, if available. + HistoricalUsage *HistoricalUsageEntity + + // The unique identifier assigned to the created usage estimate. + Id *string + + // The key of the successfully created entry. + Key *string + + // The location associated with this usage estimate. + Location *string + + // The estimated usage quantity. + Quantity *WorkloadEstimateUsageQuantity + + // The current status of the created usage estimate. + Status WorkloadEstimateCostStatus + + // The Amazon Web Services account ID associated with the created usage estimate. + UsageAccountId *string + + noSmithyDocumentSerde +} + +// Represents an error that occurred when deleting a commitment in a Bill +// +// Scenario. +type BatchDeleteBillScenarioCommitmentModificationError struct { + + // The code associated with the error. + ErrorCode BatchDeleteBillScenarioCommitmentModificationErrorCode + + // The message that describes the error. + ErrorMessage *string + + // The ID of the error. + Id *string + + noSmithyDocumentSerde +} + +// Represents an error that occurred when deleting usage in a Bill Scenario. +type BatchDeleteBillScenarioUsageModificationError struct { + + // The code associated with the error. + ErrorCode BatchDeleteBillScenarioUsageModificationErrorCode + + // The message that describes the error. + ErrorMessage *string + + // The ID of the error. + Id *string + + noSmithyDocumentSerde +} + +// Represents an error that occurred when deleting usage in a workload estimate. +type BatchDeleteWorkloadEstimateUsageError struct { + + // The code associated with the error. + ErrorCode WorkloadEstimateUpdateUsageErrorCode + + // The message that describes the error. + ErrorMessage *string + + // The ID of the error. + Id *string + + noSmithyDocumentSerde +} + +// Represents an entry in a batch operation to update bill scenario commitment +// +// modifications. +type BatchUpdateBillScenarioCommitmentModificationEntry struct { + + // The unique identifier of the commitment modification to update. + // + // This member is required. + Id *string + + // The updated group identifier for the commitment modification. + Group *string + + noSmithyDocumentSerde +} + +// Represents an error that occurred when updating a commitment in a Bill +// +// Scenario. +type BatchUpdateBillScenarioCommitmentModificationError struct { + + // The code associated with the error. + ErrorCode BatchUpdateBillScenarioCommitmentModificationErrorCode + + // The message that describes the error. + ErrorMessage *string + + // The ID of the error. + Id *string + + noSmithyDocumentSerde +} + +// Represents an entry in a batch operation to update bill scenario usage +// +// modifications. +type BatchUpdateBillScenarioUsageModificationEntry struct { + + // The unique identifier of the usage modification to update. + // + // This member is required. + Id *string + + // The updated usage amounts for the modification. + Amounts []UsageAmount + + // The updated group identifier for the usage modification. + Group *string + + noSmithyDocumentSerde +} + +// Represents an error that occurred when updating usage in a Bill Scenario. +type BatchUpdateBillScenarioUsageModificationError struct { + + // The code associated with the error. + ErrorCode BatchUpdateBillScenarioUsageModificationErrorCode + + // The message that describes the error. + ErrorMessage *string + + // The ID of the error. + Id *string + + noSmithyDocumentSerde +} + +// Represents an entry in a batch operation to update workload estimate usage. +type BatchUpdateWorkloadEstimateUsageEntry struct { + + // The unique identifier of the usage estimate to update. + // + // This member is required. + Id *string + + // The updated estimated usage amount. + Amount *float64 + + // The updated group identifier for the usage estimate. + Group *string + + noSmithyDocumentSerde +} + +// Represents an error that occurred when updating usage in a workload estimate. +type BatchUpdateWorkloadEstimateUsageError struct { + + // The code associated with the error. + ErrorCode WorkloadEstimateUpdateUsageErrorCode + + // The message that describes the error. + ErrorMessage *string + + // The ID of the error. + Id *string + + noSmithyDocumentSerde +} + +// Provides a summary of commitment-related information for a bill estimate. +type BillEstimateCommitmentSummary struct { + + // The unique identifier of the commitment. + Id *string + + // The monthly payment amount for this commitment, if applicable. + MonthlyPayment *CostAmount + + // The identifier of the specific offering associated with this commitment. + OfferingId *string + + // The payment option chosen for this commitment (e.g., All Upfront, Partial + // Upfront, No Upfront). + PaymentOption *string + + // The type of purchase agreement (e.g., Reserved Instance, Savings Plan). + PurchaseAgreementType PurchaseAgreementType + + // The Amazon Web Services region associated with this commitment. + Region *string + + // The length of the commitment term. + TermLength *string + + // The upfront payment amount for this commitment, if applicable. + UpfrontPayment *CostAmount + + // The Amazon Web Services account ID associated with this commitment. + UsageAccountId *string + + noSmithyDocumentSerde +} + +// Provides a summary of cost-related information for a bill estimate. +type BillEstimateCostSummary struct { + + // A breakdown of cost differences by Amazon Web Services service. + ServiceCostDifferences map[string]CostDifference + + // The total difference in cost between the estimated and historical costs. + TotalCostDifference *CostDifference + + noSmithyDocumentSerde +} + +// Summarizes an input commitment modification for a bill estimate. +type BillEstimateInputCommitmentModificationSummary struct { + + // The specific commitment action taken in this modification. + CommitmentAction BillScenarioCommitmentModificationAction + + // The group identifier for the commitment modification. + Group *string + + // The unique identifier of the commitment modification. + Id *string + + // The Amazon Web Services account ID associated with this commitment + // modification. + UsageAccountId *string + + noSmithyDocumentSerde +} + +// Summarizes an input usage modification for a bill estimate. +type BillEstimateInputUsageModificationSummary struct { + + // The specific operation associated with this usage modification. + // + // This member is required. + Operation *string + + // The Amazon Web Services service code for this usage modification. + // + // This member is required. + ServiceCode *string + + // The type of usage being modified. + // + // This member is required. + UsageType *string + + // The availability zone associated with this usage modification, if applicable. + AvailabilityZone *string + + // The group identifier for the usage modification. + Group *string + + // Historical usage data associated with this modification, if available. + HistoricalUsage *HistoricalUsageEntity + + // The unique identifier of the usage modification. + Id *string + + // The location associated with this usage modification. + Location *string + + // The modified usage quantities. + Quantities []UsageQuantity + + // The Amazon Web Services account ID associated with this usage modification. + UsageAccountId *string + + noSmithyDocumentSerde +} + +// Provides a summary of a line item in a bill estimate. +type BillEstimateLineItemSummary struct { + + // The specific operation associated with this line item. + // + // This member is required. + Operation *string + + // The Amazon Web Services service code associated with this line item. + // + // This member is required. + ServiceCode *string + + // The type of usage for this line item. + // + // This member is required. + UsageType *string + + // The availability zone associated with this line item, if applicable. + AvailabilityZone *string + + // The estimated cost for this line item. + EstimatedCost *CostAmount + + // The estimated usage quantity for this line item. + EstimatedUsageQuantity *UsageQuantityResult + + // The historical cost for this line item. + HistoricalCost *CostAmount + + // The historical usage quantity for this line item. + HistoricalUsageQuantity *UsageQuantityResult + + // The unique identifier of this line item. + Id *string + + // The line item identifier from the original bill. + LineItemId *string + + // The type of this line item (e.g., Usage, Tax, Credit). + LineItemType *string + + // The location associated with this line item. + Location *string + + // The Amazon Web Services account ID of the payer for this line item. + PayerAccountId *string + + // The Amazon Resource Names (ARNs) of any Savings Plans applied to this line + // item. + SavingsPlanArns []string + + // The Amazon Web Services account ID associated with the usage for this line + // item. + UsageAccountId *string + + noSmithyDocumentSerde +} + +// Provides a summary of a bill estimate. +type BillEstimateSummary struct { + + // The unique identifier of the bill estimate. + // + // This member is required. + Id *string + + // The time period covered by the bill estimate. + BillInterval *BillInterval + + // The timestamp when the bill estimate was created. + CreatedAt *time.Time + + // The timestamp when the bill estimate will expire. + ExpiresAt *time.Time + + // The name of the bill estimate. + Name *string + + // The current status of the bill estimate. + Status BillEstimateStatus + + noSmithyDocumentSerde +} + +// Represents a time interval for a bill or estimate. +type BillInterval struct { + + // The end date and time of the interval. + End *time.Time + + // The start date and time of the interval. + Start *time.Time + + noSmithyDocumentSerde +} + +// Represents an action to modify commitments in a bill scenario. +// +// The following types satisfy this interface: +// +// BillScenarioCommitmentModificationActionMemberAddReservedInstanceAction +// BillScenarioCommitmentModificationActionMemberAddSavingsPlanAction +// BillScenarioCommitmentModificationActionMemberNegateReservedInstanceAction +// BillScenarioCommitmentModificationActionMemberNegateSavingsPlanAction +type BillScenarioCommitmentModificationAction interface { + isBillScenarioCommitmentModificationAction() +} + +// Action to add a Reserved Instance to the scenario. +type BillScenarioCommitmentModificationActionMemberAddReservedInstanceAction struct { + Value AddReservedInstanceAction + + noSmithyDocumentSerde +} + +func (*BillScenarioCommitmentModificationActionMemberAddReservedInstanceAction) isBillScenarioCommitmentModificationAction() { +} + +// Action to add a Savings Plan to the scenario. +type BillScenarioCommitmentModificationActionMemberAddSavingsPlanAction struct { + Value AddSavingsPlanAction + + noSmithyDocumentSerde +} + +func (*BillScenarioCommitmentModificationActionMemberAddSavingsPlanAction) isBillScenarioCommitmentModificationAction() { +} + +// Action to remove a Reserved Instance from the scenario. +type BillScenarioCommitmentModificationActionMemberNegateReservedInstanceAction struct { + Value NegateReservedInstanceAction + + noSmithyDocumentSerde +} + +func (*BillScenarioCommitmentModificationActionMemberNegateReservedInstanceAction) isBillScenarioCommitmentModificationAction() { +} + +// Action to remove a Savings Plan from the scenario. +type BillScenarioCommitmentModificationActionMemberNegateSavingsPlanAction struct { + Value NegateSavingsPlanAction + + noSmithyDocumentSerde +} + +func (*BillScenarioCommitmentModificationActionMemberNegateSavingsPlanAction) isBillScenarioCommitmentModificationAction() { +} + +// Represents a commitment modification item in a bill scenario. +type BillScenarioCommitmentModificationItem struct { + + // The specific commitment action taken in this modification. + CommitmentAction BillScenarioCommitmentModificationAction + + // The group identifier for the commitment modification. + Group *string + + // The unique identifier of the commitment modification. + Id *string + + // The Amazon Web Services account ID associated with this commitment + // modification. + UsageAccountId *string + + noSmithyDocumentSerde +} + +// Provides a summary of a bill scenario. +type BillScenarioSummary struct { + + // The unique identifier of the bill scenario. + // + // This member is required. + Id *string + + // The time period covered by the bill scenario. + BillInterval *BillInterval + + // The timestamp when the bill scenario was created. + CreatedAt *time.Time + + // The timestamp when the bill scenario will expire. + ExpiresAt *time.Time + + // An error message if the bill scenario creation or processing failed. + FailureMessage *string + + // The name of the bill scenario. + Name *string + + // The current status of the bill scenario. + Status BillScenarioStatus + + noSmithyDocumentSerde +} + +// Represents a usage modification item in a bill scenario. +type BillScenarioUsageModificationItem struct { + + // The specific operation associated with this usage modification. + // + // This member is required. + Operation *string + + // The Amazon Web Services service code for this usage modification. + // + // This member is required. + ServiceCode *string + + // The type of usage being modified. + // + // This member is required. + UsageType *string + + // The availability zone associated with this usage modification, if applicable. + AvailabilityZone *string + + // The group identifier for the usage modification. + Group *string + + // Historical usage data associated with this modification, if available. + HistoricalUsage *HistoricalUsageEntity + + // The unique identifier of the usage modification. + Id *string + + // The location associated with this usage modification. + Location *string + + // The modified usage quantities. + Quantities []UsageQuantity + + // The Amazon Web Services account ID associated with this usage modification. + UsageAccountId *string + + noSmithyDocumentSerde +} + +// Represents a monetary amount with associated currency. +type CostAmount struct { + + // The numeric value of the cost. + Amount *float64 + + // The currency code for the cost amount. + Currency CurrencyCode + + noSmithyDocumentSerde +} + +// Represents the difference between historical and estimated costs. +type CostDifference struct { + + // The estimated cost amount. + EstimatedCost *CostAmount + + // The historical cost amount. + HistoricalCost *CostAmount + + noSmithyDocumentSerde +} + +// Represents a complex filtering expression for cost and usage data. +type Expression struct { + + // A list of expressions to be combined with AND logic. + And []Expression + + // Filters based on cost categories. + CostCategories *ExpressionFilter + + // Filters based on dimensions (e.g., service, operation). + Dimensions *ExpressionFilter + + // An expression to be negated. + Not *Expression + + // A list of expressions to be combined with OR logic. + Or []Expression + + // Filters based on resource tags. + Tags *ExpressionFilter + + noSmithyDocumentSerde +} + +// Represents a filter used within an expression. +type ExpressionFilter struct { + + // The key or attribute to filter on. + Key *string + + // The match options for the filter (e.g., equals, contains). + MatchOptions []string + + // The values to match against. + Values []string + + noSmithyDocumentSerde +} + +// Represents a time-based filter. +type FilterTimestamp struct { + + // Include results after this timestamp. + AfterTimestamp *time.Time + + // Include results before this timestamp. + BeforeTimestamp *time.Time + + noSmithyDocumentSerde +} + +// Represents historical usage data for a specific entity. +type HistoricalUsageEntity struct { + + // The time interval for the historical usage data. + // + // This member is required. + BillInterval *BillInterval + + // An optional filter expression to apply to the historical usage data. + // + // This member is required. + FilterExpression *Expression + + // The specific operation associated with the usage. + // + // This member is required. + Operation *string + + // The Amazon Web Services service code associated with the usage. + // + // This member is required. + ServiceCode *string + + // The Amazon Web Services account ID associated with the usage. + // + // This member is required. + UsageAccountId *string + + // The type of usage. + // + // This member is required. + UsageType *string + + // The location associated with the usage. + Location *string + + noSmithyDocumentSerde +} + +// Represents a filter for listing bill estimate line items. +type ListBillEstimateLineItemsFilter struct { + + // The name of the filter attribute. + // + // This member is required. + Name ListBillEstimateLineItemsFilterName + + // The values to filter by. + // + // This member is required. + Values []string + + // The match option for the filter (e.g., equals, contains). + MatchOption MatchOption + + noSmithyDocumentSerde +} + +// Represents a filter for listing bill estimates. +type ListBillEstimatesFilter struct { + + // The name of the filter attribute. + // + // This member is required. + Name ListBillEstimatesFilterName + + // The values to filter by. + // + // This member is required. + Values []string + + // The match option for the filter (e.g., equals, contains). + MatchOption MatchOption + + noSmithyDocumentSerde +} + +// Represents a filter for listing bill scenarios. +type ListBillScenariosFilter struct { + + // The name of the filter attribute. + // + // This member is required. + Name ListBillScenariosFilterName + + // The values to filter by. + // + // This member is required. + Values []string + + // The match option for the filter (e.g., equals, contains). + MatchOption MatchOption + + noSmithyDocumentSerde +} + +// Represents a filter for listing usage data. +type ListUsageFilter struct { + + // The name of the filter attribute. + // + // This member is required. + Name ListUsageFilterName + + // The values to filter by. + // + // This member is required. + Values []string + + // The match option for the filter (e.g., equals, contains). + MatchOption MatchOption + + noSmithyDocumentSerde +} + +// Represents a filter for listing workload estimates. +type ListWorkloadEstimatesFilter struct { + + // The name of the filter attribute. + // + // This member is required. + Name ListWorkloadEstimatesFilterName + + // The values to filter by. + // + // This member is required. + Values []string + + // The match option for the filter (e.g., equals, contains). + MatchOption MatchOption + + noSmithyDocumentSerde +} + +// Represents an action to remove a Reserved Instance from a bill scenario. +// +// This is the ID of an existing Reserved Instance in your account. +type NegateReservedInstanceAction struct { + + // The ID of the Reserved Instance to remove. + ReservedInstancesId *string + + noSmithyDocumentSerde +} + +// Represents an action to remove a Savings Plan from a bill scenario. +// +// This is the ID of an existing Savings Plan in your account. +type NegateSavingsPlanAction struct { + + // The ID of the Savings Plan to remove. + SavingsPlanId *string + + noSmithyDocumentSerde +} + +// Represents a usage amount for a specific time period. +type UsageAmount struct { + + // The usage amount for the period. + // + // This member is required. + Amount *float64 + + // The start hour of the usage period. + // + // This member is required. + StartHour *time.Time + + noSmithyDocumentSerde +} + +// Represents a usage quantity with associated unit and time period. +type UsageQuantity struct { + + // The numeric value of the usage quantity. + Amount *float64 + + // The start hour of the usage period. + StartHour *time.Time + + // The unit of measurement for the usage quantity. + Unit *string + + noSmithyDocumentSerde +} + +// Represents the result of a usage quantity calculation. +type UsageQuantityResult struct { + + // The numeric value of the usage quantity result. + Amount *float64 + + // The unit of measurement for the usage quantity result. + Unit *string + + noSmithyDocumentSerde +} + +// Represents a field that failed validation in a request. +type ValidationExceptionField struct { + + // The error message describing why the field failed validation. + // + // This member is required. + Message *string + + // The name of the field that failed validation. + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + +// Provides a summary of a workload estimate. +type WorkloadEstimateSummary struct { + + // The unique identifier of the workload estimate. + // + // This member is required. + Id *string + + // The currency of the estimated cost. + CostCurrency CurrencyCode + + // The timestamp when the workload estimate was created. + CreatedAt *time.Time + + // The timestamp when the workload estimate will expire. + ExpiresAt *time.Time + + // An error message if the workload estimate creation or processing failed. + FailureMessage *string + + // The name of the workload estimate. + Name *string + + // The timestamp of the pricing rates used for the estimate. + RateTimestamp *time.Time + + // The type of pricing rates used for the estimate. + RateType WorkloadEstimateRateType + + // The current status of the workload estimate. + Status WorkloadEstimateStatus + + // The total estimated cost for the workload. + TotalCost *float64 + + noSmithyDocumentSerde +} + +// Represents a usage item in a workload estimate. +type WorkloadEstimateUsageItem struct { + + // The specific operation associated with this usage item. + // + // This member is required. + Operation *string + + // The Amazon Web Services service code associated with this usage item. + // + // This member is required. + ServiceCode *string + + // The type of usage for this item. + // + // This member is required. + UsageType *string + + // The estimated cost for this usage item. + Cost *float64 + + // The currency of the estimated cost. + Currency CurrencyCode + + // The group identifier for this usage item. + Group *string + + // Historical usage data associated with this item, if available. + HistoricalUsage *HistoricalUsageEntity + + // The unique identifier of this usage item. + Id *string + + // The location associated with this usage item. + Location *string + + // The estimated usage quantity for this item. + Quantity *WorkloadEstimateUsageQuantity + + // The current status of this usage item. + Status WorkloadEstimateCostStatus + + // The Amazon Web Services account ID associated with this usage item. + UsageAccountId *string + + noSmithyDocumentSerde +} + +// Represents a usage quantity for a workload estimate. +type WorkloadEstimateUsageQuantity struct { + + // The numeric value of the usage quantity. + Amount *float64 + + // The unit of measurement for the usage quantity. + Unit *string + + noSmithyDocumentSerde +} + +type noSmithyDocumentSerde = smithydocument.NoSerde + +// UnknownUnionMember is returned when a union member is returned over the wire, +// but has an unknown tag. +type UnknownUnionMember struct { + Tag string + Value []byte + + noSmithyDocumentSerde +} + +func (*UnknownUnionMember) isBillScenarioCommitmentModificationAction() {} diff --git a/service/bcmpricingcalculator/types/types_exported_test.go b/service/bcmpricingcalculator/types/types_exported_test.go new file mode 100644 index 00000000000..790cad5f708 --- /dev/null +++ b/service/bcmpricingcalculator/types/types_exported_test.go @@ -0,0 +1,38 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types_test + +import ( + "fmt" + "github.com/aws/aws-sdk-go-v2/service/bcmpricingcalculator/types" +) + +func ExampleBillScenarioCommitmentModificationAction_outputUsage() { + var union types.BillScenarioCommitmentModificationAction + // type switches can be used to check the union value + switch v := union.(type) { + case *types.BillScenarioCommitmentModificationActionMemberAddReservedInstanceAction: + _ = v.Value // Value is types.AddReservedInstanceAction + + case *types.BillScenarioCommitmentModificationActionMemberAddSavingsPlanAction: + _ = v.Value // Value is types.AddSavingsPlanAction + + case *types.BillScenarioCommitmentModificationActionMemberNegateReservedInstanceAction: + _ = v.Value // Value is types.NegateReservedInstanceAction + + case *types.BillScenarioCommitmentModificationActionMemberNegateSavingsPlanAction: + _ = v.Value // Value is types.NegateSavingsPlanAction + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.NegateSavingsPlanAction +var _ *types.AddReservedInstanceAction +var _ *types.AddSavingsPlanAction +var _ *types.NegateReservedInstanceAction diff --git a/service/bcmpricingcalculator/validators.go b/service/bcmpricingcalculator/validators.go new file mode 100644 index 00000000000..4bd08118881 --- /dev/null +++ b/service/bcmpricingcalculator/validators.go @@ -0,0 +1,1908 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bcmpricingcalculator + +import ( + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/bcmpricingcalculator/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/middleware" +) + +type validateOpBatchCreateBillScenarioCommitmentModification struct { +} + +func (*validateOpBatchCreateBillScenarioCommitmentModification) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpBatchCreateBillScenarioCommitmentModification) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*BatchCreateBillScenarioCommitmentModificationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpBatchCreateBillScenarioCommitmentModificationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpBatchCreateBillScenarioUsageModification struct { +} + +func (*validateOpBatchCreateBillScenarioUsageModification) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpBatchCreateBillScenarioUsageModification) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*BatchCreateBillScenarioUsageModificationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpBatchCreateBillScenarioUsageModificationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpBatchCreateWorkloadEstimateUsage struct { +} + +func (*validateOpBatchCreateWorkloadEstimateUsage) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpBatchCreateWorkloadEstimateUsage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*BatchCreateWorkloadEstimateUsageInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpBatchCreateWorkloadEstimateUsageInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpBatchDeleteBillScenarioCommitmentModification struct { +} + +func (*validateOpBatchDeleteBillScenarioCommitmentModification) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpBatchDeleteBillScenarioCommitmentModification) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*BatchDeleteBillScenarioCommitmentModificationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpBatchDeleteBillScenarioCommitmentModificationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpBatchDeleteBillScenarioUsageModification struct { +} + +func (*validateOpBatchDeleteBillScenarioUsageModification) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpBatchDeleteBillScenarioUsageModification) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*BatchDeleteBillScenarioUsageModificationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpBatchDeleteBillScenarioUsageModificationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpBatchDeleteWorkloadEstimateUsage struct { +} + +func (*validateOpBatchDeleteWorkloadEstimateUsage) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpBatchDeleteWorkloadEstimateUsage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*BatchDeleteWorkloadEstimateUsageInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpBatchDeleteWorkloadEstimateUsageInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpBatchUpdateBillScenarioCommitmentModification struct { +} + +func (*validateOpBatchUpdateBillScenarioCommitmentModification) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpBatchUpdateBillScenarioCommitmentModification) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*BatchUpdateBillScenarioCommitmentModificationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpBatchUpdateBillScenarioCommitmentModificationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpBatchUpdateBillScenarioUsageModification struct { +} + +func (*validateOpBatchUpdateBillScenarioUsageModification) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpBatchUpdateBillScenarioUsageModification) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*BatchUpdateBillScenarioUsageModificationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpBatchUpdateBillScenarioUsageModificationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpBatchUpdateWorkloadEstimateUsage struct { +} + +func (*validateOpBatchUpdateWorkloadEstimateUsage) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpBatchUpdateWorkloadEstimateUsage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*BatchUpdateWorkloadEstimateUsageInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpBatchUpdateWorkloadEstimateUsageInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateBillEstimate struct { +} + +func (*validateOpCreateBillEstimate) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateBillEstimate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateBillEstimateInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateBillEstimateInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateBillScenario struct { +} + +func (*validateOpCreateBillScenario) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateBillScenario) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateBillScenarioInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateBillScenarioInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateWorkloadEstimate struct { +} + +func (*validateOpCreateWorkloadEstimate) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateWorkloadEstimate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateWorkloadEstimateInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateWorkloadEstimateInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteBillEstimate struct { +} + +func (*validateOpDeleteBillEstimate) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteBillEstimate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteBillEstimateInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteBillEstimateInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteBillScenario struct { +} + +func (*validateOpDeleteBillScenario) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteBillScenario) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteBillScenarioInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteBillScenarioInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteWorkloadEstimate struct { +} + +func (*validateOpDeleteWorkloadEstimate) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteWorkloadEstimate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteWorkloadEstimateInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteWorkloadEstimateInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetBillEstimate struct { +} + +func (*validateOpGetBillEstimate) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetBillEstimate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetBillEstimateInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetBillEstimateInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetBillScenario struct { +} + +func (*validateOpGetBillScenario) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetBillScenario) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetBillScenarioInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetBillScenarioInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetWorkloadEstimate struct { +} + +func (*validateOpGetWorkloadEstimate) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetWorkloadEstimate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetWorkloadEstimateInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetWorkloadEstimateInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListBillEstimateCommitments struct { +} + +func (*validateOpListBillEstimateCommitments) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListBillEstimateCommitments) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListBillEstimateCommitmentsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListBillEstimateCommitmentsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListBillEstimateInputCommitmentModifications struct { +} + +func (*validateOpListBillEstimateInputCommitmentModifications) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListBillEstimateInputCommitmentModifications) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListBillEstimateInputCommitmentModificationsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListBillEstimateInputCommitmentModificationsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListBillEstimateInputUsageModifications struct { +} + +func (*validateOpListBillEstimateInputUsageModifications) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListBillEstimateInputUsageModifications) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListBillEstimateInputUsageModificationsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListBillEstimateInputUsageModificationsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListBillEstimateLineItems struct { +} + +func (*validateOpListBillEstimateLineItems) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListBillEstimateLineItems) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListBillEstimateLineItemsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListBillEstimateLineItemsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListBillEstimates struct { +} + +func (*validateOpListBillEstimates) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListBillEstimates) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListBillEstimatesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListBillEstimatesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListBillScenarioCommitmentModifications struct { +} + +func (*validateOpListBillScenarioCommitmentModifications) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListBillScenarioCommitmentModifications) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListBillScenarioCommitmentModificationsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListBillScenarioCommitmentModificationsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListBillScenarios struct { +} + +func (*validateOpListBillScenarios) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListBillScenarios) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListBillScenariosInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListBillScenariosInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListBillScenarioUsageModifications struct { +} + +func (*validateOpListBillScenarioUsageModifications) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListBillScenarioUsageModifications) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListBillScenarioUsageModificationsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListBillScenarioUsageModificationsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListTagsForResource struct { +} + +func (*validateOpListTagsForResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListTagsForResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListTagsForResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListWorkloadEstimates struct { +} + +func (*validateOpListWorkloadEstimates) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListWorkloadEstimates) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListWorkloadEstimatesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListWorkloadEstimatesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListWorkloadEstimateUsage struct { +} + +func (*validateOpListWorkloadEstimateUsage) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListWorkloadEstimateUsage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListWorkloadEstimateUsageInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListWorkloadEstimateUsageInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpTagResource struct { +} + +func (*validateOpTagResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpTagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*TagResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpTagResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUntagResource struct { +} + +func (*validateOpUntagResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUntagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UntagResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUntagResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateBillEstimate struct { +} + +func (*validateOpUpdateBillEstimate) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateBillEstimate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateBillEstimateInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateBillEstimateInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateBillScenario struct { +} + +func (*validateOpUpdateBillScenario) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateBillScenario) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateBillScenarioInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateBillScenarioInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateWorkloadEstimate struct { +} + +func (*validateOpUpdateWorkloadEstimate) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateWorkloadEstimate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateWorkloadEstimateInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateWorkloadEstimateInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +func addOpBatchCreateBillScenarioCommitmentModificationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpBatchCreateBillScenarioCommitmentModification{}, middleware.After) +} + +func addOpBatchCreateBillScenarioUsageModificationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpBatchCreateBillScenarioUsageModification{}, middleware.After) +} + +func addOpBatchCreateWorkloadEstimateUsageValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpBatchCreateWorkloadEstimateUsage{}, middleware.After) +} + +func addOpBatchDeleteBillScenarioCommitmentModificationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpBatchDeleteBillScenarioCommitmentModification{}, middleware.After) +} + +func addOpBatchDeleteBillScenarioUsageModificationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpBatchDeleteBillScenarioUsageModification{}, middleware.After) +} + +func addOpBatchDeleteWorkloadEstimateUsageValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpBatchDeleteWorkloadEstimateUsage{}, middleware.After) +} + +func addOpBatchUpdateBillScenarioCommitmentModificationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpBatchUpdateBillScenarioCommitmentModification{}, middleware.After) +} + +func addOpBatchUpdateBillScenarioUsageModificationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpBatchUpdateBillScenarioUsageModification{}, middleware.After) +} + +func addOpBatchUpdateWorkloadEstimateUsageValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpBatchUpdateWorkloadEstimateUsage{}, middleware.After) +} + +func addOpCreateBillEstimateValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateBillEstimate{}, middleware.After) +} + +func addOpCreateBillScenarioValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateBillScenario{}, middleware.After) +} + +func addOpCreateWorkloadEstimateValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateWorkloadEstimate{}, middleware.After) +} + +func addOpDeleteBillEstimateValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteBillEstimate{}, middleware.After) +} + +func addOpDeleteBillScenarioValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteBillScenario{}, middleware.After) +} + +func addOpDeleteWorkloadEstimateValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteWorkloadEstimate{}, middleware.After) +} + +func addOpGetBillEstimateValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetBillEstimate{}, middleware.After) +} + +func addOpGetBillScenarioValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetBillScenario{}, middleware.After) +} + +func addOpGetWorkloadEstimateValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetWorkloadEstimate{}, middleware.After) +} + +func addOpListBillEstimateCommitmentsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListBillEstimateCommitments{}, middleware.After) +} + +func addOpListBillEstimateInputCommitmentModificationsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListBillEstimateInputCommitmentModifications{}, middleware.After) +} + +func addOpListBillEstimateInputUsageModificationsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListBillEstimateInputUsageModifications{}, middleware.After) +} + +func addOpListBillEstimateLineItemsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListBillEstimateLineItems{}, middleware.After) +} + +func addOpListBillEstimatesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListBillEstimates{}, middleware.After) +} + +func addOpListBillScenarioCommitmentModificationsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListBillScenarioCommitmentModifications{}, middleware.After) +} + +func addOpListBillScenariosValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListBillScenarios{}, middleware.After) +} + +func addOpListBillScenarioUsageModificationsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListBillScenarioUsageModifications{}, middleware.After) +} + +func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) +} + +func addOpListWorkloadEstimatesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListWorkloadEstimates{}, middleware.After) +} + +func addOpListWorkloadEstimateUsageValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListWorkloadEstimateUsage{}, middleware.After) +} + +func addOpTagResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpTagResource{}, middleware.After) +} + +func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After) +} + +func addOpUpdateBillEstimateValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateBillEstimate{}, middleware.After) +} + +func addOpUpdateBillScenarioValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateBillScenario{}, middleware.After) +} + +func addOpUpdateWorkloadEstimateValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateWorkloadEstimate{}, middleware.After) +} + +func validateBatchCreateBillScenarioCommitmentModificationEntries(v []types.BatchCreateBillScenarioCommitmentModificationEntry) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BatchCreateBillScenarioCommitmentModificationEntries"} + for i := range v { + if err := validateBatchCreateBillScenarioCommitmentModificationEntry(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateBatchCreateBillScenarioCommitmentModificationEntry(v *types.BatchCreateBillScenarioCommitmentModificationEntry) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BatchCreateBillScenarioCommitmentModificationEntry"} + if v.Key == nil { + invalidParams.Add(smithy.NewErrParamRequired("Key")) + } + if v.UsageAccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("UsageAccountId")) + } + if v.CommitmentAction == nil { + invalidParams.Add(smithy.NewErrParamRequired("CommitmentAction")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateBatchCreateBillScenarioUsageModificationEntries(v []types.BatchCreateBillScenarioUsageModificationEntry) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BatchCreateBillScenarioUsageModificationEntries"} + for i := range v { + if err := validateBatchCreateBillScenarioUsageModificationEntry(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateBatchCreateBillScenarioUsageModificationEntry(v *types.BatchCreateBillScenarioUsageModificationEntry) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BatchCreateBillScenarioUsageModificationEntry"} + if v.ServiceCode == nil { + invalidParams.Add(smithy.NewErrParamRequired("ServiceCode")) + } + if v.UsageType == nil { + invalidParams.Add(smithy.NewErrParamRequired("UsageType")) + } + if v.Operation == nil { + invalidParams.Add(smithy.NewErrParamRequired("Operation")) + } + if v.Key == nil { + invalidParams.Add(smithy.NewErrParamRequired("Key")) + } + if v.UsageAccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("UsageAccountId")) + } + if v.Amounts != nil { + if err := validateUsageAmounts(v.Amounts); err != nil { + invalidParams.AddNested("Amounts", err.(smithy.InvalidParamsError)) + } + } + if v.HistoricalUsage != nil { + if err := validateHistoricalUsageEntity(v.HistoricalUsage); err != nil { + invalidParams.AddNested("HistoricalUsage", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateBatchCreateWorkloadEstimateUsageEntries(v []types.BatchCreateWorkloadEstimateUsageEntry) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BatchCreateWorkloadEstimateUsageEntries"} + for i := range v { + if err := validateBatchCreateWorkloadEstimateUsageEntry(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateBatchCreateWorkloadEstimateUsageEntry(v *types.BatchCreateWorkloadEstimateUsageEntry) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BatchCreateWorkloadEstimateUsageEntry"} + if v.ServiceCode == nil { + invalidParams.Add(smithy.NewErrParamRequired("ServiceCode")) + } + if v.UsageType == nil { + invalidParams.Add(smithy.NewErrParamRequired("UsageType")) + } + if v.Operation == nil { + invalidParams.Add(smithy.NewErrParamRequired("Operation")) + } + if v.Key == nil { + invalidParams.Add(smithy.NewErrParamRequired("Key")) + } + if v.UsageAccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("UsageAccountId")) + } + if v.Amount == nil { + invalidParams.Add(smithy.NewErrParamRequired("Amount")) + } + if v.HistoricalUsage != nil { + if err := validateHistoricalUsageEntity(v.HistoricalUsage); err != nil { + invalidParams.AddNested("HistoricalUsage", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateBatchUpdateBillScenarioCommitmentModificationEntries(v []types.BatchUpdateBillScenarioCommitmentModificationEntry) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BatchUpdateBillScenarioCommitmentModificationEntries"} + for i := range v { + if err := validateBatchUpdateBillScenarioCommitmentModificationEntry(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateBatchUpdateBillScenarioCommitmentModificationEntry(v *types.BatchUpdateBillScenarioCommitmentModificationEntry) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BatchUpdateBillScenarioCommitmentModificationEntry"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateBatchUpdateBillScenarioUsageModificationEntries(v []types.BatchUpdateBillScenarioUsageModificationEntry) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BatchUpdateBillScenarioUsageModificationEntries"} + for i := range v { + if err := validateBatchUpdateBillScenarioUsageModificationEntry(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateBatchUpdateBillScenarioUsageModificationEntry(v *types.BatchUpdateBillScenarioUsageModificationEntry) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BatchUpdateBillScenarioUsageModificationEntry"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if v.Amounts != nil { + if err := validateUsageAmounts(v.Amounts); err != nil { + invalidParams.AddNested("Amounts", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateBatchUpdateWorkloadEstimateUsageEntries(v []types.BatchUpdateWorkloadEstimateUsageEntry) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BatchUpdateWorkloadEstimateUsageEntries"} + for i := range v { + if err := validateBatchUpdateWorkloadEstimateUsageEntry(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateBatchUpdateWorkloadEstimateUsageEntry(v *types.BatchUpdateWorkloadEstimateUsageEntry) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BatchUpdateWorkloadEstimateUsageEntry"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateHistoricalUsageEntity(v *types.HistoricalUsageEntity) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "HistoricalUsageEntity"} + if v.ServiceCode == nil { + invalidParams.Add(smithy.NewErrParamRequired("ServiceCode")) + } + if v.UsageType == nil { + invalidParams.Add(smithy.NewErrParamRequired("UsageType")) + } + if v.Operation == nil { + invalidParams.Add(smithy.NewErrParamRequired("Operation")) + } + if v.UsageAccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("UsageAccountId")) + } + if v.BillInterval == nil { + invalidParams.Add(smithy.NewErrParamRequired("BillInterval")) + } + if v.FilterExpression == nil { + invalidParams.Add(smithy.NewErrParamRequired("FilterExpression")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateListBillEstimateLineItemsFilter(v *types.ListBillEstimateLineItemsFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListBillEstimateLineItemsFilter"} + if len(v.Name) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Values == nil { + invalidParams.Add(smithy.NewErrParamRequired("Values")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateListBillEstimateLineItemsFilters(v []types.ListBillEstimateLineItemsFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListBillEstimateLineItemsFilters"} + for i := range v { + if err := validateListBillEstimateLineItemsFilter(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateListBillEstimatesFilter(v *types.ListBillEstimatesFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListBillEstimatesFilter"} + if len(v.Name) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Values == nil { + invalidParams.Add(smithy.NewErrParamRequired("Values")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateListBillEstimatesFilters(v []types.ListBillEstimatesFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListBillEstimatesFilters"} + for i := range v { + if err := validateListBillEstimatesFilter(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateListBillScenariosFilter(v *types.ListBillScenariosFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListBillScenariosFilter"} + if len(v.Name) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Values == nil { + invalidParams.Add(smithy.NewErrParamRequired("Values")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateListBillScenariosFilters(v []types.ListBillScenariosFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListBillScenariosFilters"} + for i := range v { + if err := validateListBillScenariosFilter(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateListUsageFilter(v *types.ListUsageFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListUsageFilter"} + if len(v.Name) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Values == nil { + invalidParams.Add(smithy.NewErrParamRequired("Values")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateListUsageFilters(v []types.ListUsageFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListUsageFilters"} + for i := range v { + if err := validateListUsageFilter(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateListWorkloadEstimatesFilter(v *types.ListWorkloadEstimatesFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListWorkloadEstimatesFilter"} + if len(v.Name) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Values == nil { + invalidParams.Add(smithy.NewErrParamRequired("Values")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateListWorkloadEstimatesFilters(v []types.ListWorkloadEstimatesFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListWorkloadEstimatesFilters"} + for i := range v { + if err := validateListWorkloadEstimatesFilter(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateUsageAmount(v *types.UsageAmount) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UsageAmount"} + if v.StartHour == nil { + invalidParams.Add(smithy.NewErrParamRequired("StartHour")) + } + if v.Amount == nil { + invalidParams.Add(smithy.NewErrParamRequired("Amount")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateUsageAmounts(v []types.UsageAmount) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UsageAmounts"} + for i := range v { + if err := validateUsageAmount(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpBatchCreateBillScenarioCommitmentModificationInput(v *BatchCreateBillScenarioCommitmentModificationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BatchCreateBillScenarioCommitmentModificationInput"} + if v.BillScenarioId == nil { + invalidParams.Add(smithy.NewErrParamRequired("BillScenarioId")) + } + if v.CommitmentModifications == nil { + invalidParams.Add(smithy.NewErrParamRequired("CommitmentModifications")) + } else if v.CommitmentModifications != nil { + if err := validateBatchCreateBillScenarioCommitmentModificationEntries(v.CommitmentModifications); err != nil { + invalidParams.AddNested("CommitmentModifications", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpBatchCreateBillScenarioUsageModificationInput(v *BatchCreateBillScenarioUsageModificationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BatchCreateBillScenarioUsageModificationInput"} + if v.BillScenarioId == nil { + invalidParams.Add(smithy.NewErrParamRequired("BillScenarioId")) + } + if v.UsageModifications == nil { + invalidParams.Add(smithy.NewErrParamRequired("UsageModifications")) + } else if v.UsageModifications != nil { + if err := validateBatchCreateBillScenarioUsageModificationEntries(v.UsageModifications); err != nil { + invalidParams.AddNested("UsageModifications", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpBatchCreateWorkloadEstimateUsageInput(v *BatchCreateWorkloadEstimateUsageInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BatchCreateWorkloadEstimateUsageInput"} + if v.WorkloadEstimateId == nil { + invalidParams.Add(smithy.NewErrParamRequired("WorkloadEstimateId")) + } + if v.Usage == nil { + invalidParams.Add(smithy.NewErrParamRequired("Usage")) + } else if v.Usage != nil { + if err := validateBatchCreateWorkloadEstimateUsageEntries(v.Usage); err != nil { + invalidParams.AddNested("Usage", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpBatchDeleteBillScenarioCommitmentModificationInput(v *BatchDeleteBillScenarioCommitmentModificationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BatchDeleteBillScenarioCommitmentModificationInput"} + if v.BillScenarioId == nil { + invalidParams.Add(smithy.NewErrParamRequired("BillScenarioId")) + } + if v.Ids == nil { + invalidParams.Add(smithy.NewErrParamRequired("Ids")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpBatchDeleteBillScenarioUsageModificationInput(v *BatchDeleteBillScenarioUsageModificationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BatchDeleteBillScenarioUsageModificationInput"} + if v.BillScenarioId == nil { + invalidParams.Add(smithy.NewErrParamRequired("BillScenarioId")) + } + if v.Ids == nil { + invalidParams.Add(smithy.NewErrParamRequired("Ids")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpBatchDeleteWorkloadEstimateUsageInput(v *BatchDeleteWorkloadEstimateUsageInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BatchDeleteWorkloadEstimateUsageInput"} + if v.WorkloadEstimateId == nil { + invalidParams.Add(smithy.NewErrParamRequired("WorkloadEstimateId")) + } + if v.Ids == nil { + invalidParams.Add(smithy.NewErrParamRequired("Ids")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpBatchUpdateBillScenarioCommitmentModificationInput(v *BatchUpdateBillScenarioCommitmentModificationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BatchUpdateBillScenarioCommitmentModificationInput"} + if v.BillScenarioId == nil { + invalidParams.Add(smithy.NewErrParamRequired("BillScenarioId")) + } + if v.CommitmentModifications == nil { + invalidParams.Add(smithy.NewErrParamRequired("CommitmentModifications")) + } else if v.CommitmentModifications != nil { + if err := validateBatchUpdateBillScenarioCommitmentModificationEntries(v.CommitmentModifications); err != nil { + invalidParams.AddNested("CommitmentModifications", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpBatchUpdateBillScenarioUsageModificationInput(v *BatchUpdateBillScenarioUsageModificationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BatchUpdateBillScenarioUsageModificationInput"} + if v.BillScenarioId == nil { + invalidParams.Add(smithy.NewErrParamRequired("BillScenarioId")) + } + if v.UsageModifications == nil { + invalidParams.Add(smithy.NewErrParamRequired("UsageModifications")) + } else if v.UsageModifications != nil { + if err := validateBatchUpdateBillScenarioUsageModificationEntries(v.UsageModifications); err != nil { + invalidParams.AddNested("UsageModifications", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpBatchUpdateWorkloadEstimateUsageInput(v *BatchUpdateWorkloadEstimateUsageInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BatchUpdateWorkloadEstimateUsageInput"} + if v.WorkloadEstimateId == nil { + invalidParams.Add(smithy.NewErrParamRequired("WorkloadEstimateId")) + } + if v.Usage == nil { + invalidParams.Add(smithy.NewErrParamRequired("Usage")) + } else if v.Usage != nil { + if err := validateBatchUpdateWorkloadEstimateUsageEntries(v.Usage); err != nil { + invalidParams.AddNested("Usage", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateBillEstimateInput(v *CreateBillEstimateInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateBillEstimateInput"} + if v.BillScenarioId == nil { + invalidParams.Add(smithy.NewErrParamRequired("BillScenarioId")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateBillScenarioInput(v *CreateBillScenarioInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateBillScenarioInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateWorkloadEstimateInput(v *CreateWorkloadEstimateInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateWorkloadEstimateInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteBillEstimateInput(v *DeleteBillEstimateInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteBillEstimateInput"} + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteBillScenarioInput(v *DeleteBillScenarioInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteBillScenarioInput"} + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteWorkloadEstimateInput(v *DeleteWorkloadEstimateInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteWorkloadEstimateInput"} + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetBillEstimateInput(v *GetBillEstimateInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetBillEstimateInput"} + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetBillScenarioInput(v *GetBillScenarioInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetBillScenarioInput"} + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetWorkloadEstimateInput(v *GetWorkloadEstimateInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetWorkloadEstimateInput"} + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListBillEstimateCommitmentsInput(v *ListBillEstimateCommitmentsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListBillEstimateCommitmentsInput"} + if v.BillEstimateId == nil { + invalidParams.Add(smithy.NewErrParamRequired("BillEstimateId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListBillEstimateInputCommitmentModificationsInput(v *ListBillEstimateInputCommitmentModificationsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListBillEstimateInputCommitmentModificationsInput"} + if v.BillEstimateId == nil { + invalidParams.Add(smithy.NewErrParamRequired("BillEstimateId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListBillEstimateInputUsageModificationsInput(v *ListBillEstimateInputUsageModificationsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListBillEstimateInputUsageModificationsInput"} + if v.BillEstimateId == nil { + invalidParams.Add(smithy.NewErrParamRequired("BillEstimateId")) + } + if v.Filters != nil { + if err := validateListUsageFilters(v.Filters); err != nil { + invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListBillEstimateLineItemsInput(v *ListBillEstimateLineItemsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListBillEstimateLineItemsInput"} + if v.BillEstimateId == nil { + invalidParams.Add(smithy.NewErrParamRequired("BillEstimateId")) + } + if v.Filters != nil { + if err := validateListBillEstimateLineItemsFilters(v.Filters); err != nil { + invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListBillEstimatesInput(v *ListBillEstimatesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListBillEstimatesInput"} + if v.Filters != nil { + if err := validateListBillEstimatesFilters(v.Filters); err != nil { + invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListBillScenarioCommitmentModificationsInput(v *ListBillScenarioCommitmentModificationsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListBillScenarioCommitmentModificationsInput"} + if v.BillScenarioId == nil { + invalidParams.Add(smithy.NewErrParamRequired("BillScenarioId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListBillScenariosInput(v *ListBillScenariosInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListBillScenariosInput"} + if v.Filters != nil { + if err := validateListBillScenariosFilters(v.Filters); err != nil { + invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListBillScenarioUsageModificationsInput(v *ListBillScenarioUsageModificationsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListBillScenarioUsageModificationsInput"} + if v.BillScenarioId == nil { + invalidParams.Add(smithy.NewErrParamRequired("BillScenarioId")) + } + if v.Filters != nil { + if err := validateListUsageFilters(v.Filters); err != nil { + invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListTagsForResourceInput"} + if v.Arn == nil { + invalidParams.Add(smithy.NewErrParamRequired("Arn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListWorkloadEstimatesInput(v *ListWorkloadEstimatesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListWorkloadEstimatesInput"} + if v.Filters != nil { + if err := validateListWorkloadEstimatesFilters(v.Filters); err != nil { + invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListWorkloadEstimateUsageInput(v *ListWorkloadEstimateUsageInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListWorkloadEstimateUsageInput"} + if v.WorkloadEstimateId == nil { + invalidParams.Add(smithy.NewErrParamRequired("WorkloadEstimateId")) + } + if v.Filters != nil { + if err := validateListUsageFilters(v.Filters); err != nil { + invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpTagResourceInput(v *TagResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TagResourceInput"} + if v.Arn == nil { + invalidParams.Add(smithy.NewErrParamRequired("Arn")) + } + if v.Tags == nil { + invalidParams.Add(smithy.NewErrParamRequired("Tags")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUntagResourceInput(v *UntagResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UntagResourceInput"} + if v.Arn == nil { + invalidParams.Add(smithy.NewErrParamRequired("Arn")) + } + if v.TagKeys == nil { + invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateBillEstimateInput(v *UpdateBillEstimateInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateBillEstimateInput"} + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateBillScenarioInput(v *UpdateBillScenarioInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateBillScenarioInput"} + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateWorkloadEstimateInput(v *UpdateWorkloadEstimateInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateWorkloadEstimateInput"} + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/service/bedrockagentruntime/api_op_InvokeInlineAgent.go b/service/bedrockagentruntime/api_op_InvokeInlineAgent.go new file mode 100644 index 00000000000..6e39145264f --- /dev/null +++ b/service/bedrockagentruntime/api_op_InvokeInlineAgent.go @@ -0,0 +1,364 @@ +// 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" +) + +// Invokes an inline Amazon Bedrock agent using the configurations you provide +// +// with the request. +// +// - Specify the following fields for security purposes. +// +// - (Optional) customerEncryptionKeyArn – The Amazon Resource Name (ARN) of a +// KMS key to encrypt the creation of the agent. +// +// - (Optional) idleSessionTTLinSeconds – Specify the number of seconds for which +// the agent should maintain session information. After this time expires, the +// subsequent InvokeInlineAgent request begins a new session. +// +// - To override the default prompt behavior for agent orchestration and to use +// advanced prompts, include a promptOverrideConfiguration object. For more +// information, see [Advanced prompts]. +// +// - The agent instructions will not be honored if your agent has only one +// knowledge base, uses default prompts, has no action group, and user input is +// disabled. +// +// The CLI doesn't support streaming operations in Amazon Bedrock, including +// InvokeInlineAgent . +// +// [Advanced prompts]: https://docs.aws.amazon.com/bedrock/latest/userguide/advanced-prompts.html +func (c *Client) InvokeInlineAgent(ctx context.Context, params *InvokeInlineAgentInput, optFns ...func(*Options)) (*InvokeInlineAgentOutput, error) { + if params == nil { + params = &InvokeInlineAgentInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "InvokeInlineAgent", params, optFns, c.addOperationInvokeInlineAgentMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*InvokeInlineAgentOutput) + out.ResultMetadata = metadata + return out, nil +} + +type InvokeInlineAgentInput struct { + + // The [model identifier (ID)] of the model to use for orchestration by the inline agent. For example, + // meta.llama3-1-70b-instruct-v1:0 . + // + // [model identifier (ID)]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns + // + // This member is required. + FoundationModel *string + + // The instructions that tell the inline agent what it should do and how it + // should interact with users. + // + // This member is required. + Instruction *string + + // The unique identifier of the session. Use the same value across requests to + // continue the same conversation. + // + // This member is required. + SessionId *string + + // A list of action groups with each action group defining the action the inline + // agent needs to carry out. + ActionGroups []types.AgentActionGroup + + // The Amazon Resource Name (ARN) of the Amazon Web Services KMS key to use to + // encrypt your inline agent. + CustomerEncryptionKeyArn *string + + // Specifies whether to turn on the trace or not to track the agent's reasoning + // process. For more information, see [Using trace]. + // + // [Using trace]: https://docs.aws.amazon.com/bedrock/latest/userguide/trace-events.html + EnableTrace *bool + + // Specifies whether to end the session with the inline agent or not. + EndSession *bool + + // The [guardrails] to assign to the inline agent. + // + // [guardrails]: https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails.html + GuardrailConfiguration *types.GuardrailConfigurationWithArn + + // The number of seconds for which the inline agent should maintain session + // information. After this time expires, the subsequent InvokeInlineAgent request + // begins a new session. + // + // A user interaction remains active for the amount of time specified. If no + // conversation occurs during this time, the session expires and the data provided + // before the timeout is deleted. + IdleSessionTTLInSeconds *int32 + + // Parameters that specify the various attributes of a sessions. You can include + // attributes for the session or prompt or, if you configured an action group to + // return control, results from invocation of the action group. For more + // information, see [Control session context]. + // + // If you include returnControlInvocationResults in the sessionState field, the + // inputText field will be ignored. + // + // [Control session context]: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-session-state.html + InlineSessionState *types.InlineSessionState + + // The prompt text to send to the agent. + // + // If you include returnControlInvocationResults in the sessionState field, the + // inputText field will be ignored. + InputText *string + + // Contains information of the knowledge bases to associate with. + KnowledgeBases []types.KnowledgeBase + + // Configurations for advanced prompts used to override the default prompts to + // enhance the accuracy of the inline agent. + PromptOverrideConfiguration *types.PromptOverrideConfiguration + + noSmithyDocumentSerde +} + +type InvokeInlineAgentOutput struct { + + // The MIME type of the input data in the request. The default value is + // application/json. + // + // This member is required. + ContentType *string + + // The unique identifier of the session with the agent. + // + // This member is required. + SessionId *string + + eventStream *InvokeInlineAgentEventStream + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +// GetStream returns the type to interact with the event stream. +func (o *InvokeInlineAgentOutput) GetStream() *InvokeInlineAgentEventStream { + return o.eventStream +} + +func (c *Client) addOperationInvokeInlineAgentMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpInvokeInlineAgent{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpInvokeInlineAgent{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "InvokeInlineAgent"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addEventStreamInvokeInlineAgentMiddleware(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 = addOpInvokeInlineAgentValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opInvokeInlineAgent(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_opInvokeInlineAgent(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "InvokeInlineAgent", + } +} + +// InvokeInlineAgentEventStream provides the event stream handling for the InvokeInlineAgent operation. +// +// For testing and mocking the event stream this type should be initialized via +// the NewInvokeInlineAgentEventStream constructor function. Using the functional options +// to pass in nested mock behavior. +type InvokeInlineAgentEventStream struct { + // InlineAgentResponseStreamReader is the EventStream reader for the + // InlineAgentResponseStream 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 InlineAgentResponseStreamReader + + done chan struct{} + closeOnce sync.Once + err *smithysync.OnceErr +} + +// NewInvokeInlineAgentEventStream initializes an InvokeInlineAgentEventStream. +// This function should only be used for testing and mocking the InvokeInlineAgentEventStream +// stream within your application. +// +// The Reader member must be set before reading events from the stream. +func NewInvokeInlineAgentEventStream(optFns ...func(*InvokeInlineAgentEventStream)) *InvokeInlineAgentEventStream { + es := &InvokeInlineAgentEventStream{ + 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 *InvokeInlineAgentEventStream) Events() <-chan types.InlineAgentResponseStream { + 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 *InvokeInlineAgentEventStream) Close() error { + es.closeOnce.Do(es.safeClose) + return es.Err() +} + +func (es *InvokeInlineAgentEventStream) 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 *InvokeInlineAgentEventStream) Err() error { + if err := es.err.Err(); err != nil { + return err + } + + if err := es.Reader.Err(); err != nil { + return err + } + + return nil +} + +func (es *InvokeInlineAgentEventStream) 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 448f4b1fc67..c45fa975e50 100644 --- a/service/bedrockagentruntime/deserializers.go +++ b/service/bedrockagentruntime/deserializers.go @@ -584,6 +584,141 @@ func awsRestjson1_deserializeOpErrorInvokeFlow(response *smithyhttp.Response, me } } +type awsRestjson1_deserializeOpInvokeInlineAgent struct { +} + +func (*awsRestjson1_deserializeOpInvokeInlineAgent) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpInvokeInlineAgent) HandleDeserialize(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_deserializeOpErrorInvokeInlineAgent(response, &metadata) + } + output := &InvokeInlineAgentOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsInvokeInlineAgentOutput(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 awsRestjson1_deserializeOpErrorInvokeInlineAgent(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(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("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_deserializeOpHttpBindingsInvokeInlineAgentOutput(v *InvokeInlineAgentOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("x-amzn-bedrock-agent-content-type"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ContentType = ptr.String(headerValues[0]) + } + + if headerValues := response.Header.Values("x-amz-bedrock-agent-session-id"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.SessionId = ptr.String(headerValues[0]) + } + + return nil +} + type awsRestjson1_deserializeOpOptimizePrompt struct { } @@ -6475,6 +6610,452 @@ func awsRestjson1_deserializeDocumentTextPrompt(v **types.TextPrompt, value inte return nil } +func awsRestjson1_deserializeEventStreamInlineAgentResponseStream(v *types.InlineAgentResponseStream, 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("chunk", eventType.String()): + vv := &types.InlineAgentResponseStreamMemberChunk{} + if err := awsRestjson1_deserializeEventMessageInlineAgentPayloadPart(&vv.Value, msg); err != nil { + return err + } + *v = vv + return nil + + case strings.EqualFold("files", eventType.String()): + vv := &types.InlineAgentResponseStreamMemberFiles{} + if err := awsRestjson1_deserializeEventMessageInlineAgentFilePart(&vv.Value, msg); err != nil { + return err + } + *v = vv + return nil + + case strings.EqualFold("returnControl", eventType.String()): + vv := &types.InlineAgentResponseStreamMemberReturnControl{} + if err := awsRestjson1_deserializeEventMessageInlineAgentReturnControlPayload(&vv.Value, msg); err != nil { + return err + } + *v = vv + return nil + + case strings.EqualFold("trace", eventType.String()): + vv := &types.InlineAgentResponseStreamMemberTrace{} + if err := awsRestjson1_deserializeEventMessageInlineAgentTracePart(&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_deserializeEventStreamExceptionInlineAgentResponseStream(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("conflictException", exceptionType.String()): + return awsRestjson1_deserializeEventMessageExceptionConflictException(msg) + + case strings.EqualFold("dependencyFailedException", exceptionType.String()): + return awsRestjson1_deserializeEventMessageExceptionDependencyFailedException(msg) + + case strings.EqualFold("internalServerException", exceptionType.String()): + return awsRestjson1_deserializeEventMessageExceptionInternalServerException(msg) + + case strings.EqualFold("resourceNotFoundException", exceptionType.String()): + return awsRestjson1_deserializeEventMessageExceptionResourceNotFoundException(msg) + + case strings.EqualFold("serviceQuotaExceededException", exceptionType.String()): + return awsRestjson1_deserializeEventMessageExceptionServiceQuotaExceededException(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_deserializeEventMessageInlineAgentPayloadPart(v *types.InlineAgentPayloadPart, 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_deserializeDocumentInlineAgentPayloadPart(&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_deserializeEventMessageInlineAgentTracePart(v *types.InlineAgentTracePart, 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_deserializeDocumentInlineAgentTracePart(&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_deserializeEventMessageInlineAgentReturnControlPayload(v *types.InlineAgentReturnControlPayload, 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_deserializeDocumentInlineAgentReturnControlPayload(&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_deserializeEventMessageInlineAgentFilePart(v *types.InlineAgentFilePart, 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_deserializeDocumentInlineAgentFilePart(&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_deserializeDocumentInlineAgentFilePart(v **types.InlineAgentFilePart, 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.InlineAgentFilePart + if *v == nil { + sv = &types.InlineAgentFilePart{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "files": + if err := awsRestjson1_deserializeDocumentOutputFiles(&sv.Files, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentInlineAgentPayloadPart(v **types.InlineAgentPayloadPart, 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.InlineAgentPayloadPart + if *v == nil { + sv = &types.InlineAgentPayloadPart{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "attribution": + if err := awsRestjson1_deserializeDocumentAttribution(&sv.Attribution, value); err != nil { + return err + } + + case "bytes": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PartBody to be []byte, got %T instead", value) + } + dv, err := base64.StdEncoding.DecodeString(jtv) + if err != nil { + return fmt.Errorf("failed to base64 decode PartBody, %w", err) + } + sv.Bytes = dv + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentInlineAgentReturnControlPayload(v **types.InlineAgentReturnControlPayload, 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.InlineAgentReturnControlPayload + if *v == nil { + sv = &types.InlineAgentReturnControlPayload{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "invocationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.InvocationId = ptr.String(jtv) + } + + case "invocationInputs": + if err := awsRestjson1_deserializeDocumentInvocationInputs(&sv.InvocationInputs, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentInlineAgentTracePart(v **types.InlineAgentTracePart, 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.InlineAgentTracePart + if *v == nil { + sv = &types.InlineAgentTracePart{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "sessionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SessionId to be of type string, got %T instead", value) + } + sv.SessionId = ptr.String(jtv) + } + + case "trace": + if err := awsRestjson1_deserializeDocumentTrace(&sv.Trace, value); err != nil { + return err + } + + 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 0d58526ef82..af7f51abdcc 100644 --- a/service/bedrockagentruntime/eventstream.go +++ b/service/bedrockagentruntime/eventstream.go @@ -28,6 +28,16 @@ type FlowResponseStreamReader interface { Err() error } +// InlineAgentResponseStreamReader provides the interface for reading events from +// a stream. +// +// The writer's Close method must allow multiple concurrent calls. +type InlineAgentResponseStreamReader interface { + Events() <-chan types.InlineAgentResponseStream + Close() error + Err() error +} + // OptimizedPromptStreamReader provides the interface for reading events from a // stream. // @@ -303,6 +313,134 @@ func (r *optimizedPromptStreamReader) Closed() <-chan struct{} { return r.done } +type inlineAgentResponseStreamReader struct { + stream chan types.InlineAgentResponseStream + decoder *eventstream.Decoder + eventStream io.ReadCloser + err *smithysync.OnceErr + payloadBuf []byte + done chan struct{} + closeOnce sync.Once +} + +func newInlineAgentResponseStreamReader(readCloser io.ReadCloser, decoder *eventstream.Decoder) *inlineAgentResponseStreamReader { + w := &inlineAgentResponseStreamReader{ + stream: make(chan types.InlineAgentResponseStream), + decoder: decoder, + eventStream: readCloser, + err: smithysync.NewOnceErr(), + done: make(chan struct{}), + payloadBuf: make([]byte, 10*1024), + } + + go w.readEventStream() + + return w +} + +func (r *inlineAgentResponseStreamReader) Events() <-chan types.InlineAgentResponseStream { + return r.stream +} + +func (r *inlineAgentResponseStreamReader) 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 *inlineAgentResponseStreamReader) deserializeEventMessage(msg *eventstream.Message) (types.InlineAgentResponseStream, 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.InlineAgentResponseStream + if err := awsRestjson1_deserializeEventStreamInlineAgentResponseStream(&v, msg); err != nil { + return nil, err + } + return v, nil + + case eventstreamapi.ExceptionMessageType: + return nil, awsRestjson1_deserializeEventStreamExceptionInlineAgentResponseStream(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 *inlineAgentResponseStreamReader) ErrorSet() <-chan struct{} { + return r.err.ErrorSet() +} + +func (r *inlineAgentResponseStreamReader) Close() error { + r.closeOnce.Do(r.safeClose) + return r.Err() +} + +func (r *inlineAgentResponseStreamReader) safeClose() { + close(r.done) + r.eventStream.Close() + +} + +func (r *inlineAgentResponseStreamReader) Err() error { + return r.err.Err() +} + +func (r *inlineAgentResponseStreamReader) Closed() <-chan struct{} { + return r.done +} + type flowResponseStreamReader struct { stream chan types.FlowResponseStream decoder *eventstream.Decoder @@ -607,6 +745,94 @@ func addEventStreamInvokeFlowMiddleware(stack *middleware.Stack, options Options } +type awsRestjson1_deserializeOpEventStreamInvokeInlineAgent struct { + LogEventStreamWrites bool + LogEventStreamReads bool +} + +func (*awsRestjson1_deserializeOpEventStreamInvokeInlineAgent) ID() string { + return "OperationEventStreamDeserializer" +} + +func (m *awsRestjson1_deserializeOpEventStreamInvokeInlineAgent) 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.(*InvokeInlineAgentOutput) + if out.Result != nil && !ok { + return out, metadata, fmt.Errorf("unexpected output result type: %T", out.Result) + } else if out.Result == nil { + output = &InvokeInlineAgentOutput{} + out.Result = output + } + + eventReader := newInlineAgentResponseStreamReader( + 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 = NewInvokeInlineAgentEventStream(func(stream *InvokeInlineAgentEventStream) { + stream.Reader = eventReader + }) + + go output.eventStream.waitStreamClose() + + return out, metadata, nil +} + +func (*awsRestjson1_deserializeOpEventStreamInvokeInlineAgent) 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 addEventStreamInvokeInlineAgentMiddleware(stack *middleware.Stack, options Options) error { + if err := stack.Deserialize.Insert(&awsRestjson1_deserializeOpEventStreamInvokeInlineAgent{ + LogEventStreamWrites: options.ClientLogMode.IsRequestEventMessage(), + LogEventStreamReads: options.ClientLogMode.IsResponseEventMessage(), + }, "OperationDeserializer", middleware.Before); err != nil { + return err + } + return nil + +} + type awsRestjson1_deserializeOpEventStreamOptimizePrompt struct { LogEventStreamWrites bool LogEventStreamReads bool @@ -717,6 +943,10 @@ func setSafeEventStreamClientLogMode(o *Options, operation string) { toggleEventStreamClientLogMode(o, false, true) return + case "InvokeInlineAgent": + toggleEventStreamClientLogMode(o, false, true) + return + case "OptimizePrompt": toggleEventStreamClientLogMode(o, false, true) return diff --git a/service/bedrockagentruntime/generated.json b/service/bedrockagentruntime/generated.json index d171a946f92..0221105ba73 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_InvokeInlineAgent.go", "api_op_OptimizePrompt.go", "api_op_Retrieve.go", "api_op_RetrieveAndGenerate.go", diff --git a/service/bedrockagentruntime/serializers.go b/service/bedrockagentruntime/serializers.go index 64ae87184ab..544f4e1823b 100644 --- a/service/bedrockagentruntime/serializers.go +++ b/service/bedrockagentruntime/serializers.go @@ -442,6 +442,165 @@ func awsRestjson1_serializeOpDocumentInvokeFlowInput(v *InvokeFlowInput, value s return nil } +type awsRestjson1_serializeOpInvokeInlineAgent struct { +} + +func (*awsRestjson1_serializeOpInvokeInlineAgent) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpInvokeInlineAgent) 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.(*InvokeInlineAgentInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/agents/{sessionId}") + 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_serializeOpHttpBindingsInvokeInlineAgentInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentInvokeInlineAgentInput(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_serializeOpHttpBindingsInvokeInlineAgentInput(v *InvokeInlineAgentInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.SessionId == nil || len(*v.SessionId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member sessionId must not be empty")} + } + if v.SessionId != nil { + if err := encoder.SetURI("sessionId").String(*v.SessionId); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentInvokeInlineAgentInput(v *InvokeInlineAgentInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ActionGroups != nil { + ok := object.Key("actionGroups") + if err := awsRestjson1_serializeDocumentAgentActionGroups(v.ActionGroups, ok); err != nil { + return err + } + } + + if v.CustomerEncryptionKeyArn != nil { + ok := object.Key("customerEncryptionKeyArn") + ok.String(*v.CustomerEncryptionKeyArn) + } + + if v.EnableTrace != nil { + ok := object.Key("enableTrace") + ok.Boolean(*v.EnableTrace) + } + + if v.EndSession != nil { + ok := object.Key("endSession") + ok.Boolean(*v.EndSession) + } + + if v.FoundationModel != nil { + ok := object.Key("foundationModel") + ok.String(*v.FoundationModel) + } + + if v.GuardrailConfiguration != nil { + ok := object.Key("guardrailConfiguration") + if err := awsRestjson1_serializeDocumentGuardrailConfigurationWithArn(v.GuardrailConfiguration, ok); err != nil { + return err + } + } + + if v.IdleSessionTTLInSeconds != nil { + ok := object.Key("idleSessionTTLInSeconds") + ok.Integer(*v.IdleSessionTTLInSeconds) + } + + if v.InlineSessionState != nil { + ok := object.Key("inlineSessionState") + if err := awsRestjson1_serializeDocumentInlineSessionState(v.InlineSessionState, ok); err != nil { + return err + } + } + + if v.InputText != nil { + ok := object.Key("inputText") + ok.String(*v.InputText) + } + + if v.Instruction != nil { + ok := object.Key("instruction") + ok.String(*v.Instruction) + } + + if v.KnowledgeBases != nil { + ok := object.Key("knowledgeBases") + if err := awsRestjson1_serializeDocumentKnowledgeBases(v.KnowledgeBases, ok); err != nil { + return err + } + } + + if v.PromptOverrideConfiguration != nil { + ok := object.Key("promptOverrideConfiguration") + if err := awsRestjson1_serializeDocumentPromptOverrideConfiguration(v.PromptOverrideConfiguration, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpOptimizePrompt struct { } @@ -740,6 +899,26 @@ func awsRestjson1_serializeOpDocumentRetrieveAndGenerateInput(v *RetrieveAndGene return nil } +func awsRestjson1_serializeDocumentActionGroupExecutor(v types.ActionGroupExecutor, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.ActionGroupExecutorMemberCustomControl: + av := object.Key("customControl") + av.String(string(uv.Value)) + + case *types.ActionGroupExecutorMemberLambda: + av := object.Key("lambda") + av.String(uv.Value) + + default: + return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) + + } + return nil +} + func awsRestjson1_serializeDocumentAdditionalModelRequestFields(v map[string]document.Interface, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -771,6 +950,62 @@ func awsRestjson1_serializeDocumentAdditionalModelRequestFieldsValue(v document. return nil } +func awsRestjson1_serializeDocumentAgentActionGroup(v *types.AgentActionGroup, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ActionGroupExecutor != nil { + ok := object.Key("actionGroupExecutor") + if err := awsRestjson1_serializeDocumentActionGroupExecutor(v.ActionGroupExecutor, ok); err != nil { + return err + } + } + + if v.ActionGroupName != nil { + ok := object.Key("actionGroupName") + ok.String(*v.ActionGroupName) + } + + if v.ApiSchema != nil { + ok := object.Key("apiSchema") + if err := awsRestjson1_serializeDocumentAPISchema(v.ApiSchema, ok); err != nil { + return err + } + } + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + if v.FunctionSchema != nil { + ok := object.Key("functionSchema") + if err := awsRestjson1_serializeDocumentFunctionSchema(v.FunctionSchema, ok); err != nil { + return err + } + } + + if len(v.ParentActionGroupSignature) > 0 { + ok := object.Key("parentActionGroupSignature") + ok.String(string(v.ParentActionGroupSignature)) + } + + return nil +} + +func awsRestjson1_serializeDocumentAgentActionGroups(v []types.AgentActionGroup, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentAgentActionGroup(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocumentApiResult(v *types.ApiResult, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -815,6 +1050,28 @@ func awsRestjson1_serializeDocumentApiResult(v *types.ApiResult, value smithyjso return nil } +func awsRestjson1_serializeDocumentAPISchema(v types.APISchema, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.APISchemaMemberPayload: + av := object.Key("payload") + av.String(uv.Value) + + case *types.APISchemaMemberS3: + av := object.Key("s3") + if err := awsRestjson1_serializeDocumentS3Identifier(&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_serializeDocumentByteContentDoc(v *types.ByteContentDoc, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1081,6 +1338,35 @@ func awsRestjson1_serializeDocumentFlowInputs(v []types.FlowInput, value smithyj return nil } +func awsRestjson1_serializeDocumentFunctionDefinition(v *types.FunctionDefinition, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + 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.Parameters != nil { + ok := object.Key("parameters") + if err := awsRestjson1_serializeDocumentParameterMap(v.Parameters, ok); err != nil { + return err + } + } + + if len(v.RequireConfirmation) > 0 { + ok := object.Key("requireConfirmation") + ok.String(string(v.RequireConfirmation)) + } + + return nil +} + func awsRestjson1_serializeDocumentFunctionResult(v *types.FunctionResult, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1115,6 +1401,37 @@ func awsRestjson1_serializeDocumentFunctionResult(v *types.FunctionResult, value return nil } +func awsRestjson1_serializeDocumentFunctions(v []types.FunctionDefinition, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentFunctionDefinition(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentFunctionSchema(v types.FunctionSchema, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.FunctionSchemaMemberFunctions: + av := object.Key("functions") + if err := awsRestjson1_serializeDocumentFunctions(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_serializeDocumentGenerationConfiguration(v *types.GenerationConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1167,6 +1484,23 @@ func awsRestjson1_serializeDocumentGuardrailConfiguration(v *types.GuardrailConf return nil } +func awsRestjson1_serializeDocumentGuardrailConfigurationWithArn(v *types.GuardrailConfigurationWithArn, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.GuardrailIdentifier != nil { + ok := object.Key("guardrailIdentifier") + ok.String(*v.GuardrailIdentifier) + } + + if v.GuardrailVersion != nil { + ok := object.Key("guardrailVersion") + ok.String(*v.GuardrailVersion) + } + + return nil +} + func awsRestjson1_serializeDocumentInferenceConfig(v *types.InferenceConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1181,6 +1515,106 @@ func awsRestjson1_serializeDocumentInferenceConfig(v *types.InferenceConfig, val return nil } +func awsRestjson1_serializeDocumentInferenceConfiguration(v *types.InferenceConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaximumLength != nil { + ok := object.Key("maximumLength") + ok.Integer(*v.MaximumLength) + } + + if v.StopSequences != nil { + ok := object.Key("stopSequences") + if err := awsRestjson1_serializeDocumentStopSequences(v.StopSequences, ok); err != nil { + return err + } + } + + if v.Temperature != nil { + ok := object.Key("temperature") + switch { + case math.IsNaN(float64(*v.Temperature)): + ok.String("NaN") + + case math.IsInf(float64(*v.Temperature), 1): + ok.String("Infinity") + + case math.IsInf(float64(*v.Temperature), -1): + ok.String("-Infinity") + + default: + ok.Float(*v.Temperature) + + } + } + + if v.TopK != nil { + ok := object.Key("topK") + ok.Integer(*v.TopK) + } + + if v.TopP != nil { + ok := object.Key("topP") + switch { + case math.IsNaN(float64(*v.TopP)): + ok.String("NaN") + + case math.IsInf(float64(*v.TopP), 1): + ok.String("Infinity") + + case math.IsInf(float64(*v.TopP), -1): + ok.String("-Infinity") + + default: + ok.Float(*v.TopP) + + } + } + + return nil +} + +func awsRestjson1_serializeDocumentInlineSessionState(v *types.InlineSessionState, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Files != nil { + ok := object.Key("files") + if err := awsRestjson1_serializeDocumentInputFiles(v.Files, ok); err != nil { + return err + } + } + + if v.InvocationId != nil { + ok := object.Key("invocationId") + ok.String(*v.InvocationId) + } + + if v.PromptSessionAttributes != nil { + ok := object.Key("promptSessionAttributes") + if err := awsRestjson1_serializeDocumentPromptSessionAttributesMap(v.PromptSessionAttributes, ok); err != nil { + return err + } + } + + if v.ReturnControlInvocationResults != nil { + ok := object.Key("returnControlInvocationResults") + if err := awsRestjson1_serializeDocumentReturnControlInvocationResults(v.ReturnControlInvocationResults, ok); err != nil { + return err + } + } + + if v.SessionAttributes != nil { + ok := object.Key("sessionAttributes") + if err := awsRestjson1_serializeDocumentSessionAttributesMap(v.SessionAttributes, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentInputFile(v *types.InputFile, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1260,6 +1694,30 @@ func awsRestjson1_serializeDocumentInvocationResultMember(v types.InvocationResu return nil } +func awsRestjson1_serializeDocumentKnowledgeBase(v *types.KnowledgeBase, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + if v.KnowledgeBaseId != nil { + ok := object.Key("knowledgeBaseId") + ok.String(*v.KnowledgeBaseId) + } + + if v.RetrievalConfiguration != nil { + ok := object.Key("retrievalConfiguration") + if err := awsRestjson1_serializeDocumentKnowledgeBaseRetrievalConfiguration(v.RetrievalConfiguration, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentKnowledgeBaseConfiguration(v *types.KnowledgeBaseConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1356,6 +1814,19 @@ func awsRestjson1_serializeDocumentKnowledgeBaseRetrieveAndGenerateConfiguration return nil } +func awsRestjson1_serializeDocumentKnowledgeBases(v []types.KnowledgeBase, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentKnowledgeBase(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocumentKnowledgeBaseVectorSearchConfiguration(v *types.KnowledgeBaseVectorSearchConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1415,6 +1886,113 @@ func awsRestjson1_serializeDocumentOrchestrationConfiguration(v *types.Orchestra return nil } +func awsRestjson1_serializeDocumentParameterDetail(v *types.ParameterDetail, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + if v.Required != nil { + ok := object.Key("required") + ok.Boolean(*v.Required) + } + + if len(v.Type) > 0 { + ok := object.Key("type") + ok.String(string(v.Type)) + } + + return nil +} + +func awsRestjson1_serializeDocumentParameterMap(v map[string]types.ParameterDetail, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + mapVar := v[key] + if err := awsRestjson1_serializeDocumentParameterDetail(&mapVar, om); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentPromptConfiguration(v *types.PromptConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BasePromptTemplate != nil { + ok := object.Key("basePromptTemplate") + ok.String(*v.BasePromptTemplate) + } + + if v.InferenceConfiguration != nil { + ok := object.Key("inferenceConfiguration") + if err := awsRestjson1_serializeDocumentInferenceConfiguration(v.InferenceConfiguration, ok); err != nil { + return err + } + } + + if len(v.ParserMode) > 0 { + ok := object.Key("parserMode") + ok.String(string(v.ParserMode)) + } + + if len(v.PromptCreationMode) > 0 { + ok := object.Key("promptCreationMode") + ok.String(string(v.PromptCreationMode)) + } + + if len(v.PromptState) > 0 { + ok := object.Key("promptState") + ok.String(string(v.PromptState)) + } + + if len(v.PromptType) > 0 { + ok := object.Key("promptType") + ok.String(string(v.PromptType)) + } + + return nil +} + +func awsRestjson1_serializeDocumentPromptConfigurations(v []types.PromptConfiguration, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentPromptConfiguration(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentPromptOverrideConfiguration(v *types.PromptOverrideConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.OverrideLambda != nil { + ok := object.Key("overrideLambda") + ok.String(*v.OverrideLambda) + } + + if v.PromptConfigurations != nil { + ok := object.Key("promptConfigurations") + if err := awsRestjson1_serializeDocumentPromptConfigurations(v.PromptConfigurations, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentPromptSessionAttributesMap(v map[string]string, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1647,6 +2225,23 @@ func awsRestjson1_serializeDocumentReturnControlInvocationResults(v []types.Invo return nil } +func awsRestjson1_serializeDocumentS3Identifier(v *types.S3Identifier, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.S3BucketName != nil { + ok := object.Key("s3BucketName") + ok.String(*v.S3BucketName) + } + + if v.S3ObjectKey != nil { + ok := object.Key("s3ObjectKey") + ok.String(*v.S3ObjectKey) + } + + return nil +} + func awsRestjson1_serializeDocumentS3ObjectDoc(v *types.S3ObjectDoc, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1729,6 +2324,17 @@ func awsRestjson1_serializeDocumentSessionState(v *types.SessionState, value smi return nil } +func awsRestjson1_serializeDocumentStopSequences(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_serializeDocumentTextInferenceConfig(v *types.TextInferenceConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/bedrockagentruntime/snapshot/api_op_InvokeInlineAgent.go.snap b/service/bedrockagentruntime/snapshot/api_op_InvokeInlineAgent.go.snap new file mode 100644 index 00000000000..4de6073bde6 --- /dev/null +++ b/service/bedrockagentruntime/snapshot/api_op_InvokeInlineAgent.go.snap @@ -0,0 +1,40 @@ +InvokeInlineAgent + 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 cab96f87ed5..7b9e2762a5c 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_InvokeInlineAgent(t *testing.T) { + svc := New(Options{}) + _, err := svc.InvokeInlineAgent(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "InvokeInlineAgent") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_OptimizePrompt(t *testing.T) { svc := New(Options{}) _, err := svc.OptimizePrompt(context.Background(), nil, func(o *Options) { @@ -193,6 +205,18 @@ func TestUpdateSnapshot_InvokeFlow(t *testing.T) { } } +func TestUpdateSnapshot_InvokeInlineAgent(t *testing.T) { + svc := New(Options{}) + _, err := svc.InvokeInlineAgent(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "InvokeInlineAgent") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_OptimizePrompt(t *testing.T) { svc := New(Options{}) _, err := svc.OptimizePrompt(context.Background(), nil, func(o *Options) { diff --git a/service/bedrockagentruntime/types/enums.go b/service/bedrockagentruntime/types/enums.go index 0b6be7687ef..cdc926d7c1e 100644 --- a/service/bedrockagentruntime/types/enums.go +++ b/service/bedrockagentruntime/types/enums.go @@ -2,6 +2,25 @@ package types +type ActionGroupSignature string + +// Enum values for ActionGroupSignature +const ( + ActionGroupSignatureAmazonUserinput ActionGroupSignature = "AMAZON.UserInput" + ActionGroupSignatureAmazonCodeinterpreter ActionGroupSignature = "AMAZON.CodeInterpreter" +) + +// Values returns all known values for ActionGroupSignature. 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 (ActionGroupSignature) Values() []ActionGroupSignature { + return []ActionGroupSignature{ + "AMAZON.UserInput", + "AMAZON.CodeInterpreter", + } +} + type ActionInvocationType string // Enum values for ActionInvocationType @@ -61,6 +80,23 @@ func (CreationMode) Values() []CreationMode { } } +type CustomControlMethod string + +// Enum values for CustomControlMethod +const ( + CustomControlMethodReturnControl CustomControlMethod = "RETURN_CONTROL" +) + +// Values returns all known values for CustomControlMethod. 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 (CustomControlMethod) Values() []CustomControlMethod { + return []CustomControlMethod{ + "RETURN_CONTROL", + } +} + type ExecutionType string // Enum values for ExecutionType @@ -495,6 +531,50 @@ func (NodeType) Values() []NodeType { } } +type ParameterType string + +// Enum values for ParameterType +const ( + ParameterTypeString ParameterType = "string" + ParameterTypeNumber ParameterType = "number" + ParameterTypeInteger ParameterType = "integer" + ParameterTypeBoolean ParameterType = "boolean" + ParameterTypeArray ParameterType = "array" +) + +// Values returns all known values for ParameterType. 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 (ParameterType) Values() []ParameterType { + return []ParameterType{ + "string", + "number", + "integer", + "boolean", + "array", + } +} + +type PromptState string + +// Enum values for PromptState +const ( + PromptStateEnabled PromptState = "ENABLED" + PromptStateDisabled PromptState = "DISABLED" +) + +// Values returns all known values for PromptState. 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 (PromptState) Values() []PromptState { + return []PromptState{ + "ENABLED", + "DISABLED", + } +} + type PromptType string // Enum values for PromptType @@ -503,6 +583,7 @@ const ( PromptTypeOrchestration PromptType = "ORCHESTRATION" PromptTypeKnowledgeBaseResponseGeneration PromptType = "KNOWLEDGE_BASE_RESPONSE_GENERATION" PromptTypePostProcessing PromptType = "POST_PROCESSING" + PromptTypeRoutingClassifier PromptType = "ROUTING_CLASSIFIER" ) // Values returns all known values for PromptType. Note that this can be expanded @@ -515,6 +596,7 @@ func (PromptType) Values() []PromptType { "ORCHESTRATION", "KNOWLEDGE_BASE_RESPONSE_GENERATION", "POST_PROCESSING", + "ROUTING_CLASSIFIER", } } @@ -535,6 +617,25 @@ func (QueryTransformationType) Values() []QueryTransformationType { } } +type RequireConfirmation string + +// Enum values for RequireConfirmation +const ( + RequireConfirmationEnabled RequireConfirmation = "ENABLED" + RequireConfirmationDisabled RequireConfirmation = "DISABLED" +) + +// Values returns all known values for RequireConfirmation. 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 (RequireConfirmation) Values() []RequireConfirmation { + return []RequireConfirmation{ + "ENABLED", + "DISABLED", + } +} + type ResponseState string // Enum values for ResponseState diff --git a/service/bedrockagentruntime/types/types.go b/service/bedrockagentruntime/types/types.go index ad423dc3959..7f37af53186 100644 --- a/service/bedrockagentruntime/types/types.go +++ b/service/bedrockagentruntime/types/types.go @@ -8,6 +8,41 @@ import ( "time" ) +// Contains details about the Lambda function containing the business logic that +// +// is carried out upon invoking the action or the custom control method for +// handling the information elicited from the user. +// +// The following types satisfy this interface: +// +// ActionGroupExecutorMemberCustomControl +// ActionGroupExecutorMemberLambda +type ActionGroupExecutor interface { + isActionGroupExecutor() +} + +// To return the action group invocation results directly in the InvokeInlineAgent +// +// response, specify RETURN_CONTROL . +type ActionGroupExecutorMemberCustomControl struct { + Value CustomControlMethod + + noSmithyDocumentSerde +} + +func (*ActionGroupExecutorMemberCustomControl) isActionGroupExecutor() {} + +// The Amazon Resource Name (ARN) of the Lambda function containing the business +// +// logic that is carried out upon invoking the action. +type ActionGroupExecutorMemberLambda struct { + Value string + + noSmithyDocumentSerde +} + +func (*ActionGroupExecutorMemberLambda) isActionGroupExecutor() {} + // 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]. // @@ -55,6 +90,54 @@ type ActionGroupInvocationOutput struct { noSmithyDocumentSerde } +// Contains details of the inline agent's action group. +type AgentActionGroup struct { + + // The name of the action group. + // + // This member is required. + ActionGroupName *string + + // The Amazon Resource Name (ARN) of the Lambda function containing the business + // logic that is carried out upon invoking the action or the custom control method + // for handling the information elicited from the user. + ActionGroupExecutor ActionGroupExecutor + + // Contains either details about the S3 object containing the OpenAPI schema for + // the action group or the JSON or YAML-formatted payload defining the schema. For + // more information, see [Action group OpenAPI schemas]. + // + // [Action group OpenAPI schemas]: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-api-schema.html + ApiSchema APISchema + + // A description of the action group. + Description *string + + // Contains details about the function schema for the action group or the JSON or + // YAML-formatted payload defining the schema. + FunctionSchema FunctionSchema + + // To allow your agent to request the user for additional information when trying + // to complete a task, set this field to AMAZON.UserInput . You must leave the + // description , apiSchema , and actionGroupExecutor fields blank for this action + // group. + // + // To allow your agent to generate, run, and troubleshoot code when trying to + // complete a task, set this field to AMAZON.CodeInterpreter . You must leave the + // description , apiSchema , and actionGroupExecutor fields blank for this action + // group. + // + // During orchestration, if your agent determines that it needs to invoke an API + // in an action group, but doesn't have enough information to complete the API + // request, it will invoke this action group instead and return an [Observation]reprompting the + // user for more information. + // + // [Observation]: https://docs.aws.amazon.com/https:/docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Observation.html + ParentActionGroupSignature ActionGroupSignature + + noSmithyDocumentSerde +} + // An event in which the prompt was analyzed in preparation for optimization. type AnalyzePromptEvent struct { @@ -179,6 +262,44 @@ type ApiResult struct { noSmithyDocumentSerde } +// Contains details about the OpenAPI schema for the action group. For more +// +// information, see [Action group OpenAPI schemas]. You can either include the schema directly in the payload +// field or you can upload it to an S3 bucket and specify the S3 bucket location in +// the s3 field. +// +// The following types satisfy this interface: +// +// APISchemaMemberPayload +// APISchemaMemberS3 +// +// [Action group OpenAPI schemas]: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-api-schema.html +type APISchema interface { + isAPISchema() +} + +// The JSON or YAML-formatted payload defining the OpenAPI schema for the action +// +// group. +type APISchemaMemberPayload struct { + Value string + + noSmithyDocumentSerde +} + +func (*APISchemaMemberPayload) isAPISchema() {} + +// Contains details about the S3 object containing the OpenAPI schema for the +// +// action group. +type APISchemaMemberS3 struct { + Value S3Identifier + + noSmithyDocumentSerde +} + +func (*APISchemaMemberS3) isAPISchema() {} + // Contains citations for a part of an agent response. type Attribution struct { @@ -777,6 +898,28 @@ type FlowTraceNodeOutputField struct { noSmithyDocumentSerde } +// Defines parameters that the agent needs to invoke from the user to complete +// +// the function. Corresponds to an action in an action group. +type FunctionDefinition struct { + + // A name for the function. + // + // This member is required. + Name *string + + // A description of the function and its purpose. + Description *string + + // The parameters that the agent elicits from the user to fulfill the function. + Parameters map[string]ParameterDetail + + // Contains information if user confirmation is required to invoke the function. + RequireConfirmation RequireConfirmation + + noSmithyDocumentSerde +} + // Contains information about the function that the agent predicts should be // called. // @@ -860,6 +1003,26 @@ type FunctionResult struct { noSmithyDocumentSerde } +// Contains details about the function schema for the action group or the JSON or +// +// YAML-formatted payload defining the schema. +// +// The following types satisfy this interface: +// +// FunctionSchemaMemberFunctions +type FunctionSchema interface { + isFunctionSchema() +} + +// A list of functions that each define an action in the action group. +type FunctionSchemaMemberFunctions struct { + Value []FunctionDefinition + + noSmithyDocumentSerde +} + +func (*FunctionSchemaMemberFunctions) isFunctionSchema() {} + // Contains metadata about a part of the generated response that is accompanied by // a citation. // @@ -948,6 +1111,22 @@ type GuardrailConfiguration struct { noSmithyDocumentSerde } +// The configuration details for the guardrail. +type GuardrailConfigurationWithArn struct { + + // The unique identifier for the guardrail. + // + // This member is required. + GuardrailIdentifier *string + + // The version of the guardrail. + // + // This member is required. + GuardrailVersion *string + + noSmithyDocumentSerde +} + // Details of the content filter used in the Guardrail. type GuardrailContentFilter struct { @@ -1153,6 +1332,170 @@ type InferenceConfiguration struct { noSmithyDocumentSerde } +// Contains intermediate response for code interpreter if any files have been +// generated. +type InlineAgentFilePart struct { + + // Files containing intermediate response for the user. + Files []OutputFile + + noSmithyDocumentSerde +} + +// Contains a part of an agent response and citations for it. +type InlineAgentPayloadPart struct { + + // Contains citations for a part of an agent response. + Attribution *Attribution + + // A part of the agent response in bytes. + Bytes []byte + + noSmithyDocumentSerde +} + +// The response from invoking the agent and associated citations and trace +// information. +// +// The following types satisfy this interface: +// +// InlineAgentResponseStreamMemberChunk +// InlineAgentResponseStreamMemberFiles +// InlineAgentResponseStreamMemberReturnControl +// InlineAgentResponseStreamMemberTrace +type InlineAgentResponseStream interface { + isInlineAgentResponseStream() +} + +// Contains a part of an agent response and citations for it. +type InlineAgentResponseStreamMemberChunk struct { + Value InlineAgentPayloadPart + + noSmithyDocumentSerde +} + +func (*InlineAgentResponseStreamMemberChunk) isInlineAgentResponseStream() {} + +// Contains intermediate response for code interpreter if any files have been +// generated. +type InlineAgentResponseStreamMemberFiles struct { + Value InlineAgentFilePart + + noSmithyDocumentSerde +} + +func (*InlineAgentResponseStreamMemberFiles) isInlineAgentResponseStream() {} + +// Contains the parameters and information that the agent elicited from the +// customer to carry out an action. This information is returned to the system and +// can be used in your own setup for fulfilling the action. +type InlineAgentResponseStreamMemberReturnControl struct { + Value InlineAgentReturnControlPayload + + noSmithyDocumentSerde +} + +func (*InlineAgentResponseStreamMemberReturnControl) isInlineAgentResponseStream() {} + +// Contains information about the agent and session, alongside the agent's +// reasoning process and results from calling actions and querying knowledge bases +// and metadata about the trace. You can use the trace to understand how the agent +// arrived at the response it provided the customer. For more information, see [Trace events]. +// +// [Trace events]: https://docs.aws.amazon.com/bedrock/latest/userguide/trace-events.html +type InlineAgentResponseStreamMemberTrace struct { + Value InlineAgentTracePart + + noSmithyDocumentSerde +} + +func (*InlineAgentResponseStreamMemberTrace) isInlineAgentResponseStream() {} + +// Contains information to return from the action group that the agent has +// predicted to invoke. +// +// This data type is used in the [InvokeAgent response] API operation. +// +// [InvokeAgent response]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeAgent.html#API_agent-runtime_InvokeAgent_ResponseSyntax +type InlineAgentReturnControlPayload struct { + + // The identifier of the action group invocation. + InvocationId *string + + // A list of objects that contain information about the parameters and inputs that + // need to be sent into the API operation or function, based on what the agent + // determines from its session with the user. + InvocationInputs []InvocationInputMember + + noSmithyDocumentSerde +} + +// Contains information about the agent and session, alongside the agent's +// reasoning process and results from calling API actions and querying knowledge +// bases and metadata about the trace. You can use the trace to understand how the +// agent arrived at the response it provided the customer. For more information, +// see [Trace enablement]. +// +// [Trace enablement]: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-test.html#trace-enablement +type InlineAgentTracePart struct { + + // The unique identifier of the session with the agent. + SessionId *string + + // Contains one part of the agent's reasoning process and results from calling API + // actions and querying knowledge bases. You can use the trace to understand how + // the agent arrived at the response it provided the customer. For more + // information, see [Trace enablement]. + // + // [Trace enablement]: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-test.html#trace-enablement + Trace Trace + + noSmithyDocumentSerde +} + +// Contains parameters that specify various attributes that persist across a +// +// session or prompt. You can define session state attributes as key-value pairs +// when writing a [Lambda function]for an action group or pass them when making an InvokeInlineAgent +// request. Use session state attributes to control and provide conversational +// context for your inline agent and to help customize your agent's behavior. For +// more information, see [Control session context] +// +// [Control session context]: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-session-state.html +// [Lambda function]: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-lambda.html +type InlineSessionState struct { + + // Contains information about the files used by code interpreter. + Files []InputFile + + // The identifier of the invocation of an action. This value must match the + // invocationId returned in the InvokeInlineAgent response for the action whose + // results are provided in the returnControlInvocationResults field. For more + // information, see [Return control to the agent developer]. + // + // [Return control to the agent developer]: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-returncontrol.html + InvocationId *string + + // Contains attributes that persist across a session and the values of those + // attributes. + PromptSessionAttributes map[string]string + + // Contains information about the results from the action group invocation. For + // more information, see [Return control to the agent developer]. + // + // If you include this field in the sessionState field, the inputText field will + // be ignored. + // + // [Return control to the agent developer]: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-returncontrol.html + ReturnControlInvocationResults []InvocationResultMember + + // Contains attributes that persist across a session and the values of those + // attributes. + SessionAttributes map[string]string + + noSmithyDocumentSerde +} + // Contains details of the source files. type InputFile struct { @@ -1287,6 +1630,28 @@ type InvocationResultMemberMemberFunctionResult struct { func (*InvocationResultMemberMemberFunctionResult) isInvocationResultMember() {} +// Details of the knowledge base associated withe inline agent. +type KnowledgeBase struct { + + // The description of the knowledge base associated with the inline agent. + // + // This member is required. + Description *string + + // The unique identifier for a knowledge base associated with the inline agent. + // + // This member is required. + KnowledgeBaseId *string + + // The configurations to apply to the knowledge base during query. For more + // information, see [Query configurations]. + // + // [Query configurations]: https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html + RetrievalConfiguration *KnowledgeBaseRetrievalConfiguration + + noSmithyDocumentSerde +} + // Configurations to apply to a knowledge base attached to the agent during query. // For more information, see [Knowledge base retrieval configurations]. // @@ -1820,6 +2185,25 @@ type Parameter struct { noSmithyDocumentSerde } +// Contains details about a parameter in a function for an action group. +type ParameterDetail struct { + + // The data type of the parameter. + // + // This member is required. + Type ParameterType + + // A description of the parameter. Helps the foundation model determine how to + // elicit the parameters from the user. + Description *string + + // Whether the parameter is required for the agent to complete the function for + // action group invocation. + Required *bool + + noSmithyDocumentSerde +} + // Contains a part of an agent response and citations for it. type PayloadPart struct { @@ -1972,6 +2356,86 @@ type PreProcessingTraceMemberModelInvocationOutput struct { func (*PreProcessingTraceMemberModelInvocationOutput) isPreProcessingTrace() {} +// Contains configurations to override a prompt template in one part of an agent +// +// sequence. For more information, see [Advanced prompts]. +// +// [Advanced prompts]: https://docs.aws.amazon.com/bedrock/latest/userguide/advanced-prompts.html +type PromptConfiguration struct { + + // Defines the prompt template with which to replace the default prompt template. + // You can use placeholder variables in the base prompt template to customize the + // prompt. For more information, see [Prompt template placeholder variables]. For more information, see [Configure the prompt templates]. + // + // [Configure the prompt templates]: https://docs.aws.amazon.com/bedrock/latest/userguide/advanced-prompts-configure.html + // [Prompt template placeholder variables]: https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-placeholders.html + BasePromptTemplate *string + + // Contains inference parameters to use when the agent invokes a foundation model + // in the part of the agent sequence defined by the promptType . For more + // information, see [Inference parameters for foundation models]. + // + // [Inference parameters for foundation models]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html + InferenceConfiguration *InferenceConfiguration + + // Specifies whether to override the default parser Lambda function when parsing + // the raw foundation model output in the part of the agent sequence defined by the + // promptType . If you set the field as OVERRIDEN , the overrideLambda field in + // the [PromptOverrideConfiguration]must be specified with the ARN of a Lambda function. + // + // [PromptOverrideConfiguration]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_PromptOverrideConfiguration.html + ParserMode CreationMode + + // Specifies whether to override the default prompt template for this promptType . + // Set this value to OVERRIDDEN to use the prompt that you provide in the + // basePromptTemplate . If you leave it as DEFAULT , the agent uses a default + // prompt template. + PromptCreationMode CreationMode + + // Specifies whether to allow the inline agent to carry out the step specified in + // the promptType . If you set this value to DISABLED , the agent skips that step. + // The default state for each promptType is as follows. + // + // - PRE_PROCESSING – ENABLED + // + // - ORCHESTRATION – ENABLED + // + // - KNOWLEDGE_BASE_RESPONSE_GENERATION – ENABLED + // + // - POST_PROCESSING – DISABLED + PromptState PromptState + + // The step in the agent sequence that this prompt configuration applies to. + PromptType PromptType + + noSmithyDocumentSerde +} + +// Contains configurations to override prompts in different parts of an agent +// sequence. For more information, see [Advanced prompts]. +// +// [Advanced prompts]: https://docs.aws.amazon.com/bedrock/latest/userguide/advanced-prompts.html +type PromptOverrideConfiguration struct { + + // Contains configurations to override a prompt template in one part of an agent + // sequence. For more information, see [Advanced prompts]. + // + // [Advanced prompts]: https://docs.aws.amazon.com/bedrock/latest/userguide/advanced-prompts.html + // + // This member is required. + PromptConfigurations []PromptConfiguration + + // The ARN of the Lambda function to use when parsing the raw foundation model + // output in parts of the agent sequence. If you specify this field, at least one + // of the promptConfigurations must contain a parserMode value that is set to + // OVERRIDDEN . For more information, see [Parser Lambda function in Amazon Bedrock Agents]. + // + // [Parser Lambda function in Amazon Bedrock Agents]: https://docs.aws.amazon.com/bedrock/latest/userguide/lambda-parser.html + OverrideLambda *string + + noSmithyDocumentSerde +} + // Contains the template for the prompt that's sent to the model for response // generation. For more information, see [Knowledge base prompt templates]. // @@ -2623,6 +3087,18 @@ type ReturnControlPayload struct { noSmithyDocumentSerde } +// The identifier information for an Amazon S3 bucket. +type S3Identifier struct { + + // The name of the S3 bucket. + S3BucketName *string + + // The S3 object key for the S3 resource. + S3ObjectKey *string + + noSmithyDocumentSerde +} + // The unique wrapper object of the document from the S3 location. type S3ObjectDoc struct { @@ -2914,12 +3390,16 @@ type UnknownUnionMember struct { noSmithyDocumentSerde } +func (*UnknownUnionMember) isActionGroupExecutor() {} +func (*UnknownUnionMember) isAPISchema() {} func (*UnknownUnionMember) isFlowInputContent() {} func (*UnknownUnionMember) isFlowOutputContent() {} func (*UnknownUnionMember) isFlowResponseStream() {} func (*UnknownUnionMember) isFlowTrace() {} func (*UnknownUnionMember) isFlowTraceNodeInputContent() {} func (*UnknownUnionMember) isFlowTraceNodeOutputContent() {} +func (*UnknownUnionMember) isFunctionSchema() {} +func (*UnknownUnionMember) isInlineAgentResponseStream() {} func (*UnknownUnionMember) isInputPrompt() {} func (*UnknownUnionMember) isInvocationInputMember() {} func (*UnknownUnionMember) isInvocationResultMember() {} diff --git a/service/bedrockagentruntime/types/types_exported_test.go b/service/bedrockagentruntime/types/types_exported_test.go index 5405569e4d4..7f6073bd230 100644 --- a/service/bedrockagentruntime/types/types_exported_test.go +++ b/service/bedrockagentruntime/types/types_exported_test.go @@ -8,6 +8,50 @@ import ( "github.com/aws/aws-sdk-go-v2/service/bedrockagentruntime/types" ) +func ExampleActionGroupExecutor_outputUsage() { + var union types.ActionGroupExecutor + // type switches can be used to check the union value + switch v := union.(type) { + case *types.ActionGroupExecutorMemberCustomControl: + _ = v.Value // Value is types.CustomControlMethod + + case *types.ActionGroupExecutorMemberLambda: + _ = v.Value // Value is string + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *string +var _ types.CustomControlMethod + +func ExampleAPISchema_outputUsage() { + var union types.APISchema + // type switches can be used to check the union value + switch v := union.(type) { + case *types.APISchemaMemberPayload: + _ = v.Value // Value is string + + case *types.APISchemaMemberS3: + _ = v.Value // Value is types.S3Identifier + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.S3Identifier +var _ *string + func ExampleFlowInputContent_outputUsage() { var union types.FlowInputContent // type switches can be used to check the union value @@ -132,6 +176,54 @@ func ExampleFlowTraceNodeOutputContent_outputUsage() { var _ document.Interface +func ExampleFunctionSchema_outputUsage() { + var union types.FunctionSchema + // type switches can be used to check the union value + switch v := union.(type) { + case *types.FunctionSchemaMemberFunctions: + _ = v.Value // Value is []types.FunctionDefinition + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ []types.FunctionDefinition + +func ExampleInlineAgentResponseStream_outputUsage() { + var union types.InlineAgentResponseStream + // type switches can be used to check the union value + switch v := union.(type) { + case *types.InlineAgentResponseStreamMemberChunk: + _ = v.Value // Value is types.InlineAgentPayloadPart + + case *types.InlineAgentResponseStreamMemberFiles: + _ = v.Value // Value is types.InlineAgentFilePart + + case *types.InlineAgentResponseStreamMemberReturnControl: + _ = v.Value // Value is types.InlineAgentReturnControlPayload + + case *types.InlineAgentResponseStreamMemberTrace: + _ = v.Value // Value is types.InlineAgentTracePart + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.InlineAgentTracePart +var _ *types.InlineAgentPayloadPart +var _ *types.InlineAgentReturnControlPayload +var _ *types.InlineAgentFilePart + func ExampleInputPrompt_outputUsage() { var union types.InputPrompt // type switches can be used to check the union value diff --git a/service/bedrockagentruntime/validators.go b/service/bedrockagentruntime/validators.go index c2d249022a5..b381bfb02ff 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 validateOpInvokeInlineAgent struct { +} + +func (*validateOpInvokeInlineAgent) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpInvokeInlineAgent) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*InvokeInlineAgentInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpInvokeInlineAgentInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpOptimizePrompt struct { } @@ -166,6 +186,10 @@ func addOpInvokeFlowValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpInvokeFlow{}, middleware.After) } +func addOpInvokeInlineAgentValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpInvokeInlineAgent{}, middleware.After) +} + func addOpOptimizePromptValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpOptimizePrompt{}, middleware.After) } @@ -178,6 +202,43 @@ func addOpRetrieveValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpRetrieve{}, middleware.After) } +func validateAgentActionGroup(v *types.AgentActionGroup) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AgentActionGroup"} + if v.ActionGroupName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ActionGroupName")) + } + if v.FunctionSchema != nil { + if err := validateFunctionSchema(v.FunctionSchema); err != nil { + invalidParams.AddNested("FunctionSchema", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateAgentActionGroups(v []types.AgentActionGroup) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AgentActionGroups"} + for i := range v { + if err := validateAgentActionGroup(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateApiResult(v *types.ApiResult) error { if v == nil { return nil @@ -399,6 +460,26 @@ func validateFlowInputs(v []types.FlowInput) error { } } +func validateFunctionDefinition(v *types.FunctionDefinition) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "FunctionDefinition"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Parameters != nil { + if err := validateParameterMap(v.Parameters); err != nil { + invalidParams.AddNested("Parameters", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateFunctionResult(v *types.FunctionResult) error { if v == nil { return nil @@ -414,6 +495,42 @@ func validateFunctionResult(v *types.FunctionResult) error { } } +func validateFunctions(v []types.FunctionDefinition) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Functions"} + for i := range v { + if err := validateFunctionDefinition(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateFunctionSchema(v types.FunctionSchema) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "FunctionSchema"} + switch uv := v.(type) { + case *types.FunctionSchemaMemberFunctions: + if err := validateFunctions(uv.Value); err != nil { + invalidParams.AddNested("[functions]", err.(smithy.InvalidParamsError)) + } + + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateGenerationConfiguration(v *types.GenerationConfiguration) error { if v == nil { return nil @@ -449,6 +566,46 @@ func validateGuardrailConfiguration(v *types.GuardrailConfiguration) error { } } +func validateGuardrailConfigurationWithArn(v *types.GuardrailConfigurationWithArn) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GuardrailConfigurationWithArn"} + if v.GuardrailIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("GuardrailIdentifier")) + } + if v.GuardrailVersion == nil { + invalidParams.Add(smithy.NewErrParamRequired("GuardrailVersion")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateInlineSessionState(v *types.InlineSessionState) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "InlineSessionState"} + if v.ReturnControlInvocationResults != nil { + if err := validateReturnControlInvocationResults(v.ReturnControlInvocationResults); err != nil { + invalidParams.AddNested("ReturnControlInvocationResults", err.(smithy.InvalidParamsError)) + } + } + if v.Files != nil { + if err := validateInputFiles(v.Files); err != nil { + invalidParams.AddNested("Files", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateInputFile(v *types.InputFile) error { if v == nil { return nil @@ -534,6 +691,29 @@ func validateInvocationResultMember(v types.InvocationResultMember) error { } } +func validateKnowledgeBase(v *types.KnowledgeBase) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "KnowledgeBase"} + if v.KnowledgeBaseId == nil { + invalidParams.Add(smithy.NewErrParamRequired("KnowledgeBaseId")) + } + if v.Description == nil { + invalidParams.Add(smithy.NewErrParamRequired("Description")) + } + if v.RetrievalConfiguration != nil { + if err := validateKnowledgeBaseRetrievalConfiguration(v.RetrievalConfiguration); err != nil { + invalidParams.AddNested("RetrievalConfiguration", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateKnowledgeBaseConfiguration(v *types.KnowledgeBaseConfiguration) error { if v == nil { return nil @@ -640,6 +820,23 @@ func validateKnowledgeBaseRetrieveAndGenerateConfiguration(v *types.KnowledgeBas } } +func validateKnowledgeBases(v []types.KnowledgeBase) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "KnowledgeBases"} + for i := range v { + if err := validateKnowledgeBase(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateKnowledgeBaseVectorSearchConfiguration(v *types.KnowledgeBaseVectorSearchConfiguration) error { if v == nil { return nil @@ -674,6 +871,54 @@ func validateOrchestrationConfiguration(v *types.OrchestrationConfiguration) err } } +func validateParameterDetail(v *types.ParameterDetail) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ParameterDetail"} + if len(v.Type) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Type")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateParameterMap(v map[string]types.ParameterDetail) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ParameterMap"} + for key := range v { + value := v[key] + if err := validateParameterDetail(&value); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%q]", key), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validatePromptOverrideConfiguration(v *types.PromptOverrideConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PromptOverrideConfiguration"} + if v.PromptConfigurations == nil { + invalidParams.Add(smithy.NewErrParamRequired("PromptConfigurations")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateQueryTransformationConfiguration(v *types.QueryTransformationConfiguration) error { if v == nil { return nil @@ -1022,6 +1267,52 @@ func validateOpInvokeFlowInput(v *InvokeFlowInput) error { } } +func validateOpInvokeInlineAgentInput(v *InvokeInlineAgentInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "InvokeInlineAgentInput"} + if v.SessionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("SessionId")) + } + if v.InlineSessionState != nil { + if err := validateInlineSessionState(v.InlineSessionState); err != nil { + invalidParams.AddNested("InlineSessionState", err.(smithy.InvalidParamsError)) + } + } + if v.FoundationModel == nil { + invalidParams.Add(smithy.NewErrParamRequired("FoundationModel")) + } + if v.Instruction == nil { + invalidParams.Add(smithy.NewErrParamRequired("Instruction")) + } + if v.ActionGroups != nil { + if err := validateAgentActionGroups(v.ActionGroups); err != nil { + invalidParams.AddNested("ActionGroups", err.(smithy.InvalidParamsError)) + } + } + if v.KnowledgeBases != nil { + if err := validateKnowledgeBases(v.KnowledgeBases); err != nil { + invalidParams.AddNested("KnowledgeBases", err.(smithy.InvalidParamsError)) + } + } + if v.GuardrailConfiguration != nil { + if err := validateGuardrailConfigurationWithArn(v.GuardrailConfiguration); err != nil { + invalidParams.AddNested("GuardrailConfiguration", err.(smithy.InvalidParamsError)) + } + } + if v.PromptOverrideConfiguration != nil { + if err := validatePromptOverrideConfiguration(v.PromptOverrideConfiguration); err != nil { + invalidParams.AddNested("PromptOverrideConfiguration", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpOptimizePromptInput(v *OptimizePromptInput) error { if v == nil { return nil diff --git a/service/chatbot/api_client.go b/service/chatbot/api_client.go index 4738049603b..9a6486da4f0 100644 --- a/service/chatbot/api_client.go +++ b/service/chatbot/api_client.go @@ -4,6 +4,7 @@ package chatbot import ( "context" + cryptorand "crypto/rand" "errors" "fmt" "github.com/aws/aws-sdk-go-v2/aws" @@ -22,6 +23,7 @@ import ( "github.com/aws/smithy-go/logging" "github.com/aws/smithy-go/metrics" "github.com/aws/smithy-go/middleware" + smithyrand "github.com/aws/smithy-go/rand" "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "net" @@ -184,6 +186,8 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveHTTPSignerV4(&options) + resolveIdempotencyTokenProvider(&options) + resolveEndpointResolverV2(&options) resolveTracerProvider(&options) @@ -679,6 +683,13 @@ func addIsPaginatorUserAgent(o *Options) { }) } +func resolveIdempotencyTokenProvider(o *Options) { + if o.IdempotencyTokenProvider != nil { + return + } + o.IdempotencyTokenProvider = smithyrand.NewUUIDIdempotencyToken(cryptorand.Reader) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -773,6 +784,11 @@ func resolveMeterProvider(options *Options) { } } +// IdempotencyTokenProvider interface for providing idempotency token +type IdempotencyTokenProvider interface { + GetIdempotencyToken() (string, error) +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/chatbot/api_op_AssociateToConfiguration.go b/service/chatbot/api_op_AssociateToConfiguration.go new file mode 100644 index 00000000000..cae435efd15 --- /dev/null +++ b/service/chatbot/api_op_AssociateToConfiguration.go @@ -0,0 +1,157 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chatbot + +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" +) + +// Links a resource (for example, a custom action) to a channel configuration. +func (c *Client) AssociateToConfiguration(ctx context.Context, params *AssociateToConfigurationInput, optFns ...func(*Options)) (*AssociateToConfigurationOutput, error) { + if params == nil { + params = &AssociateToConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "AssociateToConfiguration", params, optFns, c.addOperationAssociateToConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*AssociateToConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type AssociateToConfigurationInput struct { + + // The channel configuration to associate with the resource. + // + // This member is required. + ChatConfiguration *string + + // The resource Amazon Resource Name (ARN) to link. + // + // This member is required. + Resource *string + + noSmithyDocumentSerde +} + +type AssociateToConfigurationOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationAssociateToConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpAssociateToConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpAssociateToConfiguration{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "AssociateToConfiguration"); 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 = addOpAssociateToConfigurationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateToConfiguration(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_opAssociateToConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "AssociateToConfiguration", + } +} diff --git a/service/chatbot/api_op_CreateCustomAction.go b/service/chatbot/api_op_CreateCustomAction.go new file mode 100644 index 00000000000..e7c67262619 --- /dev/null +++ b/service/chatbot/api_op_CreateCustomAction.go @@ -0,0 +1,223 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chatbot + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/chatbot/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a custom action that can be invoked as an alias or as a button on a +// notification. +func (c *Client) CreateCustomAction(ctx context.Context, params *CreateCustomActionInput, optFns ...func(*Options)) (*CreateCustomActionOutput, error) { + if params == nil { + params = &CreateCustomActionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateCustomAction", params, optFns, c.addOperationCreateCustomActionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateCustomActionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateCustomActionInput struct { + + // The name of the custom action. This name is included in the Amazon Resource + // Name (ARN). + // + // This member is required. + ActionName *string + + // The definition of the command to run when invoked as an alias or as an action + // button. + // + // This member is required. + Definition *types.CustomActionDefinition + + // The name used to invoke this action in a chat channel. For example, @aws run + // my-alias . + AliasName *string + + // Defines when this custom action button should be attached to a notification. + Attachments []types.CustomActionAttachment + + // 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 SDK. + ClientToken *string + + // A map of tags assigned to a resource. A tag is a string-to-string map of + // key-value pairs. + Tags []types.Tag + + noSmithyDocumentSerde +} + +type CreateCustomActionOutput struct { + + // The fully defined ARN of the custom action. + // + // This member is required. + CustomActionArn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateCustomActionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateCustomAction{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateCustomAction{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateCustomAction"); 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_opCreateCustomActionMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateCustomActionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateCustomAction(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_initializeOpCreateCustomAction struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateCustomAction) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateCustomAction) 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.(*CreateCustomActionInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateCustomActionInput ") + } + + 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_opCreateCustomActionMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateCustomAction{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateCustomAction(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateCustomAction", + } +} diff --git a/service/chatbot/api_op_DeleteCustomAction.go b/service/chatbot/api_op_DeleteCustomAction.go new file mode 100644 index 00000000000..e9569973184 --- /dev/null +++ b/service/chatbot/api_op_DeleteCustomAction.go @@ -0,0 +1,152 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chatbot + +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 custom action. +func (c *Client) DeleteCustomAction(ctx context.Context, params *DeleteCustomActionInput, optFns ...func(*Options)) (*DeleteCustomActionOutput, error) { + if params == nil { + params = &DeleteCustomActionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteCustomAction", params, optFns, c.addOperationDeleteCustomActionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteCustomActionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteCustomActionInput struct { + + // The fully defined ARN of the custom action. + // + // This member is required. + CustomActionArn *string + + noSmithyDocumentSerde +} + +type DeleteCustomActionOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteCustomActionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteCustomAction{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteCustomAction{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteCustomAction"); 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 = addOpDeleteCustomActionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteCustomAction(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_opDeleteCustomAction(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteCustomAction", + } +} diff --git a/service/chatbot/api_op_DescribeChimeWebhookConfigurations.go b/service/chatbot/api_op_DescribeChimeWebhookConfigurations.go index 5b42fba25a5..f780f1eb709 100644 --- a/service/chatbot/api_op_DescribeChimeWebhookConfigurations.go +++ b/service/chatbot/api_op_DescribeChimeWebhookConfigurations.go @@ -30,7 +30,7 @@ func (c *Client) DescribeChimeWebhookConfigurations(ctx context.Context, params type DescribeChimeWebhookConfigurationsInput struct { - // An optional Amazon Resource Number (ARN) of a ChimeWebhookConfiguration to + // An optional Amazon Resource Name (ARN) of a ChimeWebhookConfiguration to // describe. ChatConfigurationArn *string diff --git a/service/chatbot/api_op_DescribeSlackChannelConfigurations.go b/service/chatbot/api_op_DescribeSlackChannelConfigurations.go index 6c65952e46b..9a35d535fcc 100644 --- a/service/chatbot/api_op_DescribeSlackChannelConfigurations.go +++ b/service/chatbot/api_op_DescribeSlackChannelConfigurations.go @@ -29,7 +29,7 @@ func (c *Client) DescribeSlackChannelConfigurations(ctx context.Context, params type DescribeSlackChannelConfigurationsInput struct { - // An optional Amazon Resource Number (ARN) of a SlackChannelConfiguration to + // An optional Amazon Resource Name (ARN) of a SlackChannelConfiguration to // describe. ChatConfigurationArn *string diff --git a/service/chatbot/api_op_DescribeSlackUserIdentities.go b/service/chatbot/api_op_DescribeSlackUserIdentities.go index d3fae3f82bb..018f3da3888 100644 --- a/service/chatbot/api_op_DescribeSlackUserIdentities.go +++ b/service/chatbot/api_op_DescribeSlackUserIdentities.go @@ -29,8 +29,8 @@ func (c *Client) DescribeSlackUserIdentities(ctx context.Context, params *Descri type DescribeSlackUserIdentitiesInput struct { - // The Amazon Resource Number (ARN) of the SlackChannelConfiguration associated - // with the user identities to describe. + // The Amazon Resource Name (ARN) of the SlackChannelConfiguration associated with + // the user identities to describe. ChatConfigurationArn *string // The maximum number of results to include in the response. If more results exist diff --git a/service/chatbot/api_op_DisassociateFromConfiguration.go b/service/chatbot/api_op_DisassociateFromConfiguration.go new file mode 100644 index 00000000000..166971d4bb0 --- /dev/null +++ b/service/chatbot/api_op_DisassociateFromConfiguration.go @@ -0,0 +1,158 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chatbot + +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" +) + +// Unlink a resource, for example a custom action, from a channel configuration. +func (c *Client) DisassociateFromConfiguration(ctx context.Context, params *DisassociateFromConfigurationInput, optFns ...func(*Options)) (*DisassociateFromConfigurationOutput, error) { + if params == nil { + params = &DisassociateFromConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DisassociateFromConfiguration", params, optFns, c.addOperationDisassociateFromConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DisassociateFromConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DisassociateFromConfigurationInput struct { + + // The channel configuration the resource is being disassociated from. + // + // This member is required. + ChatConfiguration *string + + // The resource (for example, a custom action) Amazon Resource Name (ARN) to + // unlink. + // + // This member is required. + Resource *string + + noSmithyDocumentSerde +} + +type DisassociateFromConfigurationOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDisassociateFromConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDisassociateFromConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDisassociateFromConfiguration{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DisassociateFromConfiguration"); 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 = addOpDisassociateFromConfigurationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateFromConfiguration(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_opDisassociateFromConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DisassociateFromConfiguration", + } +} diff --git a/service/chatbot/api_op_GetCustomAction.go b/service/chatbot/api_op_GetCustomAction.go new file mode 100644 index 00000000000..231a42ce05d --- /dev/null +++ b/service/chatbot/api_op_GetCustomAction.go @@ -0,0 +1,157 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chatbot + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/chatbot/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a custom action. +func (c *Client) GetCustomAction(ctx context.Context, params *GetCustomActionInput, optFns ...func(*Options)) (*GetCustomActionOutput, error) { + if params == nil { + params = &GetCustomActionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetCustomAction", params, optFns, c.addOperationGetCustomActionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetCustomActionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetCustomActionInput struct { + + // Returns the fully defined Amazon Resource Name (ARN) of the custom action. + // + // This member is required. + CustomActionArn *string + + noSmithyDocumentSerde +} + +type GetCustomActionOutput struct { + + // Returns the custom action. + CustomAction *types.CustomAction + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetCustomActionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetCustomAction{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetCustomAction{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetCustomAction"); 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 = addOpGetCustomActionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCustomAction(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_opGetCustomAction(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetCustomAction", + } +} diff --git a/service/chatbot/api_op_GetMicrosoftTeamsChannelConfiguration.go b/service/chatbot/api_op_GetMicrosoftTeamsChannelConfiguration.go index 9b774934d52..ee995c5ef40 100644 --- a/service/chatbot/api_op_GetMicrosoftTeamsChannelConfiguration.go +++ b/service/chatbot/api_op_GetMicrosoftTeamsChannelConfiguration.go @@ -29,7 +29,7 @@ func (c *Client) GetMicrosoftTeamsChannelConfiguration(ctx context.Context, para type GetMicrosoftTeamsChannelConfigurationInput struct { - // The Amazon Resource Number (ARN) of the MicrosoftTeamsChannelConfiguration to + // The Amazon Resource Name (ARN) of the MicrosoftTeamsChannelConfiguration to // retrieve. // // This member is required. diff --git a/service/chatbot/api_op_ListAssociations.go b/service/chatbot/api_op_ListAssociations.go new file mode 100644 index 00000000000..f7ab9a360de --- /dev/null +++ b/service/chatbot/api_op_ListAssociations.go @@ -0,0 +1,269 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chatbot + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/chatbot/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists resources associated with a channel configuration. +func (c *Client) ListAssociations(ctx context.Context, params *ListAssociationsInput, optFns ...func(*Options)) (*ListAssociationsOutput, error) { + if params == nil { + params = &ListAssociationsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListAssociations", params, optFns, c.addOperationListAssociationsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListAssociationsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListAssociationsInput struct { + + // The channel configuration to list associations for. + // + // This member is required. + ChatConfiguration *string + + // The maximum number of results to include in the response. If more results exist + // than the specified MaxResults value, a token is included in the response so that + // the remaining results can be retrieved. + MaxResults *int32 + + // An optional token returned from a prior request. Use this token for pagination + // of results from this action. If this parameter is specified, the response + // includes only results beyond the token, up to the value specified by MaxResults. + NextToken *string + + noSmithyDocumentSerde +} + +type ListAssociationsOutput struct { + + // The resources associated with this channel configuration. + // + // This member is required. + Associations []types.AssociationListing + + // An optional token returned from a prior request. Use this token for pagination + // of results from this action. If this parameter is specified, the response + // includes only results beyond the token, up to the value specified by MaxResults. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListAssociationsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListAssociations{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListAssociations{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListAssociations"); 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 = addOpListAssociationsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAssociations(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 +} + +// ListAssociationsPaginatorOptions is the paginator options for ListAssociations +type ListAssociationsPaginatorOptions struct { + // The maximum number of results to include in the response. If more results exist + // than the specified MaxResults value, a token is included in the response so that + // the remaining results can be retrieved. + 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 +} + +// ListAssociationsPaginator is a paginator for ListAssociations +type ListAssociationsPaginator struct { + options ListAssociationsPaginatorOptions + client ListAssociationsAPIClient + params *ListAssociationsInput + nextToken *string + firstPage bool +} + +// NewListAssociationsPaginator returns a new ListAssociationsPaginator +func NewListAssociationsPaginator(client ListAssociationsAPIClient, params *ListAssociationsInput, optFns ...func(*ListAssociationsPaginatorOptions)) *ListAssociationsPaginator { + if params == nil { + params = &ListAssociationsInput{} + } + + options := ListAssociationsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListAssociationsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListAssociationsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListAssociations page. +func (p *ListAssociationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAssociationsOutput, 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.ListAssociations(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 +} + +// ListAssociationsAPIClient is a client that implements the ListAssociations +// operation. +type ListAssociationsAPIClient interface { + ListAssociations(context.Context, *ListAssociationsInput, ...func(*Options)) (*ListAssociationsOutput, error) +} + +var _ ListAssociationsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListAssociations(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListAssociations", + } +} diff --git a/service/chatbot/api_op_ListCustomActions.go b/service/chatbot/api_op_ListCustomActions.go new file mode 100644 index 00000000000..4e87cafa9cd --- /dev/null +++ b/service/chatbot/api_op_ListCustomActions.go @@ -0,0 +1,260 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chatbot + +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" +) + +// Lists custom actions defined in this account. +func (c *Client) ListCustomActions(ctx context.Context, params *ListCustomActionsInput, optFns ...func(*Options)) (*ListCustomActionsOutput, error) { + if params == nil { + params = &ListCustomActionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListCustomActions", params, optFns, c.addOperationListCustomActionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListCustomActionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListCustomActionsInput struct { + + // The maximum number of results to include in the response. If more results exist + // than the specified MaxResults value, a token is included in the response so that + // the remaining results can be retrieved. + MaxResults *int32 + + // An optional token returned from a prior request. Use this token for pagination + // of results from this action. If this parameter is specified, the response + // includes only results beyond the token, up to the value specified by MaxResults. + NextToken *string + + noSmithyDocumentSerde +} + +type ListCustomActionsOutput struct { + + // A list of custom actions. + // + // This member is required. + CustomActions []string + + // An optional token returned from a prior request. Use this token for pagination + // of results from this action. If this parameter is specified, the response + // includes only results beyond the token, up to the value specified by MaxResults. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListCustomActionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListCustomActions{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListCustomActions{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListCustomActions"); 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_opListCustomActions(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 +} + +// ListCustomActionsPaginatorOptions is the paginator options for ListCustomActions +type ListCustomActionsPaginatorOptions struct { + // The maximum number of results to include in the response. If more results exist + // than the specified MaxResults value, a token is included in the response so that + // the remaining results can be retrieved. + 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 +} + +// ListCustomActionsPaginator is a paginator for ListCustomActions +type ListCustomActionsPaginator struct { + options ListCustomActionsPaginatorOptions + client ListCustomActionsAPIClient + params *ListCustomActionsInput + nextToken *string + firstPage bool +} + +// NewListCustomActionsPaginator returns a new ListCustomActionsPaginator +func NewListCustomActionsPaginator(client ListCustomActionsAPIClient, params *ListCustomActionsInput, optFns ...func(*ListCustomActionsPaginatorOptions)) *ListCustomActionsPaginator { + if params == nil { + params = &ListCustomActionsInput{} + } + + options := ListCustomActionsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListCustomActionsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListCustomActionsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListCustomActions page. +func (p *ListCustomActionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListCustomActionsOutput, 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.ListCustomActions(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 +} + +// ListCustomActionsAPIClient is a client that implements the ListCustomActions +// operation. +type ListCustomActionsAPIClient interface { + ListCustomActions(context.Context, *ListCustomActionsInput, ...func(*Options)) (*ListCustomActionsOutput, error) +} + +var _ ListCustomActionsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListCustomActions(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListCustomActions", + } +} diff --git a/service/chatbot/api_op_ListMicrosoftTeamsUserIdentities.go b/service/chatbot/api_op_ListMicrosoftTeamsUserIdentities.go index 789db474849..5867715d808 100644 --- a/service/chatbot/api_op_ListMicrosoftTeamsUserIdentities.go +++ b/service/chatbot/api_op_ListMicrosoftTeamsUserIdentities.go @@ -29,7 +29,7 @@ func (c *Client) ListMicrosoftTeamsUserIdentities(ctx context.Context, params *L type ListMicrosoftTeamsUserIdentitiesInput struct { - // The Amazon Resource Number (ARN) of the MicrosoftTeamsChannelConfiguration + // The Amazon Resource Name (ARN) of the MicrosoftTeamsChannelConfiguration // associated with the user identities to list. ChatConfigurationArn *string diff --git a/service/chatbot/api_op_ListTagsForResource.go b/service/chatbot/api_op_ListTagsForResource.go index 0c9b7e21b43..305ff178fc0 100644 --- a/service/chatbot/api_op_ListTagsForResource.go +++ b/service/chatbot/api_op_ListTagsForResource.go @@ -30,7 +30,7 @@ func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForRes type ListTagsForResourceInput struct { - // The ARN you specified to list the tags of. + // The ARN of the resource to list tags for. // // This member is required. ResourceARN *string diff --git a/service/chatbot/api_op_UpdateChimeWebhookConfiguration.go b/service/chatbot/api_op_UpdateChimeWebhookConfiguration.go index d471e618cb1..14fc8f5d175 100644 --- a/service/chatbot/api_op_UpdateChimeWebhookConfiguration.go +++ b/service/chatbot/api_op_UpdateChimeWebhookConfiguration.go @@ -29,7 +29,7 @@ func (c *Client) UpdateChimeWebhookConfiguration(ctx context.Context, params *Up type UpdateChimeWebhookConfigurationInput struct { - // The Amazon Resource Number (ARN) of the ChimeWebhookConfiguration to update. + // The Amazon Resource Name (ARN) of the ChimeWebhookConfiguration to update. // // This member is required. ChatConfigurationArn *string diff --git a/service/chatbot/api_op_UpdateCustomAction.go b/service/chatbot/api_op_UpdateCustomAction.go new file mode 100644 index 00000000000..07299132b3f --- /dev/null +++ b/service/chatbot/api_op_UpdateCustomAction.go @@ -0,0 +1,172 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chatbot + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/chatbot/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates a custom action. +func (c *Client) UpdateCustomAction(ctx context.Context, params *UpdateCustomActionInput, optFns ...func(*Options)) (*UpdateCustomActionOutput, error) { + if params == nil { + params = &UpdateCustomActionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateCustomAction", params, optFns, c.addOperationUpdateCustomActionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateCustomActionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateCustomActionInput struct { + + // The fully defined Amazon Resource Name (ARN) of the custom action. + // + // This member is required. + CustomActionArn *string + + // The definition of the command to run when invoked as an alias or as an action + // button. + // + // This member is required. + Definition *types.CustomActionDefinition + + // The name used to invoke this action in the chat channel. For example, @aws run + // my-alias . + AliasName *string + + // Defines when this custom action button should be attached to a notification. + Attachments []types.CustomActionAttachment + + noSmithyDocumentSerde +} + +type UpdateCustomActionOutput struct { + + // The fully defined ARN of the custom action. + // + // This member is required. + CustomActionArn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateCustomActionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateCustomAction{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateCustomAction{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateCustomAction"); 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 = addOpUpdateCustomActionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateCustomAction(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_opUpdateCustomAction(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateCustomAction", + } +} diff --git a/service/chatbot/api_op_UpdateMicrosoftTeamsChannelConfiguration.go b/service/chatbot/api_op_UpdateMicrosoftTeamsChannelConfiguration.go index c92605a8faa..0a8d2c6e58b 100644 --- a/service/chatbot/api_op_UpdateMicrosoftTeamsChannelConfiguration.go +++ b/service/chatbot/api_op_UpdateMicrosoftTeamsChannelConfiguration.go @@ -34,7 +34,7 @@ type UpdateMicrosoftTeamsChannelConfigurationInput struct { // This member is required. ChannelId *string - // The Amazon Resource Number (ARN) of the TeamsChannelConfiguration to update. + // The Amazon Resource Name (ARN) of the TeamsChannelConfiguration to update. // // This member is required. ChatConfigurationArn *string diff --git a/service/chatbot/api_op_UpdateSlackChannelConfiguration.go b/service/chatbot/api_op_UpdateSlackChannelConfiguration.go index f323034ba52..6c28836db55 100644 --- a/service/chatbot/api_op_UpdateSlackChannelConfiguration.go +++ b/service/chatbot/api_op_UpdateSlackChannelConfiguration.go @@ -29,7 +29,7 @@ func (c *Client) UpdateSlackChannelConfiguration(ctx context.Context, params *Up type UpdateSlackChannelConfigurationInput struct { - // The Amazon Resource Number (ARN) of the SlackChannelConfiguration to update. + // The Amazon Resource Name (ARN) of the SlackChannelConfiguration to update. // // This member is required. ChatConfigurationArn *string diff --git a/service/chatbot/deserializers.go b/service/chatbot/deserializers.go index 4a32245c349..3e542edfe6e 100644 --- a/service/chatbot/deserializers.go +++ b/service/chatbot/deserializers.go @@ -29,6 +29,100 @@ func deserializeS3Expires(v string) (*time.Time, error) { return &t, nil } +type awsRestjson1_deserializeOpAssociateToConfiguration struct { +} + +func (*awsRestjson1_deserializeOpAssociateToConfiguration) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpAssociateToConfiguration) HandleDeserialize(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_deserializeOpErrorAssociateToConfiguration(response, &metadata) + } + output := &AssociateToConfigurationOutput{} + out.Result = output + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorAssociateToConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("InternalServiceError", errorCode): + return awsRestjson1_deserializeErrorInternalServiceError(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("UnauthorizedException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsRestjson1_deserializeOpCreateChimeWebhookConfiguration struct { } @@ -193,14 +287,14 @@ func awsRestjson1_deserializeOpDocumentCreateChimeWebhookConfigurationOutput(v * return nil } -type awsRestjson1_deserializeOpCreateMicrosoftTeamsChannelConfiguration struct { +type awsRestjson1_deserializeOpCreateCustomAction struct { } -func (*awsRestjson1_deserializeOpCreateMicrosoftTeamsChannelConfiguration) ID() string { +func (*awsRestjson1_deserializeOpCreateCustomAction) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateMicrosoftTeamsChannelConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateCustomAction) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -218,9 +312,9 @@ func (m *awsRestjson1_deserializeOpCreateMicrosoftTeamsChannelConfiguration) Han } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateMicrosoftTeamsChannelConfiguration(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateCustomAction(response, &metadata) } - output := &CreateMicrosoftTeamsChannelConfigurationOutput{} + output := &CreateCustomActionOutput{} out.Result = output var buff [1024]byte @@ -241,7 +335,7 @@ func (m *awsRestjson1_deserializeOpCreateMicrosoftTeamsChannelConfiguration) Han return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateMicrosoftTeamsChannelConfigurationOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateCustomActionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -255,7 +349,7 @@ func (m *awsRestjson1_deserializeOpCreateMicrosoftTeamsChannelConfiguration) Han return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateMicrosoftTeamsChannelConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateCustomAction(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -299,11 +393,8 @@ func awsRestjson1_deserializeOpErrorCreateMicrosoftTeamsChannelConfiguration(res case strings.EqualFold("ConflictException", errorCode): return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("CreateTeamsChannelConfigurationException", errorCode): - return awsRestjson1_deserializeErrorCreateTeamsChannelConfigurationException(response, errorBody) - - case strings.EqualFold("InvalidParameterException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("InternalServiceError", errorCode): + return awsRestjson1_deserializeErrorInternalServiceError(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) @@ -311,6 +402,9 @@ func awsRestjson1_deserializeOpErrorCreateMicrosoftTeamsChannelConfiguration(res case strings.EqualFold("LimitExceededException", errorCode): return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("UnauthorizedException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -321,7 +415,7 @@ func awsRestjson1_deserializeOpErrorCreateMicrosoftTeamsChannelConfiguration(res } } -func awsRestjson1_deserializeOpDocumentCreateMicrosoftTeamsChannelConfigurationOutput(v **CreateMicrosoftTeamsChannelConfigurationOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateCustomActionOutput(v **CreateCustomActionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -334,18 +428,22 @@ func awsRestjson1_deserializeOpDocumentCreateMicrosoftTeamsChannelConfigurationO return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateMicrosoftTeamsChannelConfigurationOutput + var sv *CreateCustomActionOutput if *v == nil { - sv = &CreateMicrosoftTeamsChannelConfigurationOutput{} + sv = &CreateCustomActionOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "ChannelConfiguration": - if err := awsRestjson1_deserializeDocumentTeamsChannelConfiguration(&sv.ChannelConfiguration, value); err != nil { - return err + case "CustomActionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CustomActionArn to be of type string, got %T instead", value) + } + sv.CustomActionArn = ptr.String(jtv) } default: @@ -357,14 +455,14 @@ func awsRestjson1_deserializeOpDocumentCreateMicrosoftTeamsChannelConfigurationO return nil } -type awsRestjson1_deserializeOpCreateSlackChannelConfiguration struct { +type awsRestjson1_deserializeOpCreateMicrosoftTeamsChannelConfiguration struct { } -func (*awsRestjson1_deserializeOpCreateSlackChannelConfiguration) ID() string { +func (*awsRestjson1_deserializeOpCreateMicrosoftTeamsChannelConfiguration) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateSlackChannelConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateMicrosoftTeamsChannelConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -382,9 +480,9 @@ func (m *awsRestjson1_deserializeOpCreateSlackChannelConfiguration) HandleDeseri } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateSlackChannelConfiguration(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateMicrosoftTeamsChannelConfiguration(response, &metadata) } - output := &CreateSlackChannelConfigurationOutput{} + output := &CreateMicrosoftTeamsChannelConfigurationOutput{} out.Result = output var buff [1024]byte @@ -405,7 +503,7 @@ func (m *awsRestjson1_deserializeOpCreateSlackChannelConfiguration) HandleDeseri return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateSlackChannelConfigurationOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateMicrosoftTeamsChannelConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -419,7 +517,7 @@ func (m *awsRestjson1_deserializeOpCreateSlackChannelConfiguration) HandleDeseri return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateSlackChannelConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateMicrosoftTeamsChannelConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -463,8 +561,8 @@ func awsRestjson1_deserializeOpErrorCreateSlackChannelConfiguration(response *sm case strings.EqualFold("ConflictException", errorCode): return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("CreateSlackChannelConfigurationException", errorCode): - return awsRestjson1_deserializeErrorCreateSlackChannelConfigurationException(response, errorBody) + case strings.EqualFold("CreateTeamsChannelConfigurationException", errorCode): + return awsRestjson1_deserializeErrorCreateTeamsChannelConfigurationException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) @@ -485,7 +583,7 @@ func awsRestjson1_deserializeOpErrorCreateSlackChannelConfiguration(response *sm } } -func awsRestjson1_deserializeOpDocumentCreateSlackChannelConfigurationOutput(v **CreateSlackChannelConfigurationOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateMicrosoftTeamsChannelConfigurationOutput(v **CreateMicrosoftTeamsChannelConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -498,9 +596,9 @@ func awsRestjson1_deserializeOpDocumentCreateSlackChannelConfigurationOutput(v * return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateSlackChannelConfigurationOutput + var sv *CreateMicrosoftTeamsChannelConfigurationOutput if *v == nil { - sv = &CreateSlackChannelConfigurationOutput{} + sv = &CreateMicrosoftTeamsChannelConfigurationOutput{} } else { sv = *v } @@ -508,7 +606,7 @@ func awsRestjson1_deserializeOpDocumentCreateSlackChannelConfigurationOutput(v * for key, value := range shape { switch key { case "ChannelConfiguration": - if err := awsRestjson1_deserializeDocumentSlackChannelConfiguration(&sv.ChannelConfiguration, value); err != nil { + if err := awsRestjson1_deserializeDocumentTeamsChannelConfiguration(&sv.ChannelConfiguration, value); err != nil { return err } @@ -521,14 +619,14 @@ func awsRestjson1_deserializeOpDocumentCreateSlackChannelConfigurationOutput(v * return nil } -type awsRestjson1_deserializeOpDeleteChimeWebhookConfiguration struct { +type awsRestjson1_deserializeOpCreateSlackChannelConfiguration struct { } -func (*awsRestjson1_deserializeOpDeleteChimeWebhookConfiguration) ID() string { +func (*awsRestjson1_deserializeOpCreateSlackChannelConfiguration) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteChimeWebhookConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateSlackChannelConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -546,16 +644,44 @@ func (m *awsRestjson1_deserializeOpDeleteChimeWebhookConfiguration) HandleDeseri } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteChimeWebhookConfiguration(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateSlackChannelConfiguration(response, &metadata) } - output := &DeleteChimeWebhookConfigurationOutput{} + output := &CreateSlackChannelConfigurationOutput{} 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_deserializeOpDocumentCreateSlackChannelConfigurationOutput(&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_deserializeOpErrorDeleteChimeWebhookConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateSlackChannelConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -596,8 +722,11 @@ func awsRestjson1_deserializeOpErrorDeleteChimeWebhookConfiguration(response *sm } switch { - case strings.EqualFold("DeleteChimeWebhookConfigurationException", errorCode): - return awsRestjson1_deserializeErrorDeleteChimeWebhookConfigurationException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("CreateSlackChannelConfigurationException", errorCode): + return awsRestjson1_deserializeErrorCreateSlackChannelConfigurationException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) @@ -605,8 +734,8 @@ func awsRestjson1_deserializeOpErrorDeleteChimeWebhookConfiguration(response *sm case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -618,14 +747,50 @@ func awsRestjson1_deserializeOpErrorDeleteChimeWebhookConfiguration(response *sm } } -type awsRestjson1_deserializeOpDeleteMicrosoftTeamsChannelConfiguration struct { +func awsRestjson1_deserializeOpDocumentCreateSlackChannelConfigurationOutput(v **CreateSlackChannelConfigurationOutput, 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 *CreateSlackChannelConfigurationOutput + if *v == nil { + sv = &CreateSlackChannelConfigurationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ChannelConfiguration": + if err := awsRestjson1_deserializeDocumentSlackChannelConfiguration(&sv.ChannelConfiguration, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil } -func (*awsRestjson1_deserializeOpDeleteMicrosoftTeamsChannelConfiguration) ID() string { +type awsRestjson1_deserializeOpDeleteChimeWebhookConfiguration struct { +} + +func (*awsRestjson1_deserializeOpDeleteChimeWebhookConfiguration) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteMicrosoftTeamsChannelConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteChimeWebhookConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -643,16 +808,16 @@ func (m *awsRestjson1_deserializeOpDeleteMicrosoftTeamsChannelConfiguration) Han } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteMicrosoftTeamsChannelConfiguration(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteChimeWebhookConfiguration(response, &metadata) } - output := &DeleteMicrosoftTeamsChannelConfigurationOutput{} + output := &DeleteChimeWebhookConfigurationOutput{} out.Result = output span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteMicrosoftTeamsChannelConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteChimeWebhookConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -693,8 +858,8 @@ func awsRestjson1_deserializeOpErrorDeleteMicrosoftTeamsChannelConfiguration(res } switch { - case strings.EqualFold("DeleteTeamsChannelConfigurationException", errorCode): - return awsRestjson1_deserializeErrorDeleteTeamsChannelConfigurationException(response, errorBody) + case strings.EqualFold("DeleteChimeWebhookConfigurationException", errorCode): + return awsRestjson1_deserializeErrorDeleteChimeWebhookConfigurationException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) @@ -715,14 +880,14 @@ func awsRestjson1_deserializeOpErrorDeleteMicrosoftTeamsChannelConfiguration(res } } -type awsRestjson1_deserializeOpDeleteMicrosoftTeamsConfiguredTeam struct { +type awsRestjson1_deserializeOpDeleteCustomAction struct { } -func (*awsRestjson1_deserializeOpDeleteMicrosoftTeamsConfiguredTeam) ID() string { +func (*awsRestjson1_deserializeOpDeleteCustomAction) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteMicrosoftTeamsConfiguredTeam) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteCustomAction) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -740,16 +905,16 @@ func (m *awsRestjson1_deserializeOpDeleteMicrosoftTeamsConfiguredTeam) HandleDes } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteMicrosoftTeamsConfiguredTeam(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteCustomAction(response, &metadata) } - output := &DeleteMicrosoftTeamsConfiguredTeamOutput{} + output := &DeleteCustomActionOutput{} out.Result = output span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteMicrosoftTeamsConfiguredTeam(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteCustomAction(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -790,14 +955,208 @@ func awsRestjson1_deserializeOpErrorDeleteMicrosoftTeamsConfiguredTeam(response } switch { - case strings.EqualFold("DeleteTeamsConfiguredTeamException", errorCode): - return awsRestjson1_deserializeErrorDeleteTeamsConfiguredTeamException(response, errorBody) + case strings.EqualFold("InternalServiceError", errorCode): + return awsRestjson1_deserializeErrorInternalServiceError(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - default: - genericError := &smithy.GenericAPIError{ + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("UnauthorizedException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDeleteMicrosoftTeamsChannelConfiguration struct { +} + +func (*awsRestjson1_deserializeOpDeleteMicrosoftTeamsChannelConfiguration) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteMicrosoftTeamsChannelConfiguration) HandleDeserialize(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_deserializeOpErrorDeleteMicrosoftTeamsChannelConfiguration(response, &metadata) + } + output := &DeleteMicrosoftTeamsChannelConfigurationOutput{} + out.Result = output + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteMicrosoftTeamsChannelConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("DeleteTeamsChannelConfigurationException", errorCode): + return awsRestjson1_deserializeErrorDeleteTeamsChannelConfigurationException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDeleteMicrosoftTeamsConfiguredTeam struct { +} + +func (*awsRestjson1_deserializeOpDeleteMicrosoftTeamsConfiguredTeam) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteMicrosoftTeamsConfiguredTeam) HandleDeserialize(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_deserializeOpErrorDeleteMicrosoftTeamsConfiguredTeam(response, &metadata) + } + output := &DeleteMicrosoftTeamsConfiguredTeamOutput{} + out.Result = output + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteMicrosoftTeamsConfiguredTeam(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("DeleteTeamsConfiguredTeamException", errorCode): + return awsRestjson1_deserializeErrorDeleteTeamsConfiguredTeamException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } @@ -1850,14 +2209,14 @@ func awsRestjson1_deserializeOpDocumentDescribeSlackWorkspacesOutput(v **Describ return nil } -type awsRestjson1_deserializeOpGetAccountPreferences struct { +type awsRestjson1_deserializeOpDisassociateFromConfiguration struct { } -func (*awsRestjson1_deserializeOpGetAccountPreferences) ID() string { +func (*awsRestjson1_deserializeOpDisassociateFromConfiguration) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetAccountPreferences) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDisassociateFromConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1875,44 +2234,16 @@ func (m *awsRestjson1_deserializeOpGetAccountPreferences) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetAccountPreferences(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDisassociateFromConfiguration(response, &metadata) } - output := &GetAccountPreferencesOutput{} + output := &DisassociateFromConfigurationOutput{} 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_deserializeOpDocumentGetAccountPreferencesOutput(&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_deserializeOpErrorGetAccountPreferences(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDisassociateFromConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1953,12 +2284,15 @@ func awsRestjson1_deserializeOpErrorGetAccountPreferences(response *smithyhttp.R } switch { - case strings.EqualFold("GetAccountPreferencesException", errorCode): - return awsRestjson1_deserializeErrorGetAccountPreferencesException(response, errorBody) + case strings.EqualFold("InternalServiceError", errorCode): + return awsRestjson1_deserializeErrorInternalServiceError(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + case strings.EqualFold("UnauthorizedException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -1969,55 +2303,19 @@ func awsRestjson1_deserializeOpErrorGetAccountPreferences(response *smithyhttp.R } } -func awsRestjson1_deserializeOpDocumentGetAccountPreferencesOutput(v **GetAccountPreferencesOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } +type awsRestjson1_deserializeOpGetAccountPreferences struct { +} - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetAccountPreferencesOutput - if *v == nil { - sv = &GetAccountPreferencesOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "AccountPreferences": - if err := awsRestjson1_deserializeDocumentAccountPreferences(&sv.AccountPreferences, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpGetMicrosoftTeamsChannelConfiguration struct { -} - -func (*awsRestjson1_deserializeOpGetMicrosoftTeamsChannelConfiguration) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetMicrosoftTeamsChannelConfiguration) HandleDeserialize(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 +func (*awsRestjson1_deserializeOpGetAccountPreferences) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetAccountPreferences) HandleDeserialize(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") @@ -2030,9 +2328,9 @@ func (m *awsRestjson1_deserializeOpGetMicrosoftTeamsChannelConfiguration) Handle } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetMicrosoftTeamsChannelConfiguration(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetAccountPreferences(response, &metadata) } - output := &GetMicrosoftTeamsChannelConfigurationOutput{} + output := &GetAccountPreferencesOutput{} out.Result = output var buff [1024]byte @@ -2053,7 +2351,7 @@ func (m *awsRestjson1_deserializeOpGetMicrosoftTeamsChannelConfiguration) Handle return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetMicrosoftTeamsChannelConfigurationOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetAccountPreferencesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2067,7 +2365,7 @@ func (m *awsRestjson1_deserializeOpGetMicrosoftTeamsChannelConfiguration) Handle return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetMicrosoftTeamsChannelConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetAccountPreferences(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2108,11 +2406,8 @@ func awsRestjson1_deserializeOpErrorGetMicrosoftTeamsChannelConfiguration(respon } switch { - case strings.EqualFold("GetTeamsChannelConfigurationException", errorCode): - return awsRestjson1_deserializeErrorGetTeamsChannelConfigurationException(response, errorBody) - - case strings.EqualFold("InvalidParameterException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("GetAccountPreferencesException", errorCode): + return awsRestjson1_deserializeErrorGetAccountPreferencesException(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) @@ -2127,7 +2422,7 @@ func awsRestjson1_deserializeOpErrorGetMicrosoftTeamsChannelConfiguration(respon } } -func awsRestjson1_deserializeOpDocumentGetMicrosoftTeamsChannelConfigurationOutput(v **GetMicrosoftTeamsChannelConfigurationOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetAccountPreferencesOutput(v **GetAccountPreferencesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2140,17 +2435,17 @@ func awsRestjson1_deserializeOpDocumentGetMicrosoftTeamsChannelConfigurationOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetMicrosoftTeamsChannelConfigurationOutput + var sv *GetAccountPreferencesOutput if *v == nil { - sv = &GetMicrosoftTeamsChannelConfigurationOutput{} + sv = &GetAccountPreferencesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "ChannelConfiguration": - if err := awsRestjson1_deserializeDocumentTeamsChannelConfiguration(&sv.ChannelConfiguration, value); err != nil { + case "AccountPreferences": + if err := awsRestjson1_deserializeDocumentAccountPreferences(&sv.AccountPreferences, value); err != nil { return err } @@ -2163,14 +2458,14 @@ func awsRestjson1_deserializeOpDocumentGetMicrosoftTeamsChannelConfigurationOutp return nil } -type awsRestjson1_deserializeOpListMicrosoftTeamsChannelConfigurations struct { +type awsRestjson1_deserializeOpGetCustomAction struct { } -func (*awsRestjson1_deserializeOpListMicrosoftTeamsChannelConfigurations) ID() string { +func (*awsRestjson1_deserializeOpGetCustomAction) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListMicrosoftTeamsChannelConfigurations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetCustomAction) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2188,9 +2483,9 @@ func (m *awsRestjson1_deserializeOpListMicrosoftTeamsChannelConfigurations) Hand } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListMicrosoftTeamsChannelConfigurations(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetCustomAction(response, &metadata) } - output := &ListMicrosoftTeamsChannelConfigurationsOutput{} + output := &GetCustomActionOutput{} out.Result = output var buff [1024]byte @@ -2211,7 +2506,7 @@ func (m *awsRestjson1_deserializeOpListMicrosoftTeamsChannelConfigurations) Hand return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListMicrosoftTeamsChannelConfigurationsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetCustomActionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2225,7 +2520,7 @@ func (m *awsRestjson1_deserializeOpListMicrosoftTeamsChannelConfigurations) Hand return out, metadata, err } -func awsRestjson1_deserializeOpErrorListMicrosoftTeamsChannelConfigurations(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetCustomAction(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2266,14 +2561,17 @@ func awsRestjson1_deserializeOpErrorListMicrosoftTeamsChannelConfigurations(resp } switch { - case strings.EqualFold("InvalidParameterException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("InternalServiceError", errorCode): + return awsRestjson1_deserializeErrorInternalServiceError(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - case strings.EqualFold("ListTeamsChannelConfigurationsException", errorCode): - return awsRestjson1_deserializeErrorListTeamsChannelConfigurationsException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("UnauthorizedException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -2285,7 +2583,7 @@ func awsRestjson1_deserializeOpErrorListMicrosoftTeamsChannelConfigurations(resp } } -func awsRestjson1_deserializeOpDocumentListMicrosoftTeamsChannelConfigurationsOutput(v **ListMicrosoftTeamsChannelConfigurationsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetCustomActionOutput(v **GetCustomActionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2298,26 +2596,17 @@ func awsRestjson1_deserializeOpDocumentListMicrosoftTeamsChannelConfigurationsOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListMicrosoftTeamsChannelConfigurationsOutput + var sv *GetCustomActionOutput if *v == nil { - sv = &ListMicrosoftTeamsChannelConfigurationsOutput{} + sv = &GetCustomActionOutput{} } 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 "TeamChannelConfigurations": - if err := awsRestjson1_deserializeDocumentTeamChannelConfigurationsList(&sv.TeamChannelConfigurations, value); err != nil { + case "CustomAction": + if err := awsRestjson1_deserializeDocumentCustomAction(&sv.CustomAction, value); err != nil { return err } @@ -2330,14 +2619,14 @@ func awsRestjson1_deserializeOpDocumentListMicrosoftTeamsChannelConfigurationsOu return nil } -type awsRestjson1_deserializeOpListMicrosoftTeamsConfiguredTeams struct { +type awsRestjson1_deserializeOpGetMicrosoftTeamsChannelConfiguration struct { } -func (*awsRestjson1_deserializeOpListMicrosoftTeamsConfiguredTeams) ID() string { +func (*awsRestjson1_deserializeOpGetMicrosoftTeamsChannelConfiguration) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListMicrosoftTeamsConfiguredTeams) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetMicrosoftTeamsChannelConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2355,9 +2644,9 @@ func (m *awsRestjson1_deserializeOpListMicrosoftTeamsConfiguredTeams) HandleDese } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListMicrosoftTeamsConfiguredTeams(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetMicrosoftTeamsChannelConfiguration(response, &metadata) } - output := &ListMicrosoftTeamsConfiguredTeamsOutput{} + output := &GetMicrosoftTeamsChannelConfigurationOutput{} out.Result = output var buff [1024]byte @@ -2378,7 +2667,7 @@ func (m *awsRestjson1_deserializeOpListMicrosoftTeamsConfiguredTeams) HandleDese return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListMicrosoftTeamsConfiguredTeamsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetMicrosoftTeamsChannelConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2392,7 +2681,7 @@ func (m *awsRestjson1_deserializeOpListMicrosoftTeamsConfiguredTeams) HandleDese return out, metadata, err } -func awsRestjson1_deserializeOpErrorListMicrosoftTeamsConfiguredTeams(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetMicrosoftTeamsChannelConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2433,15 +2722,15 @@ func awsRestjson1_deserializeOpErrorListMicrosoftTeamsConfiguredTeams(response * } switch { + case strings.EqualFold("GetTeamsChannelConfigurationException", errorCode): + return awsRestjson1_deserializeErrorGetTeamsChannelConfigurationException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - case strings.EqualFold("ListMicrosoftTeamsConfiguredTeamsException", errorCode): - return awsRestjson1_deserializeErrorListMicrosoftTeamsConfiguredTeamsException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -2452,7 +2741,7 @@ func awsRestjson1_deserializeOpErrorListMicrosoftTeamsConfiguredTeams(response * } } -func awsRestjson1_deserializeOpDocumentListMicrosoftTeamsConfiguredTeamsOutput(v **ListMicrosoftTeamsConfiguredTeamsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetMicrosoftTeamsChannelConfigurationOutput(v **GetMicrosoftTeamsChannelConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2465,29 +2754,20 @@ func awsRestjson1_deserializeOpDocumentListMicrosoftTeamsConfiguredTeamsOutput(v return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListMicrosoftTeamsConfiguredTeamsOutput + var sv *GetMicrosoftTeamsChannelConfigurationOutput if *v == nil { - sv = &ListMicrosoftTeamsConfiguredTeamsOutput{} + sv = &GetMicrosoftTeamsChannelConfigurationOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "ConfiguredTeams": - if err := awsRestjson1_deserializeDocumentConfiguredTeamsList(&sv.ConfiguredTeams, value); err != nil { + case "ChannelConfiguration": + if err := awsRestjson1_deserializeDocumentTeamsChannelConfiguration(&sv.ChannelConfiguration, 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 @@ -2497,14 +2777,14 @@ func awsRestjson1_deserializeOpDocumentListMicrosoftTeamsConfiguredTeamsOutput(v return nil } -type awsRestjson1_deserializeOpListMicrosoftTeamsUserIdentities struct { +type awsRestjson1_deserializeOpListAssociations struct { } -func (*awsRestjson1_deserializeOpListMicrosoftTeamsUserIdentities) ID() string { +func (*awsRestjson1_deserializeOpListAssociations) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListMicrosoftTeamsUserIdentities) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListAssociations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2522,9 +2802,9 @@ func (m *awsRestjson1_deserializeOpListMicrosoftTeamsUserIdentities) HandleDeser } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListMicrosoftTeamsUserIdentities(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListAssociations(response, &metadata) } - output := &ListMicrosoftTeamsUserIdentitiesOutput{} + output := &ListAssociationsOutput{} out.Result = output var buff [1024]byte @@ -2545,7 +2825,7 @@ func (m *awsRestjson1_deserializeOpListMicrosoftTeamsUserIdentities) HandleDeser return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListMicrosoftTeamsUserIdentitiesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListAssociationsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2559,7 +2839,7 @@ func (m *awsRestjson1_deserializeOpListMicrosoftTeamsUserIdentities) HandleDeser return out, metadata, err } -func awsRestjson1_deserializeOpErrorListMicrosoftTeamsUserIdentities(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListAssociations(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2600,15 +2880,6 @@ func awsRestjson1_deserializeOpErrorListMicrosoftTeamsUserIdentities(response *s } switch { - case strings.EqualFold("InvalidParameterException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - - case strings.EqualFold("InvalidRequestException", errorCode): - return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - - case strings.EqualFold("ListMicrosoftTeamsUserIdentitiesException", errorCode): - return awsRestjson1_deserializeErrorListMicrosoftTeamsUserIdentitiesException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -2619,7 +2890,7 @@ func awsRestjson1_deserializeOpErrorListMicrosoftTeamsUserIdentities(response *s } } -func awsRestjson1_deserializeOpDocumentListMicrosoftTeamsUserIdentitiesOutput(v **ListMicrosoftTeamsUserIdentitiesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListAssociationsOutput(v **ListAssociationsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2632,29 +2903,29 @@ func awsRestjson1_deserializeOpDocumentListMicrosoftTeamsUserIdentitiesOutput(v return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListMicrosoftTeamsUserIdentitiesOutput + var sv *ListAssociationsOutput if *v == nil { - sv = &ListMicrosoftTeamsUserIdentitiesOutput{} + sv = &ListAssociationsOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "Associations": + if err := awsRestjson1_deserializeDocumentAssociationList(&sv.Associations, 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) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } - case "TeamsUserIdentities": - if err := awsRestjson1_deserializeDocumentTeamsUserIdentitiesList(&sv.TeamsUserIdentities, value); err != nil { - return err - } - default: _, _ = key, value @@ -2664,14 +2935,14 @@ func awsRestjson1_deserializeOpDocumentListMicrosoftTeamsUserIdentitiesOutput(v return nil } -type awsRestjson1_deserializeOpListTagsForResource struct { +type awsRestjson1_deserializeOpListCustomActions struct { } -func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { +func (*awsRestjson1_deserializeOpListCustomActions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListCustomActions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2689,9 +2960,9 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListTagsForResource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListCustomActions(response, &metadata) } - output := &ListTagsForResourceOutput{} + output := &ListCustomActionsOutput{} out.Result = output var buff [1024]byte @@ -2712,7 +2983,7 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListCustomActionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2726,7 +2997,7 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListCustomActions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2770,11 +3041,11 @@ func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Res case strings.EqualFold("InternalServiceError", errorCode): return awsRestjson1_deserializeErrorInternalServiceError(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + case strings.EqualFold("UnauthorizedException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -2786,7 +3057,7 @@ func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListCustomActionsOutput(v **ListCustomActionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2799,20 +3070,29 @@ func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsFor return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListTagsForResourceOutput + var sv *ListCustomActionsOutput if *v == nil { - sv = &ListTagsForResourceOutput{} + sv = &ListCustomActionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Tags": - if err := awsRestjson1_deserializeDocumentTagList(&sv.Tags, value); err != nil { + case "CustomActions": + if err := awsRestjson1_deserializeDocumentCustomActionArnList(&sv.CustomActions, value); err != nil { return err } + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + default: _, _ = key, value @@ -2822,14 +3102,14 @@ func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsFor return nil } -type awsRestjson1_deserializeOpTagResource struct { +type awsRestjson1_deserializeOpListMicrosoftTeamsChannelConfigurations struct { } -func (*awsRestjson1_deserializeOpTagResource) ID() string { +func (*awsRestjson1_deserializeOpListMicrosoftTeamsChannelConfigurations) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListMicrosoftTeamsChannelConfigurations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2847,16 +3127,44 @@ func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorTagResource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListMicrosoftTeamsChannelConfigurations(response, &metadata) } - output := &TagResourceOutput{} + output := &ListMicrosoftTeamsChannelConfigurationsOutput{} 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_deserializeOpDocumentListMicrosoftTeamsChannelConfigurationsOutput(&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_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListMicrosoftTeamsChannelConfigurations(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.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,17 +3205,14 @@ func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, m } switch { - case strings.EqualFold("InternalServiceError", errorCode): - return awsRestjson1_deserializeErrorInternalServiceError(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - case strings.EqualFold("TooManyTagsException", errorCode): - return awsRestjson1_deserializeErrorTooManyTagsException(response, errorBody) + case strings.EqualFold("ListTeamsChannelConfigurationsException", errorCode): + return awsRestjson1_deserializeErrorListTeamsChannelConfigurationsException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -2919,108 +3224,59 @@ func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, m } } -type awsRestjson1_deserializeOpUntagResource struct { -} - -func (*awsRestjson1_deserializeOpUntagResource) ID() string { - return "OperationDeserializer" -} +func awsRestjson1_deserializeOpDocumentListMicrosoftTeamsChannelConfigurationsOutput(v **ListMicrosoftTeamsChannelConfigurationsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } -func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) + shape, ok := value.(map[string]interface{}) if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUntagResource(response, &metadata) - } - output := &UntagResourceOutput{} - out.Result = output - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err + return fmt.Errorf("unexpected JSON type %v", value) } - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message + var sv *ListMicrosoftTeamsChannelConfigurationsOutput + if *v == nil { + sv = &ListMicrosoftTeamsChannelConfigurationsOutput{} + } else { + sv = *v } - switch { - case strings.EqualFold("InternalServiceError", errorCode): - return awsRestjson1_deserializeErrorInternalServiceError(response, errorBody) + 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 strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case "TeamChannelConfigurations": + if err := awsRestjson1_deserializeDocumentTeamChannelConfigurationsList(&sv.TeamChannelConfigurations, value); err != nil { + return err + } - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + default: + _, _ = key, value - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, } - return genericError - } + *v = sv + return nil } -type awsRestjson1_deserializeOpUpdateAccountPreferences struct { +type awsRestjson1_deserializeOpListMicrosoftTeamsConfiguredTeams struct { } -func (*awsRestjson1_deserializeOpUpdateAccountPreferences) ID() string { +func (*awsRestjson1_deserializeOpListMicrosoftTeamsConfiguredTeams) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateAccountPreferences) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListMicrosoftTeamsConfiguredTeams) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3038,9 +3294,9 @@ func (m *awsRestjson1_deserializeOpUpdateAccountPreferences) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateAccountPreferences(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListMicrosoftTeamsConfiguredTeams(response, &metadata) } - output := &UpdateAccountPreferencesOutput{} + output := &ListMicrosoftTeamsConfiguredTeamsOutput{} out.Result = output var buff [1024]byte @@ -3061,7 +3317,7 @@ func (m *awsRestjson1_deserializeOpUpdateAccountPreferences) HandleDeserialize(c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateAccountPreferencesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListMicrosoftTeamsConfiguredTeamsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3075,7 +3331,7 @@ func (m *awsRestjson1_deserializeOpUpdateAccountPreferences) HandleDeserialize(c return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateAccountPreferences(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListMicrosoftTeamsConfiguredTeams(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3122,8 +3378,8 @@ func awsRestjson1_deserializeOpErrorUpdateAccountPreferences(response *smithyhtt case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - case strings.EqualFold("UpdateAccountPreferencesException", errorCode): - return awsRestjson1_deserializeErrorUpdateAccountPreferencesException(response, errorBody) + case strings.EqualFold("ListMicrosoftTeamsConfiguredTeamsException", errorCode): + return awsRestjson1_deserializeErrorListMicrosoftTeamsConfiguredTeamsException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -3135,7 +3391,7 @@ func awsRestjson1_deserializeOpErrorUpdateAccountPreferences(response *smithyhtt } } -func awsRestjson1_deserializeOpDocumentUpdateAccountPreferencesOutput(v **UpdateAccountPreferencesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListMicrosoftTeamsConfiguredTeamsOutput(v **ListMicrosoftTeamsConfiguredTeamsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3148,20 +3404,29 @@ func awsRestjson1_deserializeOpDocumentUpdateAccountPreferencesOutput(v **Update return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateAccountPreferencesOutput + var sv *ListMicrosoftTeamsConfiguredTeamsOutput if *v == nil { - sv = &UpdateAccountPreferencesOutput{} + sv = &ListMicrosoftTeamsConfiguredTeamsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "AccountPreferences": - if err := awsRestjson1_deserializeDocumentAccountPreferences(&sv.AccountPreferences, value); err != nil { + case "ConfiguredTeams": + if err := awsRestjson1_deserializeDocumentConfiguredTeamsList(&sv.ConfiguredTeams, 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 @@ -3171,14 +3436,14 @@ func awsRestjson1_deserializeOpDocumentUpdateAccountPreferencesOutput(v **Update return nil } -type awsRestjson1_deserializeOpUpdateChimeWebhookConfiguration struct { +type awsRestjson1_deserializeOpListMicrosoftTeamsUserIdentities struct { } -func (*awsRestjson1_deserializeOpUpdateChimeWebhookConfiguration) ID() string { +func (*awsRestjson1_deserializeOpListMicrosoftTeamsUserIdentities) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateChimeWebhookConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListMicrosoftTeamsUserIdentities) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3196,9 +3461,9 @@ func (m *awsRestjson1_deserializeOpUpdateChimeWebhookConfiguration) HandleDeseri } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateChimeWebhookConfiguration(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListMicrosoftTeamsUserIdentities(response, &metadata) } - output := &UpdateChimeWebhookConfigurationOutput{} + output := &ListMicrosoftTeamsUserIdentitiesOutput{} out.Result = output var buff [1024]byte @@ -3219,7 +3484,7 @@ func (m *awsRestjson1_deserializeOpUpdateChimeWebhookConfiguration) HandleDeseri return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateChimeWebhookConfigurationOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListMicrosoftTeamsUserIdentitiesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3233,7 +3498,7 @@ func (m *awsRestjson1_deserializeOpUpdateChimeWebhookConfiguration) HandleDeseri return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateChimeWebhookConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListMicrosoftTeamsUserIdentities(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3280,11 +3545,8 @@ func awsRestjson1_deserializeOpErrorUpdateChimeWebhookConfiguration(response *sm case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("UpdateChimeWebhookConfigurationException", errorCode): - return awsRestjson1_deserializeErrorUpdateChimeWebhookConfigurationException(response, errorBody) + case strings.EqualFold("ListMicrosoftTeamsUserIdentitiesException", errorCode): + return awsRestjson1_deserializeErrorListMicrosoftTeamsUserIdentitiesException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -3296,7 +3558,7 @@ func awsRestjson1_deserializeOpErrorUpdateChimeWebhookConfiguration(response *sm } } -func awsRestjson1_deserializeOpDocumentUpdateChimeWebhookConfigurationOutput(v **UpdateChimeWebhookConfigurationOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListMicrosoftTeamsUserIdentitiesOutput(v **ListMicrosoftTeamsUserIdentitiesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3309,17 +3571,26 @@ func awsRestjson1_deserializeOpDocumentUpdateChimeWebhookConfigurationOutput(v * return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateChimeWebhookConfigurationOutput + var sv *ListMicrosoftTeamsUserIdentitiesOutput if *v == nil { - sv = &UpdateChimeWebhookConfigurationOutput{} + sv = &ListMicrosoftTeamsUserIdentitiesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "WebhookConfiguration": - if err := awsRestjson1_deserializeDocumentChimeWebhookConfiguration(&sv.WebhookConfiguration, value); err != nil { + 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 "TeamsUserIdentities": + if err := awsRestjson1_deserializeDocumentTeamsUserIdentitiesList(&sv.TeamsUserIdentities, value); err != nil { return err } @@ -3332,14 +3603,14 @@ func awsRestjson1_deserializeOpDocumentUpdateChimeWebhookConfigurationOutput(v * return nil } -type awsRestjson1_deserializeOpUpdateMicrosoftTeamsChannelConfiguration struct { +type awsRestjson1_deserializeOpListTagsForResource struct { } -func (*awsRestjson1_deserializeOpUpdateMicrosoftTeamsChannelConfiguration) ID() string { +func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateMicrosoftTeamsChannelConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3357,9 +3628,9 @@ func (m *awsRestjson1_deserializeOpUpdateMicrosoftTeamsChannelConfiguration) Han } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateMicrosoftTeamsChannelConfiguration(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListTagsForResource(response, &metadata) } - output := &UpdateMicrosoftTeamsChannelConfigurationOutput{} + output := &ListTagsForResourceOutput{} out.Result = output var buff [1024]byte @@ -3380,7 +3651,7 @@ func (m *awsRestjson1_deserializeOpUpdateMicrosoftTeamsChannelConfiguration) Han return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateMicrosoftTeamsChannelConfigurationOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3394,7 +3665,7 @@ func (m *awsRestjson1_deserializeOpUpdateMicrosoftTeamsChannelConfiguration) Han return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateMicrosoftTeamsChannelConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3435,17 +3706,14 @@ func awsRestjson1_deserializeOpErrorUpdateMicrosoftTeamsChannelConfiguration(res } switch { - case strings.EqualFold("InvalidParameterException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - - case strings.EqualFold("InvalidRequestException", errorCode): - return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + case strings.EqualFold("InternalServiceError", errorCode): + return awsRestjson1_deserializeErrorInternalServiceError(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("UpdateTeamsChannelConfigurationException", errorCode): - return awsRestjson1_deserializeErrorUpdateTeamsChannelConfigurationException(response, errorBody) + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -3457,7 +3725,7 @@ func awsRestjson1_deserializeOpErrorUpdateMicrosoftTeamsChannelConfiguration(res } } -func awsRestjson1_deserializeOpDocumentUpdateMicrosoftTeamsChannelConfigurationOutput(v **UpdateMicrosoftTeamsChannelConfigurationOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3470,17 +3738,17 @@ func awsRestjson1_deserializeOpDocumentUpdateMicrosoftTeamsChannelConfigurationO return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateMicrosoftTeamsChannelConfigurationOutput + var sv *ListTagsForResourceOutput if *v == nil { - sv = &UpdateMicrosoftTeamsChannelConfigurationOutput{} + sv = &ListTagsForResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "ChannelConfiguration": - if err := awsRestjson1_deserializeDocumentTeamsChannelConfiguration(&sv.ChannelConfiguration, value); err != nil { + case "Tags": + if err := awsRestjson1_deserializeDocumentTagList(&sv.Tags, value); err != nil { return err } @@ -3493,14 +3761,14 @@ func awsRestjson1_deserializeOpDocumentUpdateMicrosoftTeamsChannelConfigurationO return nil } -type awsRestjson1_deserializeOpUpdateSlackChannelConfiguration struct { +type awsRestjson1_deserializeOpTagResource struct { } -func (*awsRestjson1_deserializeOpUpdateSlackChannelConfiguration) ID() string { +func (*awsRestjson1_deserializeOpTagResource) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateSlackChannelConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3518,44 +3786,16 @@ func (m *awsRestjson1_deserializeOpUpdateSlackChannelConfiguration) HandleDeseri } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateSlackChannelConfiguration(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorTagResource(response, &metadata) } - output := &UpdateSlackChannelConfigurationOutput{} + output := &TagResourceOutput{} 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_deserializeOpDocumentUpdateSlackChannelConfigurationOutput(&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_deserializeOpErrorUpdateSlackChannelConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3596,17 +3836,17 @@ func awsRestjson1_deserializeOpErrorUpdateSlackChannelConfiguration(response *sm } switch { - case strings.EqualFold("InvalidParameterException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - - case strings.EqualFold("InvalidRequestException", errorCode): - return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + case strings.EqualFold("InternalServiceError", errorCode): + return awsRestjson1_deserializeErrorInternalServiceError(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("UpdateSlackChannelConfigurationException", errorCode): - return awsRestjson1_deserializeErrorUpdateSlackChannelConfigurationException(response, errorBody) + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("TooManyTagsException", errorCode): + return awsRestjson1_deserializeErrorTooManyTagsException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -3618,63 +3858,62 @@ func awsRestjson1_deserializeOpErrorUpdateSlackChannelConfiguration(response *sm } } -func awsRestjson1_deserializeOpDocumentUpdateSlackChannelConfigurationOutput(v **UpdateSlackChannelConfigurationOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil +type awsRestjson1_deserializeOpUntagResource struct { +} + +func (*awsRestjson1_deserializeOpUntagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err } - shape, ok := value.(map[string]interface{}) + _, 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 fmt.Errorf("unexpected JSON type %v", value) + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } - var sv *UpdateSlackChannelConfigurationOutput - if *v == nil { - sv = &UpdateSlackChannelConfigurationOutput{} - } else { - sv = *v + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUntagResource(response, &metadata) } + output := &UntagResourceOutput{} + out.Result = output - for key, value := range shape { - switch key { - case "ChannelConfiguration": - if err := awsRestjson1_deserializeDocumentSlackChannelConfiguration(&sv.ChannelConfiguration, value); err != nil { - return err - } + span.End() + return out, metadata, err +} - default: - _, _ = key, value +func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) - } + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) } - *v = sv - return nil -} -func awsRestjson1_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ConflictException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - err := awsRestjson1_deserializeDocumentConflictException(&output, shape) - + jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3686,52 +3925,68 @@ func awsRestjson1_deserializeErrorConflictException(response *smithyhttp.Respons } errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } - return output -} + switch { + case strings.EqualFold("InternalServiceError", errorCode): + return awsRestjson1_deserializeErrorInternalServiceError(response, errorBody) -func awsRestjson1_deserializeErrorCreateChimeWebhookConfigurationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.CreateChimeWebhookConfigurationException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, } - return err + return genericError + } +} - err := awsRestjson1_deserializeDocumentCreateChimeWebhookConfigurationException(&output, shape) +type awsRestjson1_deserializeOpUpdateAccountPreferences struct { +} + +func (*awsRestjson1_deserializeOpUpdateAccountPreferences) ID() string { + return "OperationDeserializer" +} +func (m *awsRestjson1_deserializeOpUpdateAccountPreferences) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) + _, 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)} + } - return output -} + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdateAccountPreferences(response, &metadata) + } + output := &UpdateAccountPreferencesOutput{} + out.Result = output -func awsRestjson1_deserializeErrorCreateSlackChannelConfigurationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.CreateSlackChannelConfigurationException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -3742,83 +3997,45 @@ func awsRestjson1_deserializeErrorCreateSlackChannelConfigurationException(respo Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - err := awsRestjson1_deserializeDocumentCreateSlackChannelConfigurationException(&output, shape) - + err = awsRestjson1_deserializeOpDocumentUpdateAccountPreferencesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } - return err } - errorBody.Seek(0, io.SeekStart) - - return output + span.End() + return out, metadata, err } -func awsRestjson1_deserializeErrorCreateTeamsChannelConfigurationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.CreateTeamsChannelConfigurationException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err +func awsRestjson1_deserializeOpErrorUpdateAccountPreferences(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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()) - err := awsRestjson1_deserializeDocumentCreateTeamsChannelConfigurationException(&output, shape) + errorCode := "UnknownError" + errorMessage := errorCode - 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 + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) } - errorBody.Seek(0, io.SeekStart) - - return output -} - -func awsRestjson1_deserializeErrorDeleteChimeWebhookConfigurationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.DeleteChimeWebhookConfigurationException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - err := awsRestjson1_deserializeDocumentDeleteChimeWebhookConfigurationException(&output, shape) - + jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3830,16 +4047,903 @@ func awsRestjson1_deserializeErrorDeleteChimeWebhookConfigurationException(respo } errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } - return output -} + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) -func awsRestjson1_deserializeErrorDeleteMicrosoftTeamsUserIdentityException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.DeleteMicrosoftTeamsUserIdentityException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - body := io.TeeReader(errorBody, ringBuffer) + case strings.EqualFold("UpdateAccountPreferencesException", errorCode): + return awsRestjson1_deserializeErrorUpdateAccountPreferencesException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateAccountPreferencesOutput(v **UpdateAccountPreferencesOutput, 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 *UpdateAccountPreferencesOutput + if *v == nil { + sv = &UpdateAccountPreferencesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AccountPreferences": + if err := awsRestjson1_deserializeDocumentAccountPreferences(&sv.AccountPreferences, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateChimeWebhookConfiguration struct { +} + +func (*awsRestjson1_deserializeOpUpdateChimeWebhookConfiguration) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateChimeWebhookConfiguration) HandleDeserialize(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_deserializeOpErrorUpdateChimeWebhookConfiguration(response, &metadata) + } + output := &UpdateChimeWebhookConfigurationOutput{} + 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_deserializeOpDocumentUpdateChimeWebhookConfigurationOutput(&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_deserializeOpErrorUpdateChimeWebhookConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("UpdateChimeWebhookConfigurationException", errorCode): + return awsRestjson1_deserializeErrorUpdateChimeWebhookConfigurationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateChimeWebhookConfigurationOutput(v **UpdateChimeWebhookConfigurationOutput, 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 *UpdateChimeWebhookConfigurationOutput + if *v == nil { + sv = &UpdateChimeWebhookConfigurationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "WebhookConfiguration": + if err := awsRestjson1_deserializeDocumentChimeWebhookConfiguration(&sv.WebhookConfiguration, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateCustomAction struct { +} + +func (*awsRestjson1_deserializeOpUpdateCustomAction) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateCustomAction) HandleDeserialize(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_deserializeOpErrorUpdateCustomAction(response, &metadata) + } + output := &UpdateCustomActionOutput{} + 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_deserializeOpDocumentUpdateCustomActionOutput(&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_deserializeOpErrorUpdateCustomAction(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("InternalServiceError", errorCode): + return awsRestjson1_deserializeErrorInternalServiceError(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("UnauthorizedException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateCustomActionOutput(v **UpdateCustomActionOutput, 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 *UpdateCustomActionOutput + if *v == nil { + sv = &UpdateCustomActionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CustomActionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CustomActionArn to be of type string, got %T instead", value) + } + sv.CustomActionArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateMicrosoftTeamsChannelConfiguration struct { +} + +func (*awsRestjson1_deserializeOpUpdateMicrosoftTeamsChannelConfiguration) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateMicrosoftTeamsChannelConfiguration) HandleDeserialize(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_deserializeOpErrorUpdateMicrosoftTeamsChannelConfiguration(response, &metadata) + } + output := &UpdateMicrosoftTeamsChannelConfigurationOutput{} + 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_deserializeOpDocumentUpdateMicrosoftTeamsChannelConfigurationOutput(&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_deserializeOpErrorUpdateMicrosoftTeamsChannelConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("UpdateTeamsChannelConfigurationException", errorCode): + return awsRestjson1_deserializeErrorUpdateTeamsChannelConfigurationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateMicrosoftTeamsChannelConfigurationOutput(v **UpdateMicrosoftTeamsChannelConfigurationOutput, 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 *UpdateMicrosoftTeamsChannelConfigurationOutput + if *v == nil { + sv = &UpdateMicrosoftTeamsChannelConfigurationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ChannelConfiguration": + if err := awsRestjson1_deserializeDocumentTeamsChannelConfiguration(&sv.ChannelConfiguration, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateSlackChannelConfiguration struct { +} + +func (*awsRestjson1_deserializeOpUpdateSlackChannelConfiguration) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateSlackChannelConfiguration) HandleDeserialize(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_deserializeOpErrorUpdateSlackChannelConfiguration(response, &metadata) + } + output := &UpdateSlackChannelConfigurationOutput{} + 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_deserializeOpDocumentUpdateSlackChannelConfigurationOutput(&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_deserializeOpErrorUpdateSlackChannelConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("UpdateSlackChannelConfigurationException", errorCode): + return awsRestjson1_deserializeErrorUpdateSlackChannelConfigurationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateSlackChannelConfigurationOutput(v **UpdateSlackChannelConfigurationOutput, 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 *UpdateSlackChannelConfigurationOutput + if *v == nil { + sv = &UpdateSlackChannelConfigurationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ChannelConfiguration": + if err := awsRestjson1_deserializeDocumentSlackChannelConfiguration(&sv.ChannelConfiguration, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ConflictException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentConflictException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorCreateChimeWebhookConfigurationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.CreateChimeWebhookConfigurationException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentCreateChimeWebhookConfigurationException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorCreateSlackChannelConfigurationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.CreateSlackChannelConfigurationException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentCreateSlackChannelConfigurationException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorCreateTeamsChannelConfigurationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.CreateTeamsChannelConfigurationException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentCreateTeamsChannelConfigurationException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorDeleteChimeWebhookConfigurationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.DeleteChimeWebhookConfigurationException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentDeleteChimeWebhookConfigurationException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorDeleteMicrosoftTeamsUserIdentityException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.DeleteMicrosoftTeamsUserIdentityException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -4626,6 +5730,42 @@ func awsRestjson1_deserializeErrorTooManyTagsException(response *smithyhttp.Resp return output } +func awsRestjson1_deserializeErrorUnauthorizedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.UnauthorizedException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentUnauthorizedException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + func awsRestjson1_deserializeErrorUpdateAccountPreferencesException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.UpdateAccountPreferencesException{} var buff [1024]byte @@ -4805,9 +5945,83 @@ func awsRestjson1_deserializeDocumentAccountPreferences(v **types.AccountPrefere if value != nil { jtv, ok := value.(bool) if !ok { - return fmt.Errorf("expected BooleanAccountPreference to be of type *bool, got %T instead", value) + return fmt.Errorf("expected BooleanAccountPreference to be of type *bool, got %T instead", value) + } + sv.UserAuthorizationRequired = ptr.Bool(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAssociationList(v *[]types.AssociationListing, 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.AssociationListing + if *v == nil { + cv = []types.AssociationListing{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AssociationListing + destAddr := &col + if err := awsRestjson1_deserializeDocumentAssociationListing(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentAssociationListing(v **types.AssociationListing, 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.AssociationListing + if *v == nil { + sv = &types.AssociationListing{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Resource": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.UserAuthorizationRequired = ptr.Bool(jtv) + sv.Resource = ptr.String(jtv) } default: @@ -4905,13 +6119,277 @@ func awsRestjson1_deserializeDocumentChimeWebhookConfiguration(v **types.ChimeWe return err } - case "WebhookDescription": + case "WebhookDescription": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChimeWebhookDescription to be of type string, got %T instead", value) + } + sv.WebhookDescription = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentChimeWebhookConfigurationList(v *[]types.ChimeWebhookConfiguration, 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.ChimeWebhookConfiguration + if *v == nil { + cv = []types.ChimeWebhookConfiguration{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ChimeWebhookConfiguration + destAddr := &col + if err := awsRestjson1_deserializeDocumentChimeWebhookConfiguration(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentConfiguredTeam(v **types.ConfiguredTeam, 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.ConfiguredTeam + if *v == nil { + sv = &types.ConfiguredTeam{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceState to be of type string, got %T instead", value) + } + sv.State = ptr.String(jtv) + } + + case "StateReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.StateReason = ptr.String(jtv) + } + + case "TeamId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UUID to be of type string, got %T instead", value) + } + sv.TeamId = ptr.String(jtv) + } + + case "TeamName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UUID to be of type string, got %T instead", value) + } + sv.TeamName = ptr.String(jtv) + } + + case "TenantId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UUID to be of type string, got %T instead", value) + } + sv.TenantId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentConfiguredTeamsList(v *[]types.ConfiguredTeam, 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.ConfiguredTeam + if *v == nil { + cv = []types.ConfiguredTeam{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ConfiguredTeam + destAddr := &col + if err := awsRestjson1_deserializeDocumentConfiguredTeam(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ConflictException + if *v == nil { + sv = &types.ConflictException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCreateChimeWebhookConfigurationException(v **types.CreateChimeWebhookConfigurationException, 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.CreateChimeWebhookConfigurationException + if *v == nil { + sv = &types.CreateChimeWebhookConfigurationException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCreateSlackChannelConfigurationException(v **types.CreateSlackChannelConfigurationException, 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.CreateSlackChannelConfigurationException + if *v == nil { + sv = &types.CreateSlackChannelConfigurationException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ChimeWebhookDescription to be of type string, got %T instead", value) + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } - sv.WebhookDescription = ptr.String(jtv) + sv.Message = ptr.String(jtv) } default: @@ -4923,7 +6401,7 @@ func awsRestjson1_deserializeDocumentChimeWebhookConfiguration(v **types.ChimeWe return nil } -func awsRestjson1_deserializeDocumentChimeWebhookConfigurationList(v *[]types.ChimeWebhookConfiguration, value interface{}) error { +func awsRestjson1_deserializeDocumentCreateTeamsChannelConfigurationException(v **types.CreateTeamsChannelConfigurationException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4931,33 +6409,39 @@ func awsRestjson1_deserializeDocumentChimeWebhookConfigurationList(v *[]types.Ch return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.ChimeWebhookConfiguration + var sv *types.CreateTeamsChannelConfigurationException if *v == nil { - cv = []types.ChimeWebhookConfiguration{} + sv = &types.CreateTeamsChannelConfigurationException{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.ChimeWebhookConfiguration - destAddr := &col - if err := awsRestjson1_deserializeDocumentChimeWebhookConfiguration(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + } } - *v = cv + *v = sv return nil } -func awsRestjson1_deserializeDocumentConfiguredTeam(v **types.ConfiguredTeam, value interface{}) error { +func awsRestjson1_deserializeDocumentCustomAction(v **types.CustomAction, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4970,58 +6454,50 @@ func awsRestjson1_deserializeDocumentConfiguredTeam(v **types.ConfiguredTeam, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ConfiguredTeam + var sv *types.CustomAction if *v == nil { - sv = &types.ConfiguredTeam{} + sv = &types.CustomAction{} } else { sv = *v } for key, value := range shape { switch key { - case "State": + case "ActionName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ResourceState to be of type string, got %T instead", value) + return fmt.Errorf("expected CustomActionName to be of type string, got %T instead", value) } - sv.State = ptr.String(jtv) + sv.ActionName = ptr.String(jtv) } - case "StateReason": + case "AliasName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected CustomActionAliasName to be of type string, got %T instead", value) } - sv.StateReason = ptr.String(jtv) + sv.AliasName = ptr.String(jtv) } - case "TeamId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected UUID to be of type string, got %T instead", value) - } - sv.TeamId = ptr.String(jtv) + case "Attachments": + if err := awsRestjson1_deserializeDocumentCustomActionAttachmentList(&sv.Attachments, value); err != nil { + return err } - case "TeamName": + case "CustomActionArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected UUID to be of type string, got %T instead", value) + return fmt.Errorf("expected CustomActionArn to be of type string, got %T instead", value) } - sv.TeamName = ptr.String(jtv) + sv.CustomActionArn = ptr.String(jtv) } - case "TenantId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected UUID to be of type string, got %T instead", value) - } - sv.TenantId = ptr.String(jtv) + case "Definition": + if err := awsRestjson1_deserializeDocumentCustomActionDefinition(&sv.Definition, value); err != nil { + return err } default: @@ -5033,7 +6509,7 @@ func awsRestjson1_deserializeDocumentConfiguredTeam(v **types.ConfiguredTeam, va return nil } -func awsRestjson1_deserializeDocumentConfiguredTeamsList(v *[]types.ConfiguredTeam, value interface{}) error { +func awsRestjson1_deserializeDocumentCustomActionArnList(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5046,20 +6522,22 @@ func awsRestjson1_deserializeDocumentConfiguredTeamsList(v *[]types.ConfiguredTe return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.ConfiguredTeam + var cv []string if *v == nil { - cv = []types.ConfiguredTeam{} + cv = []string{} } else { cv = *v } for _, value := range shape { - var col types.ConfiguredTeam - destAddr := &col - if err := awsRestjson1_deserializeDocumentConfiguredTeam(&destAddr, value); err != nil { - return err + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CustomActionArn to be of type string, got %T instead", value) + } + col = jtv } - col = *destAddr cv = append(cv, col) } @@ -5067,7 +6545,7 @@ func awsRestjson1_deserializeDocumentConfiguredTeamsList(v *[]types.ConfiguredTe return nil } -func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { +func awsRestjson1_deserializeDocumentCustomActionAttachment(v **types.CustomActionAttachment, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5080,22 +6558,41 @@ func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictExcepti return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ConflictException + var sv *types.CustomActionAttachment if *v == nil { - sv = &types.ConflictException{} + sv = &types.CustomActionAttachment{} } else { sv = *v } for key, value := range shape { switch key { - case "message", "Message": + case "ButtonText": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + return fmt.Errorf("expected CustomActionButtonText to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.ButtonText = ptr.String(jtv) + } + + case "Criteria": + if err := awsRestjson1_deserializeDocumentCustomActionAttachmentCriteriaList(&sv.Criteria, value); err != nil { + return err + } + + case "NotificationType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CustomActionAttachmentNotificationType to be of type string, got %T instead", value) + } + sv.NotificationType = ptr.String(jtv) + } + + case "Variables": + if err := awsRestjson1_deserializeDocumentCustomActionAttachmentVariables(&sv.Variables, value); err != nil { + return err } default: @@ -5107,7 +6604,7 @@ func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictExcepti return nil } -func awsRestjson1_deserializeDocumentCreateChimeWebhookConfigurationException(v **types.CreateChimeWebhookConfigurationException, value interface{}) error { +func awsRestjson1_deserializeDocumentCustomActionAttachmentCriteria(v **types.CustomActionAttachmentCriteria, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5120,22 +6617,40 @@ func awsRestjson1_deserializeDocumentCreateChimeWebhookConfigurationException(v return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.CreateChimeWebhookConfigurationException + var sv *types.CustomActionAttachmentCriteria if *v == nil { - sv = &types.CreateChimeWebhookConfigurationException{} + sv = &types.CustomActionAttachmentCriteria{} } else { sv = *v } for key, value := range shape { switch key { - case "message", "Message": + case "Operator": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + return fmt.Errorf("expected CustomActionAttachmentCriteriaOperator to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.Operator = types.CustomActionAttachmentCriteriaOperator(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) + } + + case "VariableName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.VariableName = ptr.String(jtv) } default: @@ -5147,7 +6662,75 @@ func awsRestjson1_deserializeDocumentCreateChimeWebhookConfigurationException(v return nil } -func awsRestjson1_deserializeDocumentCreateSlackChannelConfigurationException(v **types.CreateSlackChannelConfigurationException, value interface{}) error { +func awsRestjson1_deserializeDocumentCustomActionAttachmentCriteriaList(v *[]types.CustomActionAttachmentCriteria, 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.CustomActionAttachmentCriteria + if *v == nil { + cv = []types.CustomActionAttachmentCriteria{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.CustomActionAttachmentCriteria + destAddr := &col + if err := awsRestjson1_deserializeDocumentCustomActionAttachmentCriteria(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentCustomActionAttachmentList(v *[]types.CustomActionAttachment, 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.CustomActionAttachment + if *v == nil { + cv = []types.CustomActionAttachment{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.CustomActionAttachment + destAddr := &col + if err := awsRestjson1_deserializeDocumentCustomActionAttachment(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentCustomActionAttachmentVariables(v *map[string]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5160,34 +6743,30 @@ func awsRestjson1_deserializeDocumentCreateSlackChannelConfigurationException(v return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.CreateSlackChannelConfigurationException + var mv map[string]string if *v == nil { - sv = &types.CreateSlackChannelConfigurationException{} + mv = map[string]string{} } else { - sv = *v + mv = *v } for key, value := range shape { - switch key { - case "message", "Message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) + var parsedVal string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - - default: - _, _ = key, value - + parsedVal = jtv } + mv[key] = parsedVal + } - *v = sv + *v = mv return nil } -func awsRestjson1_deserializeDocumentCreateTeamsChannelConfigurationException(v **types.CreateTeamsChannelConfigurationException, value interface{}) error { +func awsRestjson1_deserializeDocumentCustomActionDefinition(v **types.CustomActionDefinition, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5200,22 +6779,22 @@ func awsRestjson1_deserializeDocumentCreateTeamsChannelConfigurationException(v return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.CreateTeamsChannelConfigurationException + var sv *types.CustomActionDefinition if *v == nil { - sv = &types.CreateTeamsChannelConfigurationException{} + sv = &types.CustomActionDefinition{} } else { sv = *v } for key, value := range shape { switch key { - case "message", "Message": + case "CommandText": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.CommandText = ptr.String(jtv) } default: @@ -7042,6 +8621,46 @@ func awsRestjson1_deserializeDocumentTooManyTagsException(v **types.TooManyTagsE return nil } +func awsRestjson1_deserializeDocumentUnauthorizedException(v **types.UnauthorizedException, 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.UnauthorizedException + if *v == nil { + sv = &types.UnauthorizedException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentUpdateAccountPreferencesException(v **types.UpdateAccountPreferencesException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/chatbot/generated.json b/service/chatbot/generated.json index 13f6b83aa5d..ab56adda65f 100644 --- a/service/chatbot/generated.json +++ b/service/chatbot/generated.json @@ -8,10 +8,13 @@ "files": [ "api_client.go", "api_client_test.go", + "api_op_AssociateToConfiguration.go", "api_op_CreateChimeWebhookConfiguration.go", + "api_op_CreateCustomAction.go", "api_op_CreateMicrosoftTeamsChannelConfiguration.go", "api_op_CreateSlackChannelConfiguration.go", "api_op_DeleteChimeWebhookConfiguration.go", + "api_op_DeleteCustomAction.go", "api_op_DeleteMicrosoftTeamsChannelConfiguration.go", "api_op_DeleteMicrosoftTeamsConfiguredTeam.go", "api_op_DeleteMicrosoftTeamsUserIdentity.go", @@ -22,8 +25,12 @@ "api_op_DescribeSlackChannelConfigurations.go", "api_op_DescribeSlackUserIdentities.go", "api_op_DescribeSlackWorkspaces.go", + "api_op_DisassociateFromConfiguration.go", "api_op_GetAccountPreferences.go", + "api_op_GetCustomAction.go", "api_op_GetMicrosoftTeamsChannelConfiguration.go", + "api_op_ListAssociations.go", + "api_op_ListCustomActions.go", "api_op_ListMicrosoftTeamsChannelConfigurations.go", "api_op_ListMicrosoftTeamsConfiguredTeams.go", "api_op_ListMicrosoftTeamsUserIdentities.go", @@ -32,6 +39,7 @@ "api_op_UntagResource.go", "api_op_UpdateAccountPreferences.go", "api_op_UpdateChimeWebhookConfiguration.go", + "api_op_UpdateCustomAction.go", "api_op_UpdateMicrosoftTeamsChannelConfiguration.go", "api_op_UpdateSlackChannelConfiguration.go", "auth.go", @@ -47,6 +55,7 @@ "protocol_test.go", "serializers.go", "snapshot_test.go", + "types/enums.go", "types/errors.go", "types/types.go", "validators.go" diff --git a/service/chatbot/options.go b/service/chatbot/options.go index 01978f98252..9da9977e3d0 100644 --- a/service/chatbot/options.go +++ b/service/chatbot/options.go @@ -65,6 +65,10 @@ type Options struct { // Signature Version 4 (SigV4) Signer HTTPSignerV4 HTTPSignerV4 + // Provides idempotency tokens values that will be automatically populated into + // idempotent API operations. + IdempotencyTokenProvider IdempotencyTokenProvider + // The logger writer interface to write logging messages to. Logger logging.Logger diff --git a/service/chatbot/serializers.go b/service/chatbot/serializers.go index 6105b2a21a2..2fbabf485d1 100644 --- a/service/chatbot/serializers.go +++ b/service/chatbot/serializers.go @@ -15,6 +15,92 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) +type awsRestjson1_serializeOpAssociateToConfiguration struct { +} + +func (*awsRestjson1_serializeOpAssociateToConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpAssociateToConfiguration) 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.(*AssociateToConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/associate-to-configuration") + 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_serializeOpDocumentAssociateToConfigurationInput(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_serializeOpHttpBindingsAssociateToConfigurationInput(v *AssociateToConfigurationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentAssociateToConfigurationInput(v *AssociateToConfigurationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ChatConfiguration != nil { + ok := object.Key("ChatConfiguration") + ok.String(*v.ChatConfiguration) + } + + if v.Resource != nil { + ok := object.Key("Resource") + ok.String(*v.Resource) + } + + return nil +} + type awsRestjson1_serializeOpCreateChimeWebhookConfiguration struct { } @@ -130,6 +216,118 @@ func awsRestjson1_serializeOpDocumentCreateChimeWebhookConfigurationInput(v *Cre return nil } +type awsRestjson1_serializeOpCreateCustomAction struct { +} + +func (*awsRestjson1_serializeOpCreateCustomAction) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateCustomAction) 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.(*CreateCustomActionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/create-custom-action") + 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_serializeOpDocumentCreateCustomActionInput(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_serializeOpHttpBindingsCreateCustomActionInput(v *CreateCustomActionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateCustomActionInput(v *CreateCustomActionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ActionName != nil { + ok := object.Key("ActionName") + ok.String(*v.ActionName) + } + + if v.AliasName != nil { + ok := object.Key("AliasName") + ok.String(*v.AliasName) + } + + if v.Attachments != nil { + ok := object.Key("Attachments") + if err := awsRestjson1_serializeDocumentCustomActionAttachmentList(v.Attachments, ok); err != nil { + return err + } + } + + if v.ClientToken != nil { + ok := object.Key("ClientToken") + ok.String(*v.ClientToken) + } + + if v.Definition != nil { + ok := object.Key("Definition") + if err := awsRestjson1_serializeDocumentCustomActionDefinition(v.Definition, 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_serializeOpCreateMicrosoftTeamsChannelConfiguration struct { } @@ -485,6 +683,87 @@ func awsRestjson1_serializeOpDocumentDeleteChimeWebhookConfigurationInput(v *Del return nil } +type awsRestjson1_serializeOpDeleteCustomAction struct { +} + +func (*awsRestjson1_serializeOpDeleteCustomAction) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteCustomAction) 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.(*DeleteCustomActionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/delete-custom-action") + 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_serializeOpDocumentDeleteCustomActionInput(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_serializeOpHttpBindingsDeleteCustomActionInput(v *DeleteCustomActionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentDeleteCustomActionInput(v *DeleteCustomActionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CustomActionArn != nil { + ok := object.Key("CustomActionArn") + ok.String(*v.CustomActionArn) + } + + return nil +} + type awsRestjson1_serializeOpDeleteMicrosoftTeamsChannelConfiguration struct { } @@ -1345,14 +1624,14 @@ func awsRestjson1_serializeOpDocumentDescribeSlackWorkspacesInput(v *DescribeSla return nil } -type awsRestjson1_serializeOpGetAccountPreferences struct { +type awsRestjson1_serializeOpDisassociateFromConfiguration struct { } -func (*awsRestjson1_serializeOpGetAccountPreferences) ID() string { +func (*awsRestjson1_serializeOpDisassociateFromConfiguration) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpGetAccountPreferences) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDisassociateFromConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -1364,13 +1643,13 @@ func (m *awsRestjson1_serializeOpGetAccountPreferences) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetAccountPreferencesInput) + input, ok := in.Parameters.(*DisassociateFromConfigurationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/get-account-preferences") + opPath, opQuery := httpbinding.SplitURI("/disassociate-from-configuration") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -1386,6 +1665,17 @@ func (m *awsRestjson1_serializeOpGetAccountPreferences) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: err} } + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentDisassociateFromConfigurationInput(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} } @@ -1395,7 +1685,7 @@ func (m *awsRestjson1_serializeOpGetAccountPreferences) HandleSerialize(ctx cont span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsGetAccountPreferencesInput(v *GetAccountPreferencesInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDisassociateFromConfigurationInput(v *DisassociateFromConfigurationInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -1403,14 +1693,170 @@ func awsRestjson1_serializeOpHttpBindingsGetAccountPreferencesInput(v *GetAccoun return nil } -type awsRestjson1_serializeOpGetMicrosoftTeamsChannelConfiguration struct { -} +func awsRestjson1_serializeOpDocumentDisassociateFromConfigurationInput(v *DisassociateFromConfigurationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() -func (*awsRestjson1_serializeOpGetMicrosoftTeamsChannelConfiguration) ID() string { - return "OperationSerializer" -} + if v.ChatConfiguration != nil { + ok := object.Key("ChatConfiguration") + ok.String(*v.ChatConfiguration) + } -func (m *awsRestjson1_serializeOpGetMicrosoftTeamsChannelConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + if v.Resource != nil { + ok := object.Key("Resource") + ok.String(*v.Resource) + } + + return nil +} + +type awsRestjson1_serializeOpGetAccountPreferences struct { +} + +func (*awsRestjson1_serializeOpGetAccountPreferences) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetAccountPreferences) 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.(*GetAccountPreferencesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/get-account-preferences") + 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 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_serializeOpHttpBindingsGetAccountPreferencesInput(v *GetAccountPreferencesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +type awsRestjson1_serializeOpGetCustomAction struct { +} + +func (*awsRestjson1_serializeOpGetCustomAction) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetCustomAction) 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.(*GetCustomActionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/get-custom-action") + 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_serializeOpDocumentGetCustomActionInput(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_serializeOpHttpBindingsGetCustomActionInput(v *GetCustomActionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentGetCustomActionInput(v *GetCustomActionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CustomActionArn != nil { + ok := object.Key("CustomActionArn") + ok.String(*v.CustomActionArn) + } + + return nil +} + +type awsRestjson1_serializeOpGetMicrosoftTeamsChannelConfiguration struct { +} + +func (*awsRestjson1_serializeOpGetMicrosoftTeamsChannelConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetMicrosoftTeamsChannelConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -1484,6 +1930,183 @@ func awsRestjson1_serializeOpDocumentGetMicrosoftTeamsChannelConfigurationInput( return nil } +type awsRestjson1_serializeOpListAssociations struct { +} + +func (*awsRestjson1_serializeOpListAssociations) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListAssociations) 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.(*ListAssociationsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/list-associations") + 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_serializeOpDocumentListAssociationsInput(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_serializeOpHttpBindingsListAssociationsInput(v *ListAssociationsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentListAssociationsInput(v *ListAssociationsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ChatConfiguration != nil { + ok := object.Key("ChatConfiguration") + ok.String(*v.ChatConfiguration) + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpListCustomActions struct { +} + +func (*awsRestjson1_serializeOpListCustomActions) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListCustomActions) 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.(*ListCustomActionsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/list-custom-actions") + 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_serializeOpDocumentListCustomActionsInput(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_serializeOpHttpBindingsListCustomActionsInput(v *ListCustomActionsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentListCustomActionsInput(v *ListCustomActionsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + return nil +} + type awsRestjson1_serializeOpListMicrosoftTeamsChannelConfigurations struct { } @@ -2203,6 +2826,106 @@ func awsRestjson1_serializeOpDocumentUpdateChimeWebhookConfigurationInput(v *Upd return nil } +type awsRestjson1_serializeOpUpdateCustomAction struct { +} + +func (*awsRestjson1_serializeOpUpdateCustomAction) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateCustomAction) 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.(*UpdateCustomActionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/update-custom-action") + 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_serializeOpDocumentUpdateCustomActionInput(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_serializeOpHttpBindingsUpdateCustomActionInput(v *UpdateCustomActionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateCustomActionInput(v *UpdateCustomActionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AliasName != nil { + ok := object.Key("AliasName") + ok.String(*v.AliasName) + } + + if v.Attachments != nil { + ok := object.Key("Attachments") + if err := awsRestjson1_serializeDocumentCustomActionAttachmentList(v.Attachments, ok); err != nil { + return err + } + } + + if v.CustomActionArn != nil { + ok := object.Key("CustomActionArn") + ok.String(*v.CustomActionArn) + } + + if v.Definition != nil { + ok := object.Key("Definition") + if err := awsRestjson1_serializeDocumentCustomActionDefinition(v.Definition, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpUpdateMicrosoftTeamsChannelConfiguration struct { } @@ -2443,6 +3166,108 @@ func awsRestjson1_serializeOpDocumentUpdateSlackChannelConfigurationInput(v *Upd return nil } +func awsRestjson1_serializeDocumentCustomActionAttachment(v *types.CustomActionAttachment, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ButtonText != nil { + ok := object.Key("ButtonText") + ok.String(*v.ButtonText) + } + + if v.Criteria != nil { + ok := object.Key("Criteria") + if err := awsRestjson1_serializeDocumentCustomActionAttachmentCriteriaList(v.Criteria, ok); err != nil { + return err + } + } + + if v.NotificationType != nil { + ok := object.Key("NotificationType") + ok.String(*v.NotificationType) + } + + if v.Variables != nil { + ok := object.Key("Variables") + if err := awsRestjson1_serializeDocumentCustomActionAttachmentVariables(v.Variables, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentCustomActionAttachmentCriteria(v *types.CustomActionAttachmentCriteria, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Operator) > 0 { + ok := object.Key("Operator") + ok.String(string(v.Operator)) + } + + if v.Value != nil { + ok := object.Key("Value") + ok.String(*v.Value) + } + + if v.VariableName != nil { + ok := object.Key("VariableName") + ok.String(*v.VariableName) + } + + return nil +} + +func awsRestjson1_serializeDocumentCustomActionAttachmentCriteriaList(v []types.CustomActionAttachmentCriteria, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentCustomActionAttachmentCriteria(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentCustomActionAttachmentList(v []types.CustomActionAttachment, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentCustomActionAttachment(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentCustomActionAttachmentVariables(v map[string]string, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + om.String(v[key]) + } + return nil +} + +func awsRestjson1_serializeDocumentCustomActionDefinition(v *types.CustomActionDefinition, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CommandText != nil { + ok := object.Key("CommandText") + ok.String(*v.CommandText) + } + + return nil +} + func awsRestjson1_serializeDocumentGuardrailPolicyArnList(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() diff --git a/service/chatbot/snapshot/api_op_AssociateToConfiguration.go.snap b/service/chatbot/snapshot/api_op_AssociateToConfiguration.go.snap new file mode 100644 index 00000000000..21aac0f7104 --- /dev/null +++ b/service/chatbot/snapshot/api_op_AssociateToConfiguration.go.snap @@ -0,0 +1,41 @@ +AssociateToConfiguration + 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/chatbot/snapshot/api_op_CreateCustomAction.go.snap b/service/chatbot/snapshot/api_op_CreateCustomAction.go.snap new file mode 100644 index 00000000000..4ee88aa0715 --- /dev/null +++ b/service/chatbot/snapshot/api_op_CreateCustomAction.go.snap @@ -0,0 +1,42 @@ +CreateCustomAction + 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/chatbot/snapshot/api_op_DeleteCustomAction.go.snap b/service/chatbot/snapshot/api_op_DeleteCustomAction.go.snap new file mode 100644 index 00000000000..2855a804df5 --- /dev/null +++ b/service/chatbot/snapshot/api_op_DeleteCustomAction.go.snap @@ -0,0 +1,41 @@ +DeleteCustomAction + 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/chatbot/snapshot/api_op_DisassociateFromConfiguration.go.snap b/service/chatbot/snapshot/api_op_DisassociateFromConfiguration.go.snap new file mode 100644 index 00000000000..f0b436e2db0 --- /dev/null +++ b/service/chatbot/snapshot/api_op_DisassociateFromConfiguration.go.snap @@ -0,0 +1,41 @@ +DisassociateFromConfiguration + 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/chatbot/snapshot/api_op_GetCustomAction.go.snap b/service/chatbot/snapshot/api_op_GetCustomAction.go.snap new file mode 100644 index 00000000000..5761a77fa23 --- /dev/null +++ b/service/chatbot/snapshot/api_op_GetCustomAction.go.snap @@ -0,0 +1,41 @@ +GetCustomAction + 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/chatbot/snapshot/api_op_ListAssociations.go.snap b/service/chatbot/snapshot/api_op_ListAssociations.go.snap new file mode 100644 index 00000000000..75c2510927b --- /dev/null +++ b/service/chatbot/snapshot/api_op_ListAssociations.go.snap @@ -0,0 +1,41 @@ +ListAssociations + 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/chatbot/snapshot/api_op_ListCustomActions.go.snap b/service/chatbot/snapshot/api_op_ListCustomActions.go.snap new file mode 100644 index 00000000000..0d5765d2c14 --- /dev/null +++ b/service/chatbot/snapshot/api_op_ListCustomActions.go.snap @@ -0,0 +1,40 @@ +ListCustomActions + 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/chatbot/snapshot/api_op_UpdateCustomAction.go.snap b/service/chatbot/snapshot/api_op_UpdateCustomAction.go.snap new file mode 100644 index 00000000000..61527d8103d --- /dev/null +++ b/service/chatbot/snapshot/api_op_UpdateCustomAction.go.snap @@ -0,0 +1,41 @@ +UpdateCustomAction + 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/chatbot/snapshot_test.go b/service/chatbot/snapshot_test.go index 2493b6d5a19..c3f38cfd550 100644 --- a/service/chatbot/snapshot_test.go +++ b/service/chatbot/snapshot_test.go @@ -62,6 +62,18 @@ func testSnapshot(stack *middleware.Stack, operation string) error { } return snapshotOK{} } +func TestCheckSnapshot_AssociateToConfiguration(t *testing.T) { + svc := New(Options{}) + _, err := svc.AssociateToConfiguration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "AssociateToConfiguration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_CreateChimeWebhookConfiguration(t *testing.T) { svc := New(Options{}) _, err := svc.CreateChimeWebhookConfiguration(context.Background(), nil, func(o *Options) { @@ -74,6 +86,18 @@ func TestCheckSnapshot_CreateChimeWebhookConfiguration(t *testing.T) { } } +func TestCheckSnapshot_CreateCustomAction(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateCustomAction(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CreateCustomAction") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_CreateMicrosoftTeamsChannelConfiguration(t *testing.T) { svc := New(Options{}) _, err := svc.CreateMicrosoftTeamsChannelConfiguration(context.Background(), nil, func(o *Options) { @@ -110,6 +134,18 @@ func TestCheckSnapshot_DeleteChimeWebhookConfiguration(t *testing.T) { } } +func TestCheckSnapshot_DeleteCustomAction(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteCustomAction(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeleteCustomAction") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DeleteMicrosoftTeamsChannelConfiguration(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteMicrosoftTeamsChannelConfiguration(context.Background(), nil, func(o *Options) { @@ -230,6 +266,18 @@ func TestCheckSnapshot_DescribeSlackWorkspaces(t *testing.T) { } } +func TestCheckSnapshot_DisassociateFromConfiguration(t *testing.T) { + svc := New(Options{}) + _, err := svc.DisassociateFromConfiguration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DisassociateFromConfiguration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_GetAccountPreferences(t *testing.T) { svc := New(Options{}) _, err := svc.GetAccountPreferences(context.Background(), nil, func(o *Options) { @@ -242,6 +290,18 @@ func TestCheckSnapshot_GetAccountPreferences(t *testing.T) { } } +func TestCheckSnapshot_GetCustomAction(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetCustomAction(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetCustomAction") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_GetMicrosoftTeamsChannelConfiguration(t *testing.T) { svc := New(Options{}) _, err := svc.GetMicrosoftTeamsChannelConfiguration(context.Background(), nil, func(o *Options) { @@ -254,6 +314,30 @@ func TestCheckSnapshot_GetMicrosoftTeamsChannelConfiguration(t *testing.T) { } } +func TestCheckSnapshot_ListAssociations(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListAssociations(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListAssociations") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_ListCustomActions(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListCustomActions(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListCustomActions") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListMicrosoftTeamsChannelConfigurations(t *testing.T) { svc := New(Options{}) _, err := svc.ListMicrosoftTeamsChannelConfigurations(context.Background(), nil, func(o *Options) { @@ -350,6 +434,18 @@ func TestCheckSnapshot_UpdateChimeWebhookConfiguration(t *testing.T) { } } +func TestCheckSnapshot_UpdateCustomAction(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateCustomAction(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "UpdateCustomAction") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_UpdateMicrosoftTeamsChannelConfiguration(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateMicrosoftTeamsChannelConfiguration(context.Background(), nil, func(o *Options) { @@ -373,6 +469,18 @@ func TestCheckSnapshot_UpdateSlackChannelConfiguration(t *testing.T) { t.Fatal(err) } } +func TestUpdateSnapshot_AssociateToConfiguration(t *testing.T) { + svc := New(Options{}) + _, err := svc.AssociateToConfiguration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "AssociateToConfiguration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_CreateChimeWebhookConfiguration(t *testing.T) { svc := New(Options{}) _, err := svc.CreateChimeWebhookConfiguration(context.Background(), nil, func(o *Options) { @@ -385,6 +493,18 @@ func TestUpdateSnapshot_CreateChimeWebhookConfiguration(t *testing.T) { } } +func TestUpdateSnapshot_CreateCustomAction(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateCustomAction(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CreateCustomAction") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_CreateMicrosoftTeamsChannelConfiguration(t *testing.T) { svc := New(Options{}) _, err := svc.CreateMicrosoftTeamsChannelConfiguration(context.Background(), nil, func(o *Options) { @@ -421,6 +541,18 @@ func TestUpdateSnapshot_DeleteChimeWebhookConfiguration(t *testing.T) { } } +func TestUpdateSnapshot_DeleteCustomAction(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteCustomAction(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeleteCustomAction") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DeleteMicrosoftTeamsChannelConfiguration(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteMicrosoftTeamsChannelConfiguration(context.Background(), nil, func(o *Options) { @@ -541,6 +673,18 @@ func TestUpdateSnapshot_DescribeSlackWorkspaces(t *testing.T) { } } +func TestUpdateSnapshot_DisassociateFromConfiguration(t *testing.T) { + svc := New(Options{}) + _, err := svc.DisassociateFromConfiguration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DisassociateFromConfiguration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_GetAccountPreferences(t *testing.T) { svc := New(Options{}) _, err := svc.GetAccountPreferences(context.Background(), nil, func(o *Options) { @@ -553,6 +697,18 @@ func TestUpdateSnapshot_GetAccountPreferences(t *testing.T) { } } +func TestUpdateSnapshot_GetCustomAction(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetCustomAction(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetCustomAction") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_GetMicrosoftTeamsChannelConfiguration(t *testing.T) { svc := New(Options{}) _, err := svc.GetMicrosoftTeamsChannelConfiguration(context.Background(), nil, func(o *Options) { @@ -565,6 +721,30 @@ func TestUpdateSnapshot_GetMicrosoftTeamsChannelConfiguration(t *testing.T) { } } +func TestUpdateSnapshot_ListAssociations(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListAssociations(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListAssociations") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_ListCustomActions(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListCustomActions(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListCustomActions") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListMicrosoftTeamsChannelConfigurations(t *testing.T) { svc := New(Options{}) _, err := svc.ListMicrosoftTeamsChannelConfigurations(context.Background(), nil, func(o *Options) { @@ -661,6 +841,18 @@ func TestUpdateSnapshot_UpdateChimeWebhookConfiguration(t *testing.T) { } } +func TestUpdateSnapshot_UpdateCustomAction(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateCustomAction(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "UpdateCustomAction") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_UpdateMicrosoftTeamsChannelConfiguration(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateMicrosoftTeamsChannelConfiguration(context.Background(), nil, func(o *Options) { diff --git a/service/chatbot/types/enums.go b/service/chatbot/types/enums.go new file mode 100644 index 00000000000..7509dc7980c --- /dev/null +++ b/service/chatbot/types/enums.go @@ -0,0 +1,23 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +type CustomActionAttachmentCriteriaOperator string + +// Enum values for CustomActionAttachmentCriteriaOperator +const ( + CustomActionAttachmentCriteriaOperatorHasValue CustomActionAttachmentCriteriaOperator = "HAS_VALUE" + CustomActionAttachmentCriteriaOperatorEquals CustomActionAttachmentCriteriaOperator = "EQUALS" +) + +// Values returns all known values for CustomActionAttachmentCriteriaOperator. +// 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 (CustomActionAttachmentCriteriaOperator) Values() []CustomActionAttachmentCriteriaOperator { + return []CustomActionAttachmentCriteriaOperator{ + "HAS_VALUE", + "EQUALS", + } +} diff --git a/service/chatbot/types/errors.go b/service/chatbot/types/errors.go index ff329a079b7..554d25c3551 100644 --- a/service/chatbot/types/errors.go +++ b/service/chatbot/types/errors.go @@ -760,6 +760,33 @@ func (e *TooManyTagsException) ErrorCode() string { } func (e *TooManyTagsException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// The request was rejected because it doesn't have valid credentials for the +// target resource. +type UnauthorizedException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *UnauthorizedException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *UnauthorizedException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *UnauthorizedException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "UnauthorizedException" + } + return *e.ErrorCodeOverride +} +func (e *UnauthorizedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // We can’t process your request right now because of a server issue. Try again // later. type UpdateAccountPreferencesException struct { diff --git a/service/chatbot/types/types.go b/service/chatbot/types/types.go index 6e8c9485c6f..28c7a6b5276 100644 --- a/service/chatbot/types/types.go +++ b/service/chatbot/types/types.go @@ -27,10 +27,21 @@ type AccountPreferences struct { noSmithyDocumentSerde } +// A listing of an association with a channel configuration. +type AssociationListing struct { + + // The Amazon Resource Name (ARN) of the resource (for example, a custom action). + // + // This member is required. + Resource *string + + noSmithyDocumentSerde +} + // An AWS Chatbot configuration for Amazon Chime. type ChimeWebhookConfiguration struct { - // The Amazon Resource Number (ARN) of the ChimeWebhookConfiguration. + // The Amazon Resource Name (ARN) of the ChimeWebhookConfiguration. // // This member is required. ChatConfigurationArn *string @@ -118,10 +129,90 @@ type ConfiguredTeam struct { noSmithyDocumentSerde } +// Represents a parameterized command that can be invoked as an alias or as a +// notification button in the chat client. +type CustomAction struct { + + // The fully defined Amazon Resource Name (ARN) of the custom action. + // + // This member is required. + CustomActionArn *string + + // The definition of the command to run when invoked an alias or as an action + // button. + // + // This member is required. + Definition *CustomActionDefinition + + // The name of the custom action that is included in the ARN. + ActionName *string + + // The name used to invoke this action in the chat channel. For example, @aws run + // my-alias . + AliasName *string + + // Defines when this custom action button should be attached to a notification. + Attachments []CustomActionAttachment + + noSmithyDocumentSerde +} + +// Defines when a custom action button should be attached to a notification. +type CustomActionAttachment struct { + + // The text of the button that appears on the notification. + ButtonText *string + + // The criteria for when a button should be shown based on values in the + // notification. + Criteria []CustomActionAttachmentCriteria + + // The type of notification that the custom action should be attached to. + NotificationType *string + + // The variables to extract from the notification. + Variables map[string]string + + noSmithyDocumentSerde +} + +// A criteria for when a button should be shown based on values in the notification +type CustomActionAttachmentCriteria struct { + + // The operation to perform on the named variable. + // + // This member is required. + Operator CustomActionAttachmentCriteriaOperator + + // The name of the variable to operate on. + // + // This member is required. + VariableName *string + + // A value that is compared with the actual value of the variable based on the + // behavior of the operator. + Value *string + + noSmithyDocumentSerde +} + +// The definition of the command to run when invoked as an alias or as an action +// button. +type CustomActionDefinition struct { + + // The command string to run which may include variables by prefixing with a + // dollar sign ($). + // + // This member is required. + CommandText *string + + noSmithyDocumentSerde +} + // An AWS Chatbot configuration for Slack. type SlackChannelConfiguration struct { - // The Amazon Resource Number (ARN) of the SlackChannelConfiguration. + // The Amazon Resource Name (ARN) of the SlackChannelConfiguration. // // This member is required. ChatConfigurationArn *string @@ -197,8 +288,8 @@ type SlackChannelConfiguration struct { // Identifes a user level permission for a channel configuration. type SlackUserIdentity struct { - // The Amazon Resource Number (ARN) of the SlackChannelConfiguration associated - // with the user identity to delete. + // The Amazon Resource Name (ARN) of the SlackChannelConfiguration associated with + // the user identity to delete. // // This member is required. ChatConfigurationArn *string diff --git a/service/chatbot/validators.go b/service/chatbot/validators.go index dcdc976c3db..af21a380570 100644 --- a/service/chatbot/validators.go +++ b/service/chatbot/validators.go @@ -10,6 +10,26 @@ import ( "github.com/aws/smithy-go/middleware" ) +type validateOpAssociateToConfiguration struct { +} + +func (*validateOpAssociateToConfiguration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpAssociateToConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*AssociateToConfigurationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpAssociateToConfigurationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateChimeWebhookConfiguration struct { } @@ -30,6 +50,26 @@ func (m *validateOpCreateChimeWebhookConfiguration) HandleInitialize(ctx context return next.HandleInitialize(ctx, in) } +type validateOpCreateCustomAction struct { +} + +func (*validateOpCreateCustomAction) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateCustomAction) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateCustomActionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateCustomActionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateMicrosoftTeamsChannelConfiguration struct { } @@ -90,6 +130,26 @@ func (m *validateOpDeleteChimeWebhookConfiguration) HandleInitialize(ctx context return next.HandleInitialize(ctx, in) } +type validateOpDeleteCustomAction struct { +} + +func (*validateOpDeleteCustomAction) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteCustomAction) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteCustomActionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteCustomActionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteMicrosoftTeamsChannelConfiguration struct { } @@ -210,6 +270,46 @@ func (m *validateOpDeleteSlackWorkspaceAuthorization) HandleInitialize(ctx conte return next.HandleInitialize(ctx, in) } +type validateOpDisassociateFromConfiguration struct { +} + +func (*validateOpDisassociateFromConfiguration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDisassociateFromConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DisassociateFromConfigurationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDisassociateFromConfigurationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetCustomAction struct { +} + +func (*validateOpGetCustomAction) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetCustomAction) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetCustomActionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetCustomActionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetMicrosoftTeamsChannelConfiguration struct { } @@ -230,6 +330,26 @@ func (m *validateOpGetMicrosoftTeamsChannelConfiguration) HandleInitialize(ctx c return next.HandleInitialize(ctx, in) } +type validateOpListAssociations struct { +} + +func (*validateOpListAssociations) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListAssociations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListAssociationsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListAssociationsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListTagsForResource struct { } @@ -310,6 +430,26 @@ func (m *validateOpUpdateChimeWebhookConfiguration) HandleInitialize(ctx context return next.HandleInitialize(ctx, in) } +type validateOpUpdateCustomAction struct { +} + +func (*validateOpUpdateCustomAction) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateCustomAction) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateCustomActionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateCustomActionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateMicrosoftTeamsChannelConfiguration struct { } @@ -350,10 +490,18 @@ func (m *validateOpUpdateSlackChannelConfiguration) HandleInitialize(ctx context return next.HandleInitialize(ctx, in) } +func addOpAssociateToConfigurationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAssociateToConfiguration{}, middleware.After) +} + func addOpCreateChimeWebhookConfigurationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateChimeWebhookConfiguration{}, middleware.After) } +func addOpCreateCustomActionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateCustomAction{}, middleware.After) +} + func addOpCreateMicrosoftTeamsChannelConfigurationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateMicrosoftTeamsChannelConfiguration{}, middleware.After) } @@ -366,6 +514,10 @@ func addOpDeleteChimeWebhookConfigurationValidationMiddleware(stack *middleware. return stack.Initialize.Add(&validateOpDeleteChimeWebhookConfiguration{}, middleware.After) } +func addOpDeleteCustomActionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteCustomAction{}, middleware.After) +} + func addOpDeleteMicrosoftTeamsChannelConfigurationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteMicrosoftTeamsChannelConfiguration{}, middleware.After) } @@ -390,10 +542,22 @@ func addOpDeleteSlackWorkspaceAuthorizationValidationMiddleware(stack *middlewar return stack.Initialize.Add(&validateOpDeleteSlackWorkspaceAuthorization{}, middleware.After) } +func addOpDisassociateFromConfigurationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDisassociateFromConfiguration{}, middleware.After) +} + +func addOpGetCustomActionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetCustomAction{}, middleware.After) +} + func addOpGetMicrosoftTeamsChannelConfigurationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetMicrosoftTeamsChannelConfiguration{}, middleware.After) } +func addOpListAssociationsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListAssociations{}, middleware.After) +} + func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) } @@ -410,6 +574,10 @@ func addOpUpdateChimeWebhookConfigurationValidationMiddleware(stack *middleware. return stack.Initialize.Add(&validateOpUpdateChimeWebhookConfiguration{}, middleware.After) } +func addOpUpdateCustomActionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateCustomAction{}, middleware.After) +} + func addOpUpdateMicrosoftTeamsChannelConfigurationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateMicrosoftTeamsChannelConfiguration{}, middleware.After) } @@ -418,6 +586,90 @@ func addOpUpdateSlackChannelConfigurationValidationMiddleware(stack *middleware. return stack.Initialize.Add(&validateOpUpdateSlackChannelConfiguration{}, middleware.After) } +func validateCustomActionAttachment(v *types.CustomActionAttachment) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CustomActionAttachment"} + if v.Criteria != nil { + if err := validateCustomActionAttachmentCriteriaList(v.Criteria); err != nil { + invalidParams.AddNested("Criteria", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCustomActionAttachmentCriteria(v *types.CustomActionAttachmentCriteria) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CustomActionAttachmentCriteria"} + if len(v.Operator) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Operator")) + } + if v.VariableName == nil { + invalidParams.Add(smithy.NewErrParamRequired("VariableName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCustomActionAttachmentCriteriaList(v []types.CustomActionAttachmentCriteria) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CustomActionAttachmentCriteriaList"} + for i := range v { + if err := validateCustomActionAttachmentCriteria(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCustomActionAttachmentList(v []types.CustomActionAttachment) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CustomActionAttachmentList"} + for i := range v { + if err := validateCustomActionAttachment(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCustomActionDefinition(v *types.CustomActionDefinition) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CustomActionDefinition"} + if v.CommandText == nil { + invalidParams.Add(smithy.NewErrParamRequired("CommandText")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateTag(v *types.Tag) error { if v == nil { return nil @@ -470,6 +722,24 @@ func validateTags(v []types.Tag) error { } } +func validateOpAssociateToConfigurationInput(v *AssociateToConfigurationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AssociateToConfigurationInput"} + if v.Resource == nil { + invalidParams.Add(smithy.NewErrParamRequired("Resource")) + } + if v.ChatConfiguration == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChatConfiguration")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateChimeWebhookConfigurationInput(v *CreateChimeWebhookConfigurationInput) error { if v == nil { return nil @@ -502,6 +772,38 @@ func validateOpCreateChimeWebhookConfigurationInput(v *CreateChimeWebhookConfigu } } +func validateOpCreateCustomActionInput(v *CreateCustomActionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateCustomActionInput"} + if v.Definition == nil { + invalidParams.Add(smithy.NewErrParamRequired("Definition")) + } else if v.Definition != nil { + if err := validateCustomActionDefinition(v.Definition); err != nil { + invalidParams.AddNested("Definition", err.(smithy.InvalidParamsError)) + } + } + if v.Attachments != nil { + if err := validateCustomActionAttachmentList(v.Attachments); err != nil { + invalidParams.AddNested("Attachments", err.(smithy.InvalidParamsError)) + } + } + if v.Tags != nil { + if err := validateTagList(v.Tags); err != nil { + invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) + } + } + if v.ActionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ActionName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateMicrosoftTeamsChannelConfigurationInput(v *CreateMicrosoftTeamsChannelConfigurationInput) error { if v == nil { return nil @@ -578,6 +880,21 @@ func validateOpDeleteChimeWebhookConfigurationInput(v *DeleteChimeWebhookConfigu } } +func validateOpDeleteCustomActionInput(v *DeleteCustomActionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteCustomActionInput"} + if v.CustomActionArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("CustomActionArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteMicrosoftTeamsChannelConfigurationInput(v *DeleteMicrosoftTeamsChannelConfigurationInput) error { if v == nil { return nil @@ -677,6 +994,39 @@ func validateOpDeleteSlackWorkspaceAuthorizationInput(v *DeleteSlackWorkspaceAut } } +func validateOpDisassociateFromConfigurationInput(v *DisassociateFromConfigurationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DisassociateFromConfigurationInput"} + if v.Resource == nil { + invalidParams.Add(smithy.NewErrParamRequired("Resource")) + } + if v.ChatConfiguration == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChatConfiguration")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetCustomActionInput(v *GetCustomActionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetCustomActionInput"} + if v.CustomActionArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("CustomActionArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetMicrosoftTeamsChannelConfigurationInput(v *GetMicrosoftTeamsChannelConfigurationInput) error { if v == nil { return nil @@ -692,6 +1042,21 @@ func validateOpGetMicrosoftTeamsChannelConfigurationInput(v *GetMicrosoftTeamsCh } } +func validateOpListAssociationsInput(v *ListAssociationsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListAssociationsInput"} + if v.ChatConfiguration == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChatConfiguration")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { if v == nil { return nil @@ -762,6 +1127,33 @@ func validateOpUpdateChimeWebhookConfigurationInput(v *UpdateChimeWebhookConfigu } } +func validateOpUpdateCustomActionInput(v *UpdateCustomActionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateCustomActionInput"} + if v.CustomActionArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("CustomActionArn")) + } + if v.Definition == nil { + invalidParams.Add(smithy.NewErrParamRequired("Definition")) + } else if v.Definition != nil { + if err := validateCustomActionDefinition(v.Definition); err != nil { + invalidParams.AddNested("Definition", err.(smithy.InvalidParamsError)) + } + } + if v.Attachments != nil { + if err := validateCustomActionAttachmentList(v.Attachments); err != nil { + invalidParams.AddNested("Attachments", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateMicrosoftTeamsChannelConfigurationInput(v *UpdateMicrosoftTeamsChannelConfigurationInput) error { if v == nil { return nil diff --git a/service/cloudtrail/internal/endpoints/endpoints.go b/service/cloudtrail/internal/endpoints/endpoints.go index d9fd261ad87..a5b93c7fc83 100644 --- a/service/cloudtrail/internal/endpoints/endpoints.go +++ b/service/cloudtrail/internal/endpoints/endpoints.go @@ -355,12 +355,42 @@ var defaultPartitions = endpoints.Partitions{ RegionRegex: partitionRegexp.AwsIso, IsRegionalized: true, Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "fips-us-iso-east-1", + }: endpoints.Endpoint{ + Hostname: "cloudtrail-fips.us-iso-east-1.c2s.ic.gov", + CredentialScope: endpoints.CredentialScope{ + Region: "us-iso-east-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-us-iso-west-1", + }: endpoints.Endpoint{ + Hostname: "cloudtrail-fips.us-iso-west-1.c2s.ic.gov", + CredentialScope: endpoints.CredentialScope{ + Region: "us-iso-west-1", + }, + Deprecated: aws.TrueTernary, + }, endpoints.EndpointKey{ Region: "us-iso-east-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-iso-east-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "cloudtrail-fips.us-iso-east-1.c2s.ic.gov", + }, endpoints.EndpointKey{ Region: "us-iso-west-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-iso-west-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "cloudtrail-fips.us-iso-west-1.c2s.ic.gov", + }, }, }, { @@ -384,9 +414,24 @@ var defaultPartitions = endpoints.Partitions{ RegionRegex: partitionRegexp.AwsIsoB, IsRegionalized: true, Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "fips-us-isob-east-1", + }: endpoints.Endpoint{ + Hostname: "cloudtrail-fips.us-isob-east-1.sc2s.sgov.gov", + CredentialScope: endpoints.CredentialScope{ + Region: "us-isob-east-1", + }, + Deprecated: aws.TrueTernary, + }, endpoints.EndpointKey{ Region: "us-isob-east-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-isob-east-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "cloudtrail-fips.us-isob-east-1.sc2s.sgov.gov", + }, }, }, { diff --git a/service/codepipeline/api_op_PutApprovalResult.go b/service/codepipeline/api_op_PutApprovalResult.go index 263122c5c5b..e9e7a0174a3 100644 --- a/service/codepipeline/api_op_PutApprovalResult.go +++ b/service/codepipeline/api_op_PutApprovalResult.go @@ -57,6 +57,11 @@ type PutApprovalResultInput struct { // used to validate that the approval request corresponding to this token is still // valid. // + // For a pipeline where the execution mode is set to PARALLEL, the token required + // to approve/reject approval request as detailed above is not available. Instead, + // use the externalExecutionId from the GetPipelineState action as the token in + // the approval request. + // // This member is required. Token *string diff --git a/service/codepipeline/deserializers.go b/service/codepipeline/deserializers.go index a643bbe5b23..20e58a55835 100644 --- a/service/codepipeline/deserializers.go +++ b/service/codepipeline/deserializers.go @@ -6800,6 +6800,15 @@ func awsAwsjson11_deserializeDocumentActionExecution(v **types.ActionExecution, sv.LastUpdatedBy = ptr.String(jtv) } + case "logStreamARN": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LogStreamARN to be of type string, got %T instead", value) + } + sv.LogStreamARN = ptr.String(jtv) + } + case "percentComplete": if value != nil { jtv, ok := value.(json.Number) @@ -7201,6 +7210,15 @@ func awsAwsjson11_deserializeDocumentActionExecutionResult(v **types.ActionExecu sv.ExternalExecutionUrl = ptr.String(jtv) } + case "logStreamARN": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LogStreamARN to be of type string, got %T instead", value) + } + sv.LogStreamARN = ptr.String(jtv) + } + default: _, _ = key, value diff --git a/service/codepipeline/types/types.go b/service/codepipeline/types/types.go index 3b8bd9861a0..5326a6f8070 100644 --- a/service/codepipeline/types/types.go +++ b/service/codepipeline/types/types.go @@ -176,6 +176,9 @@ type ActionExecution struct { // The ARN of the user who last changed the pipeline. LastUpdatedBy *string + // The Amazon Resource Name (ARN) of the log stream for the action compute. + LogStreamARN *string + // A percentage of completeness of the action as it runs. PercentComplete *int32 @@ -318,6 +321,9 @@ type ActionExecutionResult struct { // URL or deployment endpoint) that is used when running the action. ExternalExecutionUrl *string + // The Amazon Resource Name (ARN) of the log stream for the action compute. + LogStreamARN *string + noSmithyDocumentSerde } diff --git a/service/cognitoidentityprovider/api_op_AdminCreateUser.go b/service/cognitoidentityprovider/api_op_AdminCreateUser.go index 6704df4fc58..a75a73e4bf0 100644 --- a/service/cognitoidentityprovider/api_op_AdminCreateUser.go +++ b/service/cognitoidentityprovider/api_op_AdminCreateUser.go @@ -25,7 +25,7 @@ import ( // sign in. // // If you have never used SMS text messages with Amazon Cognito or any other -// Amazon Web Servicesservice, Amazon Simple Notification Service might place your +// Amazon Web Services service, Amazon Simple Notification Service might place your // account in the SMS sandbox. In [sandbox mode], you can send messages only to verified phone // numbers. After you test your app while in the sandbox environment, you can move // out of the sandbox and into production. For more information, see [SMS message settings for Amazon Cognito user pools]in the Amazon @@ -38,8 +38,13 @@ import ( // Alternatively, you can call AdminCreateUser with SUPPRESS for the MessageAction // parameter, and Amazon Cognito won't send any email. // -// In either case, the user will be in the FORCE_CHANGE_PASSWORD state until they -// sign in and change their password. +// In either case, if the user has a password, they will be in the +// FORCE_CHANGE_PASSWORD state until they sign in and set their password. Your +// invitation message template must have the {####} password placeholder if your +// users have passwords. If your template doesn't have this placeholder, Amazon +// Cognito doesn't deliver the invitation message. In this case, you must update +// your message template and resend the password with a new AdminCreateUser +// request with a MessageAction value of RESEND . // // Amazon Cognito evaluates Identity and Access Management (IAM) policies in // requests for this API operation. For this operation, you must use IAM @@ -72,7 +77,7 @@ func (c *Client) AdminCreateUser(ctx context.Context, params *AdminCreateUserInp return out, nil } -// Represents the request to create a user in the specified user pool. +// Creates a new user in the specified user pool. type AdminCreateUserInput struct { // The user pool ID for the user pool where the user will be created. @@ -153,17 +158,26 @@ type AdminCreateUserInput struct { // The user's temporary password. This password must conform to the password // policy that you specified when you created the user pool. // + // The exception to the requirement for a password is when your user pool supports + // passwordless sign-in with email or SMS OTPs. To create a user with no password, + // omit this parameter or submit a blank value. You can only create a passwordless + // user when passwordless sign-in is available. See [the SignInPolicyType]property of [CreateUserPool] and [UpdateUserPool]. + // // The temporary password is valid only once. To complete the Admin Create User // flow, the user must enter the temporary password in the sign-in page, along with // a new password to be used in all future sign-ins. // - // This parameter isn't required. If you don't specify a value, Amazon Cognito - // generates one for you. + // If you don't specify a value, Amazon Cognito generates one for you unless you + // have passwordless options active for your user pool. // // The temporary password can only be used until the user account expiration limit // that you set for your user pool. To reset the account after that time limit, you // must call AdminCreateUser again and specify RESEND for the MessageAction // parameter. + // + // [UpdateUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateUserPool.html + // [CreateUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateUserPool.html + // [the SignInPolicyType]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_SignInPolicyType.html TemporaryPassword *string // An array of name-value pairs that contain user attributes and attribute values @@ -180,6 +194,11 @@ type AdminCreateUserInput struct { // email address or phone number. You can do this in your call to AdminCreateUser // or in the Users tab of the Amazon Cognito console for managing your user pools. // + // You must also provide an email address or phone number when you expect the user + // to do passwordless sign-in with an email or SMS OTP. These attributes must be + // provided when passwordless options are the only available, or when you don't + // submit a TemporaryPassword . + // // In your call to AdminCreateUser , you can set the email_verified attribute to // True , and you can set the phone_number_verified attribute to True . You can // also do this by calling [AdminUpdateUserAttributes]. diff --git a/service/cognitoidentityprovider/api_op_AdminGetUser.go b/service/cognitoidentityprovider/api_op_AdminGetUser.go index 4c95175113e..ff3549dc1f8 100644 --- a/service/cognitoidentityprovider/api_op_AdminGetUser.go +++ b/service/cognitoidentityprovider/api_op_AdminGetUser.go @@ -13,7 +13,8 @@ import ( ) // Gets the specified user by user name in a user pool as an administrator. Works -// on any user. +// on any user. This operation contributes to your monthly active user (MAU) count +// for the purpose of billing. // // Amazon Cognito evaluates Identity and Access Management (IAM) policies in // requests for this API operation. For this operation, you must use IAM diff --git a/service/cognitoidentityprovider/api_op_AdminInitiateAuth.go b/service/cognitoidentityprovider/api_op_AdminInitiateAuth.go index b2abad021b1..db9714f60ac 100644 --- a/service/cognitoidentityprovider/api_op_AdminInitiateAuth.go +++ b/service/cognitoidentityprovider/api_op_AdminInitiateAuth.go @@ -22,7 +22,7 @@ import ( // sign in. // // If you have never used SMS text messages with Amazon Cognito or any other -// Amazon Web Servicesservice, Amazon Simple Notification Service might place your +// Amazon Web Services service, Amazon Simple Notification Service might place your // account in the SMS sandbox. In [sandbox mode], you can send messages only to verified phone // numbers. After you test your app while in the sandbox environment, you can move // out of the sandbox and into production. For more information, see [SMS message settings for Amazon Cognito user pools]in the Amazon @@ -62,35 +62,47 @@ func (c *Client) AdminInitiateAuth(ctx context.Context, params *AdminInitiateAut // Initiates the authorization request, as an administrator. type AdminInitiateAuthInput struct { - // The authentication flow for this call to run. The API action will depend on - // this value. For example: + // The authentication flow that you want to initiate. The AuthParameters that you + // must submit are linked to the flow that you submit. For example: // - // - REFRESH_TOKEN_AUTH will take in a valid refresh token and return new tokens. + // - USER_AUTH : Request a preferred authentication type or review available + // authentication types. From the offered authentication types, select one in a + // challenge response and then authenticate with that method in an additional + // challenge response. // - // - USER_SRP_AUTH will take in USERNAME and SRP_A and return the Secure Remote - // Password (SRP) protocol variables to be used for next challenge execution. + // - REFRESH_TOKEN_AUTH : Receive new ID and access tokens when you pass a + // REFRESH_TOKEN parameter with a valid refresh token as the value. // - // - ADMIN_USER_PASSWORD_AUTH will take in USERNAME and PASSWORD and return the - // next challenge or tokens. + // - USER_SRP_AUTH : Receive secure remote password (SRP) variables for the next + // challenge, PASSWORD_VERIFIER , when you pass USERNAME and SRP_A parameters.. // - // Valid values include: + // - ADMIN_USER_PASSWORD_AUTH : Receive new tokens or the next challenge, for + // example SOFTWARE_TOKEN_MFA , when you pass USERNAME and PASSWORD parameters. // - // - USER_SRP_AUTH : Authentication flow for the Secure Remote Password (SRP) - // protocol. + // Valid values include the following: // - // - REFRESH_TOKEN_AUTH / REFRESH_TOKEN : Authentication flow for refreshing the - // access token and ID token by supplying a valid refresh token. + // USER_AUTH The entry point for sign-in with passwords, one-time passwords, + // biometric devices, and security keys. // - // - CUSTOM_AUTH : Custom authentication flow. + // USER_SRP_AUTH Username-password authentication with the Secure Remote Password + // (SRP) protocol. For more information, see [Use SRP password verification in custom authentication flow]. // - // - ADMIN_NO_SRP_AUTH : Non-SRP authentication flow; you can pass in the - // USERNAME and PASSWORD directly if the flow is enabled for calling the app - // client. + // REFRESH_TOKEN_AUTH and REFRESH_TOKEN Provide a valid refresh token and receive + // new ID and access tokens. For more information, see [Using the refresh token]. // - // - ADMIN_USER_PASSWORD_AUTH : Admin-based user password authentication. This - // replaces the ADMIN_NO_SRP_AUTH authentication flow. In this flow, Amazon - // Cognito receives the password in the request instead of using the SRP process to - // verify passwords. + // CUSTOM_AUTH Custom authentication with Lambda triggers. For more information, + // see [Custom authentication challenge Lambda triggers]. + // + // ADMIN_USER_PASSWORD_AUTH Username-password authentication with the password + // sent directly in the request. For more information, see [Admin authentication flow]. + // + // USER_PASSWORD_AUTH is a flow type of [InitiateAuth] and isn't valid for AdminInitiateAuth. + // + // [Use SRP password verification in custom authentication flow]: https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-authentication-flow.html#Using-SRP-password-verification-in-custom-authentication-flow + // [InitiateAuth]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_InitiateAuth.html + // [Using the refresh token]: https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-using-the-refresh-token.html + // [Admin authentication flow]: https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-authentication-flow.html#Built-in-authentication-flow-and-challenges + // [Custom authentication challenge Lambda triggers]: https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-challenge.html // // This member is required. AuthFlow types.AuthFlowType @@ -112,6 +124,10 @@ type AdminInitiateAuthInput struct { // The authentication parameters. These are inputs corresponding to the AuthFlow // that you're invoking. The required values depend on the value of AuthFlow : // + // - For USER_AUTH : USERNAME (required), PREFERRED_CHALLENGE . If you don't + // provide a value for PREFERRED_CHALLENGE , Amazon Cognito responds with the + // AvailableChallenges parameter that specifies the available sign-in methods. + // // - For USER_SRP_AUTH : USERNAME (required), SRP_A (required), SECRET_HASH // (required if the app client is configured with a client secret), DEVICE_KEY . // @@ -169,6 +185,10 @@ type AdminInitiateAuthInput struct { // // - Define auth challenge // + // - Custom email sender + // + // - Custom SMS sender + // // For more information, see [Customizing user pool Workflows with Lambda Triggers] in the Amazon Cognito Developer Guide. // // When you use the ClientMetadata parameter, remember that Amazon Cognito won't @@ -193,6 +213,10 @@ type AdminInitiateAuthInput struct { // Amazon Cognito when it makes API requests. ContextData *types.ContextDataType + // The optional session ID from a ConfirmSignUp API request. You can sign in a + // user directly from the sign-up process with the USER_AUTH authentication flow. + Session *string + noSmithyDocumentSerde } @@ -208,6 +232,22 @@ type AdminInitiateAuthOutput struct { // The name of the challenge that you're responding to with this call. This is // returned in the AdminInitiateAuth response if you must pass another challenge. // + // - WEB_AUTHN : Respond to the challenge with the results of a successful + // authentication with a passkey, or webauthN, factor. These are typically + // biometric devices or security keys. + // + // - PASSWORD : Respond with USER_PASSWORD_AUTH parameters: USERNAME (required), + // PASSWORD (required), SECRET_HASH (required if the app client is configured + // with a client secret), DEVICE_KEY . + // + // - PASSWORD_SRP : Respond with USER_SRP_AUTH parameters: USERNAME (required), + // SRP_A (required), SECRET_HASH (required if the app client is configured with a + // client secret), DEVICE_KEY . + // + // - SELECT_CHALLENGE : Respond to the challenge with USERNAME and an ANSWER that + // matches one of the challenge types in the AvailableChallenges response + // parameter. + // // - MFA_SETUP : If MFA is required, users who don't have at least one of the MFA // methods set up are presented with an MFA_SETUP challenge. The user must set up // at least one MFA type to continue to authenticate. @@ -245,6 +285,14 @@ type AdminInitiateAuthOutput struct { // parameter. You can also set values for attributes that aren't required by your // user pool and that your app client can write. For more information, see [AdminRespondToAuthChallenge]. // + // Amazon Cognito only returns this challenge for users who have temporary + // passwords. Because of this, and because in some cases you can create users who + // don't have values for required attributes, take care to collect and submit + // required-attribute values for all users who don't have passwords. You can create + // a user in the Amazon Cognito console without, for example, a required + // birthdate attribute. The API response from Amazon Cognito won't prompt you to + // submit a birthdate for the user if they don't have a password. + // // In a NEW_PASSWORD_REQUIRED challenge response, you can't modify a required // attribute that already has a value. In AdminRespondToAuthChallenge , set a // value for any keys that Amazon Cognito returned in the requiredAttributes diff --git a/service/cognitoidentityprovider/api_op_AdminLinkProviderForUser.go b/service/cognitoidentityprovider/api_op_AdminLinkProviderForUser.go index d393d486951..f54cc6bd95c 100644 --- a/service/cognitoidentityprovider/api_op_AdminLinkProviderForUser.go +++ b/service/cognitoidentityprovider/api_op_AdminLinkProviderForUser.go @@ -91,21 +91,20 @@ type AdminLinkProviderForUserInput struct { // ProviderAttributeValue for the user must be the same value as the id , sub , or // user_id value found in the social IdP token. // - // For OIDC, the ProviderAttributeName can be any value that matches a claim in - // the ID token, or that your app retrieves from the userInfo endpoint. You must - // map the claim to a user pool attribute in your IdP configuration, and set the - // user pool attribute name as the value of ProviderAttributeName in your - // AdminLinkProviderForUser request. + // For OIDC, the ProviderAttributeName can be any mapped value from a claim in the + // ID token, or that your app retrieves from the userInfo endpoint. For SAML, the + // ProviderAttributeName can be any mapped value from a claim in the SAML assertion. // - // For SAML, the ProviderAttributeName can be any value that matches a claim in - // the SAML assertion. To link SAML users based on the subject of the SAML - // assertion, map the subject to a claim through the SAML IdP and set that claim - // name as the value of ProviderAttributeName in your AdminLinkProviderForUser - // request. + // The following additional considerations apply to SourceUser for OIDC and SAML + // providers. // - // For both OIDC and SAML users, when you set ProviderAttributeName to - // Cognito_Subject , Amazon Cognito will automatically parse the default unique - // identifier found in the subject from the IdP token. + // - You must map the claim to a user pool attribute in your IdP configuration, + // and set the user pool attribute name as the value of ProviderAttributeName in + // your AdminLinkProviderForUser request. For example, email . + // + // - When you set ProviderAttributeName to Cognito_Subject , Amazon Cognito will + // automatically parse the default unique identifier found in the subject from the + // IdP token. // // This member is required. SourceUser *types.ProviderUserIdentifierType diff --git a/service/cognitoidentityprovider/api_op_AdminListDevices.go b/service/cognitoidentityprovider/api_op_AdminListDevices.go index 870285d431d..8f20e7670fe 100644 --- a/service/cognitoidentityprovider/api_op_AdminListDevices.go +++ b/service/cognitoidentityprovider/api_op_AdminListDevices.go @@ -11,7 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Lists devices, as an administrator. +// Lists a user's registered devices. // // Amazon Cognito evaluates Identity and Access Management (IAM) policies in // requests for this API operation. For this operation, you must use IAM diff --git a/service/cognitoidentityprovider/api_op_AdminResetUserPassword.go b/service/cognitoidentityprovider/api_op_AdminResetUserPassword.go index 6923002a8aa..837df6b5a4c 100644 --- a/service/cognitoidentityprovider/api_op_AdminResetUserPassword.go +++ b/service/cognitoidentityprovider/api_op_AdminResetUserPassword.go @@ -25,7 +25,7 @@ import ( // sign in. // // If you have never used SMS text messages with Amazon Cognito or any other -// Amazon Web Servicesservice, Amazon Simple Notification Service might place your +// Amazon Web Services service, Amazon Simple Notification Service might place your // account in the SMS sandbox. In [sandbox mode], you can send messages only to verified phone // numbers. After you test your app while in the sandbox environment, you can move // out of the sandbox and into production. For more information, see [SMS message settings for Amazon Cognito user pools]in the Amazon diff --git a/service/cognitoidentityprovider/api_op_AdminRespondToAuthChallenge.go b/service/cognitoidentityprovider/api_op_AdminRespondToAuthChallenge.go index 3ed77ded1e3..6e9ca746a16 100644 --- a/service/cognitoidentityprovider/api_op_AdminRespondToAuthChallenge.go +++ b/service/cognitoidentityprovider/api_op_AdminRespondToAuthChallenge.go @@ -29,7 +29,7 @@ import ( // sign in. // // If you have never used SMS text messages with Amazon Cognito or any other -// Amazon Web Servicesservice, Amazon Simple Notification Service might place your +// Amazon Web Services service, Amazon Simple Notification Service might place your // account in the SMS sandbox. In [sandbox mode], you can send messages only to verified phone // numbers. After you test your app while in the sandbox environment, you can move // out of the sandbox and into production. For more information, see [SMS message settings for Amazon Cognito user pools]in the Amazon @@ -96,14 +96,47 @@ type AdminRespondToAuthChallengeInput struct { // partial JSON request bodies that highlight challenge-response parameters. // // You must provide a SECRET_HASH parameter in all challenge responses to an app - // client that has a client secret. + // client that has a client secret. Include a DEVICE_KEY for device authentication. // - // SMS_MFA "ChallengeName": "SMS_MFA", "ChallengeResponses": {"SMS_MFA_CODE": + // SELECT_CHALLENGE "ChallengeName": "SELECT_CHALLENGE", "ChallengeResponses": { + // "USERNAME": "[username]", "ANSWER": "[Challenge name]"} + // + // Available challenges are PASSWORD , PASSWORD_SRP , EMAIL_OTP , SMS_OTP , and + // WEB_AUTHN . + // + // Complete authentication in the SELECT_CHALLENGE response for PASSWORD , + // PASSWORD_SRP , and WEB_AUTHN : + // + // - "ChallengeName": "SELECT_CHALLENGE", "ChallengeResponses": { "ANSWER": + // "WEB_AUTHN", "USERNAME": "[username]", "CREDENTIAL": + // "[AuthenticationResponseJSON]"} + // + // See [AuthenticationResponseJSON]. + // + // - "ChallengeName": "SELECT_CHALLENGE", "ChallengeResponses": { "ANSWER": + // "PASSWORD", "USERNAME": "[username]", "PASSWORD": "[password]"} + // + // - "ChallengeName": "SELECT_CHALLENGE", "ChallengeResponses": { "ANSWER": + // "PASSWORD_SRP", "USERNAME": "[username]", "SRP_A": "[SRP_A]"} + // + // For SMS_OTP and EMAIL_OTP , respond with the username and answer. Your user pool + // will send a code for the user to submit in the next challenge response. + // + // - "ChallengeName": "SELECT_CHALLENGE", "ChallengeResponses": { "ANSWER": + // "SMS_OTP", "USERNAME": "[username]"} + // + // - "ChallengeName": "SELECT_CHALLENGE", "ChallengeResponses": { "ANSWER": + // "EMAIL_OTP", "USERNAME": "[username]"} + // + // SMS_OTP "ChallengeName": "SMS_OTP", "ChallengeResponses": {"SMS_OTP_CODE": // "[code]", "USERNAME": "[username]"} // // EMAIL_OTP "ChallengeName": "EMAIL_OTP", "ChallengeResponses": // {"EMAIL_OTP_CODE": "[code]", "USERNAME": "[username]"} // + // SMS_MFA "ChallengeName": "SMS_MFA", "ChallengeResponses": {"SMS_MFA_CODE": + // "[code]", "USERNAME": "[username]"} + // // PASSWORD_VERIFIER This challenge response is part of the SRP flow. Amazon // Cognito requires that your application respond to this challenge within a few // seconds. When the response time exceeds this period, your user pool returns a @@ -156,6 +189,7 @@ type AdminRespondToAuthChallengeInput struct { // , see [Working with user devices in your user pool]. // // [Computing secret hash values]: https://docs.aws.amazon.com/cognito/latest/developerguide/signing-up-users-in-your-app.html#cognito-user-pools-computing-secret-hash + // [AuthenticationResponseJSON]: https://www.w3.org/TR/webauthn-3/#dictdef-authenticationresponsejson // [Working with user devices in your user pool]: https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-device-tracking.html ChallengeResponses map[string]string diff --git a/service/cognitoidentityprovider/api_op_AdminUpdateUserAttributes.go b/service/cognitoidentityprovider/api_op_AdminUpdateUserAttributes.go index e104869589a..70bdf71ec04 100644 --- a/service/cognitoidentityprovider/api_op_AdminUpdateUserAttributes.go +++ b/service/cognitoidentityprovider/api_op_AdminUpdateUserAttributes.go @@ -20,7 +20,7 @@ import ( // sign in. // // If you have never used SMS text messages with Amazon Cognito or any other -// Amazon Web Servicesservice, Amazon Simple Notification Service might place your +// Amazon Web Services service, Amazon Simple Notification Service might place your // account in the SMS sandbox. In [sandbox mode], you can send messages only to verified phone // numbers. After you test your app while in the sandbox environment, you can move // out of the sandbox and into production. For more information, see [SMS message settings for Amazon Cognito user pools]in the Amazon @@ -82,11 +82,12 @@ type AdminUpdateUserAttributesInput struct { // updates the attribute value. Your user can sign in and receive messages with the // original attribute value until they verify the new value. // - // To update the value of an attribute that requires verification in the same API - // request, include the email_verified or phone_number_verified attribute, with a - // value of true . If you set the email_verified or phone_number_verified value - // for an email or phone_number attribute that requires verification to true , - // Amazon Cognito doesn’t send a verification message to your user. + // To skip the verification message and update the value of an attribute that + // requires verification in the same API request, include the email_verified or + // phone_number_verified attribute, with a value of true . If you set the + // email_verified or phone_number_verified value for an email or phone_number + // attribute that requires verification to true , Amazon Cognito doesn’t send a + // verification message to your user. // // This member is required. UserAttributes []types.AttributeType diff --git a/service/cognitoidentityprovider/api_op_ChangePassword.go b/service/cognitoidentityprovider/api_op_ChangePassword.go index 6891a54638e..2e800dd5b6f 100644 --- a/service/cognitoidentityprovider/api_op_ChangePassword.go +++ b/service/cognitoidentityprovider/api_op_ChangePassword.go @@ -46,16 +46,16 @@ type ChangePasswordInput struct { // This member is required. AccessToken *string - // The old password. - // - // This member is required. - PreviousPassword *string - // The new password. // // This member is required. ProposedPassword *string + // The user's previous password. Required if the user has a password. If the user + // has no password and only signs in with passwordless authentication options, you + // can omit this parameter. + PreviousPassword *string + noSmithyDocumentSerde } diff --git a/service/cognitoidentityprovider/api_op_CompleteWebAuthnRegistration.go b/service/cognitoidentityprovider/api_op_CompleteWebAuthnRegistration.go new file mode 100644 index 00000000000..fd44e88bc8c --- /dev/null +++ b/service/cognitoidentityprovider/api_op_CompleteWebAuthnRegistration.go @@ -0,0 +1,165 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cognitoidentityprovider + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider/document" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Completes registration of a passkey authenticator for the current user. Your +// application provides data from a successful registration request with the data +// from the output of a [StartWebAuthnRegistration]. +// +// Authorize this action with a signed-in user's access token. It must include the +// scope aws.cognito.signin.user.admin . +// +// [StartWebAuthnRegistration]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_StartWebAuthnRegistration.html +func (c *Client) CompleteWebAuthnRegistration(ctx context.Context, params *CompleteWebAuthnRegistrationInput, optFns ...func(*Options)) (*CompleteWebAuthnRegistrationOutput, error) { + if params == nil { + params = &CompleteWebAuthnRegistrationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CompleteWebAuthnRegistration", params, optFns, c.addOperationCompleteWebAuthnRegistrationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CompleteWebAuthnRegistrationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CompleteWebAuthnRegistrationInput struct { + + // A valid access token that Amazon Cognito issued to the user whose passkey + // registration you want to verify. + // + // This member is required. + AccessToken *string + + // A [RegistrationResponseJSON] public-key credential response from the user's passkey provider. + // + // [RegistrationResponseJSON]: https://www.w3.org/TR/webauthn-3/#dictdef-registrationresponsejson + // + // This member is required. + Credential document.Interface + + noSmithyDocumentSerde +} + +type CompleteWebAuthnRegistrationOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCompleteWebAuthnRegistrationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpCompleteWebAuthnRegistration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCompleteWebAuthnRegistration{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CompleteWebAuthnRegistration"); 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 = 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 = addOpCompleteWebAuthnRegistrationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCompleteWebAuthnRegistration(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_opCompleteWebAuthnRegistration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CompleteWebAuthnRegistration", + } +} diff --git a/service/cognitoidentityprovider/api_op_ConfirmSignUp.go b/service/cognitoidentityprovider/api_op_ConfirmSignUp.go index 438e7bef86e..a56231719b6 100644 --- a/service/cognitoidentityprovider/api_op_ConfirmSignUp.go +++ b/service/cognitoidentityprovider/api_op_ConfirmSignUp.go @@ -117,6 +117,10 @@ type ConfirmSignUpInput struct { // of a user pool client and username plus the client ID in the message. SecretHash *string + // The optional session ID from a SignUp API request. You can sign in a user + // directly from the sign-up process with the USER_AUTH authentication flow. + Session *string + // Contextual data about your user session, such as the device fingerprint, IP // address, or location. Amazon Cognito advanced security evaluates the risk of an // authentication event based on the context that your app generates and passes to @@ -128,6 +132,16 @@ type ConfirmSignUpInput struct { // Represents the response from the server for the registration confirmation. type ConfirmSignUpOutput struct { + + // You can automatically sign users in with the one-time password that they + // provided in a successful ConfirmSignUp request. To do this, pass the Session + // parameter from the ConfirmSignUp response in the Session parameter of an [InitiateAuth] or [AdminInitiateAuth] + // request. + // + // [AdminInitiateAuth]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminInitiateAuth.html + // [InitiateAuth]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_InitiateAuth.html + Session *string + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/cognitoidentityprovider/api_op_CreateManagedLoginBranding.go b/service/cognitoidentityprovider/api_op_CreateManagedLoginBranding.go new file mode 100644 index 00000000000..1e254e9b5c3 --- /dev/null +++ b/service/cognitoidentityprovider/api_op_CreateManagedLoginBranding.go @@ -0,0 +1,215 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cognitoidentityprovider + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider/document" + "github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a new set of branding settings for a user pool style and associates it +// with an app client. This operation is the programmatic option for the creation +// of a new style in the branding designer. +// +// Provides values for UI customization in a Settings JSON object and image files +// in an Assets array. To send the JSON object Document type parameter in Settings +// , you might need to update to the most recent version of your Amazon Web +// Services SDK. +// +// This operation has a 2-megabyte request-size limit and include the CSS settings +// and image assets for your app client. Your branding settings might exceed 2MB in +// size. Amazon Cognito doesn't require that you pass all parameters in one request +// and preserves existing style settings that you don't specify. If your request is +// larger than 2MB, separate it into multiple requests, each with a size smaller +// than the limit. +// +// For more information, see [API and SDK operations for managed login branding] +// +// Amazon Cognito evaluates Identity and Access Management (IAM) policies in +// requests for this API operation. For this operation, you must use IAM +// credentials to authorize requests, and you must grant yourself the corresponding +// IAM permission in a policy. +// +// # Learn more +// +// [Signing Amazon Web Services API Requests] +// +// [Using the Amazon Cognito user pools API and user pool endpoints] +// +// [Using the Amazon Cognito user pools API and user pool endpoints]: https://docs.aws.amazon.com/cognito/latest/developerguide/user-pools-API-operations.html +// [API and SDK operations for managed login branding]: https://docs.aws.amazon.com/cognito/latest/developerguide/managed-login-brandingdesigner.html#branding-designer-api +// [Signing Amazon Web Services API Requests]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-signing.html +func (c *Client) CreateManagedLoginBranding(ctx context.Context, params *CreateManagedLoginBrandingInput, optFns ...func(*Options)) (*CreateManagedLoginBrandingOutput, error) { + if params == nil { + params = &CreateManagedLoginBrandingInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateManagedLoginBranding", params, optFns, c.addOperationCreateManagedLoginBrandingMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateManagedLoginBrandingOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateManagedLoginBrandingInput struct { + + // The app client that you want to create the branding style for. Each style is + // permanently linked to an app client. To change the style for an app client, + // delete the existing style with [DeleteManagedLoginBranding]and create a new one. + // + // [DeleteManagedLoginBranding]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DeleteManagedLoginBranding.html + // + // This member is required. + ClientId *string + + // The ID of the user pool where you want to create a new branding style. + // + // This member is required. + UserPoolId *string + + // An array of image files that you want to apply to roles like backgrounds, + // logos, and icons. Each object must also indicate whether it is for dark mode, + // light mode, or browser-adaptive mode. + Assets []types.AssetType + + // A JSON file, encoded as a Document type, with the the settings that you want to + // apply to your style. + Settings document.Interface + + // When true, applies the default branding style options. This option reverts to + // default style options that are managed by Amazon Cognito. You can modify them + // later in the branding designer. + // + // When you specify true for this option, you must also omit values for Settings + // and Assets in the request. + UseCognitoProvidedValues bool + + noSmithyDocumentSerde +} + +type CreateManagedLoginBrandingOutput struct { + + // The details of the branding style that you created. + ManagedLoginBranding *types.ManagedLoginBrandingType + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateManagedLoginBrandingMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateManagedLoginBranding{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateManagedLoginBranding{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateManagedLoginBranding"); 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 = addOpCreateManagedLoginBrandingValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateManagedLoginBranding(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_opCreateManagedLoginBranding(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateManagedLoginBranding", + } +} diff --git a/service/cognitoidentityprovider/api_op_CreateUserPool.go b/service/cognitoidentityprovider/api_op_CreateUserPool.go index 0c3ecd7cc44..f50e0bd4375 100644 --- a/service/cognitoidentityprovider/api_op_CreateUserPool.go +++ b/service/cognitoidentityprovider/api_op_CreateUserPool.go @@ -20,7 +20,7 @@ import ( // sign in. // // If you have never used SMS text messages with Amazon Cognito or any other -// Amazon Web Servicesservice, Amazon Simple Notification Service might place your +// Amazon Web Services service, Amazon Simple Notification Service might place your // account in the SMS sandbox. In [sandbox mode], you can send messages only to verified phone // numbers. After you test your app while in the sandbox environment, you can move // out of the sandbox and into production. For more information, see [SMS message settings for Amazon Cognito user pools]in the Amazon @@ -122,18 +122,9 @@ type CreateUserPoolInput struct { // [VerificationMessageTemplateType]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_VerificationMessageTemplateType.html EmailVerificationSubject *string - // The Lambda trigger configuration information for the new user pool. - // - // In a push model, event sources (such as Amazon S3 and custom applications) need - // permission to invoke a function. So you must make an extra call to add - // permission for these event sources to invoke your Lambda function. - // - // For more information on using the Lambda API to add permission, see[AddPermission] . - // - // For adding permission using the CLI, see[add-permission] . - // - // [AddPermission]: https://docs.aws.amazon.com/lambda/latest/dg/API_AddPermission.html - // [add-permission]: https://docs.aws.amazon.com/cli/latest/reference/lambda/add-permission.html + // A collection of user pool Lambda triggers. Amazon Cognito invokes triggers at + // several possible stages of authentication operations. Triggers can modify the + // outcome of the operations that invoked them. LambdaConfig *types.LambdaConfigType // Specifies MFA configuration details. @@ -184,6 +175,13 @@ type CreateUserPoolInput struct { // purpose, owner, environment, or other criteria. UserPoolTags map[string]string + // The user pool [feature plan], or tier. This parameter determines the eligibility of the user + // pool for features like managed login, access-token customization, and threat + // protection. Defaults to ESSENTIALS . + // + // [feature plan]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-sign-in-feature-plans.html + UserPoolTier types.UserPoolTierType + // Specifies whether a user can use an email address or phone number as a username // when they sign up. UsernameAttributes []types.UsernameAttributeType @@ -202,8 +200,14 @@ type CreateUserPoolInput struct { // [UsernameConfigurationType]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UsernameConfigurationType.html UsernameConfiguration *types.UsernameConfigurationType - // The template for the verification message that the user sees when the app - // requests permission to access the user's information. + // The template for the verification message that your user pool delivers to users + // who set an email address or phone number attribute. + // + // Set the email message type that corresponds to your DefaultEmailOption + // selection. For CONFIRM_WITH_LINK , specify an EmailMessageByLink and leave + // EmailMessage blank. For CONFIRM_WITH_CODE , specify an EmailMessage and leave + // EmailMessageByLink blank. When you supply both parameters with either choice, + // Amazon Cognito returns an error. VerificationMessageTemplate *types.VerificationMessageTemplateType noSmithyDocumentSerde diff --git a/service/cognitoidentityprovider/api_op_CreateUserPoolClient.go b/service/cognitoidentityprovider/api_op_CreateUserPoolClient.go index 5cdbfbd0af4..aa515207713 100644 --- a/service/cognitoidentityprovider/api_op_CreateUserPoolClient.go +++ b/service/cognitoidentityprovider/api_op_CreateUserPoolClient.go @@ -183,7 +183,7 @@ type CreateUserPoolClientInput struct { // EnablePropagateAdditionalUserContextData in an app client that has a client // secret. // - // [Adding advanced security to a user pool]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pool-settings-advanced-security.html + // [Adding advanced security to a user pool]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pool-settings-threat-protection.html EnablePropagateAdditionalUserContextData *bool // Activates or deactivates token revocation. For more information about revoking @@ -206,6 +206,14 @@ type CreateUserPoolClientInput struct { // // Valid values include: // + // - ALLOW_USER_AUTH : Enable selection-based sign-in with USER_AUTH . This + // setting covers username-password, secure remote password (SRP), passwordless, + // and passkey authentication. This authentiation flow can do username-password and + // SRP authentication without other ExplicitAuthFlows permitting them. For + // example users can complete an SRP challenge through USER_AUTH without the flow + // USER_SRP_AUTH being active for the app client. This flow doesn't include + // CUSTOM_AUTH . + // // - ALLOW_ADMIN_USER_PASSWORD_AUTH : Enable admin based user password // authentication flow ADMIN_USER_PASSWORD_AUTH . This setting replaces the // ADMIN_NO_SRP_AUTH setting. With this authentication flow, your app passes a @@ -308,6 +316,14 @@ type CreateUserPoolClientInput struct { // SignInWithApple , and LoginWithAmazon . You can also specify the names that you // configured for the SAML and OIDC IdPs in your user pool, for example MySAMLIdP // or MyOIDCIdP . + // + // This setting applies to providers that you can access with the [hosted UI and OAuth 2.0 authorization server]. The removal of + // COGNITO from this list doesn't prevent authentication operations for local users + // with the user pools API in an Amazon Web Services SDK. The only way to prevent + // API-based authentication is to block access with a [WAF rule]. + // + // [WAF rule]: https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-waf.html + // [hosted UI and OAuth 2.0 authorization server]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-app-integration.html SupportedIdentityProviders []string // The units in which the validity times are represented. The default unit for diff --git a/service/cognitoidentityprovider/api_op_CreateUserPoolDomain.go b/service/cognitoidentityprovider/api_op_CreateUserPoolDomain.go index 8e73d6f8cdd..ff5100d43d0 100644 --- a/service/cognitoidentityprovider/api_op_CreateUserPoolDomain.go +++ b/service/cognitoidentityprovider/api_op_CreateUserPoolDomain.go @@ -11,7 +11,9 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Creates a new domain for a user pool. +// Creates a new domain for a user pool. The domain hosts user pool domain +// services like managed login, the hosted UI (classic), and the user pool +// authorization server. // // Amazon Cognito evaluates Identity and Access Management (IAM) policies in // requests for this API operation. For this operation, you must use IAM @@ -50,7 +52,7 @@ type CreateUserPoolDomainInput struct { // This member is required. Domain *string - // The user pool ID. + // The ID of the user pool where you want to add a domain. // // This member is required. UserPoolId *string @@ -67,6 +69,16 @@ type CreateUserPoolDomainInput struct { // [Configuring a User Pool Domain]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-assign-domain.html CustomDomainConfig *types.CustomDomainConfigType + // The version of managed login branding that you want to apply to your domain. A + // value of 1 indicates hosted UI (classic) branding and a version of 2 indicates + // managed login branding. + // + // Managed login requires that your user pool be configured for any [feature plan] other than + // Lite . + // + // [feature plan]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-sign-in-feature-plans.html + ManagedLoginVersion *int32 + noSmithyDocumentSerde } @@ -78,6 +90,11 @@ type CreateUserPoolDomainOutput struct { // Cognito prefix domain, this operation returns a blank response. CloudFrontDomain *string + // The version of managed login branding applied your domain. A value of 1 + // indicates hosted UI (classic) branding and a version of 2 indicates managed + // login branding. + ManagedLoginVersion *int32 + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/cognitoidentityprovider/api_op_DeleteManagedLoginBranding.go b/service/cognitoidentityprovider/api_op_DeleteManagedLoginBranding.go new file mode 100644 index 00000000000..e941c267156 --- /dev/null +++ b/service/cognitoidentityprovider/api_op_DeleteManagedLoginBranding.go @@ -0,0 +1,173 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cognitoidentityprovider + +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 managed login branding style. When you delete a style, you delete the +// branding association for an app client and restore it to default settings. +// +// Amazon Cognito evaluates Identity and Access Management (IAM) policies in +// requests for this API operation. For this operation, you must use IAM +// credentials to authorize requests, and you must grant yourself the corresponding +// IAM permission in a policy. +// +// # Learn more +// +// [Signing Amazon Web Services API Requests] +// +// [Using the Amazon Cognito user pools API and user pool endpoints] +// +// [Using the Amazon Cognito user pools API and user pool endpoints]: https://docs.aws.amazon.com/cognito/latest/developerguide/user-pools-API-operations.html +// [Signing Amazon Web Services API Requests]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-signing.html +func (c *Client) DeleteManagedLoginBranding(ctx context.Context, params *DeleteManagedLoginBrandingInput, optFns ...func(*Options)) (*DeleteManagedLoginBrandingOutput, error) { + if params == nil { + params = &DeleteManagedLoginBrandingInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteManagedLoginBranding", params, optFns, c.addOperationDeleteManagedLoginBrandingMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteManagedLoginBrandingOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteManagedLoginBrandingInput struct { + + // The ID of the managed login branding style that you want to delete. + // + // This member is required. + ManagedLoginBrandingId *string + + // The ID of the user pool that contains the managed login branding style that you + // want to delete. + // + // This member is required. + UserPoolId *string + + noSmithyDocumentSerde +} + +type DeleteManagedLoginBrandingOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteManagedLoginBrandingMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteManagedLoginBranding{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteManagedLoginBranding{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteManagedLoginBranding"); 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 = addOpDeleteManagedLoginBrandingValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteManagedLoginBranding(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_opDeleteManagedLoginBranding(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteManagedLoginBranding", + } +} diff --git a/service/cognitoidentityprovider/api_op_DeleteWebAuthnCredential.go b/service/cognitoidentityprovider/api_op_DeleteWebAuthnCredential.go new file mode 100644 index 00000000000..e0590636736 --- /dev/null +++ b/service/cognitoidentityprovider/api_op_DeleteWebAuthnCredential.go @@ -0,0 +1,162 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cognitoidentityprovider + +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 registered passkey, or webauthN, device for the currently signed-in +// user. +// +// Authorize this action with a signed-in user's access token. It must include the +// scope aws.cognito.signin.user.admin . +func (c *Client) DeleteWebAuthnCredential(ctx context.Context, params *DeleteWebAuthnCredentialInput, optFns ...func(*Options)) (*DeleteWebAuthnCredentialOutput, error) { + if params == nil { + params = &DeleteWebAuthnCredentialInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteWebAuthnCredential", params, optFns, c.addOperationDeleteWebAuthnCredentialMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteWebAuthnCredentialOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteWebAuthnCredentialInput struct { + + // A valid access token that Amazon Cognito issued to the user whose passkey you + // want to delete. + // + // This member is required. + AccessToken *string + + // The unique identifier of the passkey that you want to delete. Look up + // registered devices with [ListWebAuthnCredentials]. + // + // [ListWebAuthnCredentials]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_ListWebAuthnCredentials.html + // + // This member is required. + CredentialId *string + + noSmithyDocumentSerde +} + +type DeleteWebAuthnCredentialOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteWebAuthnCredentialMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteWebAuthnCredential{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteWebAuthnCredential{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteWebAuthnCredential"); 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 = 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 = addOpDeleteWebAuthnCredentialValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteWebAuthnCredential(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_opDeleteWebAuthnCredential(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteWebAuthnCredential", + } +} diff --git a/service/cognitoidentityprovider/api_op_DescribeManagedLoginBranding.go b/service/cognitoidentityprovider/api_op_DescribeManagedLoginBranding.go new file mode 100644 index 00000000000..20ddafa5c09 --- /dev/null +++ b/service/cognitoidentityprovider/api_op_DescribeManagedLoginBranding.go @@ -0,0 +1,170 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cognitoidentityprovider + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// When given the ID of a managed login branding style, returns detailed +// information about the style. +func (c *Client) DescribeManagedLoginBranding(ctx context.Context, params *DescribeManagedLoginBrandingInput, optFns ...func(*Options)) (*DescribeManagedLoginBrandingOutput, error) { + if params == nil { + params = &DescribeManagedLoginBrandingInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeManagedLoginBranding", params, optFns, c.addOperationDescribeManagedLoginBrandingMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeManagedLoginBrandingOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeManagedLoginBrandingInput struct { + + // The ID of the managed login branding style that you want to get more + // information about. + // + // This member is required. + ManagedLoginBrandingId *string + + // The ID of the user pool that contains the managed login branding style that you + // want to get information about. + // + // This member is required. + UserPoolId *string + + // When true , returns values for branding options that are unchanged from Amazon + // Cognito defaults. When false or when you omit this parameter, returns only + // values that you customized in your branding style. + ReturnMergedResources bool + + noSmithyDocumentSerde +} + +type DescribeManagedLoginBrandingOutput struct { + + // The details of the requested branding style. + ManagedLoginBranding *types.ManagedLoginBrandingType + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeManagedLoginBrandingMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeManagedLoginBranding{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeManagedLoginBranding{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeManagedLoginBranding"); 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 = addOpDescribeManagedLoginBrandingValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeManagedLoginBranding(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_opDescribeManagedLoginBranding(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeManagedLoginBranding", + } +} diff --git a/service/cognitoidentityprovider/api_op_DescribeManagedLoginBrandingByClient.go b/service/cognitoidentityprovider/api_op_DescribeManagedLoginBrandingByClient.go new file mode 100644 index 00000000000..c0be90afef4 --- /dev/null +++ b/service/cognitoidentityprovider/api_op_DescribeManagedLoginBrandingByClient.go @@ -0,0 +1,170 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cognitoidentityprovider + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// When given the ID of a user pool app client, returns detailed information about +// the style assigned to the app client. +func (c *Client) DescribeManagedLoginBrandingByClient(ctx context.Context, params *DescribeManagedLoginBrandingByClientInput, optFns ...func(*Options)) (*DescribeManagedLoginBrandingByClientOutput, error) { + if params == nil { + params = &DescribeManagedLoginBrandingByClientInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeManagedLoginBrandingByClient", params, optFns, c.addOperationDescribeManagedLoginBrandingByClientMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeManagedLoginBrandingByClientOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeManagedLoginBrandingByClientInput struct { + + // The app client that's assigned to the branding style that you want more + // information about. + // + // This member is required. + ClientId *string + + // The ID of the user pool that contains the app client where you want more + // information about the managed login branding style. + // + // This member is required. + UserPoolId *string + + // When true , returns values for branding options that are unchanged from Amazon + // Cognito defaults. When false or when you omit this parameter, returns only + // values that you customized in your branding style. + ReturnMergedResources bool + + noSmithyDocumentSerde +} + +type DescribeManagedLoginBrandingByClientOutput struct { + + // The details of the requested branding style. + ManagedLoginBranding *types.ManagedLoginBrandingType + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeManagedLoginBrandingByClientMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeManagedLoginBrandingByClient{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeManagedLoginBrandingByClient{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeManagedLoginBrandingByClient"); 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 = addOpDescribeManagedLoginBrandingByClientValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeManagedLoginBrandingByClient(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_opDescribeManagedLoginBrandingByClient(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeManagedLoginBrandingByClient", + } +} diff --git a/service/cognitoidentityprovider/api_op_ForgotPassword.go b/service/cognitoidentityprovider/api_op_ForgotPassword.go index 0bd6dacc501..86158ef5daa 100644 --- a/service/cognitoidentityprovider/api_op_ForgotPassword.go +++ b/service/cognitoidentityprovider/api_op_ForgotPassword.go @@ -42,7 +42,7 @@ import ( // sign in. // // If you have never used SMS text messages with Amazon Cognito or any other -// Amazon Web Servicesservice, Amazon Simple Notification Service might place your +// Amazon Web Services service, Amazon Simple Notification Service might place your // account in the SMS sandbox. In [sandbox mode], you can send messages only to verified phone // numbers. After you test your app while in the sandbox environment, you can move // out of the sandbox and into production. For more information, see [SMS message settings for Amazon Cognito user pools]in the Amazon diff --git a/service/cognitoidentityprovider/api_op_GetUserAttributeVerificationCode.go b/service/cognitoidentityprovider/api_op_GetUserAttributeVerificationCode.go index a5a19ebf3f0..f8cc55d9caf 100644 --- a/service/cognitoidentityprovider/api_op_GetUserAttributeVerificationCode.go +++ b/service/cognitoidentityprovider/api_op_GetUserAttributeVerificationCode.go @@ -33,7 +33,7 @@ import ( // sign in. // // If you have never used SMS text messages with Amazon Cognito or any other -// Amazon Web Servicesservice, Amazon Simple Notification Service might place your +// Amazon Web Services service, Amazon Simple Notification Service might place your // account in the SMS sandbox. In [sandbox mode], you can send messages only to verified phone // numbers. After you test your app while in the sandbox environment, you can move // out of the sandbox and into production. For more information, see [SMS message settings for Amazon Cognito user pools]in the Amazon diff --git a/service/cognitoidentityprovider/api_op_GetUserAuthFactors.go b/service/cognitoidentityprovider/api_op_GetUserAuthFactors.go new file mode 100644 index 00000000000..ed341c6d0aa --- /dev/null +++ b/service/cognitoidentityprovider/api_op_GetUserAuthFactors.go @@ -0,0 +1,173 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cognitoidentityprovider + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the authentication options for the currently signed-in user. Returns the +// following: +// +// - The user's multi-factor authentication (MFA) preferences. +// +// - The user's options in the USER_AUTH flow that they can select in a +// SELECT_CHALLENGE response or request in a PREFERRED_CHALLENGE request. +func (c *Client) GetUserAuthFactors(ctx context.Context, params *GetUserAuthFactorsInput, optFns ...func(*Options)) (*GetUserAuthFactorsOutput, error) { + if params == nil { + params = &GetUserAuthFactorsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetUserAuthFactors", params, optFns, c.addOperationGetUserAuthFactorsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetUserAuthFactorsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetUserAuthFactorsInput struct { + + // A valid access token that Amazon Cognito issued to the user whose + // authentication factors you want to view. + // + // This member is required. + AccessToken *string + + noSmithyDocumentSerde +} + +type GetUserAuthFactorsOutput struct { + + // The username of the currently sign-in user. + // + // This member is required. + Username *string + + // The authentication types that are available to the user with USER_AUTH sign-in. + ConfiguredUserAuthFactors []types.AuthFactorType + + // The user's preferred MFA setting. + PreferredMfaSetting *string + + // The MFA options that are activated for the user. The possible values in this + // list are SMS_MFA , EMAIL_OTP , and SOFTWARE_TOKEN_MFA . + UserMFASettingList []string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetUserAuthFactorsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetUserAuthFactors{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetUserAuthFactors{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetUserAuthFactors"); 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 = 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 = addOpGetUserAuthFactorsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetUserAuthFactors(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_opGetUserAuthFactors(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetUserAuthFactors", + } +} diff --git a/service/cognitoidentityprovider/api_op_GetUserPoolMfaConfig.go b/service/cognitoidentityprovider/api_op_GetUserPoolMfaConfig.go index edeb05ffab2..628e519e11d 100644 --- a/service/cognitoidentityprovider/api_op_GetUserPoolMfaConfig.go +++ b/service/cognitoidentityprovider/api_op_GetUserPoolMfaConfig.go @@ -64,6 +64,10 @@ type GetUserPoolMfaConfigOutput struct { // Includes TOTP enabled or disabled state. SoftwareTokenMfaConfiguration *types.SoftwareTokenMfaConfigType + // Shows user pool configuration for MFA with passkeys from biometric devices and + // security keys. + WebAuthnConfiguration *types.WebAuthnConfigurationType + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/cognitoidentityprovider/api_op_InitiateAuth.go b/service/cognitoidentityprovider/api_op_InitiateAuth.go index 81c86eca3f0..8691f991af6 100644 --- a/service/cognitoidentityprovider/api_op_InitiateAuth.go +++ b/service/cognitoidentityprovider/api_op_InitiateAuth.go @@ -30,7 +30,7 @@ import ( // sign in. // // If you have never used SMS text messages with Amazon Cognito or any other -// Amazon Web Servicesservice, Amazon Simple Notification Service might place your +// Amazon Web Services service, Amazon Simple Notification Service might place your // account in the SMS sandbox. In [sandbox mode], you can send messages only to verified phone // numbers. After you test your app while in the sandbox environment, you can move // out of the sandbox and into production. For more information, see [SMS message settings for Amazon Cognito user pools]in the Amazon @@ -59,33 +59,49 @@ func (c *Client) InitiateAuth(ctx context.Context, params *InitiateAuthInput, op // Initiates the authentication request. type InitiateAuthInput struct { - // The authentication flow for this call to run. The API action will depend on - // this value. For example: + // The authentication flow that you want to initiate. The AuthParameters that you + // must submit are linked to the flow that you submit. For example: // - // - REFRESH_TOKEN_AUTH takes in a valid refresh token and returns new tokens. + // - USER_AUTH : Request a preferred authentication type or review available + // authentication types. From the offered authentication types, select one in a + // challenge response and then authenticate with that method in an additional + // challenge response. // - // - USER_SRP_AUTH takes in USERNAME and SRP_A and returns the SRP variables to - // be used for next challenge execution. + // - REFRESH_TOKEN_AUTH : Receive new ID and access tokens when you pass a + // REFRESH_TOKEN parameter with a valid refresh token as the value. // - // - USER_PASSWORD_AUTH takes in USERNAME and PASSWORD and returns the next - // challenge or tokens. + // - USER_SRP_AUTH : Receive secure remote password (SRP) variables for the next + // challenge, PASSWORD_VERIFIER , when you pass USERNAME and SRP_A parameters. // - // Valid values include: + // - USER_PASSWORD_AUTH : Receive new tokens or the next challenge, for example + // SOFTWARE_TOKEN_MFA , when you pass USERNAME and PASSWORD parameters. // - // - USER_SRP_AUTH : Authentication flow for the Secure Remote Password (SRP) - // protocol. + // Valid values include the following: + // + // USER_AUTH The entry point for sign-in with passwords, one-time passwords, + // biometric devices, and security keys. + // + // USER_SRP_AUTH Username-password authentication with the Secure Remote Password + // (SRP) protocol. For more information, see [Use SRP password verification in custom authentication flow]. + // + // REFRESH_TOKEN_AUTH and REFRESH_TOKEN Provide a valid refresh token and receive + // new ID and access tokens. For more information, see [Using the refresh token]. // - // - REFRESH_TOKEN_AUTH / REFRESH_TOKEN : Authentication flow for refreshing the - // access token and ID token by supplying a valid refresh token. + // CUSTOM_AUTH Custom authentication with Lambda triggers. For more information, + // see [Custom authentication challenge Lambda triggers]. // - // - CUSTOM_AUTH : Custom authentication flow. + // USER_PASSWORD_AUTH Username-password authentication with the password sent + // directly in the request. For more information, see [Admin authentication flow]. // - // - USER_PASSWORD_AUTH : Non-SRP authentication flow; user name and password are - // passed directly. If a user migration Lambda trigger is set, this flow will - // invoke the user migration Lambda if it doesn't find the user name in the user - // pool. + // ADMIN_USER_PASSWORD_AUTH is a flow type of [AdminInitiateAuth] and isn't valid for InitiateAuth. + // ADMIN_NO_SRP_AUTH is a legacy server-side username-password flow and isn't valid + // for InitiateAuth. // - // ADMIN_NO_SRP_AUTH isn't a valid value. + // [Use SRP password verification in custom authentication flow]: https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-authentication-flow.html#Using-SRP-password-verification-in-custom-authentication-flow + // [AdminInitiateAuth]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminInitiateAuth.html + // [Using the refresh token]: https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-using-the-refresh-token.html + // [Admin authentication flow]: https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-authentication-flow.html#Built-in-authentication-flow-and-challenges + // [Custom authentication challenge Lambda triggers]: https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-challenge.html // // This member is required. AuthFlow types.AuthFlowType @@ -102,6 +118,10 @@ type InitiateAuthInput struct { // The authentication parameters. These are inputs corresponding to the AuthFlow // that you're invoking. The required values depend on the value of AuthFlow : // + // - For USER_AUTH : USERNAME (required), PREFERRED_CHALLENGE . If you don't + // provide a value for PREFERRED_CHALLENGE , Amazon Cognito responds with the + // AvailableChallenges parameter that specifies the available sign-in methods. + // // - For USER_SRP_AUTH : USERNAME (required), SRP_A (required), SECRET_HASH // (required if the app client is configured with a client secret), DEVICE_KEY . // @@ -159,6 +179,10 @@ type InitiateAuthInput struct { // // - Define auth challenge // + // - Custom email sender + // + // - Custom SMS sender + // // For more information, see [Customizing user pool Workflows with Lambda Triggers] in the Amazon Cognito Developer Guide. // // When you use the ClientMetadata parameter, remember that Amazon Cognito won't @@ -177,6 +201,10 @@ type InitiateAuthInput struct { // [Customizing user pool Workflows with Lambda Triggers]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools-working-with-aws-lambda-triggers.html ClientMetadata map[string]string + // The optional session ID from a ConfirmSignUp API request. You can sign in a + // user directly from the sign-up process with the USER_AUTH authentication flow. + Session *string + // Contextual data about your user session, such as the device fingerprint, IP // address, or location. Amazon Cognito advanced security evaluates the risk of an // authentication event based on the context that your app generates and passes to @@ -195,6 +223,12 @@ type InitiateAuthOutput struct { // and Session are returned. AuthenticationResult *types.AuthenticationResultType + // This response parameter prompts a user to select from multiple available + // challenges that they can complete authentication with. For example, they might + // be able to continue with passwordless authentication or with a one-time password + // from an SMS message. + AvailableChallenges []types.ChallengeNameType + // The name of the challenge that you're responding to with this call. This name // is returned in the InitiateAuth response if you must pass another challenge. // @@ -203,6 +237,22 @@ type InitiateAuthOutput struct { // All of the following challenges require USERNAME and SECRET_HASH (if // applicable) in the parameters. // + // - WEB_AUTHN : Respond to the challenge with the results of a successful + // authentication with a passkey, or webauthN, factor. These are typically + // biometric devices or security keys. + // + // - PASSWORD : Respond with USER_PASSWORD_AUTH parameters: USERNAME (required), + // PASSWORD (required), SECRET_HASH (required if the app client is configured + // with a client secret), DEVICE_KEY . + // + // - PASSWORD_SRP : Respond with USER_SRP_AUTH parameters: USERNAME (required), + // SRP_A (required), SECRET_HASH (required if the app client is configured with a + // client secret), DEVICE_KEY . + // + // - SELECT_CHALLENGE : Respond to the challenge with USERNAME and an ANSWER that + // matches one of the challenge types in the AvailableChallenges response + // parameter. + // // - SMS_MFA : Next challenge is to supply an SMS_MFA_CODE that your user pool // delivered in an SMS message. // @@ -231,6 +281,14 @@ type InitiateAuthOutput struct { // values for attributes that aren't required by your user pool and that your app // client can write. For more information, see [RespondToAuthChallenge]. // + // Amazon Cognito only returns this challenge for users who have temporary + // passwords. Because of this, and because in some cases you can create users who + // don't have values for required attributes, take care to collect and submit + // required-attribute values for all users who don't have passwords. You can create + // a user in the Amazon Cognito console without, for example, a required + // birthdate attribute. The API response from Amazon Cognito won't prompt you to + // submit a birthdate for the user if they don't have a password. + // // In a NEW_PASSWORD_REQUIRED challenge response, you can't modify a required // attribute that already has a value. In RespondToAuthChallenge , set a value // for any keys that Amazon Cognito returned in the requiredAttributes parameter, @@ -255,13 +313,14 @@ type InitiateAuthOutput struct { // you must pass another challenge. The responses in this parameter should be used // to compute inputs to the next call ( RespondToAuthChallenge ). // - // All challenges require USERNAME and SECRET_HASH (if applicable). + // All challenges require USERNAME . They also require SECRET_HASH if your app + // client has a client secret. ChallengeParameters map[string]string // The session that should pass both ways in challenge-response calls to the // service. If the caller must pass another challenge, they return a session with - // other challenge parameters. This session should be passed as it is to the next - // RespondToAuthChallenge API call. + // other challenge parameters. Include this session identifier in a + // RespondToAuthChallenge API request. Session *string // Metadata pertaining to the operation's result. diff --git a/service/cognitoidentityprovider/api_op_ListUsers.go b/service/cognitoidentityprovider/api_op_ListUsers.go index ec9fe88062c..c6d9cad59f6 100644 --- a/service/cognitoidentityprovider/api_op_ListUsers.go +++ b/service/cognitoidentityprovider/api_op_ListUsers.go @@ -61,7 +61,7 @@ type ListUsersInput struct { // user profile before an AttributesToGet parameter returns results. AttributesToGet []string - // A filter string of the form "AttributeName Filter-Type "AttributeValue"". + // A filter string of the form "AttributeName Filter-Type "AttributeValue" . // Quotation marks within the filter string must be escaped using the backslash ( \ // ) character. For example, "family_name = \"Reddy\"" . // diff --git a/service/cognitoidentityprovider/api_op_ListWebAuthnCredentials.go b/service/cognitoidentityprovider/api_op_ListWebAuthnCredentials.go new file mode 100644 index 00000000000..ccfaad558e9 --- /dev/null +++ b/service/cognitoidentityprovider/api_op_ListWebAuthnCredentials.go @@ -0,0 +1,169 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cognitoidentityprovider + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Generates a list of the current user's registered passkey, or webauthN, +// credentials. +func (c *Client) ListWebAuthnCredentials(ctx context.Context, params *ListWebAuthnCredentialsInput, optFns ...func(*Options)) (*ListWebAuthnCredentialsOutput, error) { + if params == nil { + params = &ListWebAuthnCredentialsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListWebAuthnCredentials", params, optFns, c.addOperationListWebAuthnCredentialsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListWebAuthnCredentialsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListWebAuthnCredentialsInput struct { + + // A valid access token that Amazon Cognito issued to the user whose registered + // passkeys you want to list. + // + // This member is required. + AccessToken *string + + // The maximum number of the user's passkey credentials that you want to return. + MaxResults *int32 + + // An identifier that was returned from the previous call to this operation, which + // can be used to return the next set of items in the list. + NextToken *string + + noSmithyDocumentSerde +} + +type ListWebAuthnCredentialsOutput struct { + + // A list of registered passkeys for a user. + // + // This member is required. + Credentials []types.WebAuthnCredentialDescription + + // An identifier that you can use in a later request to return the next set of + // items in the list. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListWebAuthnCredentialsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListWebAuthnCredentials{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListWebAuthnCredentials{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListWebAuthnCredentials"); 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 = 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 = addOpListWebAuthnCredentialsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListWebAuthnCredentials(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_opListWebAuthnCredentials(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListWebAuthnCredentials", + } +} diff --git a/service/cognitoidentityprovider/api_op_ResendConfirmationCode.go b/service/cognitoidentityprovider/api_op_ResendConfirmationCode.go index b9bd8081419..55eb61c994f 100644 --- a/service/cognitoidentityprovider/api_op_ResendConfirmationCode.go +++ b/service/cognitoidentityprovider/api_op_ResendConfirmationCode.go @@ -29,7 +29,7 @@ import ( // sign in. // // If you have never used SMS text messages with Amazon Cognito or any other -// Amazon Web Servicesservice, Amazon Simple Notification Service might place your +// Amazon Web Services service, Amazon Simple Notification Service might place your // account in the SMS sandbox. In [sandbox mode], you can send messages only to verified phone // numbers. After you test your app while in the sandbox environment, you can move // out of the sandbox and into production. For more information, see [SMS message settings for Amazon Cognito user pools]in the Amazon diff --git a/service/cognitoidentityprovider/api_op_RespondToAuthChallenge.go b/service/cognitoidentityprovider/api_op_RespondToAuthChallenge.go index d12ab40df99..e04a132b755 100644 --- a/service/cognitoidentityprovider/api_op_RespondToAuthChallenge.go +++ b/service/cognitoidentityprovider/api_op_RespondToAuthChallenge.go @@ -35,7 +35,7 @@ import ( // sign in. // // If you have never used SMS text messages with Amazon Cognito or any other -// Amazon Web Servicesservice, Amazon Simple Notification Service might place your +// Amazon Web Services service, Amazon Simple Notification Service might place your // account in the SMS sandbox. In [sandbox mode], you can send messages only to verified phone // numbers. After you test your app while in the sandbox environment, you can move // out of the sandbox and into production. For more information, see [SMS message settings for Amazon Cognito user pools]in the Amazon @@ -87,14 +87,47 @@ type RespondToAuthChallengeInput struct { // partial JSON request bodies that highlight challenge-response parameters. // // You must provide a SECRET_HASH parameter in all challenge responses to an app - // client that has a client secret. + // client that has a client secret. Include a DEVICE_KEY for device authentication. // - // SMS_MFA "ChallengeName": "SMS_MFA", "ChallengeResponses": {"SMS_MFA_CODE": + // SELECT_CHALLENGE "ChallengeName": "SELECT_CHALLENGE", "ChallengeResponses": { + // "USERNAME": "[username]", "ANSWER": "[Challenge name]"} + // + // Available challenges are PASSWORD , PASSWORD_SRP , EMAIL_OTP , SMS_OTP , and + // WEB_AUTHN . + // + // Complete authentication in the SELECT_CHALLENGE response for PASSWORD , + // PASSWORD_SRP , and WEB_AUTHN : + // + // - "ChallengeName": "SELECT_CHALLENGE", "ChallengeResponses": { "ANSWER": + // "WEB_AUTHN", "USERNAME": "[username]", "CREDENTIAL": + // "[AuthenticationResponseJSON]"} + // + // See [AuthenticationResponseJSON]. + // + // - "ChallengeName": "SELECT_CHALLENGE", "ChallengeResponses": { "ANSWER": + // "PASSWORD", "USERNAME": "[username]", "PASSWORD": "[password]"} + // + // - "ChallengeName": "SELECT_CHALLENGE", "ChallengeResponses": { "ANSWER": + // "PASSWORD_SRP", "USERNAME": "[username]", "SRP_A": "[SRP_A]"} + // + // For SMS_OTP and EMAIL_OTP , respond with the username and answer. Your user pool + // will send a code for the user to submit in the next challenge response. + // + // - "ChallengeName": "SELECT_CHALLENGE", "ChallengeResponses": { "ANSWER": + // "SMS_OTP", "USERNAME": "[username]"} + // + // - "ChallengeName": "SELECT_CHALLENGE", "ChallengeResponses": { "ANSWER": + // "EMAIL_OTP", "USERNAME": "[username]"} + // + // SMS_OTP "ChallengeName": "SMS_OTP", "ChallengeResponses": {"SMS_OTP_CODE": // "[code]", "USERNAME": "[username]"} // // EMAIL_OTP "ChallengeName": "EMAIL_OTP", "ChallengeResponses": // {"EMAIL_OTP_CODE": "[code]", "USERNAME": "[username]"} // + // SMS_MFA "ChallengeName": "SMS_MFA", "ChallengeResponses": {"SMS_MFA_CODE": + // "[code]", "USERNAME": "[username]"} + // // PASSWORD_VERIFIER This challenge response is part of the SRP flow. Amazon // Cognito requires that your application respond to this challenge within a few // seconds. When the response time exceeds this period, your user pool returns a @@ -147,6 +180,7 @@ type RespondToAuthChallengeInput struct { // , see [Working with user devices in your user pool]. // // [Computing secret hash values]: https://docs.aws.amazon.com/cognito/latest/developerguide/signing-up-users-in-your-app.html#cognito-user-pools-computing-secret-hash + // [AuthenticationResponseJSON]: https://www.w3.org/TR/webauthn-3/#dictdef-authenticationresponsejson // [Working with user devices in your user pool]: https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-device-tracking.html ChallengeResponses map[string]string diff --git a/service/cognitoidentityprovider/api_op_SetUserPoolMfaConfig.go b/service/cognitoidentityprovider/api_op_SetUserPoolMfaConfig.go index 43f0a852608..ae90bf7be50 100644 --- a/service/cognitoidentityprovider/api_op_SetUserPoolMfaConfig.go +++ b/service/cognitoidentityprovider/api_op_SetUserPoolMfaConfig.go @@ -11,7 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Sets the user pool multi-factor authentication (MFA) configuration. +// Sets the user pool multi-factor authentication (MFA) and passkey configuration. // // This action might generate an SMS text message. Starting June 1, 2021, US // telecom carriers require you to register an origination phone number before you @@ -22,7 +22,7 @@ import ( // sign in. // // If you have never used SMS text messages with Amazon Cognito or any other -// Amazon Web Servicesservice, Amazon Simple Notification Service might place your +// Amazon Web Services service, Amazon Simple Notification Service might place your // account in the SMS sandbox. In [sandbox mode], you can send messages only to verified phone // numbers. After you test your app while in the sandbox environment, you can move // out of the sandbox and into production. For more information, see [SMS message settings for Amazon Cognito user pools]in the Amazon @@ -82,6 +82,11 @@ type SetUserPoolMfaConfigInput struct { // disables TOTP. SoftwareTokenMfaConfiguration *types.SoftwareTokenMfaConfigType + // The configuration of your user pool for passkey, or webauthN, authentication + // and registration. You can set this configuration independent of the MFA + // configuration options in this operation. + WebAuthnConfiguration *types.WebAuthnConfigurationType + noSmithyDocumentSerde } @@ -112,6 +117,10 @@ type SetUserPoolMfaConfigOutput struct { // Includes TOTP enabled or disabled state. SoftwareTokenMfaConfiguration *types.SoftwareTokenMfaConfigType + // The configuration of your user pool for passkey, or webauthN, biometric and + // security-key devices. + WebAuthnConfiguration *types.WebAuthnConfigurationType + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/cognitoidentityprovider/api_op_SignUp.go b/service/cognitoidentityprovider/api_op_SignUp.go index 96a9d3da789..fe429095e20 100644 --- a/service/cognitoidentityprovider/api_op_SignUp.go +++ b/service/cognitoidentityprovider/api_op_SignUp.go @@ -29,14 +29,23 @@ import ( // sign in. // // If you have never used SMS text messages with Amazon Cognito or any other -// Amazon Web Servicesservice, Amazon Simple Notification Service might place your +// Amazon Web Services service, Amazon Simple Notification Service might place your // account in the SMS sandbox. In [sandbox mode], you can send messages only to verified phone // numbers. After you test your app while in the sandbox environment, you can move // out of the sandbox and into production. For more information, see [SMS message settings for Amazon Cognito user pools]in the Amazon // Cognito Developer Guide. // +// You might receive a LimitExceeded exception in response to this request if you +// have exceeded a rate quota for email or SMS messages, and if your user pool +// automatically verifies email addresses or phone numbers. When you get this +// exception in the response, the user is successfully created and is in an +// UNCONFIRMED state. You can send a new code with the [ResendConfirmationCode] request, or confirm the +// user as an administrator with an [AdminConfirmSignUp]request. +// // [SMS message settings for Amazon Cognito user pools]: https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-sms-settings.html +// [ResendConfirmationCode]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_ResendConfirmationCode.html // [Using the Amazon Cognito user pools API and user pool endpoints]: https://docs.aws.amazon.com/cognito/latest/developerguide/user-pools-API-operations.html +// [AdminConfirmSignUp]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminConfirmSignUp.html // [sandbox mode]: https://docs.aws.amazon.com/sns/latest/dg/sns-sms-sandbox.html // [Amazon Pinpoint]: https://console.aws.amazon.com/pinpoint/home/ func (c *Client) SignUp(ctx context.Context, params *SignUpInput, optFns ...func(*Options)) (*SignUpOutput, error) { @@ -62,11 +71,6 @@ type SignUpInput struct { // This member is required. ClientId *string - // The password of the user you want to register. - // - // This member is required. - Password *string - // The username of the user that you want to sign up. The value of this parameter // is typically a username, but can be any alias attribute in your user pool. // @@ -108,6 +112,18 @@ type SignUpInput struct { // [Customizing user pool Workflows with Lambda Triggers]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools-working-with-aws-lambda-triggers.html ClientMetadata map[string]string + // The password of the user you want to register. + // + // Users can sign up without a password when your user pool supports passwordless + // sign-in with email or SMS OTPs. To create a user with no password, omit this + // parameter or submit a blank value. You can only create a passwordless user when + // passwordless sign-in is available. See [the SignInPolicyType]property of [CreateUserPool] and [UpdateUserPool]. + // + // [UpdateUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateUserPool.html + // [CreateUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateUserPool.html + // [the SignInPolicyType]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_SignInPolicyType.html + Password *string + // A keyed-hash message authentication code (HMAC) calculated using the secret key // of a user pool client and username plus the client ID in the message. SecretHash *string @@ -160,6 +176,10 @@ type SignUpOutput struct { // registration request. CodeDeliveryDetails *types.CodeDeliveryDetailsType + // A session Id that you can pass to ConfirmSignUp when you want to immediately + // sign in your user with the USER_AUTH flow after they complete sign-up. + Session *string + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/cognitoidentityprovider/api_op_StartWebAuthnRegistration.go b/service/cognitoidentityprovider/api_op_StartWebAuthnRegistration.go new file mode 100644 index 00000000000..1b954ad5655 --- /dev/null +++ b/service/cognitoidentityprovider/api_op_StartWebAuthnRegistration.go @@ -0,0 +1,169 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cognitoidentityprovider + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider/document" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Requests credential creation options from your user pool for registration of a +// passkey authenticator. Returns information about the user pool, the user +// profile, and authentication requirements. Users must provide this information in +// their request to enroll your application with their passkey provider. +// +// After users present this data and register with their passkey provider, return +// the response to your user pool in a [CompleteWebAuthnRegistration]API request. +// +// Authorize this action with a signed-in user's access token. It must include the +// scope aws.cognito.signin.user.admin . +// +// [CompleteWebAuthnRegistration]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CompleteWebAuthnRegistration.html +func (c *Client) StartWebAuthnRegistration(ctx context.Context, params *StartWebAuthnRegistrationInput, optFns ...func(*Options)) (*StartWebAuthnRegistrationOutput, error) { + if params == nil { + params = &StartWebAuthnRegistrationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StartWebAuthnRegistration", params, optFns, c.addOperationStartWebAuthnRegistrationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StartWebAuthnRegistrationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type StartWebAuthnRegistrationInput struct { + + // A valid access token that Amazon Cognito issued to the user whose passkey + // metadata you want to generate. + // + // This member is required. + AccessToken *string + + noSmithyDocumentSerde +} + +type StartWebAuthnRegistrationOutput struct { + + // The information that a user can provide in their request to register with their + // passkey provider. + // + // This member is required. + CredentialCreationOptions document.Interface + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationStartWebAuthnRegistrationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpStartWebAuthnRegistration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpStartWebAuthnRegistration{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "StartWebAuthnRegistration"); 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 = 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 = addOpStartWebAuthnRegistrationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartWebAuthnRegistration(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_opStartWebAuthnRegistration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "StartWebAuthnRegistration", + } +} diff --git a/service/cognitoidentityprovider/api_op_UpdateManagedLoginBranding.go b/service/cognitoidentityprovider/api_op_UpdateManagedLoginBranding.go new file mode 100644 index 00000000000..e1bddb6f8f3 --- /dev/null +++ b/service/cognitoidentityprovider/api_op_UpdateManagedLoginBranding.go @@ -0,0 +1,205 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cognitoidentityprovider + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider/document" + "github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Configures the branding settings for a user pool style. This operation is the +// programmatic option for the configuration of a style in the branding designer. +// +// Provides values for UI customization in a Settings JSON object and image files +// in an Assets array. +// +// This operation has a 2-megabyte request-size limit and include the CSS settings +// and image assets for your app client. Your branding settings might exceed 2MB in +// size. Amazon Cognito doesn't require that you pass all parameters in one request +// and preserves existing style settings that you don't specify. If your request is +// larger than 2MB, separate it into multiple requests, each with a size smaller +// than the limit. +// +// For more information, see [API and SDK operations for managed login branding]. +// +// Amazon Cognito evaluates Identity and Access Management (IAM) policies in +// requests for this API operation. For this operation, you must use IAM +// credentials to authorize requests, and you must grant yourself the corresponding +// IAM permission in a policy. +// +// # Learn more +// +// [Signing Amazon Web Services API Requests] +// +// [Using the Amazon Cognito user pools API and user pool endpoints] +// +// [Using the Amazon Cognito user pools API and user pool endpoints]: https://docs.aws.amazon.com/cognito/latest/developerguide/user-pools-API-operations.html +// [API and SDK operations for managed login branding]: https://docs.aws.amazon.com/cognito/latest/developerguide/managed-login-brandingdesigner.html#branding-designer-api +// [Signing Amazon Web Services API Requests]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-signing.html +func (c *Client) UpdateManagedLoginBranding(ctx context.Context, params *UpdateManagedLoginBrandingInput, optFns ...func(*Options)) (*UpdateManagedLoginBrandingOutput, error) { + if params == nil { + params = &UpdateManagedLoginBrandingInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateManagedLoginBranding", params, optFns, c.addOperationUpdateManagedLoginBrandingMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateManagedLoginBrandingOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateManagedLoginBrandingInput struct { + + // An array of image files that you want to apply to roles like backgrounds, + // logos, and icons. Each object must also indicate whether it is for dark mode, + // light mode, or browser-adaptive mode. + Assets []types.AssetType + + // The ID of the managed login branding style that you want to update. + ManagedLoginBrandingId *string + + // A JSON file, encoded as a Document type, with the the settings that you want to + // apply to your style. + Settings document.Interface + + // When true, applies the default branding style options. This option reverts to + // default style options that are managed by Amazon Cognito. You can modify them + // later in the branding designer. + // + // When you specify true for this option, you must also omit values for Settings + // and Assets in the request. + UseCognitoProvidedValues bool + + // The ID of the user pool that contains the managed login branding style that you + // want to update. + UserPoolId *string + + noSmithyDocumentSerde +} + +type UpdateManagedLoginBrandingOutput struct { + + // The details of the branding style that you updated. + ManagedLoginBranding *types.ManagedLoginBrandingType + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateManagedLoginBrandingMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateManagedLoginBranding{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateManagedLoginBranding{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateManagedLoginBranding"); 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 = addOpUpdateManagedLoginBrandingValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateManagedLoginBranding(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_opUpdateManagedLoginBranding(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateManagedLoginBranding", + } +} diff --git a/service/cognitoidentityprovider/api_op_UpdateUserAttributes.go b/service/cognitoidentityprovider/api_op_UpdateUserAttributes.go index 29f188afe18..bafb6425b49 100644 --- a/service/cognitoidentityprovider/api_op_UpdateUserAttributes.go +++ b/service/cognitoidentityprovider/api_op_UpdateUserAttributes.go @@ -35,7 +35,7 @@ import ( // sign in. // // If you have never used SMS text messages with Amazon Cognito or any other -// Amazon Web Servicesservice, Amazon Simple Notification Service might place your +// Amazon Web Services service, Amazon Simple Notification Service might place your // account in the SMS sandbox. In [sandbox mode], you can send messages only to verified phone // numbers. After you test your app while in the sandbox environment, you can move // out of the sandbox and into production. For more information, see [SMS message settings for Amazon Cognito user pools]in the Amazon diff --git a/service/cognitoidentityprovider/api_op_UpdateUserPool.go b/service/cognitoidentityprovider/api_op_UpdateUserPool.go index 8288bce3f25..d6a901e01b6 100644 --- a/service/cognitoidentityprovider/api_op_UpdateUserPool.go +++ b/service/cognitoidentityprovider/api_op_UpdateUserPool.go @@ -20,7 +20,7 @@ import ( // sign in. // // If you have never used SMS text messages with Amazon Cognito or any other -// Amazon Web Servicesservice, Amazon Simple Notification Service might place your +// Amazon Web Services service, Amazon Simple Notification Service might place your // account in the SMS sandbox. In [sandbox mode], you can send messages only to verified phone // numbers. After you test your app while in the sandbox environment, you can move // out of the sandbox and into production. For more information, see [SMS message settings for Amazon Cognito user pools]in the Amazon @@ -140,6 +140,9 @@ type UpdateUserPoolInput struct { // A container with the policies you want to update in a user pool. Policies *types.UserPoolPolicyType + // The updated name of your user pool. + PoolName *string + // The contents of the SMS authentication message. SmsAuthenticationMessage *string @@ -178,6 +181,13 @@ type UpdateUserPoolInput struct { // purpose, owner, environment, or other criteria. UserPoolTags map[string]string + // The user pool [feature plan], or tier. This parameter determines the eligibility of the user + // pool for features like managed login, access-token customization, and threat + // protection. Defaults to ESSENTIALS . + // + // [feature plan]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-sign-in-feature-plans.html + UserPoolTier types.UserPoolTierType + // The template for verification messages. VerificationMessageTemplate *types.VerificationMessageTemplateType diff --git a/service/cognitoidentityprovider/api_op_UpdateUserPoolClient.go b/service/cognitoidentityprovider/api_op_UpdateUserPoolClient.go index 3042ca24186..ff9624e42e3 100644 --- a/service/cognitoidentityprovider/api_op_UpdateUserPoolClient.go +++ b/service/cognitoidentityprovider/api_op_UpdateUserPoolClient.go @@ -185,7 +185,7 @@ type UpdateUserPoolClientInput struct { // EnablePropagateAdditionalUserContextData in an app client that has a client // secret. // - // [Adding advanced security to a user pool]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pool-settings-advanced-security.html + // [Adding advanced security to a user pool]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pool-settings-threat-protection.html EnablePropagateAdditionalUserContextData *bool // Activates or deactivates token revocation. For more information about revoking @@ -205,6 +205,14 @@ type UpdateUserPoolClientInput struct { // // Valid values include: // + // - ALLOW_USER_AUTH : Enable selection-based sign-in with USER_AUTH . This + // setting covers username-password, secure remote password (SRP), passwordless, + // and passkey authentication. This authentiation flow can do username-password and + // SRP authentication without other ExplicitAuthFlows permitting them. For + // example users can complete an SRP challenge through USER_AUTH without the flow + // USER_SRP_AUTH being active for the app client. This flow doesn't include + // CUSTOM_AUTH . + // // - ALLOW_ADMIN_USER_PASSWORD_AUTH : Enable admin based user password // authentication flow ADMIN_USER_PASSWORD_AUTH . This setting replaces the // ADMIN_NO_SRP_AUTH setting. With this authentication flow, your app passes a @@ -298,9 +306,19 @@ type UpdateUserPoolClientInput struct { // refresh tokens are valid for 30 days. RefreshTokenValidity int32 - // A list of provider names for the IdPs that this client supports. The following - // are supported: COGNITO , Facebook , Google , SignInWithApple , LoginWithAmazon , - // and the names of your own SAML and OIDC providers. + // A list of provider names for the identity providers (IdPs) that are supported + // on this client. The following are supported: COGNITO , Facebook , Google , + // SignInWithApple , and LoginWithAmazon . You can also specify the names that you + // configured for the SAML and OIDC IdPs in your user pool, for example MySAMLIdP + // or MyOIDCIdP . + // + // This setting applies to providers that you can access with the [hosted UI and OAuth 2.0 authorization server]. The removal of + // COGNITO from this list doesn't prevent authentication operations for local users + // with the user pools API in an Amazon Web Services SDK. The only way to prevent + // API-based authentication is to block access with a [WAF rule]. + // + // [WAF rule]: https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-waf.html + // [hosted UI and OAuth 2.0 authorization server]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-app-integration.html SupportedIdentityProviders []string // The time units you use when you set the duration of ID, access, and refresh diff --git a/service/cognitoidentityprovider/api_op_UpdateUserPoolDomain.go b/service/cognitoidentityprovider/api_op_UpdateUserPoolDomain.go index bc66b829588..9ace7f803d1 100644 --- a/service/cognitoidentityprovider/api_op_UpdateUserPoolDomain.go +++ b/service/cognitoidentityprovider/api_op_UpdateUserPoolDomain.go @@ -76,6 +76,14 @@ type UpdateUserPoolDomainInput struct { // for your application. Use this object to specify an SSL certificate that is // managed by ACM. // + // When you create a custom domain, the passkey RP ID defaults to the custom + // domain. If you had a prefix domain active, this will cause passkey integration + // for your prefix domain to stop working due to a mismatch in RP ID. To keep the + // prefix domain passkey integration working, you can explicitly set RP ID to the + // prefix domain. Update the RP ID in a [SetUserPoolMfaConfig]request. + // + // [SetUserPoolMfaConfig]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_SetUserPoolMfaConfig.html + // // This member is required. CustomDomainConfig *types.CustomDomainConfigType @@ -95,6 +103,13 @@ type UpdateUserPoolDomainInput struct { // This member is required. UserPoolId *string + // A version number that indicates the state of managed login for your domain. + // Version 1 is hosted UI (classic). Version 2 is the newer managed login with the + // branding designer. For more information, see [Managed login]. + // + // [Managed login]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-managed-login.html + ManagedLoginVersion *int32 + noSmithyDocumentSerde } @@ -105,6 +120,13 @@ type UpdateUserPoolDomainOutput struct { // custom domain to your user pool. CloudFrontDomain *string + // A version number that indicates the state of managed login for your domain. + // Version 1 is hosted UI (classic). Version 2 is the newer managed login with the + // branding designer. For more information, see [Managed login]. + // + // [Managed login]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-managed-login.html + ManagedLoginVersion *int32 + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/cognitoidentityprovider/auth.go b/service/cognitoidentityprovider/auth.go index 3cd6c0fa45c..1c5e3e8b876 100644 --- a/service/cognitoidentityprovider/auth.go +++ b/service/cognitoidentityprovider/auth.go @@ -132,6 +132,12 @@ var operationAuthOptions = map[string]func(*AuthResolverParameters) []*smithyaut } }, + "CompleteWebAuthnRegistration": func(params *AuthResolverParameters) []*smithyauth.Option { + return []*smithyauth.Option{ + {SchemeID: smithyauth.SchemeIDAnonymous}, + } + }, + "ConfirmDevice": func(params *AuthResolverParameters) []*smithyauth.Option { return []*smithyauth.Option{ {SchemeID: smithyauth.SchemeIDAnonymous}, @@ -162,6 +168,12 @@ var operationAuthOptions = map[string]func(*AuthResolverParameters) []*smithyaut } }, + "DeleteWebAuthnCredential": func(params *AuthResolverParameters) []*smithyauth.Option { + return []*smithyauth.Option{ + {SchemeID: smithyauth.SchemeIDAnonymous}, + } + }, + "ForgetDevice": func(params *AuthResolverParameters) []*smithyauth.Option { return []*smithyauth.Option{ {SchemeID: smithyauth.SchemeIDAnonymous}, @@ -192,6 +204,12 @@ var operationAuthOptions = map[string]func(*AuthResolverParameters) []*smithyaut } }, + "GetUserAuthFactors": func(params *AuthResolverParameters) []*smithyauth.Option { + return []*smithyauth.Option{ + {SchemeID: smithyauth.SchemeIDAnonymous}, + } + }, + "GlobalSignOut": func(params *AuthResolverParameters) []*smithyauth.Option { return []*smithyauth.Option{ {SchemeID: smithyauth.SchemeIDAnonymous}, @@ -210,6 +228,12 @@ var operationAuthOptions = map[string]func(*AuthResolverParameters) []*smithyaut } }, + "ListWebAuthnCredentials": func(params *AuthResolverParameters) []*smithyauth.Option { + return []*smithyauth.Option{ + {SchemeID: smithyauth.SchemeIDAnonymous}, + } + }, + "ResendConfirmationCode": func(params *AuthResolverParameters) []*smithyauth.Option { return []*smithyauth.Option{ {SchemeID: smithyauth.SchemeIDAnonymous}, @@ -246,6 +270,12 @@ var operationAuthOptions = map[string]func(*AuthResolverParameters) []*smithyaut } }, + "StartWebAuthnRegistration": func(params *AuthResolverParameters) []*smithyauth.Option { + return []*smithyauth.Option{ + {SchemeID: smithyauth.SchemeIDAnonymous}, + } + }, + "UpdateAuthEventFeedback": func(params *AuthResolverParameters) []*smithyauth.Option { return []*smithyauth.Option{ {SchemeID: smithyauth.SchemeIDAnonymous}, diff --git a/service/cognitoidentityprovider/deserializers.go b/service/cognitoidentityprovider/deserializers.go index c1a9cb1aa39..d61fe011fb6 100644 --- a/service/cognitoidentityprovider/deserializers.go +++ b/service/cognitoidentityprovider/deserializers.go @@ -5,9 +5,12 @@ package cognitoidentityprovider import ( "bytes" "context" + "encoding/base64" "encoding/json" "fmt" "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" + "github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider/document" + internaldocument "github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider/internal/document" "github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider/types" smithy "github.com/aws/smithy-go" smithyio "github.com/aws/smithy-go/io" @@ -3809,6 +3812,150 @@ func awsAwsjson11_deserializeOpErrorChangePassword(response *smithyhttp.Response } } +type awsAwsjson11_deserializeOpCompleteWebAuthnRegistration struct { +} + +func (*awsAwsjson11_deserializeOpCompleteWebAuthnRegistration) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpCompleteWebAuthnRegistration) HandleDeserialize(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, awsAwsjson11_deserializeOpErrorCompleteWebAuthnRegistration(response, &metadata) + } + output := &CompleteWebAuthnRegistrationOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentCompleteWebAuthnRegistrationOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorCompleteWebAuthnRegistration(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("ForbiddenException", errorCode): + return awsAwsjson11_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("InternalErrorException", errorCode): + return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NotAuthorizedException", errorCode): + return awsAwsjson11_deserializeErrorNotAuthorizedException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) + + case strings.EqualFold("WebAuthnChallengeNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorWebAuthnChallengeNotFoundException(response, errorBody) + + case strings.EqualFold("WebAuthnClientMismatchException", errorCode): + return awsAwsjson11_deserializeErrorWebAuthnClientMismatchException(response, errorBody) + + case strings.EqualFold("WebAuthnCredentialNotSupportedException", errorCode): + return awsAwsjson11_deserializeErrorWebAuthnCredentialNotSupportedException(response, errorBody) + + case strings.EqualFold("WebAuthnNotEnabledException", errorCode): + return awsAwsjson11_deserializeErrorWebAuthnNotEnabledException(response, errorBody) + + case strings.EqualFold("WebAuthnOriginNotAllowedException", errorCode): + return awsAwsjson11_deserializeErrorWebAuthnOriginNotAllowedException(response, errorBody) + + case strings.EqualFold("WebAuthnRelyingPartyMismatchException", errorCode): + return awsAwsjson11_deserializeErrorWebAuthnRelyingPartyMismatchException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpConfirmDevice struct { } @@ -4526,6 +4673,138 @@ func awsAwsjson11_deserializeOpErrorCreateIdentityProvider(response *smithyhttp. } } +type awsAwsjson11_deserializeOpCreateManagedLoginBranding struct { +} + +func (*awsAwsjson11_deserializeOpCreateManagedLoginBranding) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpCreateManagedLoginBranding) HandleDeserialize(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, awsAwsjson11_deserializeOpErrorCreateManagedLoginBranding(response, &metadata) + } + output := &CreateManagedLoginBrandingOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentCreateManagedLoginBrandingOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorCreateManagedLoginBranding(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("ConcurrentModificationException", errorCode): + return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("InternalErrorException", errorCode): + return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("ManagedLoginBrandingExistsException", errorCode): + return awsAwsjson11_deserializeErrorManagedLoginBrandingExistsException(response, errorBody) + + case strings.EqualFold("NotAuthorizedException", errorCode): + return awsAwsjson11_deserializeErrorNotAuthorizedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpCreateResourceServer struct { } @@ -4879,6 +5158,9 @@ func awsAwsjson11_deserializeOpErrorCreateUserPool(response *smithyhttp.Response errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("FeatureUnavailableInTierException", errorCode): + return awsAwsjson11_deserializeErrorFeatureUnavailableInTierException(response, errorBody) + case strings.EqualFold("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) @@ -4900,6 +5182,9 @@ func awsAwsjson11_deserializeOpErrorCreateUserPool(response *smithyhttp.Response case strings.EqualFold("NotAuthorizedException", errorCode): return awsAwsjson11_deserializeErrorNotAuthorizedException(response, errorBody) + case strings.EqualFold("TierChangeNotAllowedException", errorCode): + return awsAwsjson11_deserializeErrorTierChangeNotAllowedException(response, errorBody) + case strings.EqualFold("TooManyRequestsException", errorCode): return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) @@ -5146,6 +5431,9 @@ func awsAwsjson11_deserializeOpErrorCreateUserPoolDomain(response *smithyhttp.Re errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("FeatureUnavailableInTierException", errorCode): + return awsAwsjson11_deserializeErrorFeatureUnavailableInTierException(response, errorBody) + case strings.EqualFold("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) @@ -5379,14 +5667,14 @@ func awsAwsjson11_deserializeOpErrorDeleteIdentityProvider(response *smithyhttp. } } -type awsAwsjson11_deserializeOpDeleteResourceServer struct { +type awsAwsjson11_deserializeOpDeleteManagedLoginBranding struct { } -func (*awsAwsjson11_deserializeOpDeleteResourceServer) ID() string { +func (*awsAwsjson11_deserializeOpDeleteManagedLoginBranding) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDeleteResourceServer) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeleteManagedLoginBranding) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5404,9 +5692,113 @@ func (m *awsAwsjson11_deserializeOpDeleteResourceServer) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDeleteResourceServer(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteManagedLoginBranding(response, &metadata) } - output := &DeleteResourceServerOutput{} + output := &DeleteManagedLoginBrandingOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDeleteManagedLoginBranding(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("ConcurrentModificationException", errorCode): + return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("InternalErrorException", errorCode): + return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("NotAuthorizedException", errorCode): + return awsAwsjson11_deserializeErrorNotAuthorizedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDeleteResourceServer struct { +} + +func (*awsAwsjson11_deserializeOpDeleteResourceServer) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteResourceServer) HandleDeserialize(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, awsAwsjson11_deserializeOpErrorDeleteResourceServer(response, &metadata) + } + output := &DeleteResourceServerOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -6056,14 +6448,14 @@ func awsAwsjson11_deserializeOpErrorDeleteUserPoolDomain(response *smithyhttp.Re } } -type awsAwsjson11_deserializeOpDescribeIdentityProvider struct { +type awsAwsjson11_deserializeOpDeleteWebAuthnCredential struct { } -func (*awsAwsjson11_deserializeOpDescribeIdentityProvider) ID() string { +func (*awsAwsjson11_deserializeOpDeleteWebAuthnCredential) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeIdentityProvider) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeleteWebAuthnCredential) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6081,9 +6473,9 @@ func (m *awsAwsjson11_deserializeOpDescribeIdentityProvider) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeIdentityProvider(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteWebAuthnCredential(response, &metadata) } - output := &DescribeIdentityProviderOutput{} + output := &DeleteWebAuthnCredentialOutput{} out.Result = output var buff [1024]byte @@ -6103,7 +6495,7 @@ func (m *awsAwsjson11_deserializeOpDescribeIdentityProvider) HandleDeserialize(c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeIdentityProviderOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDeleteWebAuthnCredentialOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6117,7 +6509,7 @@ func (m *awsAwsjson11_deserializeOpDescribeIdentityProvider) HandleDeserialize(c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeIdentityProvider(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDeleteWebAuthnCredential(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6154,6 +6546,9 @@ func awsAwsjson11_deserializeOpErrorDescribeIdentityProvider(response *smithyhtt errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("ForbiddenException", errorCode): + return awsAwsjson11_deserializeErrorForbiddenException(response, errorBody) + case strings.EqualFold("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) @@ -6166,9 +6561,6 @@ func awsAwsjson11_deserializeOpErrorDescribeIdentityProvider(response *smithyhtt case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("TooManyRequestsException", errorCode): - return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -6179,14 +6571,14 @@ func awsAwsjson11_deserializeOpErrorDescribeIdentityProvider(response *smithyhtt } } -type awsAwsjson11_deserializeOpDescribeResourceServer struct { +type awsAwsjson11_deserializeOpDescribeIdentityProvider struct { } -func (*awsAwsjson11_deserializeOpDescribeResourceServer) ID() string { +func (*awsAwsjson11_deserializeOpDescribeIdentityProvider) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeResourceServer) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeIdentityProvider) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6204,9 +6596,9 @@ func (m *awsAwsjson11_deserializeOpDescribeResourceServer) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeResourceServer(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeIdentityProvider(response, &metadata) } - output := &DescribeResourceServerOutput{} + output := &DescribeIdentityProviderOutput{} out.Result = output var buff [1024]byte @@ -6226,7 +6618,7 @@ func (m *awsAwsjson11_deserializeOpDescribeResourceServer) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeResourceServerOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeIdentityProviderOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6240,7 +6632,7 @@ func (m *awsAwsjson11_deserializeOpDescribeResourceServer) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeResourceServer(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeIdentityProvider(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6302,14 +6694,14 @@ func awsAwsjson11_deserializeOpErrorDescribeResourceServer(response *smithyhttp. } } -type awsAwsjson11_deserializeOpDescribeRiskConfiguration struct { +type awsAwsjson11_deserializeOpDescribeManagedLoginBranding struct { } -func (*awsAwsjson11_deserializeOpDescribeRiskConfiguration) ID() string { +func (*awsAwsjson11_deserializeOpDescribeManagedLoginBranding) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeRiskConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeManagedLoginBranding) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6327,9 +6719,9 @@ func (m *awsAwsjson11_deserializeOpDescribeRiskConfiguration) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeRiskConfiguration(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeManagedLoginBranding(response, &metadata) } - output := &DescribeRiskConfigurationOutput{} + output := &DescribeManagedLoginBrandingOutput{} out.Result = output var buff [1024]byte @@ -6349,7 +6741,7 @@ func (m *awsAwsjson11_deserializeOpDescribeRiskConfiguration) HandleDeserialize( return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeRiskConfigurationOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeManagedLoginBrandingOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6363,7 +6755,7 @@ func (m *awsAwsjson11_deserializeOpDescribeRiskConfiguration) HandleDeserialize( return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeRiskConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeManagedLoginBranding(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6415,9 +6807,6 @@ func awsAwsjson11_deserializeOpErrorDescribeRiskConfiguration(response *smithyht case strings.EqualFold("TooManyRequestsException", errorCode): return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) - case strings.EqualFold("UserPoolAddOnNotEnabledException", errorCode): - return awsAwsjson11_deserializeErrorUserPoolAddOnNotEnabledException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -6428,14 +6817,14 @@ func awsAwsjson11_deserializeOpErrorDescribeRiskConfiguration(response *smithyht } } -type awsAwsjson11_deserializeOpDescribeUserImportJob struct { +type awsAwsjson11_deserializeOpDescribeManagedLoginBrandingByClient struct { } -func (*awsAwsjson11_deserializeOpDescribeUserImportJob) ID() string { +func (*awsAwsjson11_deserializeOpDescribeManagedLoginBrandingByClient) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeUserImportJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeManagedLoginBrandingByClient) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6453,9 +6842,9 @@ func (m *awsAwsjson11_deserializeOpDescribeUserImportJob) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeUserImportJob(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeManagedLoginBrandingByClient(response, &metadata) } - output := &DescribeUserImportJobOutput{} + output := &DescribeManagedLoginBrandingByClientOutput{} out.Result = output var buff [1024]byte @@ -6475,7 +6864,7 @@ func (m *awsAwsjson11_deserializeOpDescribeUserImportJob) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeUserImportJobOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeManagedLoginBrandingByClientOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6489,7 +6878,7 @@ func (m *awsAwsjson11_deserializeOpDescribeUserImportJob) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeUserImportJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeManagedLoginBrandingByClient(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6551,14 +6940,14 @@ func awsAwsjson11_deserializeOpErrorDescribeUserImportJob(response *smithyhttp.R } } -type awsAwsjson11_deserializeOpDescribeUserPool struct { +type awsAwsjson11_deserializeOpDescribeResourceServer struct { } -func (*awsAwsjson11_deserializeOpDescribeUserPool) ID() string { +func (*awsAwsjson11_deserializeOpDescribeResourceServer) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeUserPool) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeResourceServer) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6576,9 +6965,9 @@ func (m *awsAwsjson11_deserializeOpDescribeUserPool) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeUserPool(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeResourceServer(response, &metadata) } - output := &DescribeUserPoolOutput{} + output := &DescribeResourceServerOutput{} out.Result = output var buff [1024]byte @@ -6598,7 +6987,7 @@ func (m *awsAwsjson11_deserializeOpDescribeUserPool) HandleDeserialize(ctx conte return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeUserPoolOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeResourceServerOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6612,7 +7001,7 @@ func (m *awsAwsjson11_deserializeOpDescribeUserPool) HandleDeserialize(ctx conte return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeUserPool(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeResourceServer(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6664,9 +7053,6 @@ func awsAwsjson11_deserializeOpErrorDescribeUserPool(response *smithyhttp.Respon case strings.EqualFold("TooManyRequestsException", errorCode): return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) - case strings.EqualFold("UserPoolTaggingException", errorCode): - return awsAwsjson11_deserializeErrorUserPoolTaggingException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -6677,14 +7063,14 @@ func awsAwsjson11_deserializeOpErrorDescribeUserPool(response *smithyhttp.Respon } } -type awsAwsjson11_deserializeOpDescribeUserPoolClient struct { +type awsAwsjson11_deserializeOpDescribeRiskConfiguration struct { } -func (*awsAwsjson11_deserializeOpDescribeUserPoolClient) ID() string { +func (*awsAwsjson11_deserializeOpDescribeRiskConfiguration) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeUserPoolClient) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeRiskConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6702,9 +7088,9 @@ func (m *awsAwsjson11_deserializeOpDescribeUserPoolClient) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeUserPoolClient(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeRiskConfiguration(response, &metadata) } - output := &DescribeUserPoolClientOutput{} + output := &DescribeRiskConfigurationOutput{} out.Result = output var buff [1024]byte @@ -6724,7 +7110,7 @@ func (m *awsAwsjson11_deserializeOpDescribeUserPoolClient) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeUserPoolClientOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeRiskConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6738,7 +7124,7 @@ func (m *awsAwsjson11_deserializeOpDescribeUserPoolClient) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeUserPoolClient(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeRiskConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6790,6 +7176,9 @@ func awsAwsjson11_deserializeOpErrorDescribeUserPoolClient(response *smithyhttp. case strings.EqualFold("TooManyRequestsException", errorCode): return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) + case strings.EqualFold("UserPoolAddOnNotEnabledException", errorCode): + return awsAwsjson11_deserializeErrorUserPoolAddOnNotEnabledException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -6800,14 +7189,14 @@ func awsAwsjson11_deserializeOpErrorDescribeUserPoolClient(response *smithyhttp. } } -type awsAwsjson11_deserializeOpDescribeUserPoolDomain struct { +type awsAwsjson11_deserializeOpDescribeUserImportJob struct { } -func (*awsAwsjson11_deserializeOpDescribeUserPoolDomain) ID() string { +func (*awsAwsjson11_deserializeOpDescribeUserImportJob) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeUserPoolDomain) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeUserImportJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6825,9 +7214,9 @@ func (m *awsAwsjson11_deserializeOpDescribeUserPoolDomain) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeUserPoolDomain(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeUserImportJob(response, &metadata) } - output := &DescribeUserPoolDomainOutput{} + output := &DescribeUserImportJobOutput{} out.Result = output var buff [1024]byte @@ -6847,7 +7236,7 @@ func (m *awsAwsjson11_deserializeOpDescribeUserPoolDomain) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeUserPoolDomainOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeUserImportJobOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6861,7 +7250,7 @@ func (m *awsAwsjson11_deserializeOpDescribeUserPoolDomain) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeUserPoolDomain(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeUserImportJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6910,6 +7299,9 @@ func awsAwsjson11_deserializeOpErrorDescribeUserPoolDomain(response *smithyhttp. case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -6920,14 +7312,14 @@ func awsAwsjson11_deserializeOpErrorDescribeUserPoolDomain(response *smithyhttp. } } -type awsAwsjson11_deserializeOpForgetDevice struct { +type awsAwsjson11_deserializeOpDescribeUserPool struct { } -func (*awsAwsjson11_deserializeOpForgetDevice) ID() string { +func (*awsAwsjson11_deserializeOpDescribeUserPool) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpForgetDevice) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeUserPool) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6945,21 +7337,43 @@ func (m *awsAwsjson11_deserializeOpForgetDevice) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorForgetDevice(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeUserPool(response, &metadata) } - output := &ForgetDeviceOutput{} + output := &DescribeUserPoolOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeUserPoolOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err } return out, metadata, err } -func awsAwsjson11_deserializeOpErrorForgetDevice(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeUserPool(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6996,35 +7410,23 @@ func awsAwsjson11_deserializeOpErrorForgetDevice(response *smithyhttp.Response, errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("ForbiddenException", errorCode): - return awsAwsjson11_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidUserPoolConfigurationException", errorCode): - return awsAwsjson11_deserializeErrorInvalidUserPoolConfigurationException(response, errorBody) - case strings.EqualFold("NotAuthorizedException", errorCode): return awsAwsjson11_deserializeErrorNotAuthorizedException(response, errorBody) - case strings.EqualFold("PasswordResetRequiredException", errorCode): - return awsAwsjson11_deserializeErrorPasswordResetRequiredException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("TooManyRequestsException", errorCode): return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) - case strings.EqualFold("UserNotConfirmedException", errorCode): - return awsAwsjson11_deserializeErrorUserNotConfirmedException(response, errorBody) - - case strings.EqualFold("UserNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorUserNotFoundException(response, errorBody) + case strings.EqualFold("UserPoolTaggingException", errorCode): + return awsAwsjson11_deserializeErrorUserPoolTaggingException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -7036,14 +7438,14 @@ func awsAwsjson11_deserializeOpErrorForgetDevice(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpForgotPassword struct { +type awsAwsjson11_deserializeOpDescribeUserPoolClient struct { } -func (*awsAwsjson11_deserializeOpForgotPassword) ID() string { +func (*awsAwsjson11_deserializeOpDescribeUserPoolClient) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpForgotPassword) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeUserPoolClient) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7061,9 +7463,9 @@ func (m *awsAwsjson11_deserializeOpForgotPassword) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorForgotPassword(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeUserPoolClient(response, &metadata) } - output := &ForgotPasswordOutput{} + output := &DescribeUserPoolClientOutput{} out.Result = output var buff [1024]byte @@ -7083,7 +7485,7 @@ func (m *awsAwsjson11_deserializeOpForgotPassword) HandleDeserialize(ctx context return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentForgotPasswordOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeUserPoolClientOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7097,7 +7499,7 @@ func (m *awsAwsjson11_deserializeOpForgotPassword) HandleDeserialize(ctx context return out, metadata, err } -func awsAwsjson11_deserializeOpErrorForgotPassword(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeUserPoolClient(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7134,33 +7536,12 @@ func awsAwsjson11_deserializeOpErrorForgotPassword(response *smithyhttp.Response errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("CodeDeliveryFailureException", errorCode): - return awsAwsjson11_deserializeErrorCodeDeliveryFailureException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsAwsjson11_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) - case strings.EqualFold("InvalidEmailRoleAccessPolicyException", errorCode): - return awsAwsjson11_deserializeErrorInvalidEmailRoleAccessPolicyException(response, errorBody) - - case strings.EqualFold("InvalidLambdaResponseException", errorCode): - return awsAwsjson11_deserializeErrorInvalidLambdaResponseException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidSmsRoleAccessPolicyException", errorCode): - return awsAwsjson11_deserializeErrorInvalidSmsRoleAccessPolicyException(response, errorBody) - - case strings.EqualFold("InvalidSmsRoleTrustRelationshipException", errorCode): - return awsAwsjson11_deserializeErrorInvalidSmsRoleTrustRelationshipException(response, errorBody) - - case strings.EqualFold("LimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) - case strings.EqualFold("NotAuthorizedException", errorCode): return awsAwsjson11_deserializeErrorNotAuthorizedException(response, errorBody) @@ -7170,15 +7551,6 @@ func awsAwsjson11_deserializeOpErrorForgotPassword(response *smithyhttp.Response case strings.EqualFold("TooManyRequestsException", errorCode): return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) - case strings.EqualFold("UnexpectedLambdaException", errorCode): - return awsAwsjson11_deserializeErrorUnexpectedLambdaException(response, errorBody) - - case strings.EqualFold("UserLambdaValidationException", errorCode): - return awsAwsjson11_deserializeErrorUserLambdaValidationException(response, errorBody) - - case strings.EqualFold("UserNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorUserNotFoundException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -7189,14 +7561,14 @@ func awsAwsjson11_deserializeOpErrorForgotPassword(response *smithyhttp.Response } } -type awsAwsjson11_deserializeOpGetCSVHeader struct { +type awsAwsjson11_deserializeOpDescribeUserPoolDomain struct { } -func (*awsAwsjson11_deserializeOpGetCSVHeader) ID() string { +func (*awsAwsjson11_deserializeOpDescribeUserPoolDomain) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetCSVHeader) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeUserPoolDomain) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7214,9 +7586,9 @@ func (m *awsAwsjson11_deserializeOpGetCSVHeader) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetCSVHeader(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeUserPoolDomain(response, &metadata) } - output := &GetCSVHeaderOutput{} + output := &DescribeUserPoolDomainOutput{} out.Result = output var buff [1024]byte @@ -7236,7 +7608,7 @@ func (m *awsAwsjson11_deserializeOpGetCSVHeader) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetCSVHeaderOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeUserPoolDomainOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7250,7 +7622,7 @@ func (m *awsAwsjson11_deserializeOpGetCSVHeader) HandleDeserialize(ctx context.C return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetCSVHeader(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeUserPoolDomain(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7299,9 +7671,6 @@ func awsAwsjson11_deserializeOpErrorGetCSVHeader(response *smithyhttp.Response, case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("TooManyRequestsException", errorCode): - return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -7312,14 +7681,14 @@ func awsAwsjson11_deserializeOpErrorGetCSVHeader(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpGetDevice struct { +type awsAwsjson11_deserializeOpForgetDevice struct { } -func (*awsAwsjson11_deserializeOpGetDevice) ID() string { +func (*awsAwsjson11_deserializeOpForgetDevice) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetDevice) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpForgetDevice) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7337,43 +7706,21 @@ func (m *awsAwsjson11_deserializeOpGetDevice) HandleDeserialize(ctx context.Cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetDevice(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorForgetDevice(response, &metadata) } - output := &GetDeviceOutput{} + output := &ForgetDeviceOutput{} out.Result = output - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsAwsjson11_deserializeOpDocumentGetDeviceOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), } - return out, metadata, err } return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetDevice(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorForgetDevice(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7450,14 +7797,14 @@ func awsAwsjson11_deserializeOpErrorGetDevice(response *smithyhttp.Response, met } } -type awsAwsjson11_deserializeOpGetGroup struct { +type awsAwsjson11_deserializeOpForgotPassword struct { } -func (*awsAwsjson11_deserializeOpGetGroup) ID() string { +func (*awsAwsjson11_deserializeOpForgotPassword) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpForgotPassword) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7475,9 +7822,9 @@ func (m *awsAwsjson11_deserializeOpGetGroup) HandleDeserialize(ctx context.Conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetGroup(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorForgotPassword(response, &metadata) } - output := &GetGroupOutput{} + output := &ForgotPasswordOutput{} out.Result = output var buff [1024]byte @@ -7497,7 +7844,7 @@ func (m *awsAwsjson11_deserializeOpGetGroup) HandleDeserialize(ctx context.Conte return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetGroupOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentForgotPasswordOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7511,7 +7858,7 @@ func (m *awsAwsjson11_deserializeOpGetGroup) HandleDeserialize(ctx context.Conte return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorForgotPassword(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7548,12 +7895,33 @@ func awsAwsjson11_deserializeOpErrorGetGroup(response *smithyhttp.Response, meta errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("CodeDeliveryFailureException", errorCode): + return awsAwsjson11_deserializeErrorCodeDeliveryFailureException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsAwsjson11_deserializeErrorForbiddenException(response, errorBody) + case strings.EqualFold("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) + case strings.EqualFold("InvalidEmailRoleAccessPolicyException", errorCode): + return awsAwsjson11_deserializeErrorInvalidEmailRoleAccessPolicyException(response, errorBody) + + case strings.EqualFold("InvalidLambdaResponseException", errorCode): + return awsAwsjson11_deserializeErrorInvalidLambdaResponseException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("InvalidSmsRoleAccessPolicyException", errorCode): + return awsAwsjson11_deserializeErrorInvalidSmsRoleAccessPolicyException(response, errorBody) + + case strings.EqualFold("InvalidSmsRoleTrustRelationshipException", errorCode): + return awsAwsjson11_deserializeErrorInvalidSmsRoleTrustRelationshipException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("NotAuthorizedException", errorCode): return awsAwsjson11_deserializeErrorNotAuthorizedException(response, errorBody) @@ -7563,6 +7931,15 @@ func awsAwsjson11_deserializeOpErrorGetGroup(response *smithyhttp.Response, meta case strings.EqualFold("TooManyRequestsException", errorCode): return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) + case strings.EqualFold("UnexpectedLambdaException", errorCode): + return awsAwsjson11_deserializeErrorUnexpectedLambdaException(response, errorBody) + + case strings.EqualFold("UserLambdaValidationException", errorCode): + return awsAwsjson11_deserializeErrorUserLambdaValidationException(response, errorBody) + + case strings.EqualFold("UserNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorUserNotFoundException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -7573,14 +7950,14 @@ func awsAwsjson11_deserializeOpErrorGetGroup(response *smithyhttp.Response, meta } } -type awsAwsjson11_deserializeOpGetIdentityProviderByIdentifier struct { +type awsAwsjson11_deserializeOpGetCSVHeader struct { } -func (*awsAwsjson11_deserializeOpGetIdentityProviderByIdentifier) ID() string { +func (*awsAwsjson11_deserializeOpGetCSVHeader) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetIdentityProviderByIdentifier) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetCSVHeader) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7598,9 +7975,9 @@ func (m *awsAwsjson11_deserializeOpGetIdentityProviderByIdentifier) HandleDeseri } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetIdentityProviderByIdentifier(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetCSVHeader(response, &metadata) } - output := &GetIdentityProviderByIdentifierOutput{} + output := &GetCSVHeaderOutput{} out.Result = output var buff [1024]byte @@ -7620,7 +7997,7 @@ func (m *awsAwsjson11_deserializeOpGetIdentityProviderByIdentifier) HandleDeseri return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetIdentityProviderByIdentifierOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetCSVHeaderOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7634,7 +8011,7 @@ func (m *awsAwsjson11_deserializeOpGetIdentityProviderByIdentifier) HandleDeseri return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetIdentityProviderByIdentifier(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetCSVHeader(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7696,14 +8073,14 @@ func awsAwsjson11_deserializeOpErrorGetIdentityProviderByIdentifier(response *sm } } -type awsAwsjson11_deserializeOpGetLogDeliveryConfiguration struct { +type awsAwsjson11_deserializeOpGetDevice struct { } -func (*awsAwsjson11_deserializeOpGetLogDeliveryConfiguration) ID() string { +func (*awsAwsjson11_deserializeOpGetDevice) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetLogDeliveryConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetDevice) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7721,9 +8098,9 @@ func (m *awsAwsjson11_deserializeOpGetLogDeliveryConfiguration) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetLogDeliveryConfiguration(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetDevice(response, &metadata) } - output := &GetLogDeliveryConfigurationOutput{} + output := &GetDeviceOutput{} out.Result = output var buff [1024]byte @@ -7743,7 +8120,7 @@ func (m *awsAwsjson11_deserializeOpGetLogDeliveryConfiguration) HandleDeserializ return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetLogDeliveryConfigurationOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetDeviceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7757,7 +8134,7 @@ func (m *awsAwsjson11_deserializeOpGetLogDeliveryConfiguration) HandleDeserializ return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetLogDeliveryConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetDevice(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7794,21 +8171,36 @@ func awsAwsjson11_deserializeOpErrorGetLogDeliveryConfiguration(response *smithy errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("ForbiddenException", errorCode): + return awsAwsjson11_deserializeErrorForbiddenException(response, errorBody) + case strings.EqualFold("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("InvalidUserPoolConfigurationException", errorCode): + return awsAwsjson11_deserializeErrorInvalidUserPoolConfigurationException(response, errorBody) + case strings.EqualFold("NotAuthorizedException", errorCode): return awsAwsjson11_deserializeErrorNotAuthorizedException(response, errorBody) + case strings.EqualFold("PasswordResetRequiredException", errorCode): + return awsAwsjson11_deserializeErrorPasswordResetRequiredException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("TooManyRequestsException", errorCode): return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) + case strings.EqualFold("UserNotConfirmedException", errorCode): + return awsAwsjson11_deserializeErrorUserNotConfirmedException(response, errorBody) + + case strings.EqualFold("UserNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorUserNotFoundException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -7819,14 +8211,14 @@ func awsAwsjson11_deserializeOpErrorGetLogDeliveryConfiguration(response *smithy } } -type awsAwsjson11_deserializeOpGetSigningCertificate struct { +type awsAwsjson11_deserializeOpGetGroup struct { } -func (*awsAwsjson11_deserializeOpGetSigningCertificate) ID() string { +func (*awsAwsjson11_deserializeOpGetGroup) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetSigningCertificate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7844,9 +8236,9 @@ func (m *awsAwsjson11_deserializeOpGetSigningCertificate) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetSigningCertificate(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetGroup(response, &metadata) } - output := &GetSigningCertificateOutput{} + output := &GetGroupOutput{} out.Result = output var buff [1024]byte @@ -7866,7 +8258,7 @@ func (m *awsAwsjson11_deserializeOpGetSigningCertificate) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetSigningCertificateOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetGroupOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7880,7 +8272,7 @@ func (m *awsAwsjson11_deserializeOpGetSigningCertificate) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetSigningCertificate(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7923,9 +8315,15 @@ func awsAwsjson11_deserializeOpErrorGetSigningCertificate(response *smithyhttp.R case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("NotAuthorizedException", errorCode): + return awsAwsjson11_deserializeErrorNotAuthorizedException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -7936,14 +8334,14 @@ func awsAwsjson11_deserializeOpErrorGetSigningCertificate(response *smithyhttp.R } } -type awsAwsjson11_deserializeOpGetUICustomization struct { +type awsAwsjson11_deserializeOpGetIdentityProviderByIdentifier struct { } -func (*awsAwsjson11_deserializeOpGetUICustomization) ID() string { +func (*awsAwsjson11_deserializeOpGetIdentityProviderByIdentifier) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetUICustomization) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetIdentityProviderByIdentifier) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7961,9 +8359,9 @@ func (m *awsAwsjson11_deserializeOpGetUICustomization) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetUICustomization(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetIdentityProviderByIdentifier(response, &metadata) } - output := &GetUICustomizationOutput{} + output := &GetIdentityProviderByIdentifierOutput{} out.Result = output var buff [1024]byte @@ -7983,7 +8381,7 @@ func (m *awsAwsjson11_deserializeOpGetUICustomization) HandleDeserialize(ctx con return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetUICustomizationOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetIdentityProviderByIdentifierOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7997,7 +8395,7 @@ func (m *awsAwsjson11_deserializeOpGetUICustomization) HandleDeserialize(ctx con return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetUICustomization(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetIdentityProviderByIdentifier(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8059,14 +8457,14 @@ func awsAwsjson11_deserializeOpErrorGetUICustomization(response *smithyhttp.Resp } } -type awsAwsjson11_deserializeOpGetUser struct { +type awsAwsjson11_deserializeOpGetLogDeliveryConfiguration struct { } -func (*awsAwsjson11_deserializeOpGetUser) ID() string { +func (*awsAwsjson11_deserializeOpGetLogDeliveryConfiguration) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetLogDeliveryConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8084,9 +8482,9 @@ func (m *awsAwsjson11_deserializeOpGetUser) HandleDeserialize(ctx context.Contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetUser(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetLogDeliveryConfiguration(response, &metadata) } - output := &GetUserOutput{} + output := &GetLogDeliveryConfigurationOutput{} out.Result = output var buff [1024]byte @@ -8106,7 +8504,7 @@ func (m *awsAwsjson11_deserializeOpGetUser) HandleDeserialize(ctx context.Contex return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetUserOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetLogDeliveryConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8120,7 +8518,7 @@ func (m *awsAwsjson11_deserializeOpGetUser) HandleDeserialize(ctx context.Contex return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetLogDeliveryConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8157,9 +8555,6 @@ func awsAwsjson11_deserializeOpErrorGetUser(response *smithyhttp.Response, metad errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("ForbiddenException", errorCode): - return awsAwsjson11_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) @@ -8169,21 +8564,12 @@ func awsAwsjson11_deserializeOpErrorGetUser(response *smithyhttp.Response, metad case strings.EqualFold("NotAuthorizedException", errorCode): return awsAwsjson11_deserializeErrorNotAuthorizedException(response, errorBody) - case strings.EqualFold("PasswordResetRequiredException", errorCode): - return awsAwsjson11_deserializeErrorPasswordResetRequiredException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("TooManyRequestsException", errorCode): return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) - case strings.EqualFold("UserNotConfirmedException", errorCode): - return awsAwsjson11_deserializeErrorUserNotConfirmedException(response, errorBody) - - case strings.EqualFold("UserNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorUserNotFoundException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -8194,14 +8580,14 @@ func awsAwsjson11_deserializeOpErrorGetUser(response *smithyhttp.Response, metad } } -type awsAwsjson11_deserializeOpGetUserAttributeVerificationCode struct { +type awsAwsjson11_deserializeOpGetSigningCertificate struct { } -func (*awsAwsjson11_deserializeOpGetUserAttributeVerificationCode) ID() string { +func (*awsAwsjson11_deserializeOpGetSigningCertificate) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetUserAttributeVerificationCode) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetSigningCertificate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8219,9 +8605,9 @@ func (m *awsAwsjson11_deserializeOpGetUserAttributeVerificationCode) HandleDeser } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetUserAttributeVerificationCode(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetSigningCertificate(response, &metadata) } - output := &GetUserAttributeVerificationCodeOutput{} + output := &GetSigningCertificateOutput{} out.Result = output var buff [1024]byte @@ -8241,7 +8627,7 @@ func (m *awsAwsjson11_deserializeOpGetUserAttributeVerificationCode) HandleDeser return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetUserAttributeVerificationCodeOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetSigningCertificateOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8255,7 +8641,7 @@ func (m *awsAwsjson11_deserializeOpGetUserAttributeVerificationCode) HandleDeser return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetUserAttributeVerificationCode(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetSigningCertificate(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8292,57 +8678,15 @@ func awsAwsjson11_deserializeOpErrorGetUserAttributeVerificationCode(response *s errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("CodeDeliveryFailureException", errorCode): - return awsAwsjson11_deserializeErrorCodeDeliveryFailureException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsAwsjson11_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) - case strings.EqualFold("InvalidEmailRoleAccessPolicyException", errorCode): - return awsAwsjson11_deserializeErrorInvalidEmailRoleAccessPolicyException(response, errorBody) - - case strings.EqualFold("InvalidLambdaResponseException", errorCode): - return awsAwsjson11_deserializeErrorInvalidLambdaResponseException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidSmsRoleAccessPolicyException", errorCode): - return awsAwsjson11_deserializeErrorInvalidSmsRoleAccessPolicyException(response, errorBody) - - case strings.EqualFold("InvalidSmsRoleTrustRelationshipException", errorCode): - return awsAwsjson11_deserializeErrorInvalidSmsRoleTrustRelationshipException(response, errorBody) - - case strings.EqualFold("LimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) - - case strings.EqualFold("NotAuthorizedException", errorCode): - return awsAwsjson11_deserializeErrorNotAuthorizedException(response, errorBody) - - case strings.EqualFold("PasswordResetRequiredException", errorCode): - return awsAwsjson11_deserializeErrorPasswordResetRequiredException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("TooManyRequestsException", errorCode): - return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) - - case strings.EqualFold("UnexpectedLambdaException", errorCode): - return awsAwsjson11_deserializeErrorUnexpectedLambdaException(response, errorBody) - - case strings.EqualFold("UserLambdaValidationException", errorCode): - return awsAwsjson11_deserializeErrorUserLambdaValidationException(response, errorBody) - - case strings.EqualFold("UserNotConfirmedException", errorCode): - return awsAwsjson11_deserializeErrorUserNotConfirmedException(response, errorBody) - - case strings.EqualFold("UserNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorUserNotFoundException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -8353,14 +8697,14 @@ func awsAwsjson11_deserializeOpErrorGetUserAttributeVerificationCode(response *s } } -type awsAwsjson11_deserializeOpGetUserPoolMfaConfig struct { +type awsAwsjson11_deserializeOpGetUICustomization struct { } -func (*awsAwsjson11_deserializeOpGetUserPoolMfaConfig) ID() string { +func (*awsAwsjson11_deserializeOpGetUICustomization) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetUserPoolMfaConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetUICustomization) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8378,9 +8722,9 @@ func (m *awsAwsjson11_deserializeOpGetUserPoolMfaConfig) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetUserPoolMfaConfig(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetUICustomization(response, &metadata) } - output := &GetUserPoolMfaConfigOutput{} + output := &GetUICustomizationOutput{} out.Result = output var buff [1024]byte @@ -8400,7 +8744,7 @@ func (m *awsAwsjson11_deserializeOpGetUserPoolMfaConfig) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetUserPoolMfaConfigOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetUICustomizationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8414,7 +8758,7 @@ func (m *awsAwsjson11_deserializeOpGetUserPoolMfaConfig) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetUserPoolMfaConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetUICustomization(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8476,14 +8820,14 @@ func awsAwsjson11_deserializeOpErrorGetUserPoolMfaConfig(response *smithyhttp.Re } } -type awsAwsjson11_deserializeOpGlobalSignOut struct { +type awsAwsjson11_deserializeOpGetUser struct { } -func (*awsAwsjson11_deserializeOpGlobalSignOut) ID() string { +func (*awsAwsjson11_deserializeOpGetUser) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGlobalSignOut) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8501,9 +8845,9 @@ func (m *awsAwsjson11_deserializeOpGlobalSignOut) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGlobalSignOut(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetUser(response, &metadata) } - output := &GlobalSignOutOutput{} + output := &GetUserOutput{} out.Result = output var buff [1024]byte @@ -8523,7 +8867,7 @@ func (m *awsAwsjson11_deserializeOpGlobalSignOut) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGlobalSignOutOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetUserOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8537,7 +8881,7 @@ func (m *awsAwsjson11_deserializeOpGlobalSignOut) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGlobalSignOut(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8598,6 +8942,9 @@ func awsAwsjson11_deserializeOpErrorGlobalSignOut(response *smithyhttp.Response, case strings.EqualFold("UserNotConfirmedException", errorCode): return awsAwsjson11_deserializeErrorUserNotConfirmedException(response, errorBody) + case strings.EqualFold("UserNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorUserNotFoundException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -8608,14 +8955,14 @@ func awsAwsjson11_deserializeOpErrorGlobalSignOut(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpInitiateAuth struct { +type awsAwsjson11_deserializeOpGetUserAttributeVerificationCode struct { } -func (*awsAwsjson11_deserializeOpInitiateAuth) ID() string { +func (*awsAwsjson11_deserializeOpGetUserAttributeVerificationCode) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpInitiateAuth) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetUserAttributeVerificationCode) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8633,9 +8980,9 @@ func (m *awsAwsjson11_deserializeOpInitiateAuth) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorInitiateAuth(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetUserAttributeVerificationCode(response, &metadata) } - output := &InitiateAuthOutput{} + output := &GetUserAttributeVerificationCodeOutput{} out.Result = output var buff [1024]byte @@ -8655,7 +9002,7 @@ func (m *awsAwsjson11_deserializeOpInitiateAuth) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentInitiateAuthOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetUserAttributeVerificationCodeOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8669,7 +9016,7 @@ func (m *awsAwsjson11_deserializeOpInitiateAuth) HandleDeserialize(ctx context.C return out, metadata, err } -func awsAwsjson11_deserializeOpErrorInitiateAuth(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetUserAttributeVerificationCode(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8706,6 +9053,9 @@ func awsAwsjson11_deserializeOpErrorInitiateAuth(response *smithyhttp.Response, errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("CodeDeliveryFailureException", errorCode): + return awsAwsjson11_deserializeErrorCodeDeliveryFailureException(response, errorBody) + case strings.EqualFold("ForbiddenException", errorCode): return awsAwsjson11_deserializeErrorForbiddenException(response, errorBody) @@ -8727,8 +9077,8 @@ func awsAwsjson11_deserializeOpErrorInitiateAuth(response *smithyhttp.Response, case strings.EqualFold("InvalidSmsRoleTrustRelationshipException", errorCode): return awsAwsjson11_deserializeErrorInvalidSmsRoleTrustRelationshipException(response, errorBody) - case strings.EqualFold("InvalidUserPoolConfigurationException", errorCode): - return awsAwsjson11_deserializeErrorInvalidUserPoolConfigurationException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) case strings.EqualFold("NotAuthorizedException", errorCode): return awsAwsjson11_deserializeErrorNotAuthorizedException(response, errorBody) @@ -8764,14 +9114,14 @@ func awsAwsjson11_deserializeOpErrorInitiateAuth(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpListDevices struct { +type awsAwsjson11_deserializeOpGetUserAuthFactors struct { } -func (*awsAwsjson11_deserializeOpListDevices) ID() string { +func (*awsAwsjson11_deserializeOpGetUserAuthFactors) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListDevices) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetUserAuthFactors) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8789,9 +9139,9 @@ func (m *awsAwsjson11_deserializeOpListDevices) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListDevices(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetUserAuthFactors(response, &metadata) } - output := &ListDevicesOutput{} + output := &GetUserAuthFactorsOutput{} out.Result = output var buff [1024]byte @@ -8811,7 +9161,7 @@ func (m *awsAwsjson11_deserializeOpListDevices) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListDevicesOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetUserAuthFactorsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8825,7 +9175,7 @@ func (m *awsAwsjson11_deserializeOpListDevices) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListDevices(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetUserAuthFactors(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8871,9 +9221,6 @@ func awsAwsjson11_deserializeOpErrorListDevices(response *smithyhttp.Response, m case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidUserPoolConfigurationException", errorCode): - return awsAwsjson11_deserializeErrorInvalidUserPoolConfigurationException(response, errorBody) - case strings.EqualFold("NotAuthorizedException", errorCode): return awsAwsjson11_deserializeErrorNotAuthorizedException(response, errorBody) @@ -8902,14 +9249,14 @@ func awsAwsjson11_deserializeOpErrorListDevices(response *smithyhttp.Response, m } } -type awsAwsjson11_deserializeOpListGroups struct { +type awsAwsjson11_deserializeOpGetUserPoolMfaConfig struct { } -func (*awsAwsjson11_deserializeOpListGroups) ID() string { +func (*awsAwsjson11_deserializeOpGetUserPoolMfaConfig) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListGroups) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetUserPoolMfaConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8927,9 +9274,9 @@ func (m *awsAwsjson11_deserializeOpListGroups) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListGroups(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetUserPoolMfaConfig(response, &metadata) } - output := &ListGroupsOutput{} + output := &GetUserPoolMfaConfigOutput{} out.Result = output var buff [1024]byte @@ -8949,7 +9296,7 @@ func (m *awsAwsjson11_deserializeOpListGroups) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListGroupsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetUserPoolMfaConfigOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8963,7 +9310,7 @@ func (m *awsAwsjson11_deserializeOpListGroups) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetUserPoolMfaConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -9025,14 +9372,14 @@ func awsAwsjson11_deserializeOpErrorListGroups(response *smithyhttp.Response, me } } -type awsAwsjson11_deserializeOpListIdentityProviders struct { +type awsAwsjson11_deserializeOpGlobalSignOut struct { } -func (*awsAwsjson11_deserializeOpListIdentityProviders) ID() string { +func (*awsAwsjson11_deserializeOpGlobalSignOut) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListIdentityProviders) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGlobalSignOut) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -9050,9 +9397,9 @@ func (m *awsAwsjson11_deserializeOpListIdentityProviders) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListIdentityProviders(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGlobalSignOut(response, &metadata) } - output := &ListIdentityProvidersOutput{} + output := &GlobalSignOutOutput{} out.Result = output var buff [1024]byte @@ -9072,7 +9419,7 @@ func (m *awsAwsjson11_deserializeOpListIdentityProviders) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListIdentityProvidersOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGlobalSignOutOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9086,7 +9433,7 @@ func (m *awsAwsjson11_deserializeOpListIdentityProviders) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListIdentityProviders(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGlobalSignOut(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -9123,6 +9470,9 @@ func awsAwsjson11_deserializeOpErrorListIdentityProviders(response *smithyhttp.R errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("ForbiddenException", errorCode): + return awsAwsjson11_deserializeErrorForbiddenException(response, errorBody) + case strings.EqualFold("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) @@ -9132,12 +9482,18 @@ func awsAwsjson11_deserializeOpErrorListIdentityProviders(response *smithyhttp.R case strings.EqualFold("NotAuthorizedException", errorCode): return awsAwsjson11_deserializeErrorNotAuthorizedException(response, errorBody) + case strings.EqualFold("PasswordResetRequiredException", errorCode): + return awsAwsjson11_deserializeErrorPasswordResetRequiredException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("TooManyRequestsException", errorCode): return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) + case strings.EqualFold("UserNotConfirmedException", errorCode): + return awsAwsjson11_deserializeErrorUserNotConfirmedException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -9148,14 +9504,14 @@ func awsAwsjson11_deserializeOpErrorListIdentityProviders(response *smithyhttp.R } } -type awsAwsjson11_deserializeOpListResourceServers struct { +type awsAwsjson11_deserializeOpInitiateAuth struct { } -func (*awsAwsjson11_deserializeOpListResourceServers) ID() string { +func (*awsAwsjson11_deserializeOpInitiateAuth) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListResourceServers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpInitiateAuth) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -9173,9 +9529,9 @@ func (m *awsAwsjson11_deserializeOpListResourceServers) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListResourceServers(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorInitiateAuth(response, &metadata) } - output := &ListResourceServersOutput{} + output := &InitiateAuthOutput{} out.Result = output var buff [1024]byte @@ -9195,7 +9551,7 @@ func (m *awsAwsjson11_deserializeOpListResourceServers) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListResourceServersOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentInitiateAuthOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9209,7 +9565,7 @@ func (m *awsAwsjson11_deserializeOpListResourceServers) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListResourceServers(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorInitiateAuth(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -9246,21 +9602,54 @@ func awsAwsjson11_deserializeOpErrorListResourceServers(response *smithyhttp.Res errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("ForbiddenException", errorCode): + return awsAwsjson11_deserializeErrorForbiddenException(response, errorBody) + case strings.EqualFold("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) + case strings.EqualFold("InvalidEmailRoleAccessPolicyException", errorCode): + return awsAwsjson11_deserializeErrorInvalidEmailRoleAccessPolicyException(response, errorBody) + + case strings.EqualFold("InvalidLambdaResponseException", errorCode): + return awsAwsjson11_deserializeErrorInvalidLambdaResponseException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("InvalidSmsRoleAccessPolicyException", errorCode): + return awsAwsjson11_deserializeErrorInvalidSmsRoleAccessPolicyException(response, errorBody) + + case strings.EqualFold("InvalidSmsRoleTrustRelationshipException", errorCode): + return awsAwsjson11_deserializeErrorInvalidSmsRoleTrustRelationshipException(response, errorBody) + + case strings.EqualFold("InvalidUserPoolConfigurationException", errorCode): + return awsAwsjson11_deserializeErrorInvalidUserPoolConfigurationException(response, errorBody) + case strings.EqualFold("NotAuthorizedException", errorCode): return awsAwsjson11_deserializeErrorNotAuthorizedException(response, errorBody) + case strings.EqualFold("PasswordResetRequiredException", errorCode): + return awsAwsjson11_deserializeErrorPasswordResetRequiredException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("TooManyRequestsException", errorCode): return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) + case strings.EqualFold("UnexpectedLambdaException", errorCode): + return awsAwsjson11_deserializeErrorUnexpectedLambdaException(response, errorBody) + + case strings.EqualFold("UserLambdaValidationException", errorCode): + return awsAwsjson11_deserializeErrorUserLambdaValidationException(response, errorBody) + + case strings.EqualFold("UserNotConfirmedException", errorCode): + return awsAwsjson11_deserializeErrorUserNotConfirmedException(response, errorBody) + + case strings.EqualFold("UserNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorUserNotFoundException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -9271,14 +9660,14 @@ func awsAwsjson11_deserializeOpErrorListResourceServers(response *smithyhttp.Res } } -type awsAwsjson11_deserializeOpListTagsForResource struct { +type awsAwsjson11_deserializeOpListDevices struct { } -func (*awsAwsjson11_deserializeOpListTagsForResource) ID() string { +func (*awsAwsjson11_deserializeOpListDevices) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListDevices) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -9296,9 +9685,9 @@ func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListTagsForResource(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListDevices(response, &metadata) } - output := &ListTagsForResourceOutput{} + output := &ListDevicesOutput{} out.Result = output var buff [1024]byte @@ -9318,7 +9707,7 @@ func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListDevicesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9332,7 +9721,7 @@ func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListDevices(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -9369,21 +9758,36 @@ func awsAwsjson11_deserializeOpErrorListTagsForResource(response *smithyhttp.Res errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("ForbiddenException", errorCode): + return awsAwsjson11_deserializeErrorForbiddenException(response, errorBody) + case strings.EqualFold("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("InvalidUserPoolConfigurationException", errorCode): + return awsAwsjson11_deserializeErrorInvalidUserPoolConfigurationException(response, errorBody) + case strings.EqualFold("NotAuthorizedException", errorCode): return awsAwsjson11_deserializeErrorNotAuthorizedException(response, errorBody) + case strings.EqualFold("PasswordResetRequiredException", errorCode): + return awsAwsjson11_deserializeErrorPasswordResetRequiredException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("TooManyRequestsException", errorCode): return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) + case strings.EqualFold("UserNotConfirmedException", errorCode): + return awsAwsjson11_deserializeErrorUserNotConfirmedException(response, errorBody) + + case strings.EqualFold("UserNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorUserNotFoundException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -9394,14 +9798,14 @@ func awsAwsjson11_deserializeOpErrorListTagsForResource(response *smithyhttp.Res } } -type awsAwsjson11_deserializeOpListUserImportJobs struct { +type awsAwsjson11_deserializeOpListGroups struct { } -func (*awsAwsjson11_deserializeOpListUserImportJobs) ID() string { +func (*awsAwsjson11_deserializeOpListGroups) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListUserImportJobs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListGroups) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -9419,9 +9823,9 @@ func (m *awsAwsjson11_deserializeOpListUserImportJobs) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListUserImportJobs(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListGroups(response, &metadata) } - output := &ListUserImportJobsOutput{} + output := &ListGroupsOutput{} out.Result = output var buff [1024]byte @@ -9441,7 +9845,7 @@ func (m *awsAwsjson11_deserializeOpListUserImportJobs) HandleDeserialize(ctx con return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListUserImportJobsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListGroupsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9455,7 +9859,7 @@ func (m *awsAwsjson11_deserializeOpListUserImportJobs) HandleDeserialize(ctx con return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListUserImportJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -9517,14 +9921,14 @@ func awsAwsjson11_deserializeOpErrorListUserImportJobs(response *smithyhttp.Resp } } -type awsAwsjson11_deserializeOpListUserPoolClients struct { +type awsAwsjson11_deserializeOpListIdentityProviders struct { } -func (*awsAwsjson11_deserializeOpListUserPoolClients) ID() string { +func (*awsAwsjson11_deserializeOpListIdentityProviders) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListUserPoolClients) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_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) @@ -9542,9 +9946,9 @@ func (m *awsAwsjson11_deserializeOpListUserPoolClients) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListUserPoolClients(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListIdentityProviders(response, &metadata) } - output := &ListUserPoolClientsOutput{} + output := &ListIdentityProvidersOutput{} out.Result = output var buff [1024]byte @@ -9564,7 +9968,7 @@ func (m *awsAwsjson11_deserializeOpListUserPoolClients) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListUserPoolClientsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListIdentityProvidersOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9578,7 +9982,7 @@ func (m *awsAwsjson11_deserializeOpListUserPoolClients) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListUserPoolClients(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_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)} @@ -9640,14 +10044,14 @@ func awsAwsjson11_deserializeOpErrorListUserPoolClients(response *smithyhttp.Res } } -type awsAwsjson11_deserializeOpListUserPools struct { +type awsAwsjson11_deserializeOpListResourceServers struct { } -func (*awsAwsjson11_deserializeOpListUserPools) ID() string { +func (*awsAwsjson11_deserializeOpListResourceServers) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListUserPools) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListResourceServers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -9665,9 +10069,9 @@ func (m *awsAwsjson11_deserializeOpListUserPools) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListUserPools(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListResourceServers(response, &metadata) } - output := &ListUserPoolsOutput{} + output := &ListResourceServersOutput{} out.Result = output var buff [1024]byte @@ -9687,7 +10091,7 @@ func (m *awsAwsjson11_deserializeOpListUserPools) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListUserPoolsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListResourceServersOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9701,7 +10105,7 @@ func (m *awsAwsjson11_deserializeOpListUserPools) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListUserPools(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListResourceServers(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -9747,6 +10151,9 @@ func awsAwsjson11_deserializeOpErrorListUserPools(response *smithyhttp.Response, case strings.EqualFold("NotAuthorizedException", errorCode): return awsAwsjson11_deserializeErrorNotAuthorizedException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("TooManyRequestsException", errorCode): return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) @@ -9760,14 +10167,14 @@ func awsAwsjson11_deserializeOpErrorListUserPools(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpListUsers struct { +type awsAwsjson11_deserializeOpListTagsForResource struct { } -func (*awsAwsjson11_deserializeOpListUsers) ID() string { +func (*awsAwsjson11_deserializeOpListTagsForResource) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListUsers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_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) @@ -9785,9 +10192,9 @@ func (m *awsAwsjson11_deserializeOpListUsers) HandleDeserialize(ctx context.Cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListUsers(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListTagsForResource(response, &metadata) } - output := &ListUsersOutput{} + output := &ListTagsForResourceOutput{} out.Result = output var buff [1024]byte @@ -9807,7 +10214,7 @@ func (m *awsAwsjson11_deserializeOpListUsers) HandleDeserialize(ctx context.Cont return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListUsersOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListTagsForResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9821,7 +10228,7 @@ func (m *awsAwsjson11_deserializeOpListUsers) HandleDeserialize(ctx context.Cont return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListUsers(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_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)} @@ -9883,14 +10290,14 @@ func awsAwsjson11_deserializeOpErrorListUsers(response *smithyhttp.Response, met } } -type awsAwsjson11_deserializeOpListUsersInGroup struct { +type awsAwsjson11_deserializeOpListUserImportJobs struct { } -func (*awsAwsjson11_deserializeOpListUsersInGroup) ID() string { +func (*awsAwsjson11_deserializeOpListUserImportJobs) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListUsersInGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListUserImportJobs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -9908,9 +10315,9 @@ func (m *awsAwsjson11_deserializeOpListUsersInGroup) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListUsersInGroup(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListUserImportJobs(response, &metadata) } - output := &ListUsersInGroupOutput{} + output := &ListUserImportJobsOutput{} out.Result = output var buff [1024]byte @@ -9930,7 +10337,7 @@ func (m *awsAwsjson11_deserializeOpListUsersInGroup) HandleDeserialize(ctx conte return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListUsersInGroupOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListUserImportJobsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9944,7 +10351,7 @@ func (m *awsAwsjson11_deserializeOpListUsersInGroup) HandleDeserialize(ctx conte return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListUsersInGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListUserImportJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -10006,14 +10413,14 @@ func awsAwsjson11_deserializeOpErrorListUsersInGroup(response *smithyhttp.Respon } } -type awsAwsjson11_deserializeOpResendConfirmationCode struct { +type awsAwsjson11_deserializeOpListUserPoolClients struct { } -func (*awsAwsjson11_deserializeOpResendConfirmationCode) ID() string { +func (*awsAwsjson11_deserializeOpListUserPoolClients) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpResendConfirmationCode) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListUserPoolClients) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -10031,9 +10438,9 @@ func (m *awsAwsjson11_deserializeOpResendConfirmationCode) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorResendConfirmationCode(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListUserPoolClients(response, &metadata) } - output := &ResendConfirmationCodeOutput{} + output := &ListUserPoolClientsOutput{} out.Result = output var buff [1024]byte @@ -10053,7 +10460,7 @@ func (m *awsAwsjson11_deserializeOpResendConfirmationCode) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentResendConfirmationCodeOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListUserPoolClientsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10067,7 +10474,7 @@ func (m *awsAwsjson11_deserializeOpResendConfirmationCode) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorResendConfirmationCode(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListUserPoolClients(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -10104,33 +10511,12 @@ func awsAwsjson11_deserializeOpErrorResendConfirmationCode(response *smithyhttp. errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("CodeDeliveryFailureException", errorCode): - return awsAwsjson11_deserializeErrorCodeDeliveryFailureException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsAwsjson11_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) - case strings.EqualFold("InvalidEmailRoleAccessPolicyException", errorCode): - return awsAwsjson11_deserializeErrorInvalidEmailRoleAccessPolicyException(response, errorBody) - - case strings.EqualFold("InvalidLambdaResponseException", errorCode): - return awsAwsjson11_deserializeErrorInvalidLambdaResponseException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidSmsRoleAccessPolicyException", errorCode): - return awsAwsjson11_deserializeErrorInvalidSmsRoleAccessPolicyException(response, errorBody) - - case strings.EqualFold("InvalidSmsRoleTrustRelationshipException", errorCode): - return awsAwsjson11_deserializeErrorInvalidSmsRoleTrustRelationshipException(response, errorBody) - - case strings.EqualFold("LimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) - case strings.EqualFold("NotAuthorizedException", errorCode): return awsAwsjson11_deserializeErrorNotAuthorizedException(response, errorBody) @@ -10140,15 +10526,6 @@ func awsAwsjson11_deserializeOpErrorResendConfirmationCode(response *smithyhttp. case strings.EqualFold("TooManyRequestsException", errorCode): return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) - case strings.EqualFold("UnexpectedLambdaException", errorCode): - return awsAwsjson11_deserializeErrorUnexpectedLambdaException(response, errorBody) - - case strings.EqualFold("UserLambdaValidationException", errorCode): - return awsAwsjson11_deserializeErrorUserLambdaValidationException(response, errorBody) - - case strings.EqualFold("UserNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorUserNotFoundException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -10159,14 +10536,14 @@ func awsAwsjson11_deserializeOpErrorResendConfirmationCode(response *smithyhttp. } } -type awsAwsjson11_deserializeOpRespondToAuthChallenge struct { +type awsAwsjson11_deserializeOpListUserPools struct { } -func (*awsAwsjson11_deserializeOpRespondToAuthChallenge) ID() string { +func (*awsAwsjson11_deserializeOpListUserPools) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpRespondToAuthChallenge) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListUserPools) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -10184,9 +10561,9 @@ func (m *awsAwsjson11_deserializeOpRespondToAuthChallenge) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorRespondToAuthChallenge(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListUserPools(response, &metadata) } - output := &RespondToAuthChallengeOutput{} + output := &ListUserPoolsOutput{} out.Result = output var buff [1024]byte @@ -10206,7 +10583,7 @@ func (m *awsAwsjson11_deserializeOpRespondToAuthChallenge) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentRespondToAuthChallengeOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListUserPoolsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10220,7 +10597,7 @@ func (m *awsAwsjson11_deserializeOpRespondToAuthChallenge) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorRespondToAuthChallenge(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListUserPools(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -10257,75 +10634,18 @@ func awsAwsjson11_deserializeOpErrorRespondToAuthChallenge(response *smithyhttp. errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("AliasExistsException", errorCode): - return awsAwsjson11_deserializeErrorAliasExistsException(response, errorBody) - - case strings.EqualFold("CodeMismatchException", errorCode): - return awsAwsjson11_deserializeErrorCodeMismatchException(response, errorBody) - - case strings.EqualFold("ExpiredCodeException", errorCode): - return awsAwsjson11_deserializeErrorExpiredCodeException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsAwsjson11_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) - case strings.EqualFold("InvalidEmailRoleAccessPolicyException", errorCode): - return awsAwsjson11_deserializeErrorInvalidEmailRoleAccessPolicyException(response, errorBody) - - case strings.EqualFold("InvalidLambdaResponseException", errorCode): - return awsAwsjson11_deserializeErrorInvalidLambdaResponseException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidPasswordException", errorCode): - return awsAwsjson11_deserializeErrorInvalidPasswordException(response, errorBody) - - case strings.EqualFold("InvalidSmsRoleAccessPolicyException", errorCode): - return awsAwsjson11_deserializeErrorInvalidSmsRoleAccessPolicyException(response, errorBody) - - case strings.EqualFold("InvalidSmsRoleTrustRelationshipException", errorCode): - return awsAwsjson11_deserializeErrorInvalidSmsRoleTrustRelationshipException(response, errorBody) - - case strings.EqualFold("InvalidUserPoolConfigurationException", errorCode): - return awsAwsjson11_deserializeErrorInvalidUserPoolConfigurationException(response, errorBody) - - case strings.EqualFold("MFAMethodNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorMFAMethodNotFoundException(response, errorBody) - case strings.EqualFold("NotAuthorizedException", errorCode): return awsAwsjson11_deserializeErrorNotAuthorizedException(response, errorBody) - case strings.EqualFold("PasswordHistoryPolicyViolationException", errorCode): - return awsAwsjson11_deserializeErrorPasswordHistoryPolicyViolationException(response, errorBody) - - case strings.EqualFold("PasswordResetRequiredException", errorCode): - return awsAwsjson11_deserializeErrorPasswordResetRequiredException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("SoftwareTokenMFANotFoundException", errorCode): - return awsAwsjson11_deserializeErrorSoftwareTokenMFANotFoundException(response, errorBody) - case strings.EqualFold("TooManyRequestsException", errorCode): return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) - case strings.EqualFold("UnexpectedLambdaException", errorCode): - return awsAwsjson11_deserializeErrorUnexpectedLambdaException(response, errorBody) - - case strings.EqualFold("UserLambdaValidationException", errorCode): - return awsAwsjson11_deserializeErrorUserLambdaValidationException(response, errorBody) - - case strings.EqualFold("UserNotConfirmedException", errorCode): - return awsAwsjson11_deserializeErrorUserNotConfirmedException(response, errorBody) - - case strings.EqualFold("UserNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorUserNotFoundException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -10336,14 +10656,14 @@ func awsAwsjson11_deserializeOpErrorRespondToAuthChallenge(response *smithyhttp. } } -type awsAwsjson11_deserializeOpRevokeToken struct { +type awsAwsjson11_deserializeOpListUsers struct { } -func (*awsAwsjson11_deserializeOpRevokeToken) ID() string { +func (*awsAwsjson11_deserializeOpListUsers) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpRevokeToken) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListUsers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -10361,9 +10681,9 @@ func (m *awsAwsjson11_deserializeOpRevokeToken) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorRevokeToken(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListUsers(response, &metadata) } - output := &RevokeTokenOutput{} + output := &ListUsersOutput{} out.Result = output var buff [1024]byte @@ -10383,7 +10703,7 @@ func (m *awsAwsjson11_deserializeOpRevokeToken) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentRevokeTokenOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListUsersOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10397,7 +10717,7 @@ func (m *awsAwsjson11_deserializeOpRevokeToken) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorRevokeToken(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListUsers(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -10434,26 +10754,20 @@ func awsAwsjson11_deserializeOpErrorRevokeToken(response *smithyhttp.Response, m errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("ForbiddenException", errorCode): - return awsAwsjson11_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("TooManyRequestsException", errorCode): - return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) - - case strings.EqualFold("UnauthorizedException", errorCode): - return awsAwsjson11_deserializeErrorUnauthorizedException(response, errorBody) + case strings.EqualFold("NotAuthorizedException", errorCode): + return awsAwsjson11_deserializeErrorNotAuthorizedException(response, errorBody) - case strings.EqualFold("UnsupportedOperationException", errorCode): - return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("UnsupportedTokenTypeException", errorCode): - return awsAwsjson11_deserializeErrorUnsupportedTokenTypeException(response, errorBody) + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -10465,14 +10779,14 @@ func awsAwsjson11_deserializeOpErrorRevokeToken(response *smithyhttp.Response, m } } -type awsAwsjson11_deserializeOpSetLogDeliveryConfiguration struct { +type awsAwsjson11_deserializeOpListUsersInGroup struct { } -func (*awsAwsjson11_deserializeOpSetLogDeliveryConfiguration) ID() string { +func (*awsAwsjson11_deserializeOpListUsersInGroup) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpSetLogDeliveryConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListUsersInGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -10490,9 +10804,9 @@ func (m *awsAwsjson11_deserializeOpSetLogDeliveryConfiguration) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorSetLogDeliveryConfiguration(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListUsersInGroup(response, &metadata) } - output := &SetLogDeliveryConfigurationOutput{} + output := &ListUsersInGroupOutput{} out.Result = output var buff [1024]byte @@ -10512,7 +10826,7 @@ func (m *awsAwsjson11_deserializeOpSetLogDeliveryConfiguration) HandleDeserializ return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentSetLogDeliveryConfigurationOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListUsersInGroupOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10526,7 +10840,7 @@ func (m *awsAwsjson11_deserializeOpSetLogDeliveryConfiguration) HandleDeserializ return out, metadata, err } -func awsAwsjson11_deserializeOpErrorSetLogDeliveryConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListUsersInGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -10588,14 +10902,14 @@ func awsAwsjson11_deserializeOpErrorSetLogDeliveryConfiguration(response *smithy } } -type awsAwsjson11_deserializeOpSetRiskConfiguration struct { +type awsAwsjson11_deserializeOpListWebAuthnCredentials struct { } -func (*awsAwsjson11_deserializeOpSetRiskConfiguration) ID() string { +func (*awsAwsjson11_deserializeOpListWebAuthnCredentials) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpSetRiskConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListWebAuthnCredentials) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -10613,9 +10927,9 @@ func (m *awsAwsjson11_deserializeOpSetRiskConfiguration) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorSetRiskConfiguration(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListWebAuthnCredentials(response, &metadata) } - output := &SetRiskConfigurationOutput{} + output := &ListWebAuthnCredentialsOutput{} out.Result = output var buff [1024]byte @@ -10635,7 +10949,7 @@ func (m *awsAwsjson11_deserializeOpSetRiskConfiguration) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentSetRiskConfigurationOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListWebAuthnCredentialsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10649,7 +10963,7 @@ func (m *awsAwsjson11_deserializeOpSetRiskConfiguration) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorSetRiskConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListWebAuthnCredentials(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -10686,30 +11000,18 @@ func awsAwsjson11_deserializeOpErrorSetRiskConfiguration(response *smithyhttp.Re errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("CodeDeliveryFailureException", errorCode): - return awsAwsjson11_deserializeErrorCodeDeliveryFailureException(response, errorBody) + case strings.EqualFold("ForbiddenException", errorCode): + return awsAwsjson11_deserializeErrorForbiddenException(response, errorBody) case strings.EqualFold("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) - case strings.EqualFold("InvalidEmailRoleAccessPolicyException", errorCode): - return awsAwsjson11_deserializeErrorInvalidEmailRoleAccessPolicyException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("NotAuthorizedException", errorCode): return awsAwsjson11_deserializeErrorNotAuthorizedException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("TooManyRequestsException", errorCode): - return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) - - case strings.EqualFold("UserPoolAddOnNotEnabledException", errorCode): - return awsAwsjson11_deserializeErrorUserPoolAddOnNotEnabledException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -10720,14 +11022,14 @@ func awsAwsjson11_deserializeOpErrorSetRiskConfiguration(response *smithyhttp.Re } } -type awsAwsjson11_deserializeOpSetUICustomization struct { +type awsAwsjson11_deserializeOpResendConfirmationCode struct { } -func (*awsAwsjson11_deserializeOpSetUICustomization) ID() string { +func (*awsAwsjson11_deserializeOpResendConfirmationCode) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpSetUICustomization) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpResendConfirmationCode) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -10745,9 +11047,9 @@ func (m *awsAwsjson11_deserializeOpSetUICustomization) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorSetUICustomization(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorResendConfirmationCode(response, &metadata) } - output := &SetUICustomizationOutput{} + output := &ResendConfirmationCodeOutput{} out.Result = output var buff [1024]byte @@ -10767,7 +11069,7 @@ func (m *awsAwsjson11_deserializeOpSetUICustomization) HandleDeserialize(ctx con return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentSetUICustomizationOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentResendConfirmationCodeOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10781,7 +11083,7 @@ func (m *awsAwsjson11_deserializeOpSetUICustomization) HandleDeserialize(ctx con return out, metadata, err } -func awsAwsjson11_deserializeOpErrorSetUICustomization(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorResendConfirmationCode(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -10818,21 +11120,51 @@ func awsAwsjson11_deserializeOpErrorSetUICustomization(response *smithyhttp.Resp errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("CodeDeliveryFailureException", errorCode): + return awsAwsjson11_deserializeErrorCodeDeliveryFailureException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsAwsjson11_deserializeErrorForbiddenException(response, errorBody) + case strings.EqualFold("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) + case strings.EqualFold("InvalidEmailRoleAccessPolicyException", errorCode): + return awsAwsjson11_deserializeErrorInvalidEmailRoleAccessPolicyException(response, errorBody) + + case strings.EqualFold("InvalidLambdaResponseException", errorCode): + return awsAwsjson11_deserializeErrorInvalidLambdaResponseException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("NotAuthorizedException", errorCode): - return awsAwsjson11_deserializeErrorNotAuthorizedException(response, errorBody) + case strings.EqualFold("InvalidSmsRoleAccessPolicyException", errorCode): + return awsAwsjson11_deserializeErrorInvalidSmsRoleAccessPolicyException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("InvalidSmsRoleTrustRelationshipException", errorCode): + return awsAwsjson11_deserializeErrorInvalidSmsRoleTrustRelationshipException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NotAuthorizedException", errorCode): + return awsAwsjson11_deserializeErrorNotAuthorizedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("TooManyRequestsException", errorCode): return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) + case strings.EqualFold("UnexpectedLambdaException", errorCode): + return awsAwsjson11_deserializeErrorUnexpectedLambdaException(response, errorBody) + + case strings.EqualFold("UserLambdaValidationException", errorCode): + return awsAwsjson11_deserializeErrorUserLambdaValidationException(response, errorBody) + + case strings.EqualFold("UserNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorUserNotFoundException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -10843,14 +11175,14 @@ func awsAwsjson11_deserializeOpErrorSetUICustomization(response *smithyhttp.Resp } } -type awsAwsjson11_deserializeOpSetUserMFAPreference struct { +type awsAwsjson11_deserializeOpRespondToAuthChallenge struct { } -func (*awsAwsjson11_deserializeOpSetUserMFAPreference) ID() string { +func (*awsAwsjson11_deserializeOpRespondToAuthChallenge) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpSetUserMFAPreference) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpRespondToAuthChallenge) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -10868,9 +11200,9 @@ func (m *awsAwsjson11_deserializeOpSetUserMFAPreference) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorSetUserMFAPreference(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorRespondToAuthChallenge(response, &metadata) } - output := &SetUserMFAPreferenceOutput{} + output := &RespondToAuthChallengeOutput{} out.Result = output var buff [1024]byte @@ -10890,7 +11222,7 @@ func (m *awsAwsjson11_deserializeOpSetUserMFAPreference) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentSetUserMFAPreferenceOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentRespondToAuthChallengeOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10904,7 +11236,7 @@ func (m *awsAwsjson11_deserializeOpSetUserMFAPreference) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorSetUserMFAPreference(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorRespondToAuthChallenge(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -10941,24 +11273,69 @@ func awsAwsjson11_deserializeOpErrorSetUserMFAPreference(response *smithyhttp.Re errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("AliasExistsException", errorCode): + return awsAwsjson11_deserializeErrorAliasExistsException(response, errorBody) + + case strings.EqualFold("CodeMismatchException", errorCode): + return awsAwsjson11_deserializeErrorCodeMismatchException(response, errorBody) + + case strings.EqualFold("ExpiredCodeException", errorCode): + return awsAwsjson11_deserializeErrorExpiredCodeException(response, errorBody) + case strings.EqualFold("ForbiddenException", errorCode): return awsAwsjson11_deserializeErrorForbiddenException(response, errorBody) case strings.EqualFold("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) + case strings.EqualFold("InvalidEmailRoleAccessPolicyException", errorCode): + return awsAwsjson11_deserializeErrorInvalidEmailRoleAccessPolicyException(response, errorBody) + + case strings.EqualFold("InvalidLambdaResponseException", errorCode): + return awsAwsjson11_deserializeErrorInvalidLambdaResponseException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("InvalidPasswordException", errorCode): + return awsAwsjson11_deserializeErrorInvalidPasswordException(response, errorBody) + + case strings.EqualFold("InvalidSmsRoleAccessPolicyException", errorCode): + return awsAwsjson11_deserializeErrorInvalidSmsRoleAccessPolicyException(response, errorBody) + + case strings.EqualFold("InvalidSmsRoleTrustRelationshipException", errorCode): + return awsAwsjson11_deserializeErrorInvalidSmsRoleTrustRelationshipException(response, errorBody) + + case strings.EqualFold("InvalidUserPoolConfigurationException", errorCode): + return awsAwsjson11_deserializeErrorInvalidUserPoolConfigurationException(response, errorBody) + + case strings.EqualFold("MFAMethodNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorMFAMethodNotFoundException(response, errorBody) + case strings.EqualFold("NotAuthorizedException", errorCode): return awsAwsjson11_deserializeErrorNotAuthorizedException(response, errorBody) + case strings.EqualFold("PasswordHistoryPolicyViolationException", errorCode): + return awsAwsjson11_deserializeErrorPasswordHistoryPolicyViolationException(response, errorBody) + case strings.EqualFold("PasswordResetRequiredException", errorCode): return awsAwsjson11_deserializeErrorPasswordResetRequiredException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("SoftwareTokenMFANotFoundException", errorCode): + return awsAwsjson11_deserializeErrorSoftwareTokenMFANotFoundException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) + + case strings.EqualFold("UnexpectedLambdaException", errorCode): + return awsAwsjson11_deserializeErrorUnexpectedLambdaException(response, errorBody) + + case strings.EqualFold("UserLambdaValidationException", errorCode): + return awsAwsjson11_deserializeErrorUserLambdaValidationException(response, errorBody) + case strings.EqualFold("UserNotConfirmedException", errorCode): return awsAwsjson11_deserializeErrorUserNotConfirmedException(response, errorBody) @@ -10975,14 +11352,14 @@ func awsAwsjson11_deserializeOpErrorSetUserMFAPreference(response *smithyhttp.Re } } -type awsAwsjson11_deserializeOpSetUserPoolMfaConfig struct { +type awsAwsjson11_deserializeOpRevokeToken struct { } -func (*awsAwsjson11_deserializeOpSetUserPoolMfaConfig) ID() string { +func (*awsAwsjson11_deserializeOpRevokeToken) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpSetUserPoolMfaConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpRevokeToken) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -11000,9 +11377,9 @@ func (m *awsAwsjson11_deserializeOpSetUserPoolMfaConfig) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorSetUserPoolMfaConfig(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorRevokeToken(response, &metadata) } - output := &SetUserPoolMfaConfigOutput{} + output := &RevokeTokenOutput{} out.Result = output var buff [1024]byte @@ -11022,7 +11399,7 @@ func (m *awsAwsjson11_deserializeOpSetUserPoolMfaConfig) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentSetUserPoolMfaConfigOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentRevokeTokenOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11036,7 +11413,7 @@ func (m *awsAwsjson11_deserializeOpSetUserPoolMfaConfig) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorSetUserPoolMfaConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorRevokeToken(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -11073,8 +11450,8 @@ func awsAwsjson11_deserializeOpErrorSetUserPoolMfaConfig(response *smithyhttp.Re errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("ConcurrentModificationException", errorCode): - return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) + case strings.EqualFold("ForbiddenException", errorCode): + return awsAwsjson11_deserializeErrorForbiddenException(response, errorBody) case strings.EqualFold("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) @@ -11082,20 +11459,17 @@ func awsAwsjson11_deserializeOpErrorSetUserPoolMfaConfig(response *smithyhttp.Re case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidSmsRoleAccessPolicyException", errorCode): - return awsAwsjson11_deserializeErrorInvalidSmsRoleAccessPolicyException(response, errorBody) - - case strings.EqualFold("InvalidSmsRoleTrustRelationshipException", errorCode): - return awsAwsjson11_deserializeErrorInvalidSmsRoleTrustRelationshipException(response, errorBody) + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) - case strings.EqualFold("NotAuthorizedException", errorCode): - return awsAwsjson11_deserializeErrorNotAuthorizedException(response, errorBody) + case strings.EqualFold("UnauthorizedException", errorCode): + return awsAwsjson11_deserializeErrorUnauthorizedException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("UnsupportedOperationException", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) - case strings.EqualFold("TooManyRequestsException", errorCode): - return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) + case strings.EqualFold("UnsupportedTokenTypeException", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedTokenTypeException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -11107,14 +11481,14 @@ func awsAwsjson11_deserializeOpErrorSetUserPoolMfaConfig(response *smithyhttp.Re } } -type awsAwsjson11_deserializeOpSetUserSettings struct { +type awsAwsjson11_deserializeOpSetLogDeliveryConfiguration struct { } -func (*awsAwsjson11_deserializeOpSetUserSettings) ID() string { +func (*awsAwsjson11_deserializeOpSetLogDeliveryConfiguration) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpSetUserSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpSetLogDeliveryConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -11132,9 +11506,9 @@ func (m *awsAwsjson11_deserializeOpSetUserSettings) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorSetUserSettings(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorSetLogDeliveryConfiguration(response, &metadata) } - output := &SetUserSettingsOutput{} + output := &SetLogDeliveryConfigurationOutput{} out.Result = output var buff [1024]byte @@ -11154,7 +11528,7 @@ func (m *awsAwsjson11_deserializeOpSetUserSettings) HandleDeserialize(ctx contex return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentSetUserSettingsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentSetLogDeliveryConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11168,7 +11542,7 @@ func (m *awsAwsjson11_deserializeOpSetUserSettings) HandleDeserialize(ctx contex return out, metadata, err } -func awsAwsjson11_deserializeOpErrorSetUserSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorSetLogDeliveryConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -11205,8 +11579,8 @@ func awsAwsjson11_deserializeOpErrorSetUserSettings(response *smithyhttp.Respons errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("ForbiddenException", errorCode): - return awsAwsjson11_deserializeErrorForbiddenException(response, errorBody) + case strings.EqualFold("FeatureUnavailableInTierException", errorCode): + return awsAwsjson11_deserializeErrorFeatureUnavailableInTierException(response, errorBody) case strings.EqualFold("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) @@ -11217,17 +11591,11 @@ func awsAwsjson11_deserializeOpErrorSetUserSettings(response *smithyhttp.Respons case strings.EqualFold("NotAuthorizedException", errorCode): return awsAwsjson11_deserializeErrorNotAuthorizedException(response, errorBody) - case strings.EqualFold("PasswordResetRequiredException", errorCode): - return awsAwsjson11_deserializeErrorPasswordResetRequiredException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("UserNotConfirmedException", errorCode): - return awsAwsjson11_deserializeErrorUserNotConfirmedException(response, errorBody) - - case strings.EqualFold("UserNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorUserNotFoundException(response, errorBody) + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -11239,14 +11607,14 @@ func awsAwsjson11_deserializeOpErrorSetUserSettings(response *smithyhttp.Respons } } -type awsAwsjson11_deserializeOpSignUp struct { +type awsAwsjson11_deserializeOpSetRiskConfiguration struct { } -func (*awsAwsjson11_deserializeOpSignUp) ID() string { +func (*awsAwsjson11_deserializeOpSetRiskConfiguration) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpSignUp) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpSetRiskConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -11264,9 +11632,9 @@ func (m *awsAwsjson11_deserializeOpSignUp) HandleDeserialize(ctx context.Context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorSignUp(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorSetRiskConfiguration(response, &metadata) } - output := &SignUpOutput{} + output := &SetRiskConfigurationOutput{} out.Result = output var buff [1024]byte @@ -11286,7 +11654,7 @@ func (m *awsAwsjson11_deserializeOpSignUp) HandleDeserialize(ctx context.Context return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentSignUpOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentSetRiskConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11300,7 +11668,7 @@ func (m *awsAwsjson11_deserializeOpSignUp) HandleDeserialize(ctx context.Context return out, metadata, err } -func awsAwsjson11_deserializeOpErrorSignUp(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorSetRiskConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -11340,33 +11708,15 @@ func awsAwsjson11_deserializeOpErrorSignUp(response *smithyhttp.Response, metada case strings.EqualFold("CodeDeliveryFailureException", errorCode): return awsAwsjson11_deserializeErrorCodeDeliveryFailureException(response, errorBody) - case strings.EqualFold("ForbiddenException", errorCode): - return awsAwsjson11_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) case strings.EqualFold("InvalidEmailRoleAccessPolicyException", errorCode): return awsAwsjson11_deserializeErrorInvalidEmailRoleAccessPolicyException(response, errorBody) - case strings.EqualFold("InvalidLambdaResponseException", errorCode): - return awsAwsjson11_deserializeErrorInvalidLambdaResponseException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidPasswordException", errorCode): - return awsAwsjson11_deserializeErrorInvalidPasswordException(response, errorBody) - - case strings.EqualFold("InvalidSmsRoleAccessPolicyException", errorCode): - return awsAwsjson11_deserializeErrorInvalidSmsRoleAccessPolicyException(response, errorBody) - - case strings.EqualFold("InvalidSmsRoleTrustRelationshipException", errorCode): - return awsAwsjson11_deserializeErrorInvalidSmsRoleTrustRelationshipException(response, errorBody) - - case strings.EqualFold("LimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) - case strings.EqualFold("NotAuthorizedException", errorCode): return awsAwsjson11_deserializeErrorNotAuthorizedException(response, errorBody) @@ -11376,14 +11726,8 @@ func awsAwsjson11_deserializeOpErrorSignUp(response *smithyhttp.Response, metada case strings.EqualFold("TooManyRequestsException", errorCode): return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) - case strings.EqualFold("UnexpectedLambdaException", errorCode): - return awsAwsjson11_deserializeErrorUnexpectedLambdaException(response, errorBody) - - case strings.EqualFold("UserLambdaValidationException", errorCode): - return awsAwsjson11_deserializeErrorUserLambdaValidationException(response, errorBody) - - case strings.EqualFold("UsernameExistsException", errorCode): - return awsAwsjson11_deserializeErrorUsernameExistsException(response, errorBody) + case strings.EqualFold("UserPoolAddOnNotEnabledException", errorCode): + return awsAwsjson11_deserializeErrorUserPoolAddOnNotEnabledException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -11395,14 +11739,14 @@ func awsAwsjson11_deserializeOpErrorSignUp(response *smithyhttp.Response, metada } } -type awsAwsjson11_deserializeOpStartUserImportJob struct { +type awsAwsjson11_deserializeOpSetUICustomization struct { } -func (*awsAwsjson11_deserializeOpStartUserImportJob) ID() string { +func (*awsAwsjson11_deserializeOpSetUICustomization) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStartUserImportJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpSetUICustomization) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -11420,9 +11764,9 @@ func (m *awsAwsjson11_deserializeOpStartUserImportJob) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStartUserImportJob(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorSetUICustomization(response, &metadata) } - output := &StartUserImportJobOutput{} + output := &SetUICustomizationOutput{} out.Result = output var buff [1024]byte @@ -11442,7 +11786,7 @@ func (m *awsAwsjson11_deserializeOpStartUserImportJob) HandleDeserialize(ctx con return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentStartUserImportJobOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentSetUICustomizationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11456,7 +11800,7 @@ func (m *awsAwsjson11_deserializeOpStartUserImportJob) HandleDeserialize(ctx con return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStartUserImportJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorSetUICustomization(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -11502,9 +11846,6 @@ func awsAwsjson11_deserializeOpErrorStartUserImportJob(response *smithyhttp.Resp case strings.EqualFold("NotAuthorizedException", errorCode): return awsAwsjson11_deserializeErrorNotAuthorizedException(response, errorBody) - case strings.EqualFold("PreconditionNotMetException", errorCode): - return awsAwsjson11_deserializeErrorPreconditionNotMetException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) @@ -11521,14 +11862,14 @@ func awsAwsjson11_deserializeOpErrorStartUserImportJob(response *smithyhttp.Resp } } -type awsAwsjson11_deserializeOpStopUserImportJob struct { +type awsAwsjson11_deserializeOpSetUserMFAPreference struct { } -func (*awsAwsjson11_deserializeOpStopUserImportJob) ID() string { +func (*awsAwsjson11_deserializeOpSetUserMFAPreference) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStopUserImportJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpSetUserMFAPreference) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -11546,9 +11887,9 @@ func (m *awsAwsjson11_deserializeOpStopUserImportJob) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStopUserImportJob(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorSetUserMFAPreference(response, &metadata) } - output := &StopUserImportJobOutput{} + output := &SetUserMFAPreferenceOutput{} out.Result = output var buff [1024]byte @@ -11568,7 +11909,7 @@ func (m *awsAwsjson11_deserializeOpStopUserImportJob) HandleDeserialize(ctx cont return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentStopUserImportJobOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentSetUserMFAPreferenceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11582,7 +11923,7 @@ func (m *awsAwsjson11_deserializeOpStopUserImportJob) HandleDeserialize(ctx cont return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStopUserImportJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorSetUserMFAPreference(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -11619,6 +11960,9 @@ func awsAwsjson11_deserializeOpErrorStopUserImportJob(response *smithyhttp.Respo errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("ForbiddenException", errorCode): + return awsAwsjson11_deserializeErrorForbiddenException(response, errorBody) + case strings.EqualFold("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) @@ -11628,14 +11972,17 @@ func awsAwsjson11_deserializeOpErrorStopUserImportJob(response *smithyhttp.Respo case strings.EqualFold("NotAuthorizedException", errorCode): return awsAwsjson11_deserializeErrorNotAuthorizedException(response, errorBody) - case strings.EqualFold("PreconditionNotMetException", errorCode): - return awsAwsjson11_deserializeErrorPreconditionNotMetException(response, errorBody) + case strings.EqualFold("PasswordResetRequiredException", errorCode): + return awsAwsjson11_deserializeErrorPasswordResetRequiredException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("TooManyRequestsException", errorCode): - return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) + case strings.EqualFold("UserNotConfirmedException", errorCode): + return awsAwsjson11_deserializeErrorUserNotConfirmedException(response, errorBody) + + case strings.EqualFold("UserNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorUserNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -11647,14 +11994,14 @@ func awsAwsjson11_deserializeOpErrorStopUserImportJob(response *smithyhttp.Respo } } -type awsAwsjson11_deserializeOpTagResource struct { +type awsAwsjson11_deserializeOpSetUserPoolMfaConfig struct { } -func (*awsAwsjson11_deserializeOpTagResource) ID() string { +func (*awsAwsjson11_deserializeOpSetUserPoolMfaConfig) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpSetUserPoolMfaConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -11672,9 +12019,9 @@ func (m *awsAwsjson11_deserializeOpTagResource) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorTagResource(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorSetUserPoolMfaConfig(response, &metadata) } - output := &TagResourceOutput{} + output := &SetUserPoolMfaConfigOutput{} out.Result = output var buff [1024]byte @@ -11694,7 +12041,7 @@ func (m *awsAwsjson11_deserializeOpTagResource) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentTagResourceOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentSetUserPoolMfaConfigOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11708,7 +12055,7 @@ func (m *awsAwsjson11_deserializeOpTagResource) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorSetUserPoolMfaConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -11745,12 +12092,24 @@ func awsAwsjson11_deserializeOpErrorTagResource(response *smithyhttp.Response, m errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("ConcurrentModificationException", errorCode): + return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("FeatureUnavailableInTierException", errorCode): + return awsAwsjson11_deserializeErrorFeatureUnavailableInTierException(response, errorBody) + case strings.EqualFold("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("InvalidSmsRoleAccessPolicyException", errorCode): + return awsAwsjson11_deserializeErrorInvalidSmsRoleAccessPolicyException(response, errorBody) + + case strings.EqualFold("InvalidSmsRoleTrustRelationshipException", errorCode): + return awsAwsjson11_deserializeErrorInvalidSmsRoleTrustRelationshipException(response, errorBody) + case strings.EqualFold("NotAuthorizedException", errorCode): return awsAwsjson11_deserializeErrorNotAuthorizedException(response, errorBody) @@ -11770,14 +12129,14 @@ func awsAwsjson11_deserializeOpErrorTagResource(response *smithyhttp.Response, m } } -type awsAwsjson11_deserializeOpUntagResource struct { +type awsAwsjson11_deserializeOpSetUserSettings struct { } -func (*awsAwsjson11_deserializeOpUntagResource) ID() string { +func (*awsAwsjson11_deserializeOpSetUserSettings) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpSetUserSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -11795,9 +12154,9 @@ func (m *awsAwsjson11_deserializeOpUntagResource) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUntagResource(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorSetUserSettings(response, &metadata) } - output := &UntagResourceOutput{} + output := &SetUserSettingsOutput{} out.Result = output var buff [1024]byte @@ -11817,7 +12176,7 @@ func (m *awsAwsjson11_deserializeOpUntagResource) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUntagResourceOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentSetUserSettingsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11831,7 +12190,7 @@ func (m *awsAwsjson11_deserializeOpUntagResource) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorSetUserSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -11868,6 +12227,9 @@ func awsAwsjson11_deserializeOpErrorUntagResource(response *smithyhttp.Response, errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("ForbiddenException", errorCode): + return awsAwsjson11_deserializeErrorForbiddenException(response, errorBody) + case strings.EqualFold("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) @@ -11877,11 +12239,17 @@ func awsAwsjson11_deserializeOpErrorUntagResource(response *smithyhttp.Response, case strings.EqualFold("NotAuthorizedException", errorCode): return awsAwsjson11_deserializeErrorNotAuthorizedException(response, errorBody) + case strings.EqualFold("PasswordResetRequiredException", errorCode): + return awsAwsjson11_deserializeErrorPasswordResetRequiredException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("TooManyRequestsException", errorCode): - return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) + case strings.EqualFold("UserNotConfirmedException", errorCode): + return awsAwsjson11_deserializeErrorUserNotConfirmedException(response, errorBody) + + case strings.EqualFold("UserNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorUserNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -11893,14 +12261,14 @@ func awsAwsjson11_deserializeOpErrorUntagResource(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpUpdateAuthEventFeedback struct { +type awsAwsjson11_deserializeOpSignUp struct { } -func (*awsAwsjson11_deserializeOpUpdateAuthEventFeedback) ID() string { +func (*awsAwsjson11_deserializeOpSignUp) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateAuthEventFeedback) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpSignUp) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -11918,9 +12286,9 @@ func (m *awsAwsjson11_deserializeOpUpdateAuthEventFeedback) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateAuthEventFeedback(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorSignUp(response, &metadata) } - output := &UpdateAuthEventFeedbackOutput{} + output := &SignUpOutput{} out.Result = output var buff [1024]byte @@ -11940,7 +12308,7 @@ func (m *awsAwsjson11_deserializeOpUpdateAuthEventFeedback) HandleDeserialize(ct return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateAuthEventFeedbackOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentSignUpOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11954,7 +12322,7 @@ func (m *awsAwsjson11_deserializeOpUpdateAuthEventFeedback) HandleDeserialize(ct return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateAuthEventFeedback(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorSignUp(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -11991,12 +12359,36 @@ func awsAwsjson11_deserializeOpErrorUpdateAuthEventFeedback(response *smithyhttp errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("CodeDeliveryFailureException", errorCode): + return awsAwsjson11_deserializeErrorCodeDeliveryFailureException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsAwsjson11_deserializeErrorForbiddenException(response, errorBody) + case strings.EqualFold("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) + case strings.EqualFold("InvalidEmailRoleAccessPolicyException", errorCode): + return awsAwsjson11_deserializeErrorInvalidEmailRoleAccessPolicyException(response, errorBody) + + case strings.EqualFold("InvalidLambdaResponseException", errorCode): + return awsAwsjson11_deserializeErrorInvalidLambdaResponseException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("InvalidPasswordException", errorCode): + return awsAwsjson11_deserializeErrorInvalidPasswordException(response, errorBody) + + case strings.EqualFold("InvalidSmsRoleAccessPolicyException", errorCode): + return awsAwsjson11_deserializeErrorInvalidSmsRoleAccessPolicyException(response, errorBody) + + case strings.EqualFold("InvalidSmsRoleTrustRelationshipException", errorCode): + return awsAwsjson11_deserializeErrorInvalidSmsRoleTrustRelationshipException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("NotAuthorizedException", errorCode): return awsAwsjson11_deserializeErrorNotAuthorizedException(response, errorBody) @@ -12006,11 +12398,14 @@ func awsAwsjson11_deserializeOpErrorUpdateAuthEventFeedback(response *smithyhttp case strings.EqualFold("TooManyRequestsException", errorCode): return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) - case strings.EqualFold("UserNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorUserNotFoundException(response, errorBody) + case strings.EqualFold("UnexpectedLambdaException", errorCode): + return awsAwsjson11_deserializeErrorUnexpectedLambdaException(response, errorBody) - case strings.EqualFold("UserPoolAddOnNotEnabledException", errorCode): - return awsAwsjson11_deserializeErrorUserPoolAddOnNotEnabledException(response, errorBody) + case strings.EqualFold("UserLambdaValidationException", errorCode): + return awsAwsjson11_deserializeErrorUserLambdaValidationException(response, errorBody) + + case strings.EqualFold("UsernameExistsException", errorCode): + return awsAwsjson11_deserializeErrorUsernameExistsException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -12022,14 +12417,14 @@ func awsAwsjson11_deserializeOpErrorUpdateAuthEventFeedback(response *smithyhttp } } -type awsAwsjson11_deserializeOpUpdateDeviceStatus struct { +type awsAwsjson11_deserializeOpStartUserImportJob struct { } -func (*awsAwsjson11_deserializeOpUpdateDeviceStatus) ID() string { +func (*awsAwsjson11_deserializeOpStartUserImportJob) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateDeviceStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpStartUserImportJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -12047,9 +12442,9 @@ func (m *awsAwsjson11_deserializeOpUpdateDeviceStatus) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateDeviceStatus(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorStartUserImportJob(response, &metadata) } - output := &UpdateDeviceStatusOutput{} + output := &StartUserImportJobOutput{} out.Result = output var buff [1024]byte @@ -12069,7 +12464,7 @@ func (m *awsAwsjson11_deserializeOpUpdateDeviceStatus) HandleDeserialize(ctx con return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateDeviceStatusOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentStartUserImportJobOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -12083,7 +12478,7 @@ func (m *awsAwsjson11_deserializeOpUpdateDeviceStatus) HandleDeserialize(ctx con return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateDeviceStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorStartUserImportJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -12120,23 +12515,17 @@ func awsAwsjson11_deserializeOpErrorUpdateDeviceStatus(response *smithyhttp.Resp errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("ForbiddenException", errorCode): - return awsAwsjson11_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidUserPoolConfigurationException", errorCode): - return awsAwsjson11_deserializeErrorInvalidUserPoolConfigurationException(response, errorBody) - case strings.EqualFold("NotAuthorizedException", errorCode): return awsAwsjson11_deserializeErrorNotAuthorizedException(response, errorBody) - case strings.EqualFold("PasswordResetRequiredException", errorCode): - return awsAwsjson11_deserializeErrorPasswordResetRequiredException(response, errorBody) + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsAwsjson11_deserializeErrorPreconditionNotMetException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) @@ -12144,12 +12533,6 @@ func awsAwsjson11_deserializeOpErrorUpdateDeviceStatus(response *smithyhttp.Resp case strings.EqualFold("TooManyRequestsException", errorCode): return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) - case strings.EqualFold("UserNotConfirmedException", errorCode): - return awsAwsjson11_deserializeErrorUserNotConfirmedException(response, errorBody) - - case strings.EqualFold("UserNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorUserNotFoundException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -12160,14 +12543,14 @@ func awsAwsjson11_deserializeOpErrorUpdateDeviceStatus(response *smithyhttp.Resp } } -type awsAwsjson11_deserializeOpUpdateGroup struct { +type awsAwsjson11_deserializeOpStartWebAuthnRegistration struct { } -func (*awsAwsjson11_deserializeOpUpdateGroup) ID() string { +func (*awsAwsjson11_deserializeOpStartWebAuthnRegistration) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpStartWebAuthnRegistration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -12185,9 +12568,9 @@ func (m *awsAwsjson11_deserializeOpUpdateGroup) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateGroup(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorStartWebAuthnRegistration(response, &metadata) } - output := &UpdateGroupOutput{} + output := &StartWebAuthnRegistrationOutput{} out.Result = output var buff [1024]byte @@ -12207,7 +12590,7 @@ func (m *awsAwsjson11_deserializeOpUpdateGroup) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateGroupOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentStartWebAuthnRegistrationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -12221,7 +12604,7 @@ func (m *awsAwsjson11_deserializeOpUpdateGroup) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorStartWebAuthnRegistration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -12258,21 +12641,30 @@ func awsAwsjson11_deserializeOpErrorUpdateGroup(response *smithyhttp.Response, m errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("ForbiddenException", errorCode): + return awsAwsjson11_deserializeErrorForbiddenException(response, errorBody) + case strings.EqualFold("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("NotAuthorizedException", errorCode): return awsAwsjson11_deserializeErrorNotAuthorizedException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("TooManyRequestsException", errorCode): return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) + case strings.EqualFold("WebAuthnConfigurationMissingException", errorCode): + return awsAwsjson11_deserializeErrorWebAuthnConfigurationMissingException(response, errorBody) + + case strings.EqualFold("WebAuthnNotEnabledException", errorCode): + return awsAwsjson11_deserializeErrorWebAuthnNotEnabledException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -12283,14 +12675,14 @@ func awsAwsjson11_deserializeOpErrorUpdateGroup(response *smithyhttp.Response, m } } -type awsAwsjson11_deserializeOpUpdateIdentityProvider struct { +type awsAwsjson11_deserializeOpStopUserImportJob struct { } -func (*awsAwsjson11_deserializeOpUpdateIdentityProvider) ID() string { +func (*awsAwsjson11_deserializeOpStopUserImportJob) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateIdentityProvider) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpStopUserImportJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -12308,9 +12700,9 @@ func (m *awsAwsjson11_deserializeOpUpdateIdentityProvider) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateIdentityProvider(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorStopUserImportJob(response, &metadata) } - output := &UpdateIdentityProviderOutput{} + output := &StopUserImportJobOutput{} out.Result = output var buff [1024]byte @@ -12330,7 +12722,7 @@ func (m *awsAwsjson11_deserializeOpUpdateIdentityProvider) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateIdentityProviderOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentStopUserImportJobOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -12344,7 +12736,7 @@ func (m *awsAwsjson11_deserializeOpUpdateIdentityProvider) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateIdentityProvider(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorStopUserImportJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -12381,9 +12773,6 @@ func awsAwsjson11_deserializeOpErrorUpdateIdentityProvider(response *smithyhttp. errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("ConcurrentModificationException", errorCode): - return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) - case strings.EqualFold("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) @@ -12393,15 +12782,15 @@ func awsAwsjson11_deserializeOpErrorUpdateIdentityProvider(response *smithyhttp. case strings.EqualFold("NotAuthorizedException", errorCode): return awsAwsjson11_deserializeErrorNotAuthorizedException(response, errorBody) + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsAwsjson11_deserializeErrorPreconditionNotMetException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("TooManyRequestsException", errorCode): return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) - case strings.EqualFold("UnsupportedIdentityProviderException", errorCode): - return awsAwsjson11_deserializeErrorUnsupportedIdentityProviderException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -12412,14 +12801,14 @@ func awsAwsjson11_deserializeOpErrorUpdateIdentityProvider(response *smithyhttp. } } -type awsAwsjson11_deserializeOpUpdateResourceServer struct { +type awsAwsjson11_deserializeOpTagResource struct { } -func (*awsAwsjson11_deserializeOpUpdateResourceServer) ID() string { +func (*awsAwsjson11_deserializeOpTagResource) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateResourceServer) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_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) @@ -12437,9 +12826,9 @@ func (m *awsAwsjson11_deserializeOpUpdateResourceServer) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateResourceServer(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorTagResource(response, &metadata) } - output := &UpdateResourceServerOutput{} + output := &TagResourceOutput{} out.Result = output var buff [1024]byte @@ -12459,7 +12848,7 @@ func (m *awsAwsjson11_deserializeOpUpdateResourceServer) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateResourceServerOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentTagResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -12473,7 +12862,7 @@ func (m *awsAwsjson11_deserializeOpUpdateResourceServer) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateResourceServer(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_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)} @@ -12535,14 +12924,14 @@ func awsAwsjson11_deserializeOpErrorUpdateResourceServer(response *smithyhttp.Re } } -type awsAwsjson11_deserializeOpUpdateUserAttributes struct { +type awsAwsjson11_deserializeOpUntagResource struct { } -func (*awsAwsjson11_deserializeOpUpdateUserAttributes) ID() string { +func (*awsAwsjson11_deserializeOpUntagResource) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateUserAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_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) @@ -12560,9 +12949,9 @@ func (m *awsAwsjson11_deserializeOpUpdateUserAttributes) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateUserAttributes(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorUntagResource(response, &metadata) } - output := &UpdateUserAttributesOutput{} + output := &UntagResourceOutput{} out.Result = output var buff [1024]byte @@ -12582,7 +12971,7 @@ func (m *awsAwsjson11_deserializeOpUpdateUserAttributes) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateUserAttributesOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentUntagResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -12596,7 +12985,7 @@ func (m *awsAwsjson11_deserializeOpUpdateUserAttributes) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateUserAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_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)} @@ -12633,63 +13022,21 @@ func awsAwsjson11_deserializeOpErrorUpdateUserAttributes(response *smithyhttp.Re errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("AliasExistsException", errorCode): - return awsAwsjson11_deserializeErrorAliasExistsException(response, errorBody) - - case strings.EqualFold("CodeDeliveryFailureException", errorCode): - return awsAwsjson11_deserializeErrorCodeDeliveryFailureException(response, errorBody) - - case strings.EqualFold("CodeMismatchException", errorCode): - return awsAwsjson11_deserializeErrorCodeMismatchException(response, errorBody) - - case strings.EqualFold("ExpiredCodeException", errorCode): - return awsAwsjson11_deserializeErrorExpiredCodeException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsAwsjson11_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) - case strings.EqualFold("InvalidEmailRoleAccessPolicyException", errorCode): - return awsAwsjson11_deserializeErrorInvalidEmailRoleAccessPolicyException(response, errorBody) - - case strings.EqualFold("InvalidLambdaResponseException", errorCode): - return awsAwsjson11_deserializeErrorInvalidLambdaResponseException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidSmsRoleAccessPolicyException", errorCode): - return awsAwsjson11_deserializeErrorInvalidSmsRoleAccessPolicyException(response, errorBody) - - case strings.EqualFold("InvalidSmsRoleTrustRelationshipException", errorCode): - return awsAwsjson11_deserializeErrorInvalidSmsRoleTrustRelationshipException(response, errorBody) - case strings.EqualFold("NotAuthorizedException", errorCode): return awsAwsjson11_deserializeErrorNotAuthorizedException(response, errorBody) - case strings.EqualFold("PasswordResetRequiredException", errorCode): - return awsAwsjson11_deserializeErrorPasswordResetRequiredException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("TooManyRequestsException", errorCode): return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) - case strings.EqualFold("UnexpectedLambdaException", errorCode): - return awsAwsjson11_deserializeErrorUnexpectedLambdaException(response, errorBody) - - case strings.EqualFold("UserLambdaValidationException", errorCode): - return awsAwsjson11_deserializeErrorUserLambdaValidationException(response, errorBody) - - case strings.EqualFold("UserNotConfirmedException", errorCode): - return awsAwsjson11_deserializeErrorUserNotConfirmedException(response, errorBody) - - case strings.EqualFold("UserNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorUserNotFoundException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -12700,14 +13047,14 @@ func awsAwsjson11_deserializeOpErrorUpdateUserAttributes(response *smithyhttp.Re } } -type awsAwsjson11_deserializeOpUpdateUserPool struct { +type awsAwsjson11_deserializeOpUpdateAuthEventFeedback struct { } -func (*awsAwsjson11_deserializeOpUpdateUserPool) ID() string { +func (*awsAwsjson11_deserializeOpUpdateAuthEventFeedback) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateUserPool) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpUpdateAuthEventFeedback) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -12725,9 +13072,9 @@ func (m *awsAwsjson11_deserializeOpUpdateUserPool) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateUserPool(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateAuthEventFeedback(response, &metadata) } - output := &UpdateUserPoolOutput{} + output := &UpdateAuthEventFeedbackOutput{} out.Result = output var buff [1024]byte @@ -12747,7 +13094,7 @@ func (m *awsAwsjson11_deserializeOpUpdateUserPool) HandleDeserialize(ctx context return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateUserPoolOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentUpdateAuthEventFeedbackOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -12761,7 +13108,7 @@ func (m *awsAwsjson11_deserializeOpUpdateUserPool) HandleDeserialize(ctx context return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateUserPool(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorUpdateAuthEventFeedback(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -12798,24 +13145,12 @@ func awsAwsjson11_deserializeOpErrorUpdateUserPool(response *smithyhttp.Response errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("ConcurrentModificationException", errorCode): - return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) - case strings.EqualFold("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) - case strings.EqualFold("InvalidEmailRoleAccessPolicyException", errorCode): - return awsAwsjson11_deserializeErrorInvalidEmailRoleAccessPolicyException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidSmsRoleAccessPolicyException", errorCode): - return awsAwsjson11_deserializeErrorInvalidSmsRoleAccessPolicyException(response, errorBody) - - case strings.EqualFold("InvalidSmsRoleTrustRelationshipException", errorCode): - return awsAwsjson11_deserializeErrorInvalidSmsRoleTrustRelationshipException(response, errorBody) - case strings.EqualFold("NotAuthorizedException", errorCode): return awsAwsjson11_deserializeErrorNotAuthorizedException(response, errorBody) @@ -12825,11 +13160,11 @@ func awsAwsjson11_deserializeOpErrorUpdateUserPool(response *smithyhttp.Response case strings.EqualFold("TooManyRequestsException", errorCode): return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) - case strings.EqualFold("UserImportInProgressException", errorCode): - return awsAwsjson11_deserializeErrorUserImportInProgressException(response, errorBody) + case strings.EqualFold("UserNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorUserNotFoundException(response, errorBody) - case strings.EqualFold("UserPoolTaggingException", errorCode): - return awsAwsjson11_deserializeErrorUserPoolTaggingException(response, errorBody) + case strings.EqualFold("UserPoolAddOnNotEnabledException", errorCode): + return awsAwsjson11_deserializeErrorUserPoolAddOnNotEnabledException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -12841,14 +13176,14 @@ func awsAwsjson11_deserializeOpErrorUpdateUserPool(response *smithyhttp.Response } } -type awsAwsjson11_deserializeOpUpdateUserPoolClient struct { +type awsAwsjson11_deserializeOpUpdateDeviceStatus struct { } -func (*awsAwsjson11_deserializeOpUpdateUserPoolClient) ID() string { +func (*awsAwsjson11_deserializeOpUpdateDeviceStatus) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateUserPoolClient) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpUpdateDeviceStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -12866,9 +13201,9 @@ func (m *awsAwsjson11_deserializeOpUpdateUserPoolClient) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateUserPoolClient(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateDeviceStatus(response, &metadata) } - output := &UpdateUserPoolClientOutput{} + output := &UpdateDeviceStatusOutput{} out.Result = output var buff [1024]byte @@ -12888,7 +13223,7 @@ func (m *awsAwsjson11_deserializeOpUpdateUserPoolClient) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateUserPoolClientOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentUpdateDeviceStatusOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -12902,7 +13237,7 @@ func (m *awsAwsjson11_deserializeOpUpdateUserPoolClient) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateUserPoolClient(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorUpdateDeviceStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -12939,30 +13274,36 @@ func awsAwsjson11_deserializeOpErrorUpdateUserPoolClient(response *smithyhttp.Re errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("ConcurrentModificationException", errorCode): - return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) + case strings.EqualFold("ForbiddenException", errorCode): + return awsAwsjson11_deserializeErrorForbiddenException(response, errorBody) case strings.EqualFold("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) - case strings.EqualFold("InvalidOAuthFlowException", errorCode): - return awsAwsjson11_deserializeErrorInvalidOAuthFlowException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("InvalidUserPoolConfigurationException", errorCode): + return awsAwsjson11_deserializeErrorInvalidUserPoolConfigurationException(response, errorBody) + case strings.EqualFold("NotAuthorizedException", errorCode): return awsAwsjson11_deserializeErrorNotAuthorizedException(response, errorBody) + case strings.EqualFold("PasswordResetRequiredException", errorCode): + return awsAwsjson11_deserializeErrorPasswordResetRequiredException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ScopeDoesNotExistException", errorCode): - return awsAwsjson11_deserializeErrorScopeDoesNotExistException(response, errorBody) - case strings.EqualFold("TooManyRequestsException", errorCode): return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) + case strings.EqualFold("UserNotConfirmedException", errorCode): + return awsAwsjson11_deserializeErrorUserNotConfirmedException(response, errorBody) + + case strings.EqualFold("UserNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorUserNotFoundException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -12973,14 +13314,14 @@ func awsAwsjson11_deserializeOpErrorUpdateUserPoolClient(response *smithyhttp.Re } } -type awsAwsjson11_deserializeOpUpdateUserPoolDomain struct { +type awsAwsjson11_deserializeOpUpdateGroup struct { } -func (*awsAwsjson11_deserializeOpUpdateUserPoolDomain) ID() string { +func (*awsAwsjson11_deserializeOpUpdateGroup) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateUserPoolDomain) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpUpdateGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -12998,9 +13339,9 @@ func (m *awsAwsjson11_deserializeOpUpdateUserPoolDomain) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateUserPoolDomain(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateGroup(response, &metadata) } - output := &UpdateUserPoolDomainOutput{} + output := &UpdateGroupOutput{} out.Result = output var buff [1024]byte @@ -13020,7 +13361,7 @@ func (m *awsAwsjson11_deserializeOpUpdateUserPoolDomain) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateUserPoolDomainOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentUpdateGroupOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -13034,7 +13375,7 @@ func (m *awsAwsjson11_deserializeOpUpdateUserPoolDomain) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateUserPoolDomain(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorUpdateGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -13096,14 +13437,14 @@ func awsAwsjson11_deserializeOpErrorUpdateUserPoolDomain(response *smithyhttp.Re } } -type awsAwsjson11_deserializeOpVerifySoftwareToken struct { +type awsAwsjson11_deserializeOpUpdateIdentityProvider struct { } -func (*awsAwsjson11_deserializeOpVerifySoftwareToken) ID() string { +func (*awsAwsjson11_deserializeOpUpdateIdentityProvider) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpVerifySoftwareToken) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_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) @@ -13121,9 +13462,9 @@ func (m *awsAwsjson11_deserializeOpVerifySoftwareToken) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorVerifySoftwareToken(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateIdentityProvider(response, &metadata) } - output := &VerifySoftwareTokenOutput{} + output := &UpdateIdentityProviderOutput{} out.Result = output var buff [1024]byte @@ -13143,7 +13484,7 @@ func (m *awsAwsjson11_deserializeOpVerifySoftwareToken) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentVerifySoftwareTokenOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentUpdateIdentityProviderOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -13157,7 +13498,7 @@ func (m *awsAwsjson11_deserializeOpVerifySoftwareToken) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorVerifySoftwareToken(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_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)} @@ -13194,14 +13535,8 @@ func awsAwsjson11_deserializeOpErrorVerifySoftwareToken(response *smithyhttp.Res errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("CodeMismatchException", errorCode): - return awsAwsjson11_deserializeErrorCodeMismatchException(response, errorBody) - - case strings.EqualFold("EnableSoftwareTokenMFAException", errorCode): - return awsAwsjson11_deserializeErrorEnableSoftwareTokenMFAException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsAwsjson11_deserializeErrorForbiddenException(response, errorBody) + case strings.EqualFold("ConcurrentModificationException", errorCode): + return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) case strings.EqualFold("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) @@ -13209,29 +13544,17 @@ func awsAwsjson11_deserializeOpErrorVerifySoftwareToken(response *smithyhttp.Res case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidUserPoolConfigurationException", errorCode): - return awsAwsjson11_deserializeErrorInvalidUserPoolConfigurationException(response, errorBody) - case strings.EqualFold("NotAuthorizedException", errorCode): return awsAwsjson11_deserializeErrorNotAuthorizedException(response, errorBody) - case strings.EqualFold("PasswordResetRequiredException", errorCode): - return awsAwsjson11_deserializeErrorPasswordResetRequiredException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("SoftwareTokenMFANotFoundException", errorCode): - return awsAwsjson11_deserializeErrorSoftwareTokenMFANotFoundException(response, errorBody) - case strings.EqualFold("TooManyRequestsException", errorCode): return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) - case strings.EqualFold("UserNotConfirmedException", errorCode): - return awsAwsjson11_deserializeErrorUserNotConfirmedException(response, errorBody) - - case strings.EqualFold("UserNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorUserNotFoundException(response, errorBody) + case strings.EqualFold("UnsupportedIdentityProviderException", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedIdentityProviderException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -13243,14 +13566,14 @@ func awsAwsjson11_deserializeOpErrorVerifySoftwareToken(response *smithyhttp.Res } } -type awsAwsjson11_deserializeOpVerifyUserAttribute struct { +type awsAwsjson11_deserializeOpUpdateManagedLoginBranding struct { } -func (*awsAwsjson11_deserializeOpVerifyUserAttribute) ID() string { +func (*awsAwsjson11_deserializeOpUpdateManagedLoginBranding) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpVerifyUserAttribute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpUpdateManagedLoginBranding) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -13268,9 +13591,9 @@ func (m *awsAwsjson11_deserializeOpVerifyUserAttribute) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorVerifyUserAttribute(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateManagedLoginBranding(response, &metadata) } - output := &VerifyUserAttributeOutput{} + output := &UpdateManagedLoginBrandingOutput{} out.Result = output var buff [1024]byte @@ -13290,7 +13613,7 @@ func (m *awsAwsjson11_deserializeOpVerifyUserAttribute) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentVerifyUserAttributeOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentUpdateManagedLoginBrandingOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -13304,7 +13627,7 @@ func (m *awsAwsjson11_deserializeOpVerifyUserAttribute) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorVerifyUserAttribute(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorUpdateManagedLoginBranding(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -13341,17 +13664,8 @@ func awsAwsjson11_deserializeOpErrorVerifyUserAttribute(response *smithyhttp.Res errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("AliasExistsException", errorCode): - return awsAwsjson11_deserializeErrorAliasExistsException(response, errorBody) - - case strings.EqualFold("CodeMismatchException", errorCode): - return awsAwsjson11_deserializeErrorCodeMismatchException(response, errorBody) - - case strings.EqualFold("ExpiredCodeException", errorCode): - return awsAwsjson11_deserializeErrorExpiredCodeException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsAwsjson11_deserializeErrorForbiddenException(response, errorBody) + case strings.EqualFold("ConcurrentModificationException", errorCode): + return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) case strings.EqualFold("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) @@ -13359,27 +13673,15 @@ func awsAwsjson11_deserializeOpErrorVerifyUserAttribute(response *smithyhttp.Res case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) - case strings.EqualFold("NotAuthorizedException", errorCode): return awsAwsjson11_deserializeErrorNotAuthorizedException(response, errorBody) - case strings.EqualFold("PasswordResetRequiredException", errorCode): - return awsAwsjson11_deserializeErrorPasswordResetRequiredException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("TooManyRequestsException", errorCode): return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) - case strings.EqualFold("UserNotConfirmedException", errorCode): - return awsAwsjson11_deserializeErrorUserNotConfirmedException(response, errorBody) - - case strings.EqualFold("UserNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorUserNotFoundException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -13390,11 +13692,40 @@ func awsAwsjson11_deserializeOpErrorVerifyUserAttribute(response *smithyhttp.Res } } -func awsAwsjson11_deserializeErrorAliasExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +type awsAwsjson11_deserializeOpUpdateResourceServer struct { +} + +func (*awsAwsjson11_deserializeOpUpdateResourceServer) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateResourceServer) HandleDeserialize(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, awsAwsjson11_deserializeOpErrorUpdateResourceServer(response, &metadata) + } + output := &UpdateResourceServerOutput{} + out.Result = output + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -13405,12 +13736,10 @@ func awsAwsjson11_deserializeErrorAliasExistsException(response *smithyhttp.Resp Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - output := &types.AliasExistsException{} - err := awsAwsjson11_deserializeDocumentAliasExistsException(&output, shape) - + err = awsAwsjson11_deserializeOpDocumentUpdateResourceServerOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -13418,22 +13747,32 @@ func awsAwsjson11_deserializeErrorAliasExistsException(response *smithyhttp.Resp Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) - return output + return out, metadata, err } -func awsAwsjson11_deserializeErrorCodeDeliveryFailureException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeOpErrorUpdateResourceServer(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ @@ -13443,28 +13782,73 @@ func awsAwsjson11_deserializeErrorCodeDeliveryFailureException(response *smithyh return err } - output := &types.CodeDeliveryFailureException{} - err := awsAwsjson11_deserializeDocumentCodeDeliveryFailureException(&output, shape) + 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("InternalErrorException", errorCode): + return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) - 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(), + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("NotAuthorizedException", errorCode): + return awsAwsjson11_deserializeErrorNotAuthorizedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, } - return err + return genericError + } +} - errorBody.Seek(0, io.SeekStart) - return output +type awsAwsjson11_deserializeOpUpdateUserAttributes struct { } -func awsAwsjson11_deserializeErrorCodeMismatchException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func (*awsAwsjson11_deserializeOpUpdateUserAttributes) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateUserAttributes) HandleDeserialize(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, awsAwsjson11_deserializeOpErrorUpdateUserAttributes(response, &metadata) + } + output := &UpdateUserAttributesOutput{} + out.Result = output + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -13475,12 +13859,10 @@ func awsAwsjson11_deserializeErrorCodeMismatchException(response *smithyhttp.Res Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - output := &types.CodeMismatchException{} - err := awsAwsjson11_deserializeDocumentCodeMismatchException(&output, shape) - + err = awsAwsjson11_deserializeOpDocumentUpdateUserAttributesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -13488,14 +13870,1201 @@ func awsAwsjson11_deserializeErrorCodeMismatchException(response *smithyhttp.Res Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) - return output + return out, metadata, err } -func awsAwsjson11_deserializeErrorConcurrentModificationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeOpErrorUpdateUserAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("AliasExistsException", errorCode): + return awsAwsjson11_deserializeErrorAliasExistsException(response, errorBody) + + case strings.EqualFold("CodeDeliveryFailureException", errorCode): + return awsAwsjson11_deserializeErrorCodeDeliveryFailureException(response, errorBody) + + case strings.EqualFold("CodeMismatchException", errorCode): + return awsAwsjson11_deserializeErrorCodeMismatchException(response, errorBody) + + case strings.EqualFold("ExpiredCodeException", errorCode): + return awsAwsjson11_deserializeErrorExpiredCodeException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsAwsjson11_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("InternalErrorException", errorCode): + return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) + + case strings.EqualFold("InvalidEmailRoleAccessPolicyException", errorCode): + return awsAwsjson11_deserializeErrorInvalidEmailRoleAccessPolicyException(response, errorBody) + + case strings.EqualFold("InvalidLambdaResponseException", errorCode): + return awsAwsjson11_deserializeErrorInvalidLambdaResponseException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidSmsRoleAccessPolicyException", errorCode): + return awsAwsjson11_deserializeErrorInvalidSmsRoleAccessPolicyException(response, errorBody) + + case strings.EqualFold("InvalidSmsRoleTrustRelationshipException", errorCode): + return awsAwsjson11_deserializeErrorInvalidSmsRoleTrustRelationshipException(response, errorBody) + + case strings.EqualFold("NotAuthorizedException", errorCode): + return awsAwsjson11_deserializeErrorNotAuthorizedException(response, errorBody) + + case strings.EqualFold("PasswordResetRequiredException", errorCode): + return awsAwsjson11_deserializeErrorPasswordResetRequiredException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) + + case strings.EqualFold("UnexpectedLambdaException", errorCode): + return awsAwsjson11_deserializeErrorUnexpectedLambdaException(response, errorBody) + + case strings.EqualFold("UserLambdaValidationException", errorCode): + return awsAwsjson11_deserializeErrorUserLambdaValidationException(response, errorBody) + + case strings.EqualFold("UserNotConfirmedException", errorCode): + return awsAwsjson11_deserializeErrorUserNotConfirmedException(response, errorBody) + + case strings.EqualFold("UserNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorUserNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateUserPool struct { +} + +func (*awsAwsjson11_deserializeOpUpdateUserPool) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateUserPool) HandleDeserialize(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, awsAwsjson11_deserializeOpErrorUpdateUserPool(response, &metadata) + } + output := &UpdateUserPoolOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentUpdateUserPoolOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUpdateUserPool(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("ConcurrentModificationException", errorCode): + return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("FeatureUnavailableInTierException", errorCode): + return awsAwsjson11_deserializeErrorFeatureUnavailableInTierException(response, errorBody) + + case strings.EqualFold("InternalErrorException", errorCode): + return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) + + case strings.EqualFold("InvalidEmailRoleAccessPolicyException", errorCode): + return awsAwsjson11_deserializeErrorInvalidEmailRoleAccessPolicyException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidSmsRoleAccessPolicyException", errorCode): + return awsAwsjson11_deserializeErrorInvalidSmsRoleAccessPolicyException(response, errorBody) + + case strings.EqualFold("InvalidSmsRoleTrustRelationshipException", errorCode): + return awsAwsjson11_deserializeErrorInvalidSmsRoleTrustRelationshipException(response, errorBody) + + case strings.EqualFold("NotAuthorizedException", errorCode): + return awsAwsjson11_deserializeErrorNotAuthorizedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("TierChangeNotAllowedException", errorCode): + return awsAwsjson11_deserializeErrorTierChangeNotAllowedException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) + + case strings.EqualFold("UserImportInProgressException", errorCode): + return awsAwsjson11_deserializeErrorUserImportInProgressException(response, errorBody) + + case strings.EqualFold("UserPoolTaggingException", errorCode): + return awsAwsjson11_deserializeErrorUserPoolTaggingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateUserPoolClient struct { +} + +func (*awsAwsjson11_deserializeOpUpdateUserPoolClient) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateUserPoolClient) HandleDeserialize(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, awsAwsjson11_deserializeOpErrorUpdateUserPoolClient(response, &metadata) + } + output := &UpdateUserPoolClientOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentUpdateUserPoolClientOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUpdateUserPoolClient(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("ConcurrentModificationException", errorCode): + return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("InternalErrorException", errorCode): + return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) + + case strings.EqualFold("InvalidOAuthFlowException", errorCode): + return awsAwsjson11_deserializeErrorInvalidOAuthFlowException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("NotAuthorizedException", errorCode): + return awsAwsjson11_deserializeErrorNotAuthorizedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ScopeDoesNotExistException", errorCode): + return awsAwsjson11_deserializeErrorScopeDoesNotExistException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateUserPoolDomain struct { +} + +func (*awsAwsjson11_deserializeOpUpdateUserPoolDomain) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateUserPoolDomain) HandleDeserialize(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, awsAwsjson11_deserializeOpErrorUpdateUserPoolDomain(response, &metadata) + } + output := &UpdateUserPoolDomainOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentUpdateUserPoolDomainOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUpdateUserPoolDomain(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("FeatureUnavailableInTierException", errorCode): + return awsAwsjson11_deserializeErrorFeatureUnavailableInTierException(response, errorBody) + + case strings.EqualFold("InternalErrorException", errorCode): + return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("NotAuthorizedException", errorCode): + return awsAwsjson11_deserializeErrorNotAuthorizedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpVerifySoftwareToken struct { +} + +func (*awsAwsjson11_deserializeOpVerifySoftwareToken) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpVerifySoftwareToken) HandleDeserialize(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, awsAwsjson11_deserializeOpErrorVerifySoftwareToken(response, &metadata) + } + output := &VerifySoftwareTokenOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentVerifySoftwareTokenOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorVerifySoftwareToken(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("CodeMismatchException", errorCode): + return awsAwsjson11_deserializeErrorCodeMismatchException(response, errorBody) + + case strings.EqualFold("EnableSoftwareTokenMFAException", errorCode): + return awsAwsjson11_deserializeErrorEnableSoftwareTokenMFAException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsAwsjson11_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("InternalErrorException", errorCode): + return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidUserPoolConfigurationException", errorCode): + return awsAwsjson11_deserializeErrorInvalidUserPoolConfigurationException(response, errorBody) + + case strings.EqualFold("NotAuthorizedException", errorCode): + return awsAwsjson11_deserializeErrorNotAuthorizedException(response, errorBody) + + case strings.EqualFold("PasswordResetRequiredException", errorCode): + return awsAwsjson11_deserializeErrorPasswordResetRequiredException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("SoftwareTokenMFANotFoundException", errorCode): + return awsAwsjson11_deserializeErrorSoftwareTokenMFANotFoundException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) + + case strings.EqualFold("UserNotConfirmedException", errorCode): + return awsAwsjson11_deserializeErrorUserNotConfirmedException(response, errorBody) + + case strings.EqualFold("UserNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorUserNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpVerifyUserAttribute struct { +} + +func (*awsAwsjson11_deserializeOpVerifyUserAttribute) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpVerifyUserAttribute) HandleDeserialize(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, awsAwsjson11_deserializeOpErrorVerifyUserAttribute(response, &metadata) + } + output := &VerifyUserAttributeOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentVerifyUserAttributeOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorVerifyUserAttribute(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("AliasExistsException", errorCode): + return awsAwsjson11_deserializeErrorAliasExistsException(response, errorBody) + + case strings.EqualFold("CodeMismatchException", errorCode): + return awsAwsjson11_deserializeErrorCodeMismatchException(response, errorBody) + + case strings.EqualFold("ExpiredCodeException", errorCode): + return awsAwsjson11_deserializeErrorExpiredCodeException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsAwsjson11_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("InternalErrorException", errorCode): + return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NotAuthorizedException", errorCode): + return awsAwsjson11_deserializeErrorNotAuthorizedException(response, errorBody) + + case strings.EqualFold("PasswordResetRequiredException", errorCode): + return awsAwsjson11_deserializeErrorPasswordResetRequiredException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody) + + case strings.EqualFold("UserNotConfirmedException", errorCode): + return awsAwsjson11_deserializeErrorUserNotConfirmedException(response, errorBody) + + case strings.EqualFold("UserNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorUserNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsAwsjson11_deserializeErrorAliasExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.AliasExistsException{} + err := awsAwsjson11_deserializeDocumentAliasExistsException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorCodeDeliveryFailureException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.CodeDeliveryFailureException{} + err := awsAwsjson11_deserializeDocumentCodeDeliveryFailureException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorCodeMismatchException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.CodeMismatchException{} + err := awsAwsjson11_deserializeDocumentCodeMismatchException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorConcurrentModificationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ConcurrentModificationException{} + err := awsAwsjson11_deserializeDocumentConcurrentModificationException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorDuplicateProviderException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.DuplicateProviderException{} + err := awsAwsjson11_deserializeDocumentDuplicateProviderException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorEnableSoftwareTokenMFAException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.EnableSoftwareTokenMFAException{} + err := awsAwsjson11_deserializeDocumentEnableSoftwareTokenMFAException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorExpiredCodeException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ExpiredCodeException{} + err := awsAwsjson11_deserializeDocumentExpiredCodeException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorFeatureUnavailableInTierException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.FeatureUnavailableInTierException{} + err := awsAwsjson11_deserializeDocumentFeatureUnavailableInTierException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorForbiddenException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ForbiddenException{} + err := awsAwsjson11_deserializeDocumentForbiddenException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorGroupExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.GroupExistsException{} + err := awsAwsjson11_deserializeDocumentGroupExistsException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInternalErrorException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InternalErrorException{} + err := awsAwsjson11_deserializeDocumentInternalErrorException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidEmailRoleAccessPolicyException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -13513,8 +15082,8 @@ func awsAwsjson11_deserializeErrorConcurrentModificationException(response *smit return err } - output := &types.ConcurrentModificationException{} - err := awsAwsjson11_deserializeDocumentConcurrentModificationException(&output, shape) + output := &types.InvalidEmailRoleAccessPolicyException{} + err := awsAwsjson11_deserializeDocumentInvalidEmailRoleAccessPolicyException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -13530,7 +15099,7 @@ func awsAwsjson11_deserializeErrorConcurrentModificationException(response *smit return output } -func awsAwsjson11_deserializeErrorDuplicateProviderException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInvalidLambdaResponseException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -13548,8 +15117,8 @@ func awsAwsjson11_deserializeErrorDuplicateProviderException(response *smithyhtt return err } - output := &types.DuplicateProviderException{} - err := awsAwsjson11_deserializeDocumentDuplicateProviderException(&output, shape) + output := &types.InvalidLambdaResponseException{} + err := awsAwsjson11_deserializeDocumentInvalidLambdaResponseException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -13565,7 +15134,7 @@ func awsAwsjson11_deserializeErrorDuplicateProviderException(response *smithyhtt return output } -func awsAwsjson11_deserializeErrorEnableSoftwareTokenMFAException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInvalidOAuthFlowException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -13583,8 +15152,8 @@ func awsAwsjson11_deserializeErrorEnableSoftwareTokenMFAException(response *smit return err } - output := &types.EnableSoftwareTokenMFAException{} - err := awsAwsjson11_deserializeDocumentEnableSoftwareTokenMFAException(&output, shape) + output := &types.InvalidOAuthFlowException{} + err := awsAwsjson11_deserializeDocumentInvalidOAuthFlowException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -13600,7 +15169,7 @@ func awsAwsjson11_deserializeErrorEnableSoftwareTokenMFAException(response *smit return output } -func awsAwsjson11_deserializeErrorExpiredCodeException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInvalidParameterException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -13618,8 +15187,8 @@ func awsAwsjson11_deserializeErrorExpiredCodeException(response *smithyhttp.Resp return err } - output := &types.ExpiredCodeException{} - err := awsAwsjson11_deserializeDocumentExpiredCodeException(&output, shape) + output := &types.InvalidParameterException{} + err := awsAwsjson11_deserializeDocumentInvalidParameterException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -13635,7 +15204,7 @@ func awsAwsjson11_deserializeErrorExpiredCodeException(response *smithyhttp.Resp return output } -func awsAwsjson11_deserializeErrorForbiddenException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInvalidPasswordException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -13653,8 +15222,8 @@ func awsAwsjson11_deserializeErrorForbiddenException(response *smithyhttp.Respon return err } - output := &types.ForbiddenException{} - err := awsAwsjson11_deserializeDocumentForbiddenException(&output, shape) + output := &types.InvalidPasswordException{} + err := awsAwsjson11_deserializeDocumentInvalidPasswordException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -13670,7 +15239,7 @@ func awsAwsjson11_deserializeErrorForbiddenException(response *smithyhttp.Respon return output } -func awsAwsjson11_deserializeErrorGroupExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInvalidSmsRoleAccessPolicyException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -13688,8 +15257,8 @@ func awsAwsjson11_deserializeErrorGroupExistsException(response *smithyhttp.Resp return err } - output := &types.GroupExistsException{} - err := awsAwsjson11_deserializeDocumentGroupExistsException(&output, shape) + output := &types.InvalidSmsRoleAccessPolicyException{} + err := awsAwsjson11_deserializeDocumentInvalidSmsRoleAccessPolicyException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -13705,7 +15274,7 @@ func awsAwsjson11_deserializeErrorGroupExistsException(response *smithyhttp.Resp return output } -func awsAwsjson11_deserializeErrorInternalErrorException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInvalidSmsRoleTrustRelationshipException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -13723,8 +15292,8 @@ func awsAwsjson11_deserializeErrorInternalErrorException(response *smithyhttp.Re return err } - output := &types.InternalErrorException{} - err := awsAwsjson11_deserializeDocumentInternalErrorException(&output, shape) + output := &types.InvalidSmsRoleTrustRelationshipException{} + err := awsAwsjson11_deserializeDocumentInvalidSmsRoleTrustRelationshipException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -13740,7 +15309,7 @@ func awsAwsjson11_deserializeErrorInternalErrorException(response *smithyhttp.Re return output } -func awsAwsjson11_deserializeErrorInvalidEmailRoleAccessPolicyException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInvalidUserPoolConfigurationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -13758,8 +15327,8 @@ func awsAwsjson11_deserializeErrorInvalidEmailRoleAccessPolicyException(response return err } - output := &types.InvalidEmailRoleAccessPolicyException{} - err := awsAwsjson11_deserializeDocumentInvalidEmailRoleAccessPolicyException(&output, shape) + output := &types.InvalidUserPoolConfigurationException{} + err := awsAwsjson11_deserializeDocumentInvalidUserPoolConfigurationException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -13775,7 +15344,7 @@ func awsAwsjson11_deserializeErrorInvalidEmailRoleAccessPolicyException(response return output } -func awsAwsjson11_deserializeErrorInvalidLambdaResponseException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -13793,8 +15362,8 @@ func awsAwsjson11_deserializeErrorInvalidLambdaResponseException(response *smith return err } - output := &types.InvalidLambdaResponseException{} - err := awsAwsjson11_deserializeDocumentInvalidLambdaResponseException(&output, shape) + output := &types.LimitExceededException{} + err := awsAwsjson11_deserializeDocumentLimitExceededException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -13810,7 +15379,7 @@ func awsAwsjson11_deserializeErrorInvalidLambdaResponseException(response *smith return output } -func awsAwsjson11_deserializeErrorInvalidOAuthFlowException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorManagedLoginBrandingExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -13828,8 +15397,8 @@ func awsAwsjson11_deserializeErrorInvalidOAuthFlowException(response *smithyhttp return err } - output := &types.InvalidOAuthFlowException{} - err := awsAwsjson11_deserializeDocumentInvalidOAuthFlowException(&output, shape) + output := &types.ManagedLoginBrandingExistsException{} + err := awsAwsjson11_deserializeDocumentManagedLoginBrandingExistsException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -13845,7 +15414,7 @@ func awsAwsjson11_deserializeErrorInvalidOAuthFlowException(response *smithyhttp return output } -func awsAwsjson11_deserializeErrorInvalidParameterException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorMFAMethodNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -13863,8 +15432,8 @@ func awsAwsjson11_deserializeErrorInvalidParameterException(response *smithyhttp return err } - output := &types.InvalidParameterException{} - err := awsAwsjson11_deserializeDocumentInvalidParameterException(&output, shape) + output := &types.MFAMethodNotFoundException{} + err := awsAwsjson11_deserializeDocumentMFAMethodNotFoundException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -13880,7 +15449,7 @@ func awsAwsjson11_deserializeErrorInvalidParameterException(response *smithyhttp return output } -func awsAwsjson11_deserializeErrorInvalidPasswordException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorNotAuthorizedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -13898,8 +15467,8 @@ func awsAwsjson11_deserializeErrorInvalidPasswordException(response *smithyhttp. return err } - output := &types.InvalidPasswordException{} - err := awsAwsjson11_deserializeDocumentInvalidPasswordException(&output, shape) + output := &types.NotAuthorizedException{} + err := awsAwsjson11_deserializeDocumentNotAuthorizedException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -13915,7 +15484,7 @@ func awsAwsjson11_deserializeErrorInvalidPasswordException(response *smithyhttp. return output } -func awsAwsjson11_deserializeErrorInvalidSmsRoleAccessPolicyException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorPasswordHistoryPolicyViolationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -13933,8 +15502,8 @@ func awsAwsjson11_deserializeErrorInvalidSmsRoleAccessPolicyException(response * return err } - output := &types.InvalidSmsRoleAccessPolicyException{} - err := awsAwsjson11_deserializeDocumentInvalidSmsRoleAccessPolicyException(&output, shape) + output := &types.PasswordHistoryPolicyViolationException{} + err := awsAwsjson11_deserializeDocumentPasswordHistoryPolicyViolationException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -13950,7 +15519,7 @@ func awsAwsjson11_deserializeErrorInvalidSmsRoleAccessPolicyException(response * return output } -func awsAwsjson11_deserializeErrorInvalidSmsRoleTrustRelationshipException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorPasswordResetRequiredException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -13968,8 +15537,8 @@ func awsAwsjson11_deserializeErrorInvalidSmsRoleTrustRelationshipException(respo return err } - output := &types.InvalidSmsRoleTrustRelationshipException{} - err := awsAwsjson11_deserializeDocumentInvalidSmsRoleTrustRelationshipException(&output, shape) + output := &types.PasswordResetRequiredException{} + err := awsAwsjson11_deserializeDocumentPasswordResetRequiredException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -13985,7 +15554,7 @@ func awsAwsjson11_deserializeErrorInvalidSmsRoleTrustRelationshipException(respo return output } -func awsAwsjson11_deserializeErrorInvalidUserPoolConfigurationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorPreconditionNotMetException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -14003,8 +15572,8 @@ func awsAwsjson11_deserializeErrorInvalidUserPoolConfigurationException(response return err } - output := &types.InvalidUserPoolConfigurationException{} - err := awsAwsjson11_deserializeDocumentInvalidUserPoolConfigurationException(&output, shape) + output := &types.PreconditionNotMetException{} + err := awsAwsjson11_deserializeDocumentPreconditionNotMetException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -14020,7 +15589,7 @@ func awsAwsjson11_deserializeErrorInvalidUserPoolConfigurationException(response return output } -func awsAwsjson11_deserializeErrorLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -14038,8 +15607,8 @@ func awsAwsjson11_deserializeErrorLimitExceededException(response *smithyhttp.Re return err } - output := &types.LimitExceededException{} - err := awsAwsjson11_deserializeDocumentLimitExceededException(&output, shape) + output := &types.ResourceNotFoundException{} + err := awsAwsjson11_deserializeDocumentResourceNotFoundException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -14055,7 +15624,7 @@ func awsAwsjson11_deserializeErrorLimitExceededException(response *smithyhttp.Re return output } -func awsAwsjson11_deserializeErrorMFAMethodNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorScopeDoesNotExistException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -14073,8 +15642,8 @@ func awsAwsjson11_deserializeErrorMFAMethodNotFoundException(response *smithyhtt return err } - output := &types.MFAMethodNotFoundException{} - err := awsAwsjson11_deserializeDocumentMFAMethodNotFoundException(&output, shape) + output := &types.ScopeDoesNotExistException{} + err := awsAwsjson11_deserializeDocumentScopeDoesNotExistException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -14090,7 +15659,7 @@ func awsAwsjson11_deserializeErrorMFAMethodNotFoundException(response *smithyhtt return output } -func awsAwsjson11_deserializeErrorNotAuthorizedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorSoftwareTokenMFANotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -14108,8 +15677,8 @@ func awsAwsjson11_deserializeErrorNotAuthorizedException(response *smithyhttp.Re return err } - output := &types.NotAuthorizedException{} - err := awsAwsjson11_deserializeDocumentNotAuthorizedException(&output, shape) + output := &types.SoftwareTokenMFANotFoundException{} + err := awsAwsjson11_deserializeDocumentSoftwareTokenMFANotFoundException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -14125,7 +15694,7 @@ func awsAwsjson11_deserializeErrorNotAuthorizedException(response *smithyhttp.Re return output } -func awsAwsjson11_deserializeErrorPasswordHistoryPolicyViolationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorTierChangeNotAllowedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -14143,8 +15712,8 @@ func awsAwsjson11_deserializeErrorPasswordHistoryPolicyViolationException(respon return err } - output := &types.PasswordHistoryPolicyViolationException{} - err := awsAwsjson11_deserializeDocumentPasswordHistoryPolicyViolationException(&output, shape) + output := &types.TierChangeNotAllowedException{} + err := awsAwsjson11_deserializeDocumentTierChangeNotAllowedException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -14160,7 +15729,7 @@ func awsAwsjson11_deserializeErrorPasswordHistoryPolicyViolationException(respon return output } -func awsAwsjson11_deserializeErrorPasswordResetRequiredException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorTooManyFailedAttemptsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -14178,8 +15747,8 @@ func awsAwsjson11_deserializeErrorPasswordResetRequiredException(response *smith return err } - output := &types.PasswordResetRequiredException{} - err := awsAwsjson11_deserializeDocumentPasswordResetRequiredException(&output, shape) + output := &types.TooManyFailedAttemptsException{} + err := awsAwsjson11_deserializeDocumentTooManyFailedAttemptsException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -14195,7 +15764,7 @@ func awsAwsjson11_deserializeErrorPasswordResetRequiredException(response *smith return output } -func awsAwsjson11_deserializeErrorPreconditionNotMetException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorTooManyRequestsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -14213,8 +15782,8 @@ func awsAwsjson11_deserializeErrorPreconditionNotMetException(response *smithyht return err } - output := &types.PreconditionNotMetException{} - err := awsAwsjson11_deserializeDocumentPreconditionNotMetException(&output, shape) + output := &types.TooManyRequestsException{} + err := awsAwsjson11_deserializeDocumentTooManyRequestsException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -14230,7 +15799,7 @@ func awsAwsjson11_deserializeErrorPreconditionNotMetException(response *smithyht return output } -func awsAwsjson11_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorUnauthorizedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -14248,8 +15817,8 @@ func awsAwsjson11_deserializeErrorResourceNotFoundException(response *smithyhttp return err } - output := &types.ResourceNotFoundException{} - err := awsAwsjson11_deserializeDocumentResourceNotFoundException(&output, shape) + output := &types.UnauthorizedException{} + err := awsAwsjson11_deserializeDocumentUnauthorizedException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -14265,7 +15834,7 @@ func awsAwsjson11_deserializeErrorResourceNotFoundException(response *smithyhttp return output } -func awsAwsjson11_deserializeErrorScopeDoesNotExistException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorUnexpectedLambdaException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -14283,8 +15852,8 @@ func awsAwsjson11_deserializeErrorScopeDoesNotExistException(response *smithyhtt return err } - output := &types.ScopeDoesNotExistException{} - err := awsAwsjson11_deserializeDocumentScopeDoesNotExistException(&output, shape) + output := &types.UnexpectedLambdaException{} + err := awsAwsjson11_deserializeDocumentUnexpectedLambdaException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -14300,7 +15869,7 @@ func awsAwsjson11_deserializeErrorScopeDoesNotExistException(response *smithyhtt return output } -func awsAwsjson11_deserializeErrorSoftwareTokenMFANotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorUnsupportedIdentityProviderException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -14318,8 +15887,8 @@ func awsAwsjson11_deserializeErrorSoftwareTokenMFANotFoundException(response *sm return err } - output := &types.SoftwareTokenMFANotFoundException{} - err := awsAwsjson11_deserializeDocumentSoftwareTokenMFANotFoundException(&output, shape) + output := &types.UnsupportedIdentityProviderException{} + err := awsAwsjson11_deserializeDocumentUnsupportedIdentityProviderException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -14335,7 +15904,7 @@ func awsAwsjson11_deserializeErrorSoftwareTokenMFANotFoundException(response *sm return output } -func awsAwsjson11_deserializeErrorTooManyFailedAttemptsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorUnsupportedOperationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -14353,8 +15922,8 @@ func awsAwsjson11_deserializeErrorTooManyFailedAttemptsException(response *smith return err } - output := &types.TooManyFailedAttemptsException{} - err := awsAwsjson11_deserializeDocumentTooManyFailedAttemptsException(&output, shape) + output := &types.UnsupportedOperationException{} + err := awsAwsjson11_deserializeDocumentUnsupportedOperationException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -14370,7 +15939,7 @@ func awsAwsjson11_deserializeErrorTooManyFailedAttemptsException(response *smith return output } -func awsAwsjson11_deserializeErrorTooManyRequestsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorUnsupportedTokenTypeException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -14388,8 +15957,8 @@ func awsAwsjson11_deserializeErrorTooManyRequestsException(response *smithyhttp. return err } - output := &types.TooManyRequestsException{} - err := awsAwsjson11_deserializeDocumentTooManyRequestsException(&output, shape) + output := &types.UnsupportedTokenTypeException{} + err := awsAwsjson11_deserializeDocumentUnsupportedTokenTypeException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -14405,7 +15974,7 @@ func awsAwsjson11_deserializeErrorTooManyRequestsException(response *smithyhttp. return output } -func awsAwsjson11_deserializeErrorUnauthorizedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorUnsupportedUserStateException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -14423,8 +15992,8 @@ func awsAwsjson11_deserializeErrorUnauthorizedException(response *smithyhttp.Res return err } - output := &types.UnauthorizedException{} - err := awsAwsjson11_deserializeDocumentUnauthorizedException(&output, shape) + output := &types.UnsupportedUserStateException{} + err := awsAwsjson11_deserializeDocumentUnsupportedUserStateException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -14440,7 +16009,7 @@ func awsAwsjson11_deserializeErrorUnauthorizedException(response *smithyhttp.Res return output } -func awsAwsjson11_deserializeErrorUnexpectedLambdaException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorUserImportInProgressException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -14458,8 +16027,8 @@ func awsAwsjson11_deserializeErrorUnexpectedLambdaException(response *smithyhttp return err } - output := &types.UnexpectedLambdaException{} - err := awsAwsjson11_deserializeDocumentUnexpectedLambdaException(&output, shape) + output := &types.UserImportInProgressException{} + err := awsAwsjson11_deserializeDocumentUserImportInProgressException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -14475,7 +16044,7 @@ func awsAwsjson11_deserializeErrorUnexpectedLambdaException(response *smithyhttp return output } -func awsAwsjson11_deserializeErrorUnsupportedIdentityProviderException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorUserLambdaValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -14493,8 +16062,8 @@ func awsAwsjson11_deserializeErrorUnsupportedIdentityProviderException(response return err } - output := &types.UnsupportedIdentityProviderException{} - err := awsAwsjson11_deserializeDocumentUnsupportedIdentityProviderException(&output, shape) + output := &types.UserLambdaValidationException{} + err := awsAwsjson11_deserializeDocumentUserLambdaValidationException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -14510,7 +16079,7 @@ func awsAwsjson11_deserializeErrorUnsupportedIdentityProviderException(response return output } -func awsAwsjson11_deserializeErrorUnsupportedOperationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorUsernameExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -14528,8 +16097,8 @@ func awsAwsjson11_deserializeErrorUnsupportedOperationException(response *smithy return err } - output := &types.UnsupportedOperationException{} - err := awsAwsjson11_deserializeDocumentUnsupportedOperationException(&output, shape) + output := &types.UsernameExistsException{} + err := awsAwsjson11_deserializeDocumentUsernameExistsException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -14545,7 +16114,7 @@ func awsAwsjson11_deserializeErrorUnsupportedOperationException(response *smithy return output } -func awsAwsjson11_deserializeErrorUnsupportedTokenTypeException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorUserNotConfirmedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -14563,8 +16132,78 @@ func awsAwsjson11_deserializeErrorUnsupportedTokenTypeException(response *smithy return err } - output := &types.UnsupportedTokenTypeException{} - err := awsAwsjson11_deserializeDocumentUnsupportedTokenTypeException(&output, shape) + output := &types.UserNotConfirmedException{} + err := awsAwsjson11_deserializeDocumentUserNotConfirmedException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorUserNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.UserNotFoundException{} + err := awsAwsjson11_deserializeDocumentUserNotFoundException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorUserPoolAddOnNotEnabledException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.UserPoolAddOnNotEnabledException{} + err := awsAwsjson11_deserializeDocumentUserPoolAddOnNotEnabledException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -14580,7 +16219,7 @@ func awsAwsjson11_deserializeErrorUnsupportedTokenTypeException(response *smithy return output } -func awsAwsjson11_deserializeErrorUnsupportedUserStateException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorUserPoolTaggingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -14598,8 +16237,8 @@ func awsAwsjson11_deserializeErrorUnsupportedUserStateException(response *smithy return err } - output := &types.UnsupportedUserStateException{} - err := awsAwsjson11_deserializeDocumentUnsupportedUserStateException(&output, shape) + output := &types.UserPoolTaggingException{} + err := awsAwsjson11_deserializeDocumentUserPoolTaggingException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -14615,7 +16254,7 @@ func awsAwsjson11_deserializeErrorUnsupportedUserStateException(response *smithy return output } -func awsAwsjson11_deserializeErrorUserImportInProgressException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorWebAuthnChallengeNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -14633,8 +16272,8 @@ func awsAwsjson11_deserializeErrorUserImportInProgressException(response *smithy return err } - output := &types.UserImportInProgressException{} - err := awsAwsjson11_deserializeDocumentUserImportInProgressException(&output, shape) + output := &types.WebAuthnChallengeNotFoundException{} + err := awsAwsjson11_deserializeDocumentWebAuthnChallengeNotFoundException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -14650,7 +16289,7 @@ func awsAwsjson11_deserializeErrorUserImportInProgressException(response *smithy return output } -func awsAwsjson11_deserializeErrorUserLambdaValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorWebAuthnClientMismatchException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -14668,8 +16307,8 @@ func awsAwsjson11_deserializeErrorUserLambdaValidationException(response *smithy return err } - output := &types.UserLambdaValidationException{} - err := awsAwsjson11_deserializeDocumentUserLambdaValidationException(&output, shape) + output := &types.WebAuthnClientMismatchException{} + err := awsAwsjson11_deserializeDocumentWebAuthnClientMismatchException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -14685,7 +16324,7 @@ func awsAwsjson11_deserializeErrorUserLambdaValidationException(response *smithy return output } -func awsAwsjson11_deserializeErrorUsernameExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorWebAuthnConfigurationMissingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -14703,8 +16342,8 @@ func awsAwsjson11_deserializeErrorUsernameExistsException(response *smithyhttp.R return err } - output := &types.UsernameExistsException{} - err := awsAwsjson11_deserializeDocumentUsernameExistsException(&output, shape) + output := &types.WebAuthnConfigurationMissingException{} + err := awsAwsjson11_deserializeDocumentWebAuthnConfigurationMissingException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -14720,7 +16359,7 @@ func awsAwsjson11_deserializeErrorUsernameExistsException(response *smithyhttp.R return output } -func awsAwsjson11_deserializeErrorUserNotConfirmedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorWebAuthnCredentialNotSupportedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -14738,8 +16377,8 @@ func awsAwsjson11_deserializeErrorUserNotConfirmedException(response *smithyhttp return err } - output := &types.UserNotConfirmedException{} - err := awsAwsjson11_deserializeDocumentUserNotConfirmedException(&output, shape) + output := &types.WebAuthnCredentialNotSupportedException{} + err := awsAwsjson11_deserializeDocumentWebAuthnCredentialNotSupportedException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -14755,7 +16394,7 @@ func awsAwsjson11_deserializeErrorUserNotConfirmedException(response *smithyhttp return output } -func awsAwsjson11_deserializeErrorUserNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorWebAuthnNotEnabledException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -14773,8 +16412,8 @@ func awsAwsjson11_deserializeErrorUserNotFoundException(response *smithyhttp.Res return err } - output := &types.UserNotFoundException{} - err := awsAwsjson11_deserializeDocumentUserNotFoundException(&output, shape) + output := &types.WebAuthnNotEnabledException{} + err := awsAwsjson11_deserializeDocumentWebAuthnNotEnabledException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -14790,7 +16429,7 @@ func awsAwsjson11_deserializeErrorUserNotFoundException(response *smithyhttp.Res return output } -func awsAwsjson11_deserializeErrorUserPoolAddOnNotEnabledException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorWebAuthnOriginNotAllowedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -14808,8 +16447,8 @@ func awsAwsjson11_deserializeErrorUserPoolAddOnNotEnabledException(response *smi return err } - output := &types.UserPoolAddOnNotEnabledException{} - err := awsAwsjson11_deserializeDocumentUserPoolAddOnNotEnabledException(&output, shape) + output := &types.WebAuthnOriginNotAllowedException{} + err := awsAwsjson11_deserializeDocumentWebAuthnOriginNotAllowedException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -14825,7 +16464,7 @@ func awsAwsjson11_deserializeErrorUserPoolAddOnNotEnabledException(response *smi return output } -func awsAwsjson11_deserializeErrorUserPoolTaggingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorWebAuthnRelyingPartyMismatchException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -14843,8 +16482,8 @@ func awsAwsjson11_deserializeErrorUserPoolTaggingException(response *smithyhttp. return err } - output := &types.UserPoolTaggingException{} - err := awsAwsjson11_deserializeDocumentUserPoolTaggingException(&output, shape) + output := &types.WebAuthnRelyingPartyMismatchException{} + err := awsAwsjson11_deserializeDocumentWebAuthnRelyingPartyMismatchException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -15206,6 +16845,42 @@ func awsAwsjson11_deserializeDocumentAliasExistsException(v **types.AliasExistsE return nil } +func awsAwsjson11_deserializeDocumentAllowedFirstAuthFactorsListType(v *[]types.AuthFactorType, 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.AuthFactorType + if *v == nil { + cv = []types.AuthFactorType{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AuthFactorType + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AuthFactorType to be of type string, got %T instead", value) + } + col = types.AuthFactorType(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson11_deserializeDocumentAnalyticsConfigurationType(v **types.AnalyticsConfigurationType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -15282,6 +16957,120 @@ func awsAwsjson11_deserializeDocumentAnalyticsConfigurationType(v **types.Analyt return nil } +func awsAwsjson11_deserializeDocumentAssetListType(v *[]types.AssetType, 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.AssetType + if *v == nil { + cv = []types.AssetType{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AssetType + destAddr := &col + if err := awsAwsjson11_deserializeDocumentAssetType(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentAssetType(v **types.AssetType, 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.AssetType + if *v == nil { + sv = &types.AssetType{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Bytes": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AssetBytesType to be []byte, got %T instead", value) + } + dv, err := base64.StdEncoding.DecodeString(jtv) + if err != nil { + return fmt.Errorf("failed to base64 decode AssetBytesType, %w", err) + } + sv.Bytes = dv + } + + case "Category": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AssetCategoryType to be of type string, got %T instead", value) + } + sv.Category = types.AssetCategoryType(jtv) + } + + case "ColorMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ColorSchemeModeType to be of type string, got %T instead", value) + } + sv.ColorMode = types.ColorSchemeModeType(jtv) + } + + case "Extension": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AssetExtensionType to be of type string, got %T instead", value) + } + sv.Extension = types.AssetExtensionType(jtv) + } + + case "ResourceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceIdType to be of type string, got %T instead", value) + } + sv.ResourceId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentAttributeListType(v *[]types.AttributeType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -15650,6 +17439,42 @@ func awsAwsjson11_deserializeDocumentAuthEventType(v **types.AuthEventType, valu return nil } +func awsAwsjson11_deserializeDocumentAvailableChallengeListType(v *[]types.ChallengeNameType, 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.ChallengeNameType + if *v == nil { + cv = []types.ChallengeNameType{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ChallengeNameType + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChallengeNameType to be of type string, got %T instead", value) + } + col = types.ChallengeNameType(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson11_deserializeDocumentBlockedIPRangeListType(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -16210,6 +18035,42 @@ func awsAwsjson11_deserializeDocumentConcurrentModificationException(v **types.C return nil } +func awsAwsjson11_deserializeDocumentConfiguredUserAuthFactorsListType(v *[]types.AuthFactorType, 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.AuthFactorType + if *v == nil { + cv = []types.AuthFactorType{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AuthFactorType + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AuthFactorType to be of type string, got %T instead", value) + } + col = types.AuthFactorType(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson11_deserializeDocumentCustomDomainConfigType(v **types.CustomDomainConfigType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -16524,6 +18385,14 @@ func awsAwsjson11_deserializeDocumentDeviceType(v **types.DeviceType, value inte return nil } +func awsAwsjson11_deserializeDocumentDocument(v *document.Interface, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + *v = internaldocument.NewDocumentUnmarshaler(value) + return nil +} + func awsAwsjson11_deserializeDocumentDomainDescriptionType(v **types.DomainDescriptionType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -16578,6 +18447,19 @@ func awsAwsjson11_deserializeDocumentDomainDescriptionType(v **types.DomainDescr sv.Domain = ptr.String(jtv) } + case "ManagedLoginVersion": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected WrappedIntegerType to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ManagedLoginVersion = ptr.Int32(int32(i64)) + } + case "S3Bucket": if value != nil { jtv, ok := value.(string) @@ -17135,7 +19017,47 @@ func awsAwsjson11_deserializeDocumentExplicitAuthFlowsListType(v *[]types.Explic cv = append(cv, col) } - *v = cv + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentFeatureUnavailableInTierException(v **types.FeatureUnavailableInTierException, 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.FeatureUnavailableInTierException + if *v == nil { + sv = &types.FeatureUnavailableInTierException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MessageType to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv return nil } @@ -17474,31 +19396,316 @@ func awsAwsjson11_deserializeDocumentIdentityProviderType(v **types.IdentityProv return err } - case "ProviderName": + case "ProviderName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProviderNameType to be of type string, got %T instead", value) + } + sv.ProviderName = ptr.String(jtv) + } + + case "ProviderType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IdentityProviderTypeType to be of type string, got %T instead", value) + } + sv.ProviderType = types.IdentityProviderTypeType(jtv) + } + + case "UserPoolId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UserPoolIdType to be of type string, got %T instead", value) + } + sv.UserPoolId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentIdpIdentifiersListType(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 IdpIdentifierType to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentInternalErrorException(v **types.InternalErrorException, 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.InternalErrorException + if *v == nil { + sv = &types.InternalErrorException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MessageType to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidEmailRoleAccessPolicyException(v **types.InvalidEmailRoleAccessPolicyException, 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.InvalidEmailRoleAccessPolicyException + if *v == nil { + sv = &types.InvalidEmailRoleAccessPolicyException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MessageType to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidLambdaResponseException(v **types.InvalidLambdaResponseException, 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.InvalidLambdaResponseException + if *v == nil { + sv = &types.InvalidLambdaResponseException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MessageType to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidOAuthFlowException(v **types.InvalidOAuthFlowException, 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.InvalidOAuthFlowException + if *v == nil { + sv = &types.InvalidOAuthFlowException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MessageType to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidParameterException(v **types.InvalidParameterException, 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.InvalidParameterException + if *v == nil { + sv = &types.InvalidParameterException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ProviderNameType to be of type string, got %T instead", value) + return fmt.Errorf("expected MessageType to be of type string, got %T instead", value) } - sv.ProviderName = ptr.String(jtv) + sv.Message = ptr.String(jtv) } - case "ProviderType": + case "reasonCode": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected IdentityProviderTypeType to be of type string, got %T instead", value) + return fmt.Errorf("expected InvalidParameterExceptionReasonCodeType to be of type string, got %T instead", value) } - sv.ProviderType = types.IdentityProviderTypeType(jtv) + sv.ReasonCode = ptr.String(jtv) } - case "UserPoolId": + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidPasswordException(v **types.InvalidPasswordException, 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.InvalidPasswordException + if *v == nil { + sv = &types.InvalidPasswordException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected UserPoolIdType to be of type string, got %T instead", value) + return fmt.Errorf("expected MessageType to be of type string, got %T instead", value) } - sv.UserPoolId = ptr.String(jtv) + sv.Message = ptr.String(jtv) } default: @@ -17510,7 +19717,7 @@ func awsAwsjson11_deserializeDocumentIdentityProviderType(v **types.IdentityProv return nil } -func awsAwsjson11_deserializeDocumentIdpIdentifiersListType(v *[]string, value interface{}) error { +func awsAwsjson11_deserializeDocumentInvalidSmsRoleAccessPolicyException(v **types.InvalidSmsRoleAccessPolicyException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -17518,35 +19725,39 @@ func awsAwsjson11_deserializeDocumentIdpIdentifiersListType(v *[]string, value i return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []string + var sv *types.InvalidSmsRoleAccessPolicyException if *v == nil { - cv = []string{} + sv = &types.InvalidSmsRoleAccessPolicyException{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected IdpIdentifierType to be of type string, got %T instead", value) + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MessageType to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) } - col = jtv - } - cv = append(cv, col) + default: + _, _ = key, value + + } } - *v = cv + *v = sv return nil } -func awsAwsjson11_deserializeDocumentInternalErrorException(v **types.InternalErrorException, value interface{}) error { +func awsAwsjson11_deserializeDocumentInvalidSmsRoleTrustRelationshipException(v **types.InvalidSmsRoleTrustRelationshipException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -17559,9 +19770,9 @@ func awsAwsjson11_deserializeDocumentInternalErrorException(v **types.InternalEr return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InternalErrorException + var sv *types.InvalidSmsRoleTrustRelationshipException if *v == nil { - sv = &types.InternalErrorException{} + sv = &types.InvalidSmsRoleTrustRelationshipException{} } else { sv = *v } @@ -17586,7 +19797,7 @@ func awsAwsjson11_deserializeDocumentInternalErrorException(v **types.InternalEr return nil } -func awsAwsjson11_deserializeDocumentInvalidEmailRoleAccessPolicyException(v **types.InvalidEmailRoleAccessPolicyException, value interface{}) error { +func awsAwsjson11_deserializeDocumentInvalidUserPoolConfigurationException(v **types.InvalidUserPoolConfigurationException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -17599,9 +19810,9 @@ func awsAwsjson11_deserializeDocumentInvalidEmailRoleAccessPolicyException(v **t return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InvalidEmailRoleAccessPolicyException + var sv *types.InvalidUserPoolConfigurationException if *v == nil { - sv = &types.InvalidEmailRoleAccessPolicyException{} + sv = &types.InvalidUserPoolConfigurationException{} } else { sv = *v } @@ -17626,7 +19837,7 @@ func awsAwsjson11_deserializeDocumentInvalidEmailRoleAccessPolicyException(v **t return nil } -func awsAwsjson11_deserializeDocumentInvalidLambdaResponseException(v **types.InvalidLambdaResponseException, value interface{}) error { +func awsAwsjson11_deserializeDocumentLambdaConfigType(v **types.LambdaConfigType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -17639,22 +19850,127 @@ func awsAwsjson11_deserializeDocumentInvalidLambdaResponseException(v **types.In return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InvalidLambdaResponseException + var sv *types.LambdaConfigType if *v == nil { - sv = &types.InvalidLambdaResponseException{} + sv = &types.LambdaConfigType{} } else { sv = *v } for key, value := range shape { switch key { - case "message", "Message": + case "CreateAuthChallenge": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected MessageType to be of type string, got %T instead", value) + return fmt.Errorf("expected ArnType to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.CreateAuthChallenge = ptr.String(jtv) + } + + case "CustomEmailSender": + if err := awsAwsjson11_deserializeDocumentCustomEmailLambdaVersionConfigType(&sv.CustomEmailSender, value); err != nil { + return err + } + + case "CustomMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ArnType to be of type string, got %T instead", value) + } + sv.CustomMessage = ptr.String(jtv) + } + + case "CustomSMSSender": + if err := awsAwsjson11_deserializeDocumentCustomSMSLambdaVersionConfigType(&sv.CustomSMSSender, value); err != nil { + return err + } + + case "DefineAuthChallenge": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ArnType to be of type string, got %T instead", value) + } + sv.DefineAuthChallenge = ptr.String(jtv) + } + + case "KMSKeyID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ArnType to be of type string, got %T instead", value) + } + sv.KMSKeyID = ptr.String(jtv) + } + + case "PostAuthentication": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ArnType to be of type string, got %T instead", value) + } + sv.PostAuthentication = ptr.String(jtv) + } + + case "PostConfirmation": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ArnType to be of type string, got %T instead", value) + } + sv.PostConfirmation = ptr.String(jtv) + } + + case "PreAuthentication": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ArnType to be of type string, got %T instead", value) + } + sv.PreAuthentication = ptr.String(jtv) + } + + case "PreSignUp": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ArnType to be of type string, got %T instead", value) + } + sv.PreSignUp = ptr.String(jtv) + } + + case "PreTokenGeneration": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ArnType to be of type string, got %T instead", value) + } + sv.PreTokenGeneration = ptr.String(jtv) + } + + case "PreTokenGenerationConfig": + if err := awsAwsjson11_deserializeDocumentPreTokenGenerationVersionConfigType(&sv.PreTokenGenerationConfig, value); err != nil { + return err + } + + case "UserMigration": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ArnType to be of type string, got %T instead", value) + } + sv.UserMigration = ptr.String(jtv) + } + + case "VerifyAuthChallengeResponse": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ArnType to be of type string, got %T instead", value) + } + sv.VerifyAuthChallengeResponse = ptr.String(jtv) } default: @@ -17666,7 +19982,7 @@ func awsAwsjson11_deserializeDocumentInvalidLambdaResponseException(v **types.In return nil } -func awsAwsjson11_deserializeDocumentInvalidOAuthFlowException(v **types.InvalidOAuthFlowException, value interface{}) error { +func awsAwsjson11_deserializeDocumentLimitExceededException(v **types.LimitExceededException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -17679,9 +19995,9 @@ func awsAwsjson11_deserializeDocumentInvalidOAuthFlowException(v **types.Invalid return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InvalidOAuthFlowException + var sv *types.LimitExceededException if *v == nil { - sv = &types.InvalidOAuthFlowException{} + sv = &types.LimitExceededException{} } else { sv = *v } @@ -17696,17 +20012,53 @@ func awsAwsjson11_deserializeDocumentInvalidOAuthFlowException(v **types.Invalid } sv.Message = ptr.String(jtv) } - - default: - _, _ = key, value - + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentListOfStringTypes(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 StringType to be of type string, got %T instead", value) + } + col = jtv } + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsAwsjson11_deserializeDocumentInvalidParameterException(v **types.InvalidParameterException, value interface{}) error { +func awsAwsjson11_deserializeDocumentLogConfigurationListType(v *[]types.LogConfigurationType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -17714,39 +20066,33 @@ func awsAwsjson11_deserializeDocumentInvalidParameterException(v **types.Invalid return nil } - shape, ok := value.(map[string]interface{}) + shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InvalidParameterException + var cv []types.LogConfigurationType if *v == nil { - sv = &types.InvalidParameterException{} + cv = []types.LogConfigurationType{} } else { - sv = *v + cv = *v } - for key, value := range shape { - switch key { - case "message", "Message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected MessageType to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - + for _, value := range shape { + var col types.LogConfigurationType + destAddr := &col + if err := awsAwsjson11_deserializeDocumentLogConfigurationType(&destAddr, value); err != nil { + return err } + col = *destAddr + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsAwsjson11_deserializeDocumentInvalidPasswordException(v **types.InvalidPasswordException, value interface{}) error { +func awsAwsjson11_deserializeDocumentLogConfigurationType(v **types.LogConfigurationType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -17759,22 +20105,46 @@ func awsAwsjson11_deserializeDocumentInvalidPasswordException(v **types.InvalidP return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InvalidPasswordException + var sv *types.LogConfigurationType if *v == nil { - sv = &types.InvalidPasswordException{} + sv = &types.LogConfigurationType{} } else { sv = *v } for key, value := range shape { switch key { - case "message", "Message": + case "CloudWatchLogsConfiguration": + if err := awsAwsjson11_deserializeDocumentCloudWatchLogsConfigurationType(&sv.CloudWatchLogsConfiguration, value); err != nil { + return err + } + + case "EventSource": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected MessageType to be of type string, got %T instead", value) + return fmt.Errorf("expected EventSourceName to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.EventSource = types.EventSourceName(jtv) + } + + case "FirehoseConfiguration": + if err := awsAwsjson11_deserializeDocumentFirehoseConfigurationType(&sv.FirehoseConfiguration, value); err != nil { + return err + } + + case "LogLevel": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LogLevel to be of type string, got %T instead", value) + } + sv.LogLevel = types.LogLevel(jtv) + } + + case "S3Configuration": + if err := awsAwsjson11_deserializeDocumentS3ConfigurationType(&sv.S3Configuration, value); err != nil { + return err } default: @@ -17786,7 +20156,7 @@ func awsAwsjson11_deserializeDocumentInvalidPasswordException(v **types.InvalidP return nil } -func awsAwsjson11_deserializeDocumentInvalidSmsRoleAccessPolicyException(v **types.InvalidSmsRoleAccessPolicyException, value interface{}) error { +func awsAwsjson11_deserializeDocumentLogDeliveryConfigurationType(v **types.LogDeliveryConfigurationType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -17799,22 +20169,27 @@ func awsAwsjson11_deserializeDocumentInvalidSmsRoleAccessPolicyException(v **typ return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InvalidSmsRoleAccessPolicyException + var sv *types.LogDeliveryConfigurationType if *v == nil { - sv = &types.InvalidSmsRoleAccessPolicyException{} + sv = &types.LogDeliveryConfigurationType{} } else { sv = *v } for key, value := range shape { switch key { - case "message", "Message": + case "LogConfigurations": + if err := awsAwsjson11_deserializeDocumentLogConfigurationListType(&sv.LogConfigurations, value); err != nil { + return err + } + + case "UserPoolId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected MessageType to be of type string, got %T instead", value) + return fmt.Errorf("expected UserPoolIdType to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.UserPoolId = ptr.String(jtv) } default: @@ -17826,7 +20201,7 @@ func awsAwsjson11_deserializeDocumentInvalidSmsRoleAccessPolicyException(v **typ return nil } -func awsAwsjson11_deserializeDocumentInvalidSmsRoleTrustRelationshipException(v **types.InvalidSmsRoleTrustRelationshipException, value interface{}) error { +func awsAwsjson11_deserializeDocumentLogoutURLsListType(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -17834,39 +20209,35 @@ func awsAwsjson11_deserializeDocumentInvalidSmsRoleTrustRelationshipException(v return nil } - shape, ok := value.(map[string]interface{}) + shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InvalidSmsRoleTrustRelationshipException + var cv []string if *v == nil { - sv = &types.InvalidSmsRoleTrustRelationshipException{} + cv = []string{} } else { - sv = *v + cv = *v } - for key, value := range shape { - switch key { - case "message", "Message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected MessageType to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RedirectUrlType to be of type string, got %T instead", value) } - - default: - _, _ = key, value - + col = jtv } + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsAwsjson11_deserializeDocumentInvalidUserPoolConfigurationException(v **types.InvalidUserPoolConfigurationException, value interface{}) error { +func awsAwsjson11_deserializeDocumentManagedLoginBrandingExistsException(v **types.ManagedLoginBrandingExistsException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -17879,9 +20250,9 @@ func awsAwsjson11_deserializeDocumentInvalidUserPoolConfigurationException(v **t return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InvalidUserPoolConfigurationException + var sv *types.ManagedLoginBrandingExistsException if *v == nil { - sv = &types.InvalidUserPoolConfigurationException{} + sv = &types.ManagedLoginBrandingExistsException{} } else { sv = *v } @@ -17906,7 +20277,7 @@ func awsAwsjson11_deserializeDocumentInvalidUserPoolConfigurationException(v **t return nil } -func awsAwsjson11_deserializeDocumentLambdaConfigType(v **types.LambdaConfigType, value interface{}) error { +func awsAwsjson11_deserializeDocumentManagedLoginBrandingType(v **types.ManagedLoginBrandingType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -17919,127 +20290,140 @@ func awsAwsjson11_deserializeDocumentLambdaConfigType(v **types.LambdaConfigType return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.LambdaConfigType + var sv *types.ManagedLoginBrandingType if *v == nil { - sv = &types.LambdaConfigType{} + sv = &types.ManagedLoginBrandingType{} } else { sv = *v } for key, value := range shape { switch key { - case "CreateAuthChallenge": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ArnType to be of type string, got %T instead", value) - } - sv.CreateAuthChallenge = ptr.String(jtv) - } - - case "CustomEmailSender": - if err := awsAwsjson11_deserializeDocumentCustomEmailLambdaVersionConfigType(&sv.CustomEmailSender, value); err != nil { + case "Assets": + if err := awsAwsjson11_deserializeDocumentAssetListType(&sv.Assets, value); err != nil { return err } - case "CustomMessage": + case "CreationDate": if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ArnType to be of type string, got %T instead", value) - } - sv.CustomMessage = ptr.String(jtv) - } + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreationDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) - case "CustomSMSSender": - if err := awsAwsjson11_deserializeDocumentCustomSMSLambdaVersionConfigType(&sv.CustomSMSSender, value); err != nil { - return err - } + default: + return fmt.Errorf("expected DateType to be a JSON Number, got %T instead", value) - case "DefineAuthChallenge": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ArnType to be of type string, got %T instead", value) } - sv.DefineAuthChallenge = ptr.String(jtv) } - case "KMSKeyID": + case "LastModifiedDate": if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ArnType to be of type string, got %T instead", value) - } - sv.KMSKeyID = ptr.String(jtv) - } + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastModifiedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateType to be a JSON Number, got %T instead", value) - case "PostAuthentication": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ArnType to be of type string, got %T instead", value) } - sv.PostAuthentication = ptr.String(jtv) } - case "PostConfirmation": + case "ManagedLoginBrandingId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ArnType to be of type string, got %T instead", value) + return fmt.Errorf("expected ManagedLoginBrandingIdType to be of type string, got %T instead", value) } - sv.PostConfirmation = ptr.String(jtv) + sv.ManagedLoginBrandingId = ptr.String(jtv) } - case "PreAuthentication": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ArnType to be of type string, got %T instead", value) - } - sv.PreAuthentication = ptr.String(jtv) + case "Settings": + if err := awsAwsjson11_deserializeDocumentDocument(&sv.Settings, value); err != nil { + return err } - case "PreSignUp": + case "UseCognitoProvidedValues": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(bool) if !ok { - return fmt.Errorf("expected ArnType to be of type string, got %T instead", value) + return fmt.Errorf("expected BooleanType to be of type *bool, got %T instead", value) } - sv.PreSignUp = ptr.String(jtv) + sv.UseCognitoProvidedValues = jtv } - case "PreTokenGeneration": + case "UserPoolId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ArnType to be of type string, got %T instead", value) + return fmt.Errorf("expected UserPoolIdType to be of type string, got %T instead", value) } - sv.PreTokenGeneration = ptr.String(jtv) + sv.UserPoolId = ptr.String(jtv) } - case "PreTokenGenerationConfig": - if err := awsAwsjson11_deserializeDocumentPreTokenGenerationVersionConfigType(&sv.PreTokenGenerationConfig, value); err != nil { - return err + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentMessageTemplateType(v **types.MessageTemplateType, 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.MessageTemplateType + if *v == nil { + sv = &types.MessageTemplateType{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "EmailMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EmailInviteMessageType to be of type string, got %T instead", value) + } + sv.EmailMessage = ptr.String(jtv) } - case "UserMigration": + case "EmailSubject": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ArnType to be of type string, got %T instead", value) + return fmt.Errorf("expected EmailVerificationSubjectType to be of type string, got %T instead", value) } - sv.UserMigration = ptr.String(jtv) + sv.EmailSubject = ptr.String(jtv) } - case "VerifyAuthChallengeResponse": + case "SMSMessage": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ArnType to be of type string, got %T instead", value) + return fmt.Errorf("expected SmsInviteMessageType to be of type string, got %T instead", value) } - sv.VerifyAuthChallengeResponse = ptr.String(jtv) + sv.SMSMessage = ptr.String(jtv) } default: @@ -18051,7 +20435,7 @@ func awsAwsjson11_deserializeDocumentLambdaConfigType(v **types.LambdaConfigType return nil } -func awsAwsjson11_deserializeDocumentLimitExceededException(v **types.LimitExceededException, value interface{}) error { +func awsAwsjson11_deserializeDocumentMFAMethodNotFoundException(v **types.MFAMethodNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -18064,9 +20448,9 @@ func awsAwsjson11_deserializeDocumentLimitExceededException(v **types.LimitExcee return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.LimitExceededException + var sv *types.MFAMethodNotFoundException if *v == nil { - sv = &types.LimitExceededException{} + sv = &types.MFAMethodNotFoundException{} } else { sv = *v } @@ -18091,7 +20475,7 @@ func awsAwsjson11_deserializeDocumentLimitExceededException(v **types.LimitExcee return nil } -func awsAwsjson11_deserializeDocumentListOfStringTypes(v *[]string, value interface{}) error { +func awsAwsjson11_deserializeDocumentMFAOptionListType(v *[]types.MFAOptionType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -18104,22 +20488,20 @@ func awsAwsjson11_deserializeDocumentListOfStringTypes(v *[]string, value interf return fmt.Errorf("unexpected JSON type %v", value) } - var cv []string + var cv []types.MFAOptionType if *v == nil { - cv = []string{} + cv = []types.MFAOptionType{} } else { cv = *v } for _, value := range shape { - var col string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StringType to be of type string, got %T instead", value) - } - col = jtv + var col types.MFAOptionType + destAddr := &col + if err := awsAwsjson11_deserializeDocumentMFAOptionType(&destAddr, value); err != nil { + return err } + col = *destAddr cv = append(cv, col) } @@ -18127,7 +20509,7 @@ func awsAwsjson11_deserializeDocumentListOfStringTypes(v *[]string, value interf return nil } -func awsAwsjson11_deserializeDocumentLogConfigurationListType(v *[]types.LogConfigurationType, value interface{}) error { +func awsAwsjson11_deserializeDocumentMFAOptionType(v **types.MFAOptionType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -18135,33 +20517,48 @@ func awsAwsjson11_deserializeDocumentLogConfigurationListType(v *[]types.LogConf return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.LogConfigurationType + var sv *types.MFAOptionType if *v == nil { - cv = []types.LogConfigurationType{} + sv = &types.MFAOptionType{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.LogConfigurationType - destAddr := &col - if err := awsAwsjson11_deserializeDocumentLogConfigurationType(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + case "AttributeName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AttributeNameType to be of type string, got %T instead", value) + } + sv.AttributeName = ptr.String(jtv) + } + + case "DeliveryMedium": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DeliveryMediumType to be of type string, got %T instead", value) + } + sv.DeliveryMedium = types.DeliveryMediumType(jtv) + } + + default: + _, _ = key, value + } } - *v = cv + *v = sv return nil } -func awsAwsjson11_deserializeDocumentLogConfigurationType(v **types.LogConfigurationType, value interface{}) error { +func awsAwsjson11_deserializeDocumentNewDeviceMetadataType(v **types.NewDeviceMetadataType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -18174,46 +20571,31 @@ func awsAwsjson11_deserializeDocumentLogConfigurationType(v **types.LogConfigura return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.LogConfigurationType + var sv *types.NewDeviceMetadataType if *v == nil { - sv = &types.LogConfigurationType{} + sv = &types.NewDeviceMetadataType{} } else { sv = *v } for key, value := range shape { switch key { - case "CloudWatchLogsConfiguration": - if err := awsAwsjson11_deserializeDocumentCloudWatchLogsConfigurationType(&sv.CloudWatchLogsConfiguration, value); err != nil { - return err - } - - case "EventSource": + case "DeviceGroupKey": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EventSourceName to be of type string, got %T instead", value) + return fmt.Errorf("expected StringType to be of type string, got %T instead", value) } - sv.EventSource = types.EventSourceName(jtv) - } - - case "FirehoseConfiguration": - if err := awsAwsjson11_deserializeDocumentFirehoseConfigurationType(&sv.FirehoseConfiguration, value); err != nil { - return err + sv.DeviceGroupKey = ptr.String(jtv) } - case "LogLevel": + case "DeviceKey": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected LogLevel to be of type string, got %T instead", value) + return fmt.Errorf("expected DeviceKeyType to be of type string, got %T instead", value) } - sv.LogLevel = types.LogLevel(jtv) - } - - case "S3Configuration": - if err := awsAwsjson11_deserializeDocumentS3ConfigurationType(&sv.S3Configuration, value); err != nil { - return err + sv.DeviceKey = ptr.String(jtv) } default: @@ -18225,7 +20607,7 @@ func awsAwsjson11_deserializeDocumentLogConfigurationType(v **types.LogConfigura return nil } -func awsAwsjson11_deserializeDocumentLogDeliveryConfigurationType(v **types.LogDeliveryConfigurationType, value interface{}) error { +func awsAwsjson11_deserializeDocumentNotAuthorizedException(v **types.NotAuthorizedException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -18238,27 +20620,22 @@ func awsAwsjson11_deserializeDocumentLogDeliveryConfigurationType(v **types.LogD return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.LogDeliveryConfigurationType + var sv *types.NotAuthorizedException if *v == nil { - sv = &types.LogDeliveryConfigurationType{} + sv = &types.NotAuthorizedException{} } else { sv = *v } for key, value := range shape { switch key { - case "LogConfigurations": - if err := awsAwsjson11_deserializeDocumentLogConfigurationListType(&sv.LogConfigurations, value); err != nil { - return err - } - - case "UserPoolId": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected UserPoolIdType to be of type string, got %T instead", value) + return fmt.Errorf("expected MessageType to be of type string, got %T instead", value) } - sv.UserPoolId = ptr.String(jtv) + sv.Message = ptr.String(jtv) } default: @@ -18270,7 +20647,7 @@ func awsAwsjson11_deserializeDocumentLogDeliveryConfigurationType(v **types.LogD return nil } -func awsAwsjson11_deserializeDocumentLogoutURLsListType(v *[]string, value interface{}) error { +func awsAwsjson11_deserializeDocumentNotifyConfigurationType(v **types.NotifyConfigurationType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -18278,35 +20655,72 @@ func awsAwsjson11_deserializeDocumentLogoutURLsListType(v *[]string, value inter return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []string + var sv *types.NotifyConfigurationType if *v == nil { - cv = []string{} + sv = &types.NotifyConfigurationType{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected RedirectUrlType to be of type string, got %T instead", value) + for key, value := range shape { + switch key { + case "BlockEmail": + if err := awsAwsjson11_deserializeDocumentNotifyEmailType(&sv.BlockEmail, value); err != nil { + return err } - col = jtv - } - cv = append(cv, col) + case "From": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StringType to be of type string, got %T instead", value) + } + sv.From = ptr.String(jtv) + } + + case "MfaEmail": + if err := awsAwsjson11_deserializeDocumentNotifyEmailType(&sv.MfaEmail, value); err != nil { + return err + } + + case "NoActionEmail": + if err := awsAwsjson11_deserializeDocumentNotifyEmailType(&sv.NoActionEmail, value); err != nil { + return err + } + + case "ReplyTo": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StringType to be of type string, got %T instead", value) + } + sv.ReplyTo = ptr.String(jtv) + } + + case "SourceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ArnType to be of type string, got %T instead", value) + } + sv.SourceArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } } - *v = cv + *v = sv return nil } -func awsAwsjson11_deserializeDocumentMessageTemplateType(v **types.MessageTemplateType, value interface{}) error { +func awsAwsjson11_deserializeDocumentNotifyEmailType(v **types.NotifyEmailType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -18319,40 +20733,40 @@ func awsAwsjson11_deserializeDocumentMessageTemplateType(v **types.MessageTempla return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.MessageTemplateType + var sv *types.NotifyEmailType if *v == nil { - sv = &types.MessageTemplateType{} + sv = &types.NotifyEmailType{} } else { sv = *v } for key, value := range shape { switch key { - case "EmailMessage": + case "HtmlBody": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EmailVerificationMessageType to be of type string, got %T instead", value) + return fmt.Errorf("expected EmailNotificationBodyType to be of type string, got %T instead", value) } - sv.EmailMessage = ptr.String(jtv) + sv.HtmlBody = ptr.String(jtv) } - case "EmailSubject": + case "Subject": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EmailVerificationSubjectType to be of type string, got %T instead", value) + return fmt.Errorf("expected EmailNotificationSubjectType to be of type string, got %T instead", value) } - sv.EmailSubject = ptr.String(jtv) + sv.Subject = ptr.String(jtv) } - case "SMSMessage": + case "TextBody": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SmsVerificationMessageType to be of type string, got %T instead", value) + return fmt.Errorf("expected EmailNotificationBodyType to be of type string, got %T instead", value) } - sv.SMSMessage = ptr.String(jtv) + sv.TextBody = ptr.String(jtv) } default: @@ -18364,7 +20778,7 @@ func awsAwsjson11_deserializeDocumentMessageTemplateType(v **types.MessageTempla return nil } -func awsAwsjson11_deserializeDocumentMFAMethodNotFoundException(v **types.MFAMethodNotFoundException, value interface{}) error { +func awsAwsjson11_deserializeDocumentNumberAttributeConstraintsType(v **types.NumberAttributeConstraintsType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -18377,22 +20791,31 @@ func awsAwsjson11_deserializeDocumentMFAMethodNotFoundException(v **types.MFAMet return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.MFAMethodNotFoundException + var sv *types.NumberAttributeConstraintsType if *v == nil { - sv = &types.MFAMethodNotFoundException{} + sv = &types.NumberAttributeConstraintsType{} } else { sv = *v } for key, value := range shape { switch key { - case "message", "Message": + case "MaxValue": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected MessageType to be of type string, got %T instead", value) + return fmt.Errorf("expected StringType to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.MaxValue = ptr.String(jtv) + } + + case "MinValue": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StringType to be of type string, got %T instead", value) + } + sv.MinValue = ptr.String(jtv) } default: @@ -18404,7 +20827,7 @@ func awsAwsjson11_deserializeDocumentMFAMethodNotFoundException(v **types.MFAMet return nil } -func awsAwsjson11_deserializeDocumentMFAOptionListType(v *[]types.MFAOptionType, value interface{}) error { +func awsAwsjson11_deserializeDocumentOAuthFlowsType(v *[]types.OAuthFlowType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -18417,20 +20840,22 @@ func awsAwsjson11_deserializeDocumentMFAOptionListType(v *[]types.MFAOptionType, return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.MFAOptionType + var cv []types.OAuthFlowType if *v == nil { - cv = []types.MFAOptionType{} + cv = []types.OAuthFlowType{} } else { cv = *v } for _, value := range shape { - var col types.MFAOptionType - destAddr := &col - if err := awsAwsjson11_deserializeDocumentMFAOptionType(&destAddr, value); err != nil { - return err + var col types.OAuthFlowType + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OAuthFlowType to be of type string, got %T instead", value) + } + col = types.OAuthFlowType(jtv) } - col = *destAddr cv = append(cv, col) } @@ -18438,7 +20863,7 @@ func awsAwsjson11_deserializeDocumentMFAOptionListType(v *[]types.MFAOptionType, return nil } -func awsAwsjson11_deserializeDocumentMFAOptionType(v **types.MFAOptionType, value interface{}) error { +func awsAwsjson11_deserializeDocumentPasswordHistoryPolicyViolationException(v **types.PasswordHistoryPolicyViolationException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -18451,31 +20876,22 @@ func awsAwsjson11_deserializeDocumentMFAOptionType(v **types.MFAOptionType, valu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.MFAOptionType + var sv *types.PasswordHistoryPolicyViolationException if *v == nil { - sv = &types.MFAOptionType{} + sv = &types.PasswordHistoryPolicyViolationException{} } else { sv = *v } for key, value := range shape { switch key { - case "AttributeName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AttributeNameType to be of type string, got %T instead", value) - } - sv.AttributeName = ptr.String(jtv) - } - - case "DeliveryMedium": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected DeliveryMediumType to be of type string, got %T instead", value) + return fmt.Errorf("expected MessageType to be of type string, got %T instead", value) } - sv.DeliveryMedium = types.DeliveryMediumType(jtv) + sv.Message = ptr.String(jtv) } default: @@ -18487,7 +20903,7 @@ func awsAwsjson11_deserializeDocumentMFAOptionType(v **types.MFAOptionType, valu return nil } -func awsAwsjson11_deserializeDocumentNewDeviceMetadataType(v **types.NewDeviceMetadataType, value interface{}) error { +func awsAwsjson11_deserializeDocumentPasswordPolicyType(v **types.PasswordPolicyType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -18500,31 +20916,88 @@ func awsAwsjson11_deserializeDocumentNewDeviceMetadataType(v **types.NewDeviceMe return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.NewDeviceMetadataType + var sv *types.PasswordPolicyType if *v == nil { - sv = &types.NewDeviceMetadataType{} + sv = &types.PasswordPolicyType{} } else { sv = *v } for key, value := range shape { switch key { - case "DeviceGroupKey": + case "MinimumLength": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected StringType to be of type string, got %T instead", value) + return fmt.Errorf("expected PasswordPolicyMinLengthType to be json.Number, got %T instead", value) } - sv.DeviceGroupKey = ptr.String(jtv) + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MinimumLength = ptr.Int32(int32(i64)) } - case "DeviceKey": + case "PasswordHistorySize": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected DeviceKeyType to be of type string, got %T instead", value) + return fmt.Errorf("expected PasswordHistorySizeType to be json.Number, got %T instead", value) } - sv.DeviceKey = ptr.String(jtv) + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.PasswordHistorySize = ptr.Int32(int32(i64)) + } + + case "RequireLowercase": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected BooleanType to be of type *bool, got %T instead", value) + } + sv.RequireLowercase = jtv + } + + case "RequireNumbers": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected BooleanType to be of type *bool, got %T instead", value) + } + sv.RequireNumbers = jtv + } + + case "RequireSymbols": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected BooleanType to be of type *bool, got %T instead", value) + } + sv.RequireSymbols = jtv + } + + case "RequireUppercase": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected BooleanType to be of type *bool, got %T instead", value) + } + sv.RequireUppercase = jtv + } + + case "TemporaryPasswordValidityDays": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected TemporaryPasswordValidityDaysType to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TemporaryPasswordValidityDays = int32(i64) } default: @@ -18536,7 +21009,7 @@ func awsAwsjson11_deserializeDocumentNewDeviceMetadataType(v **types.NewDeviceMe return nil } -func awsAwsjson11_deserializeDocumentNotAuthorizedException(v **types.NotAuthorizedException, value interface{}) error { +func awsAwsjson11_deserializeDocumentPasswordResetRequiredException(v **types.PasswordResetRequiredException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -18549,9 +21022,9 @@ func awsAwsjson11_deserializeDocumentNotAuthorizedException(v **types.NotAuthori return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.NotAuthorizedException + var sv *types.PasswordResetRequiredException if *v == nil { - sv = &types.NotAuthorizedException{} + sv = &types.PasswordResetRequiredException{} } else { sv = *v } @@ -18576,7 +21049,7 @@ func awsAwsjson11_deserializeDocumentNotAuthorizedException(v **types.NotAuthori return nil } -func awsAwsjson11_deserializeDocumentNotifyConfigurationType(v **types.NotifyConfigurationType, value interface{}) error { +func awsAwsjson11_deserializeDocumentPreconditionNotMetException(v **types.PreconditionNotMetException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -18589,55 +21062,22 @@ func awsAwsjson11_deserializeDocumentNotifyConfigurationType(v **types.NotifyCon return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.NotifyConfigurationType + var sv *types.PreconditionNotMetException if *v == nil { - sv = &types.NotifyConfigurationType{} + sv = &types.PreconditionNotMetException{} } else { sv = *v } for key, value := range shape { switch key { - case "BlockEmail": - if err := awsAwsjson11_deserializeDocumentNotifyEmailType(&sv.BlockEmail, value); err != nil { - return err - } - - case "From": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StringType to be of type string, got %T instead", value) - } - sv.From = ptr.String(jtv) - } - - case "MfaEmail": - if err := awsAwsjson11_deserializeDocumentNotifyEmailType(&sv.MfaEmail, value); err != nil { - return err - } - - case "NoActionEmail": - if err := awsAwsjson11_deserializeDocumentNotifyEmailType(&sv.NoActionEmail, value); err != nil { - return err - } - - case "ReplyTo": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StringType to be of type string, got %T instead", value) - } - sv.ReplyTo = ptr.String(jtv) - } - - case "SourceArn": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ArnType to be of type string, got %T instead", value) + return fmt.Errorf("expected MessageType to be of type string, got %T instead", value) } - sv.SourceArn = ptr.String(jtv) + sv.Message = ptr.String(jtv) } default: @@ -18649,7 +21089,7 @@ func awsAwsjson11_deserializeDocumentNotifyConfigurationType(v **types.NotifyCon return nil } -func awsAwsjson11_deserializeDocumentNotifyEmailType(v **types.NotifyEmailType, value interface{}) error { +func awsAwsjson11_deserializeDocumentPreTokenGenerationVersionConfigType(v **types.PreTokenGenerationVersionConfigType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -18662,40 +21102,31 @@ func awsAwsjson11_deserializeDocumentNotifyEmailType(v **types.NotifyEmailType, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.NotifyEmailType + var sv *types.PreTokenGenerationVersionConfigType if *v == nil { - sv = &types.NotifyEmailType{} + sv = &types.PreTokenGenerationVersionConfigType{} } else { sv = *v } for key, value := range shape { switch key { - case "HtmlBody": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EmailNotificationBodyType to be of type string, got %T instead", value) - } - sv.HtmlBody = ptr.String(jtv) - } - - case "Subject": + case "LambdaArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EmailNotificationSubjectType to be of type string, got %T instead", value) + return fmt.Errorf("expected ArnType to be of type string, got %T instead", value) } - sv.Subject = ptr.String(jtv) + sv.LambdaArn = ptr.String(jtv) } - case "TextBody": + case "LambdaVersion": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EmailNotificationBodyType to be of type string, got %T instead", value) + return fmt.Errorf("expected PreTokenGenerationLambdaVersionType to be of type string, got %T instead", value) } - sv.TextBody = ptr.String(jtv) + sv.LambdaVersion = types.PreTokenGenerationLambdaVersionType(jtv) } default: @@ -18707,7 +21138,7 @@ func awsAwsjson11_deserializeDocumentNotifyEmailType(v **types.NotifyEmailType, return nil } -func awsAwsjson11_deserializeDocumentNumberAttributeConstraintsType(v **types.NumberAttributeConstraintsType, value interface{}) error { +func awsAwsjson11_deserializeDocumentProviderDescription(v **types.ProviderDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -18720,31 +21151,63 @@ func awsAwsjson11_deserializeDocumentNumberAttributeConstraintsType(v **types.Nu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.NumberAttributeConstraintsType + var sv *types.ProviderDescription if *v == nil { - sv = &types.NumberAttributeConstraintsType{} + sv = &types.ProviderDescription{} } else { sv = *v } for key, value := range shape { switch key { - case "MaxValue": + 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 DateType to be a JSON Number, got %T instead", value) + + } + } + + case "LastModifiedDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastModifiedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateType to be a JSON Number, got %T instead", value) + + } + } + + case "ProviderName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected StringType to be of type string, got %T instead", value) + return fmt.Errorf("expected ProviderNameType to be of type string, got %T instead", value) } - sv.MaxValue = ptr.String(jtv) + sv.ProviderName = ptr.String(jtv) } - case "MinValue": + case "ProviderType": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected StringType to be of type string, got %T instead", value) + return fmt.Errorf("expected IdentityProviderTypeType to be of type string, got %T instead", value) } - sv.MinValue = ptr.String(jtv) + sv.ProviderType = types.IdentityProviderTypeType(jtv) } default: @@ -18752,11 +21215,47 @@ func awsAwsjson11_deserializeDocumentNumberAttributeConstraintsType(v **types.Nu } } - *v = sv + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentProviderDetailsType(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 awsAwsjson11_deserializeDocumentOAuthFlowsType(v *[]types.OAuthFlowType, value interface{}) error { +func awsAwsjson11_deserializeDocumentProvidersListType(v *[]types.ProviderDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -18769,22 +21268,20 @@ func awsAwsjson11_deserializeDocumentOAuthFlowsType(v *[]types.OAuthFlowType, va return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.OAuthFlowType + var cv []types.ProviderDescription if *v == nil { - cv = []types.OAuthFlowType{} + cv = []types.ProviderDescription{} } else { cv = *v } for _, value := range shape { - var col types.OAuthFlowType - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected OAuthFlowType to be of type string, got %T instead", value) - } - col = types.OAuthFlowType(jtv) + var col types.ProviderDescription + destAddr := &col + if err := awsAwsjson11_deserializeDocumentProviderDescription(&destAddr, value); err != nil { + return err } + col = *destAddr cv = append(cv, col) } @@ -18792,7 +21289,7 @@ func awsAwsjson11_deserializeDocumentOAuthFlowsType(v *[]types.OAuthFlowType, va return nil } -func awsAwsjson11_deserializeDocumentPasswordHistoryPolicyViolationException(v **types.PasswordHistoryPolicyViolationException, value interface{}) error { +func awsAwsjson11_deserializeDocumentRecoveryMechanismsType(v *[]types.RecoveryOptionType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -18800,39 +21297,33 @@ func awsAwsjson11_deserializeDocumentPasswordHistoryPolicyViolationException(v * return nil } - shape, ok := value.(map[string]interface{}) + shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.PasswordHistoryPolicyViolationException + var cv []types.RecoveryOptionType if *v == nil { - sv = &types.PasswordHistoryPolicyViolationException{} + cv = []types.RecoveryOptionType{} } else { - sv = *v + cv = *v } - for key, value := range shape { - switch key { - case "message", "Message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected MessageType to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - + for _, value := range shape { + var col types.RecoveryOptionType + destAddr := &col + if err := awsAwsjson11_deserializeDocumentRecoveryOptionType(&destAddr, value); err != nil { + return err } + col = *destAddr + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsAwsjson11_deserializeDocumentPasswordPolicyType(v **types.PasswordPolicyType, value interface{}) error { +func awsAwsjson11_deserializeDocumentRecoveryOptionType(v **types.RecoveryOptionType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -18845,88 +21336,35 @@ func awsAwsjson11_deserializeDocumentPasswordPolicyType(v **types.PasswordPolicy return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.PasswordPolicyType + var sv *types.RecoveryOptionType if *v == nil { - sv = &types.PasswordPolicyType{} + sv = &types.RecoveryOptionType{} } else { sv = *v } for key, value := range shape { switch key { - case "MinimumLength": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected PasswordPolicyMinLengthType to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.MinimumLength = ptr.Int32(int32(i64)) - } - - case "PasswordHistorySize": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected PasswordHistorySizeType to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.PasswordHistorySize = ptr.Int32(int32(i64)) - } - - case "RequireLowercase": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected BooleanType to be of type *bool, got %T instead", value) - } - sv.RequireLowercase = jtv - } - - case "RequireNumbers": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected BooleanType to be of type *bool, got %T instead", value) - } - sv.RequireNumbers = jtv - } - - case "RequireSymbols": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected BooleanType to be of type *bool, got %T instead", value) - } - sv.RequireSymbols = jtv - } - - case "RequireUppercase": + case "Name": if value != nil { - jtv, ok := value.(bool) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected BooleanType to be of type *bool, got %T instead", value) + return fmt.Errorf("expected RecoveryOptionNameType to be of type string, got %T instead", value) } - sv.RequireUppercase = jtv + sv.Name = types.RecoveryOptionNameType(jtv) } - case "TemporaryPasswordValidityDays": + case "Priority": if value != nil { jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected TemporaryPasswordValidityDaysType to be json.Number, got %T instead", value) + return fmt.Errorf("expected PriorityType to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } - sv.TemporaryPasswordValidityDays = int32(i64) + sv.Priority = ptr.Int32(int32(i64)) } default: @@ -18938,7 +21376,7 @@ func awsAwsjson11_deserializeDocumentPasswordPolicyType(v **types.PasswordPolicy return nil } -func awsAwsjson11_deserializeDocumentPasswordResetRequiredException(v **types.PasswordResetRequiredException, value interface{}) error { +func awsAwsjson11_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -18951,9 +21389,9 @@ func awsAwsjson11_deserializeDocumentPasswordResetRequiredException(v **types.Pa return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.PasswordResetRequiredException + var sv *types.ResourceNotFoundException if *v == nil { - sv = &types.PasswordResetRequiredException{} + sv = &types.ResourceNotFoundException{} } else { sv = *v } @@ -18978,7 +21416,41 @@ func awsAwsjson11_deserializeDocumentPasswordResetRequiredException(v **types.Pa return nil } -func awsAwsjson11_deserializeDocumentPreconditionNotMetException(v **types.PreconditionNotMetException, value interface{}) error { +func awsAwsjson11_deserializeDocumentResourceServerScopeListType(v *[]types.ResourceServerScopeType, 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.ResourceServerScopeType + if *v == nil { + cv = []types.ResourceServerScopeType{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ResourceServerScopeType + destAddr := &col + if err := awsAwsjson11_deserializeDocumentResourceServerScopeType(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentResourceServerScopeType(v **types.ResourceServerScopeType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -18991,22 +21463,31 @@ func awsAwsjson11_deserializeDocumentPreconditionNotMetException(v **types.Preco return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.PreconditionNotMetException + var sv *types.ResourceServerScopeType if *v == nil { - sv = &types.PreconditionNotMetException{} + sv = &types.ResourceServerScopeType{} } else { sv = *v } for key, value := range shape { switch key { - case "message", "Message": + case "ScopeDescription": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected MessageType to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceServerScopeDescriptionType to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.ScopeDescription = ptr.String(jtv) + } + + case "ScopeName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceServerScopeNameType to be of type string, got %T instead", value) + } + sv.ScopeName = ptr.String(jtv) } default: @@ -19018,7 +21499,41 @@ func awsAwsjson11_deserializeDocumentPreconditionNotMetException(v **types.Preco return nil } -func awsAwsjson11_deserializeDocumentPreTokenGenerationVersionConfigType(v **types.PreTokenGenerationVersionConfigType, value interface{}) error { +func awsAwsjson11_deserializeDocumentResourceServersListType(v *[]types.ResourceServerType, 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.ResourceServerType + if *v == nil { + cv = []types.ResourceServerType{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ResourceServerType + destAddr := &col + if err := awsAwsjson11_deserializeDocumentResourceServerType(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentResourceServerType(v **types.ResourceServerType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -19031,31 +21546,45 @@ func awsAwsjson11_deserializeDocumentPreTokenGenerationVersionConfigType(v **typ return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.PreTokenGenerationVersionConfigType + var sv *types.ResourceServerType if *v == nil { - sv = &types.PreTokenGenerationVersionConfigType{} + sv = &types.ResourceServerType{} } else { sv = *v } for key, value := range shape { switch key { - case "LambdaArn": + case "Identifier": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ArnType to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceServerIdentifierType 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 ResourceServerNameType to be of type string, got %T instead", value) } - sv.LambdaArn = ptr.String(jtv) + sv.Name = ptr.String(jtv) } - case "LambdaVersion": + case "Scopes": + if err := awsAwsjson11_deserializeDocumentResourceServerScopeListType(&sv.Scopes, value); err != nil { + return err + } + + case "UserPoolId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected PreTokenGenerationLambdaVersionType to be of type string, got %T instead", value) + return fmt.Errorf("expected UserPoolIdType to be of type string, got %T instead", value) } - sv.LambdaVersion = types.PreTokenGenerationLambdaVersionType(jtv) + sv.UserPoolId = ptr.String(jtv) } default: @@ -19067,7 +21596,7 @@ func awsAwsjson11_deserializeDocumentPreTokenGenerationVersionConfigType(v **typ return nil } -func awsAwsjson11_deserializeDocumentProviderDescription(v **types.ProviderDescription, value interface{}) error { +func awsAwsjson11_deserializeDocumentRiskConfigurationType(v **types.RiskConfigurationType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -19080,29 +21609,32 @@ func awsAwsjson11_deserializeDocumentProviderDescription(v **types.ProviderDescr return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ProviderDescription + var sv *types.RiskConfigurationType if *v == nil { - sv = &types.ProviderDescription{} + sv = &types.RiskConfigurationType{} } 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 DateType to be a JSON Number, got %T instead", value) + case "AccountTakeoverRiskConfiguration": + if err := awsAwsjson11_deserializeDocumentAccountTakeoverRiskConfigurationType(&sv.AccountTakeoverRiskConfiguration, value); err != nil { + return err + } + case "ClientId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ClientIdType to be of type string, got %T instead", value) } + sv.ClientId = ptr.String(jtv) + } + + case "CompromisedCredentialsRiskConfiguration": + if err := awsAwsjson11_deserializeDocumentCompromisedCredentialsRiskConfigurationType(&sv.CompromisedCredentialsRiskConfiguration, value); err != nil { + return err } case "LastModifiedDate": @@ -19121,22 +21653,18 @@ func awsAwsjson11_deserializeDocumentProviderDescription(v **types.ProviderDescr } } - case "ProviderName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ProviderNameType to be of type string, got %T instead", value) - } - sv.ProviderName = ptr.String(jtv) + case "RiskExceptionConfiguration": + if err := awsAwsjson11_deserializeDocumentRiskExceptionConfigurationType(&sv.RiskExceptionConfiguration, value); err != nil { + return err } - case "ProviderType": + case "UserPoolId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected IdentityProviderTypeType to be of type string, got %T instead", value) + return fmt.Errorf("expected UserPoolIdType to be of type string, got %T instead", value) } - sv.ProviderType = types.IdentityProviderTypeType(jtv) + sv.UserPoolId = ptr.String(jtv) } default: @@ -19148,7 +21676,7 @@ func awsAwsjson11_deserializeDocumentProviderDescription(v **types.ProviderDescr return nil } -func awsAwsjson11_deserializeDocumentProviderDetailsType(v *map[string]string, value interface{}) error { +func awsAwsjson11_deserializeDocumentRiskExceptionConfigurationType(v **types.RiskExceptionConfigurationType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -19161,30 +21689,35 @@ func awsAwsjson11_deserializeDocumentProviderDetailsType(v *map[string]string, v return fmt.Errorf("unexpected JSON type %v", value) } - var mv map[string]string + var sv *types.RiskExceptionConfigurationType if *v == nil { - mv = map[string]string{} + sv = &types.RiskExceptionConfigurationType{} } 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 "BlockedIPRangeList": + if err := awsAwsjson11_deserializeDocumentBlockedIPRangeListType(&sv.BlockedIPRangeList, value); err != nil { + return err } - parsedVal = jtv - } - mv[key] = parsedVal + case "SkippedIPRangeList": + if err := awsAwsjson11_deserializeDocumentSkippedIPRangeListType(&sv.SkippedIPRangeList, value); err != nil { + return err + } + + default: + _, _ = key, value + + } } - *v = mv + *v = sv return nil } -func awsAwsjson11_deserializeDocumentProvidersListType(v *[]types.ProviderDescription, value interface{}) error { +func awsAwsjson11_deserializeDocumentS3ConfigurationType(v **types.S3ConfigurationType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -19192,33 +21725,39 @@ func awsAwsjson11_deserializeDocumentProvidersListType(v *[]types.ProviderDescri return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.ProviderDescription + var sv *types.S3ConfigurationType if *v == nil { - cv = []types.ProviderDescription{} + sv = &types.S3ConfigurationType{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.ProviderDescription - destAddr := &col - if err := awsAwsjson11_deserializeDocumentProviderDescription(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + case "BucketArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3ArnType to be of type string, got %T instead", value) + } + sv.BucketArn = ptr.String(jtv) + } + + default: + _, _ = key, value + } } - *v = cv + *v = sv return nil } -func awsAwsjson11_deserializeDocumentRecoveryMechanismsType(v *[]types.RecoveryOptionType, value interface{}) error { +func awsAwsjson11_deserializeDocumentSchemaAttributesListType(v *[]types.SchemaAttributeType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -19231,17 +21770,17 @@ func awsAwsjson11_deserializeDocumentRecoveryMechanismsType(v *[]types.RecoveryO return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.RecoveryOptionType + var cv []types.SchemaAttributeType if *v == nil { - cv = []types.RecoveryOptionType{} + cv = []types.SchemaAttributeType{} } else { cv = *v } for _, value := range shape { - var col types.RecoveryOptionType + var col types.SchemaAttributeType destAddr := &col - if err := awsAwsjson11_deserializeDocumentRecoveryOptionType(&destAddr, value); err != nil { + if err := awsAwsjson11_deserializeDocumentSchemaAttributeType(&destAddr, value); err != nil { return err } col = *destAddr @@ -19252,7 +21791,7 @@ func awsAwsjson11_deserializeDocumentRecoveryMechanismsType(v *[]types.RecoveryO return nil } -func awsAwsjson11_deserializeDocumentRecoveryOptionType(v **types.RecoveryOptionType, value interface{}) error { +func awsAwsjson11_deserializeDocumentSchemaAttributeType(v **types.SchemaAttributeType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -19265,35 +21804,68 @@ func awsAwsjson11_deserializeDocumentRecoveryOptionType(v **types.RecoveryOption return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.RecoveryOptionType + var sv *types.SchemaAttributeType if *v == nil { - sv = &types.RecoveryOptionType{} + sv = &types.SchemaAttributeType{} } else { sv = *v } for key, value := range shape { switch key { - case "Name": + case "AttributeDataType": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected RecoveryOptionNameType to be of type string, got %T instead", value) + return fmt.Errorf("expected AttributeDataType to be of type string, got %T instead", value) } - sv.Name = types.RecoveryOptionNameType(jtv) + sv.AttributeDataType = types.AttributeDataType(jtv) } - case "Priority": + case "DeveloperOnlyAttribute": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(bool) if !ok { - return fmt.Errorf("expected PriorityType to be json.Number, got %T instead", value) + return fmt.Errorf("expected BooleanType to be of type *bool, got %T instead", value) } - i64, err := jtv.Int64() - if err != nil { - return err + sv.DeveloperOnlyAttribute = ptr.Bool(jtv) + } + + case "Mutable": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected BooleanType to be of type *bool, got %T instead", value) } - sv.Priority = ptr.Int32(int32(i64)) + sv.Mutable = ptr.Bool(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CustomAttributeNameType to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "NumberAttributeConstraints": + if err := awsAwsjson11_deserializeDocumentNumberAttributeConstraintsType(&sv.NumberAttributeConstraints, value); err != nil { + return err + } + + case "Required": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected BooleanType to be of type *bool, got %T instead", value) + } + sv.Required = ptr.Bool(jtv) + } + + case "StringAttributeConstraints": + if err := awsAwsjson11_deserializeDocumentStringAttributeConstraintsType(&sv.StringAttributeConstraints, value); err != nil { + return err } default: @@ -19305,7 +21877,7 @@ func awsAwsjson11_deserializeDocumentRecoveryOptionType(v **types.RecoveryOption return nil } -func awsAwsjson11_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error { +func awsAwsjson11_deserializeDocumentScopeDoesNotExistException(v **types.ScopeDoesNotExistException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -19318,9 +21890,9 @@ func awsAwsjson11_deserializeDocumentResourceNotFoundException(v **types.Resourc return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ResourceNotFoundException + var sv *types.ScopeDoesNotExistException if *v == nil { - sv = &types.ResourceNotFoundException{} + sv = &types.ScopeDoesNotExistException{} } else { sv = *v } @@ -19345,7 +21917,7 @@ func awsAwsjson11_deserializeDocumentResourceNotFoundException(v **types.Resourc return nil } -func awsAwsjson11_deserializeDocumentResourceServerScopeListType(v *[]types.ResourceServerScopeType, value interface{}) error { +func awsAwsjson11_deserializeDocumentScopeListType(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -19358,20 +21930,22 @@ func awsAwsjson11_deserializeDocumentResourceServerScopeListType(v *[]types.Reso return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.ResourceServerScopeType + var cv []string if *v == nil { - cv = []types.ResourceServerScopeType{} + cv = []string{} } else { cv = *v } for _, value := range shape { - var col types.ResourceServerScopeType - destAddr := &col - if err := awsAwsjson11_deserializeDocumentResourceServerScopeType(&destAddr, value); err != nil { - return err + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScopeType to be of type string, got %T instead", value) + } + col = jtv } - col = *destAddr cv = append(cv, col) } @@ -19379,7 +21953,7 @@ func awsAwsjson11_deserializeDocumentResourceServerScopeListType(v *[]types.Reso return nil } -func awsAwsjson11_deserializeDocumentResourceServerScopeType(v **types.ResourceServerScopeType, value interface{}) error { +func awsAwsjson11_deserializeDocumentSignInPolicyType(v **types.SignInPolicyType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -19392,31 +21966,18 @@ func awsAwsjson11_deserializeDocumentResourceServerScopeType(v **types.ResourceS return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ResourceServerScopeType + var sv *types.SignInPolicyType if *v == nil { - sv = &types.ResourceServerScopeType{} + sv = &types.SignInPolicyType{} } else { sv = *v } for key, value := range shape { switch key { - case "ScopeDescription": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ResourceServerScopeDescriptionType to be of type string, got %T instead", value) - } - sv.ScopeDescription = ptr.String(jtv) - } - - case "ScopeName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ResourceServerScopeNameType to be of type string, got %T instead", value) - } - sv.ScopeName = ptr.String(jtv) + case "AllowedFirstAuthFactors": + if err := awsAwsjson11_deserializeDocumentAllowedFirstAuthFactorsListType(&sv.AllowedFirstAuthFactors, value); err != nil { + return err } default: @@ -19428,7 +21989,7 @@ func awsAwsjson11_deserializeDocumentResourceServerScopeType(v **types.ResourceS return nil } -func awsAwsjson11_deserializeDocumentResourceServersListType(v *[]types.ResourceServerType, value interface{}) error { +func awsAwsjson11_deserializeDocumentSkippedIPRangeListType(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -19441,20 +22002,22 @@ func awsAwsjson11_deserializeDocumentResourceServersListType(v *[]types.Resource return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.ResourceServerType + var cv []string if *v == nil { - cv = []types.ResourceServerType{} + cv = []string{} } else { cv = *v } for _, value := range shape { - var col types.ResourceServerType - destAddr := &col - if err := awsAwsjson11_deserializeDocumentResourceServerType(&destAddr, value); err != nil { - return err + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StringType to be of type string, got %T instead", value) + } + col = jtv } - col = *destAddr cv = append(cv, col) } @@ -19462,7 +22025,7 @@ func awsAwsjson11_deserializeDocumentResourceServersListType(v *[]types.Resource return nil } -func awsAwsjson11_deserializeDocumentResourceServerType(v **types.ResourceServerType, value interface{}) error { +func awsAwsjson11_deserializeDocumentSmsConfigurationType(v **types.SmsConfigurationType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -19475,45 +22038,40 @@ func awsAwsjson11_deserializeDocumentResourceServerType(v **types.ResourceServer return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ResourceServerType + var sv *types.SmsConfigurationType if *v == nil { - sv = &types.ResourceServerType{} + sv = &types.SmsConfigurationType{} } else { sv = *v } for key, value := range shape { switch key { - case "Identifier": + case "ExternalId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ResourceServerIdentifierType to be of type string, got %T instead", value) + return fmt.Errorf("expected StringType to be of type string, got %T instead", value) } - sv.Identifier = ptr.String(jtv) + sv.ExternalId = ptr.String(jtv) } - case "Name": + case "SnsCallerArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ResourceServerNameType to be of type string, got %T instead", value) + return fmt.Errorf("expected ArnType to be of type string, got %T instead", value) } - sv.Name = ptr.String(jtv) - } - - case "Scopes": - if err := awsAwsjson11_deserializeDocumentResourceServerScopeListType(&sv.Scopes, value); err != nil { - return err + sv.SnsCallerArn = ptr.String(jtv) } - case "UserPoolId": + case "SnsRegion": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected UserPoolIdType to be of type string, got %T instead", value) + return fmt.Errorf("expected RegionCodeType to be of type string, got %T instead", value) } - sv.UserPoolId = ptr.String(jtv) + sv.SnsRegion = ptr.String(jtv) } default: @@ -19525,7 +22083,7 @@ func awsAwsjson11_deserializeDocumentResourceServerType(v **types.ResourceServer return nil } -func awsAwsjson11_deserializeDocumentRiskConfigurationType(v **types.RiskConfigurationType, value interface{}) error { +func awsAwsjson11_deserializeDocumentSmsMfaConfigType(v **types.SmsMfaConfigType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -19538,62 +22096,67 @@ func awsAwsjson11_deserializeDocumentRiskConfigurationType(v **types.RiskConfigu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.RiskConfigurationType + var sv *types.SmsMfaConfigType if *v == nil { - sv = &types.RiskConfigurationType{} + sv = &types.SmsMfaConfigType{} } else { sv = *v } for key, value := range shape { switch key { - case "AccountTakeoverRiskConfiguration": - if err := awsAwsjson11_deserializeDocumentAccountTakeoverRiskConfigurationType(&sv.AccountTakeoverRiskConfiguration, value); err != nil { - return err - } - - case "ClientId": + case "SmsAuthenticationMessage": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ClientIdType to be of type string, got %T instead", value) + return fmt.Errorf("expected SmsVerificationMessageType to be of type string, got %T instead", value) } - sv.ClientId = ptr.String(jtv) + sv.SmsAuthenticationMessage = ptr.String(jtv) } - case "CompromisedCredentialsRiskConfiguration": - if err := awsAwsjson11_deserializeDocumentCompromisedCredentialsRiskConfigurationType(&sv.CompromisedCredentialsRiskConfiguration, value); err != nil { + case "SmsConfiguration": + if err := awsAwsjson11_deserializeDocumentSmsConfigurationType(&sv.SmsConfiguration, value); err != nil { return err } - case "LastModifiedDate": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LastModifiedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + default: + _, _ = key, value - default: - return fmt.Errorf("expected DateType to be a JSON Number, got %T instead", value) + } + } + *v = sv + return nil +} - } - } +func awsAwsjson11_deserializeDocumentSoftwareTokenMfaConfigType(v **types.SoftwareTokenMfaConfigType, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } - case "RiskExceptionConfiguration": - if err := awsAwsjson11_deserializeDocumentRiskExceptionConfigurationType(&sv.RiskExceptionConfiguration, value); err != nil { - return err - } + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } - case "UserPoolId": + var sv *types.SoftwareTokenMfaConfigType + if *v == nil { + sv = &types.SoftwareTokenMfaConfigType{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Enabled": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(bool) if !ok { - return fmt.Errorf("expected UserPoolIdType to be of type string, got %T instead", value) + return fmt.Errorf("expected BooleanType to be of type *bool, got %T instead", value) } - sv.UserPoolId = ptr.String(jtv) + sv.Enabled = jtv } default: @@ -19605,7 +22168,7 @@ func awsAwsjson11_deserializeDocumentRiskConfigurationType(v **types.RiskConfigu return nil } -func awsAwsjson11_deserializeDocumentRiskExceptionConfigurationType(v **types.RiskExceptionConfigurationType, value interface{}) error { +func awsAwsjson11_deserializeDocumentSoftwareTokenMFANotFoundException(v **types.SoftwareTokenMFANotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -19618,23 +22181,22 @@ func awsAwsjson11_deserializeDocumentRiskExceptionConfigurationType(v **types.Ri return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.RiskExceptionConfigurationType + var sv *types.SoftwareTokenMFANotFoundException if *v == nil { - sv = &types.RiskExceptionConfigurationType{} + sv = &types.SoftwareTokenMFANotFoundException{} } else { sv = *v } for key, value := range shape { switch key { - case "BlockedIPRangeList": - if err := awsAwsjson11_deserializeDocumentBlockedIPRangeListType(&sv.BlockedIPRangeList, value); err != nil { - return err - } - - case "SkippedIPRangeList": - if err := awsAwsjson11_deserializeDocumentSkippedIPRangeListType(&sv.SkippedIPRangeList, value); err != nil { - return err + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MessageType to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) } default: @@ -19646,7 +22208,7 @@ func awsAwsjson11_deserializeDocumentRiskExceptionConfigurationType(v **types.Ri return nil } -func awsAwsjson11_deserializeDocumentS3ConfigurationType(v **types.S3ConfigurationType, value interface{}) error { +func awsAwsjson11_deserializeDocumentStringAttributeConstraintsType(v **types.StringAttributeConstraintsType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -19659,22 +22221,31 @@ func awsAwsjson11_deserializeDocumentS3ConfigurationType(v **types.S3Configurati return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.S3ConfigurationType + var sv *types.StringAttributeConstraintsType if *v == nil { - sv = &types.S3ConfigurationType{} + sv = &types.StringAttributeConstraintsType{} } else { sv = *v } for key, value := range shape { switch key { - case "BucketArn": + case "MaxLength": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected S3ArnType to be of type string, got %T instead", value) + return fmt.Errorf("expected StringType to be of type string, got %T instead", value) } - sv.BucketArn = ptr.String(jtv) + sv.MaxLength = ptr.String(jtv) + } + + case "MinLength": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StringType to be of type string, got %T instead", value) + } + sv.MinLength = ptr.String(jtv) } default: @@ -19686,7 +22257,7 @@ func awsAwsjson11_deserializeDocumentS3ConfigurationType(v **types.S3Configurati return nil } -func awsAwsjson11_deserializeDocumentSchemaAttributesListType(v *[]types.SchemaAttributeType, value interface{}) error { +func awsAwsjson11_deserializeDocumentSupportedIdentityProvidersListType(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -19699,20 +22270,22 @@ func awsAwsjson11_deserializeDocumentSchemaAttributesListType(v *[]types.SchemaA return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.SchemaAttributeType + var cv []string if *v == nil { - cv = []types.SchemaAttributeType{} + cv = []string{} } else { cv = *v } for _, value := range shape { - var col types.SchemaAttributeType - destAddr := &col - if err := awsAwsjson11_deserializeDocumentSchemaAttributeType(&destAddr, value); err != nil { - return err + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProviderNameType to be of type string, got %T instead", value) + } + col = jtv } - col = *destAddr cv = append(cv, col) } @@ -19720,7 +22293,7 @@ func awsAwsjson11_deserializeDocumentSchemaAttributesListType(v *[]types.SchemaA return nil } -func awsAwsjson11_deserializeDocumentSchemaAttributeType(v **types.SchemaAttributeType, value interface{}) error { +func awsAwsjson11_deserializeDocumentTierChangeNotAllowedException(v **types.TierChangeNotAllowedException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -19733,68 +22306,22 @@ func awsAwsjson11_deserializeDocumentSchemaAttributeType(v **types.SchemaAttribu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.SchemaAttributeType + var sv *types.TierChangeNotAllowedException if *v == nil { - sv = &types.SchemaAttributeType{} + sv = &types.TierChangeNotAllowedException{} } else { sv = *v } for key, value := range shape { switch key { - case "AttributeDataType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AttributeDataType to be of type string, got %T instead", value) - } - sv.AttributeDataType = types.AttributeDataType(jtv) - } - - case "DeveloperOnlyAttribute": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected BooleanType to be of type *bool, got %T instead", value) - } - sv.DeveloperOnlyAttribute = ptr.Bool(jtv) - } - - case "Mutable": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected BooleanType to be of type *bool, got %T instead", value) - } - sv.Mutable = ptr.Bool(jtv) - } - - case "Name": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected CustomAttributeNameType to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - case "NumberAttributeConstraints": - if err := awsAwsjson11_deserializeDocumentNumberAttributeConstraintsType(&sv.NumberAttributeConstraints, value); err != nil { - return err - } - - case "Required": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected BooleanType to be of type *bool, got %T instead", value) + return fmt.Errorf("expected MessageType to be of type string, got %T instead", value) } - sv.Required = ptr.Bool(jtv) - } - - case "StringAttributeConstraints": - if err := awsAwsjson11_deserializeDocumentStringAttributeConstraintsType(&sv.StringAttributeConstraints, value); err != nil { - return err + sv.Message = ptr.String(jtv) } default: @@ -19806,7 +22333,7 @@ func awsAwsjson11_deserializeDocumentSchemaAttributeType(v **types.SchemaAttribu return nil } -func awsAwsjson11_deserializeDocumentScopeDoesNotExistException(v **types.ScopeDoesNotExistException, value interface{}) error { +func awsAwsjson11_deserializeDocumentTokenValidityUnitsType(v **types.TokenValidityUnitsType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -19819,22 +22346,40 @@ func awsAwsjson11_deserializeDocumentScopeDoesNotExistException(v **types.ScopeD return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ScopeDoesNotExistException + var sv *types.TokenValidityUnitsType if *v == nil { - sv = &types.ScopeDoesNotExistException{} + sv = &types.TokenValidityUnitsType{} } else { sv = *v } for key, value := range shape { switch key { - case "message", "Message": + case "AccessToken": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected MessageType to be of type string, got %T instead", value) + return fmt.Errorf("expected TimeUnitsType to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.AccessToken = types.TimeUnitsType(jtv) + } + + case "IdToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TimeUnitsType to be of type string, got %T instead", value) + } + sv.IdToken = types.TimeUnitsType(jtv) + } + + case "RefreshToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TimeUnitsType to be of type string, got %T instead", value) + } + sv.RefreshToken = types.TimeUnitsType(jtv) } default: @@ -19846,7 +22391,7 @@ func awsAwsjson11_deserializeDocumentScopeDoesNotExistException(v **types.ScopeD return nil } -func awsAwsjson11_deserializeDocumentScopeListType(v *[]string, value interface{}) error { +func awsAwsjson11_deserializeDocumentTooManyFailedAttemptsException(v **types.TooManyFailedAttemptsException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -19854,35 +22399,39 @@ func awsAwsjson11_deserializeDocumentScopeListType(v *[]string, value interface{ return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []string + var sv *types.TooManyFailedAttemptsException if *v == nil { - cv = []string{} + sv = &types.TooManyFailedAttemptsException{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ScopeType to be of type string, got %T instead", value) + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MessageType to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) } - col = jtv - } - cv = append(cv, col) + default: + _, _ = key, value + + } } - *v = cv + *v = sv return nil } -func awsAwsjson11_deserializeDocumentSkippedIPRangeListType(v *[]string, value interface{}) error { +func awsAwsjson11_deserializeDocumentTooManyRequestsException(v **types.TooManyRequestsException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -19890,35 +22439,39 @@ func awsAwsjson11_deserializeDocumentSkippedIPRangeListType(v *[]string, value i return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []string + var sv *types.TooManyRequestsException if *v == nil { - cv = []string{} + sv = &types.TooManyRequestsException{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StringType to be of type string, got %T instead", value) + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MessageType to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) } - col = jtv - } - cv = append(cv, col) + default: + _, _ = key, value + + } } - *v = cv + *v = sv return nil } -func awsAwsjson11_deserializeDocumentSmsConfigurationType(v **types.SmsConfigurationType, value interface{}) error { +func awsAwsjson11_deserializeDocumentUICustomizationType(v **types.UICustomizationType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -19931,40 +22484,90 @@ func awsAwsjson11_deserializeDocumentSmsConfigurationType(v **types.SmsConfigura return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.SmsConfigurationType + var sv *types.UICustomizationType if *v == nil { - sv = &types.SmsConfigurationType{} + sv = &types.UICustomizationType{} } else { sv = *v } for key, value := range shape { switch key { - case "ExternalId": + case "ClientId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected StringType to be of type string, got %T instead", value) + return fmt.Errorf("expected ClientIdType to be of type string, got %T instead", value) } - sv.ExternalId = ptr.String(jtv) + sv.ClientId = ptr.String(jtv) } - case "SnsCallerArn": + 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 DateType to be a JSON Number, got %T instead", value) + + } + } + + case "CSS": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ArnType to be of type string, got %T instead", value) + return fmt.Errorf("expected CSSType to be of type string, got %T instead", value) } - sv.SnsCallerArn = ptr.String(jtv) + sv.CSS = ptr.String(jtv) } - case "SnsRegion": + case "CSSVersion": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected RegionCodeType to be of type string, got %T instead", value) + return fmt.Errorf("expected CSSVersionType to be of type string, got %T instead", value) } - sv.SnsRegion = ptr.String(jtv) + sv.CSSVersion = ptr.String(jtv) + } + + case "ImageUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ImageUrlType to be of type string, got %T instead", value) + } + sv.ImageUrl = ptr.String(jtv) + } + + case "LastModifiedDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastModifiedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateType to be a JSON Number, got %T instead", value) + + } + } + + case "UserPoolId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UserPoolIdType to be of type string, got %T instead", value) + } + sv.UserPoolId = ptr.String(jtv) } default: @@ -19976,7 +22579,7 @@ func awsAwsjson11_deserializeDocumentSmsConfigurationType(v **types.SmsConfigura return nil } -func awsAwsjson11_deserializeDocumentSmsMfaConfigType(v **types.SmsMfaConfigType, value interface{}) error { +func awsAwsjson11_deserializeDocumentUnauthorizedException(v **types.UnauthorizedException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -19989,27 +22592,22 @@ func awsAwsjson11_deserializeDocumentSmsMfaConfigType(v **types.SmsMfaConfigType return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.SmsMfaConfigType + var sv *types.UnauthorizedException if *v == nil { - sv = &types.SmsMfaConfigType{} + sv = &types.UnauthorizedException{} } else { sv = *v } for key, value := range shape { switch key { - case "SmsAuthenticationMessage": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SmsVerificationMessageType to be of type string, got %T instead", value) + return fmt.Errorf("expected MessageType to be of type string, got %T instead", value) } - sv.SmsAuthenticationMessage = ptr.String(jtv) - } - - case "SmsConfiguration": - if err := awsAwsjson11_deserializeDocumentSmsConfigurationType(&sv.SmsConfiguration, value); err != nil { - return err + sv.Message = ptr.String(jtv) } default: @@ -20021,7 +22619,7 @@ func awsAwsjson11_deserializeDocumentSmsMfaConfigType(v **types.SmsMfaConfigType return nil } -func awsAwsjson11_deserializeDocumentSoftwareTokenMfaConfigType(v **types.SoftwareTokenMfaConfigType, value interface{}) error { +func awsAwsjson11_deserializeDocumentUnexpectedLambdaException(v **types.UnexpectedLambdaException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -20034,22 +22632,22 @@ func awsAwsjson11_deserializeDocumentSoftwareTokenMfaConfigType(v **types.Softwa return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.SoftwareTokenMfaConfigType + var sv *types.UnexpectedLambdaException if *v == nil { - sv = &types.SoftwareTokenMfaConfigType{} + sv = &types.UnexpectedLambdaException{} } else { sv = *v } for key, value := range shape { switch key { - case "Enabled": + case "message", "Message": if value != nil { - jtv, ok := value.(bool) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected BooleanType to be of type *bool, got %T instead", value) + return fmt.Errorf("expected MessageType to be of type string, got %T instead", value) } - sv.Enabled = jtv + sv.Message = ptr.String(jtv) } default: @@ -20061,7 +22659,7 @@ func awsAwsjson11_deserializeDocumentSoftwareTokenMfaConfigType(v **types.Softwa return nil } -func awsAwsjson11_deserializeDocumentSoftwareTokenMFANotFoundException(v **types.SoftwareTokenMFANotFoundException, value interface{}) error { +func awsAwsjson11_deserializeDocumentUnsupportedIdentityProviderException(v **types.UnsupportedIdentityProviderException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -20074,9 +22672,9 @@ func awsAwsjson11_deserializeDocumentSoftwareTokenMFANotFoundException(v **types return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.SoftwareTokenMFANotFoundException + var sv *types.UnsupportedIdentityProviderException if *v == nil { - sv = &types.SoftwareTokenMFANotFoundException{} + sv = &types.UnsupportedIdentityProviderException{} } else { sv = *v } @@ -20101,7 +22699,7 @@ func awsAwsjson11_deserializeDocumentSoftwareTokenMFANotFoundException(v **types return nil } -func awsAwsjson11_deserializeDocumentStringAttributeConstraintsType(v **types.StringAttributeConstraintsType, value interface{}) error { +func awsAwsjson11_deserializeDocumentUnsupportedOperationException(v **types.UnsupportedOperationException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -20114,31 +22712,22 @@ func awsAwsjson11_deserializeDocumentStringAttributeConstraintsType(v **types.St return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.StringAttributeConstraintsType + var sv *types.UnsupportedOperationException if *v == nil { - sv = &types.StringAttributeConstraintsType{} + sv = &types.UnsupportedOperationException{} } else { sv = *v } for key, value := range shape { switch key { - case "MaxLength": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StringType to be of type string, got %T instead", value) - } - sv.MaxLength = ptr.String(jtv) - } - - case "MinLength": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected StringType to be of type string, got %T instead", value) + return fmt.Errorf("expected MessageType to be of type string, got %T instead", value) } - sv.MinLength = ptr.String(jtv) + sv.Message = ptr.String(jtv) } default: @@ -20150,7 +22739,7 @@ func awsAwsjson11_deserializeDocumentStringAttributeConstraintsType(v **types.St return nil } -func awsAwsjson11_deserializeDocumentSupportedIdentityProvidersListType(v *[]string, value interface{}) error { +func awsAwsjson11_deserializeDocumentUnsupportedTokenTypeException(v **types.UnsupportedTokenTypeException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -20158,35 +22747,39 @@ func awsAwsjson11_deserializeDocumentSupportedIdentityProvidersListType(v *[]str return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []string + var sv *types.UnsupportedTokenTypeException if *v == nil { - cv = []string{} + sv = &types.UnsupportedTokenTypeException{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ProviderNameType to be of type string, got %T instead", value) + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MessageType to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) } - col = jtv - } - cv = append(cv, col) + default: + _, _ = key, value + + } } - *v = cv + *v = sv return nil } -func awsAwsjson11_deserializeDocumentTokenValidityUnitsType(v **types.TokenValidityUnitsType, value interface{}) error { +func awsAwsjson11_deserializeDocumentUnsupportedUserStateException(v **types.UnsupportedUserStateException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -20199,40 +22792,22 @@ func awsAwsjson11_deserializeDocumentTokenValidityUnitsType(v **types.TokenValid return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.TokenValidityUnitsType - if *v == nil { - sv = &types.TokenValidityUnitsType{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "AccessToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected TimeUnitsType to be of type string, got %T instead", value) - } - sv.AccessToken = types.TimeUnitsType(jtv) - } - - case "IdToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected TimeUnitsType to be of type string, got %T instead", value) - } - sv.IdToken = types.TimeUnitsType(jtv) - } - - case "RefreshToken": + var sv *types.UnsupportedUserStateException + if *v == nil { + sv = &types.UnsupportedUserStateException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected TimeUnitsType to be of type string, got %T instead", value) + return fmt.Errorf("expected MessageType to be of type string, got %T instead", value) } - sv.RefreshToken = types.TimeUnitsType(jtv) + sv.Message = ptr.String(jtv) } default: @@ -20244,7 +22819,7 @@ func awsAwsjson11_deserializeDocumentTokenValidityUnitsType(v **types.TokenValid return nil } -func awsAwsjson11_deserializeDocumentTooManyFailedAttemptsException(v **types.TooManyFailedAttemptsException, value interface{}) error { +func awsAwsjson11_deserializeDocumentUserAttributeUpdateSettingsType(v **types.UserAttributeUpdateSettingsType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -20257,22 +22832,18 @@ func awsAwsjson11_deserializeDocumentTooManyFailedAttemptsException(v **types.To return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.TooManyFailedAttemptsException + var sv *types.UserAttributeUpdateSettingsType if *v == nil { - sv = &types.TooManyFailedAttemptsException{} + sv = &types.UserAttributeUpdateSettingsType{} } else { sv = *v } for key, value := range shape { switch key { - case "message", "Message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected MessageType to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) + case "AttributesRequireVerificationBeforeUpdate": + if err := awsAwsjson11_deserializeDocumentAttributesRequireVerificationBeforeUpdateType(&sv.AttributesRequireVerificationBeforeUpdate, value); err != nil { + return err } default: @@ -20284,7 +22855,7 @@ func awsAwsjson11_deserializeDocumentTooManyFailedAttemptsException(v **types.To return nil } -func awsAwsjson11_deserializeDocumentTooManyRequestsException(v **types.TooManyRequestsException, value interface{}) error { +func awsAwsjson11_deserializeDocumentUserImportInProgressException(v **types.UserImportInProgressException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -20297,9 +22868,9 @@ func awsAwsjson11_deserializeDocumentTooManyRequestsException(v **types.TooManyR return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.TooManyRequestsException + var sv *types.UserImportInProgressException if *v == nil { - sv = &types.TooManyRequestsException{} + sv = &types.UserImportInProgressException{} } else { sv = *v } @@ -20324,7 +22895,41 @@ func awsAwsjson11_deserializeDocumentTooManyRequestsException(v **types.TooManyR return nil } -func awsAwsjson11_deserializeDocumentUICustomizationType(v **types.UICustomizationType, value interface{}) error { +func awsAwsjson11_deserializeDocumentUserImportJobsListType(v *[]types.UserImportJobType, 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.UserImportJobType + if *v == nil { + cv = []types.UserImportJobType{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.UserImportJobType + destAddr := &col + if err := awsAwsjson11_deserializeDocumentUserImportJobType(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentUserImportJobType(v **types.UserImportJobType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -20337,22 +22942,47 @@ func awsAwsjson11_deserializeDocumentUICustomizationType(v **types.UICustomizati return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.UICustomizationType + var sv *types.UserImportJobType if *v == nil { - sv = &types.UICustomizationType{} + sv = &types.UserImportJobType{} } else { sv = *v } for key, value := range shape { switch key { - case "ClientId": + case "CloudWatchLogsRoleArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ClientIdType to be of type string, got %T instead", value) + return fmt.Errorf("expected ArnType to be of type string, got %T instead", value) } - sv.ClientId = ptr.String(jtv) + sv.CloudWatchLogsRoleArn = ptr.String(jtv) + } + + case "CompletionDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CompletionDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateType to be a JSON Number, got %T instead", value) + + } + } + + case "CompletionMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CompletionMessageType to be of type string, got %T instead", value) + } + sv.CompletionMessage = ptr.String(jtv) } case "CreationDate": @@ -20371,34 +23001,73 @@ func awsAwsjson11_deserializeDocumentUICustomizationType(v **types.UICustomizati } } - case "CSS": + case "FailedUsers": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected LongType to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.FailedUsers = i64 + } + + case "ImportedUsers": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected LongType to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ImportedUsers = i64 + } + + case "JobId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected CSSType to be of type string, got %T instead", value) + return fmt.Errorf("expected UserImportJobIdType to be of type string, got %T instead", value) } - sv.CSS = ptr.String(jtv) + sv.JobId = ptr.String(jtv) } - case "CSSVersion": + case "JobName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected CSSVersionType to be of type string, got %T instead", value) + return fmt.Errorf("expected UserImportJobNameType to be of type string, got %T instead", value) } - sv.CSSVersion = ptr.String(jtv) + sv.JobName = ptr.String(jtv) } - case "ImageUrl": + case "PreSignedUrl": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ImageUrlType to be of type string, got %T instead", value) + return fmt.Errorf("expected PreSignedUrlType to be of type string, got %T instead", value) } - sv.ImageUrl = ptr.String(jtv) + sv.PreSignedUrl = ptr.String(jtv) } - case "LastModifiedDate": + case "SkippedUsers": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected LongType to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.SkippedUsers = i64 + } + + case "StartDate": if value != nil { switch jtv := value.(type) { case json.Number: @@ -20406,7 +23075,7 @@ func awsAwsjson11_deserializeDocumentUICustomizationType(v **types.UICustomizati if err != nil { return err } - sv.LastModifiedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + sv.StartDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected DateType to be a JSON Number, got %T instead", value) @@ -20414,6 +23083,15 @@ func awsAwsjson11_deserializeDocumentUICustomizationType(v **types.UICustomizati } } + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UserImportJobStatusType to be of type string, got %T instead", value) + } + sv.Status = types.UserImportJobStatusType(jtv) + } + case "UserPoolId": if value != nil { jtv, ok := value.(string) @@ -20432,7 +23110,83 @@ func awsAwsjson11_deserializeDocumentUICustomizationType(v **types.UICustomizati return nil } -func awsAwsjson11_deserializeDocumentUnauthorizedException(v **types.UnauthorizedException, value interface{}) error { +func awsAwsjson11_deserializeDocumentUserLambdaValidationException(v **types.UserLambdaValidationException, 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.UserLambdaValidationException + if *v == nil { + sv = &types.UserLambdaValidationException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MessageType to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentUserMFASettingListType(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 StringType to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentUsernameAttributesListType(v *[]types.UsernameAttributeType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -20440,39 +23194,35 @@ func awsAwsjson11_deserializeDocumentUnauthorizedException(v **types.Unauthorize return nil } - shape, ok := value.(map[string]interface{}) + shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.UnauthorizedException + var cv []types.UsernameAttributeType if *v == nil { - sv = &types.UnauthorizedException{} + cv = []types.UsernameAttributeType{} } else { - sv = *v + cv = *v } - for key, value := range shape { - switch key { - case "message", "Message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected MessageType to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) + for _, value := range shape { + var col types.UsernameAttributeType + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UsernameAttributeType to be of type string, got %T instead", value) } - - default: - _, _ = key, value - + col = types.UsernameAttributeType(jtv) } + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsAwsjson11_deserializeDocumentUnexpectedLambdaException(v **types.UnexpectedLambdaException, value interface{}) error { +func awsAwsjson11_deserializeDocumentUsernameConfigurationType(v **types.UsernameConfigurationType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -20485,22 +23235,22 @@ func awsAwsjson11_deserializeDocumentUnexpectedLambdaException(v **types.Unexpec return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.UnexpectedLambdaException + var sv *types.UsernameConfigurationType if *v == nil { - sv = &types.UnexpectedLambdaException{} + sv = &types.UsernameConfigurationType{} } else { sv = *v } for key, value := range shape { switch key { - case "message", "Message": + case "CaseSensitive": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(bool) if !ok { - return fmt.Errorf("expected MessageType to be of type string, got %T instead", value) + return fmt.Errorf("expected WrappedBooleanType to be of type *bool, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.CaseSensitive = ptr.Bool(jtv) } default: @@ -20512,7 +23262,7 @@ func awsAwsjson11_deserializeDocumentUnexpectedLambdaException(v **types.Unexpec return nil } -func awsAwsjson11_deserializeDocumentUnsupportedIdentityProviderException(v **types.UnsupportedIdentityProviderException, value interface{}) error { +func awsAwsjson11_deserializeDocumentUsernameExistsException(v **types.UsernameExistsException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -20525,9 +23275,9 @@ func awsAwsjson11_deserializeDocumentUnsupportedIdentityProviderException(v **ty return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.UnsupportedIdentityProviderException + var sv *types.UsernameExistsException if *v == nil { - sv = &types.UnsupportedIdentityProviderException{} + sv = &types.UsernameExistsException{} } else { sv = *v } @@ -20552,7 +23302,7 @@ func awsAwsjson11_deserializeDocumentUnsupportedIdentityProviderException(v **ty return nil } -func awsAwsjson11_deserializeDocumentUnsupportedOperationException(v **types.UnsupportedOperationException, value interface{}) error { +func awsAwsjson11_deserializeDocumentUserNotConfirmedException(v **types.UserNotConfirmedException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -20565,9 +23315,9 @@ func awsAwsjson11_deserializeDocumentUnsupportedOperationException(v **types.Uns return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.UnsupportedOperationException + var sv *types.UserNotConfirmedException if *v == nil { - sv = &types.UnsupportedOperationException{} + sv = &types.UserNotConfirmedException{} } else { sv = *v } @@ -20592,7 +23342,7 @@ func awsAwsjson11_deserializeDocumentUnsupportedOperationException(v **types.Uns return nil } -func awsAwsjson11_deserializeDocumentUnsupportedTokenTypeException(v **types.UnsupportedTokenTypeException, value interface{}) error { +func awsAwsjson11_deserializeDocumentUserNotFoundException(v **types.UserNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -20605,9 +23355,9 @@ func awsAwsjson11_deserializeDocumentUnsupportedTokenTypeException(v **types.Uns return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.UnsupportedTokenTypeException + var sv *types.UserNotFoundException if *v == nil { - sv = &types.UnsupportedTokenTypeException{} + sv = &types.UserNotFoundException{} } else { sv = *v } @@ -20632,7 +23382,7 @@ func awsAwsjson11_deserializeDocumentUnsupportedTokenTypeException(v **types.Uns return nil } -func awsAwsjson11_deserializeDocumentUnsupportedUserStateException(v **types.UnsupportedUserStateException, value interface{}) error { +func awsAwsjson11_deserializeDocumentUserPoolAddOnNotEnabledException(v **types.UserPoolAddOnNotEnabledException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -20645,9 +23395,9 @@ func awsAwsjson11_deserializeDocumentUnsupportedUserStateException(v **types.Uns return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.UnsupportedUserStateException + var sv *types.UserPoolAddOnNotEnabledException if *v == nil { - sv = &types.UnsupportedUserStateException{} + sv = &types.UserPoolAddOnNotEnabledException{} } else { sv = *v } @@ -20672,7 +23422,7 @@ func awsAwsjson11_deserializeDocumentUnsupportedUserStateException(v **types.Uns return nil } -func awsAwsjson11_deserializeDocumentUserAttributeUpdateSettingsType(v **types.UserAttributeUpdateSettingsType, value interface{}) error { +func awsAwsjson11_deserializeDocumentUserPoolAddOnsType(v **types.UserPoolAddOnsType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -20685,20 +23435,29 @@ func awsAwsjson11_deserializeDocumentUserAttributeUpdateSettingsType(v **types.U return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.UserAttributeUpdateSettingsType + var sv *types.UserPoolAddOnsType if *v == nil { - sv = &types.UserAttributeUpdateSettingsType{} + sv = &types.UserPoolAddOnsType{} } else { sv = *v } for key, value := range shape { switch key { - case "AttributesRequireVerificationBeforeUpdate": - if err := awsAwsjson11_deserializeDocumentAttributesRequireVerificationBeforeUpdateType(&sv.AttributesRequireVerificationBeforeUpdate, value); err != nil { + case "AdvancedSecurityAdditionalFlows": + if err := awsAwsjson11_deserializeDocumentAdvancedSecurityAdditionalFlowsType(&sv.AdvancedSecurityAdditionalFlows, value); err != nil { return err } + case "AdvancedSecurityMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AdvancedSecurityModeType to be of type string, got %T instead", value) + } + sv.AdvancedSecurityMode = types.AdvancedSecurityModeType(jtv) + } + default: _, _ = key, value @@ -20708,7 +23467,7 @@ func awsAwsjson11_deserializeDocumentUserAttributeUpdateSettingsType(v **types.U return nil } -func awsAwsjson11_deserializeDocumentUserImportInProgressException(v **types.UserImportInProgressException, value interface{}) error { +func awsAwsjson11_deserializeDocumentUserPoolClientDescription(v **types.UserPoolClientDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -20721,22 +23480,40 @@ func awsAwsjson11_deserializeDocumentUserImportInProgressException(v **types.Use return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.UserImportInProgressException + var sv *types.UserPoolClientDescription if *v == nil { - sv = &types.UserImportInProgressException{} + sv = &types.UserPoolClientDescription{} } else { sv = *v } for key, value := range shape { switch key { - case "message", "Message": + case "ClientId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected MessageType to be of type string, got %T instead", value) + return fmt.Errorf("expected ClientIdType to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.ClientId = ptr.String(jtv) + } + + case "ClientName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ClientNameType to be of type string, got %T instead", value) + } + sv.ClientName = ptr.String(jtv) + } + + case "UserPoolId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UserPoolIdType to be of type string, got %T instead", value) + } + sv.UserPoolId = ptr.String(jtv) } default: @@ -20748,7 +23525,7 @@ func awsAwsjson11_deserializeDocumentUserImportInProgressException(v **types.Use return nil } -func awsAwsjson11_deserializeDocumentUserImportJobsListType(v *[]types.UserImportJobType, value interface{}) error { +func awsAwsjson11_deserializeDocumentUserPoolClientListType(v *[]types.UserPoolClientDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -20761,17 +23538,17 @@ func awsAwsjson11_deserializeDocumentUserImportJobsListType(v *[]types.UserImpor return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.UserImportJobType + var cv []types.UserPoolClientDescription if *v == nil { - cv = []types.UserImportJobType{} + cv = []types.UserPoolClientDescription{} } else { cv = *v } for _, value := range shape { - var col types.UserImportJobType + var col types.UserPoolClientDescription destAddr := &col - if err := awsAwsjson11_deserializeDocumentUserImportJobType(&destAddr, value); err != nil { + if err := awsAwsjson11_deserializeDocumentUserPoolClientDescription(&destAddr, value); err != nil { return err } col = *destAddr @@ -20782,7 +23559,7 @@ func awsAwsjson11_deserializeDocumentUserImportJobsListType(v *[]types.UserImpor return nil } -func awsAwsjson11_deserializeDocumentUserImportJobType(v **types.UserImportJobType, value interface{}) error { +func awsAwsjson11_deserializeDocumentUserPoolClientType(v **types.UserPoolClientType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -20795,47 +23572,95 @@ func awsAwsjson11_deserializeDocumentUserImportJobType(v **types.UserImportJobTy return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.UserImportJobType + var sv *types.UserPoolClientType if *v == nil { - sv = &types.UserImportJobType{} + sv = &types.UserPoolClientType{} } else { sv = *v } for key, value := range shape { switch key { - case "CloudWatchLogsRoleArn": + case "AccessTokenValidity": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected ArnType to be of type string, got %T instead", value) + return fmt.Errorf("expected AccessTokenValidityType to be json.Number, got %T instead", value) } - sv.CloudWatchLogsRoleArn = ptr.String(jtv) + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.AccessTokenValidity = ptr.Int32(int32(i64)) } - case "CompletionDate": + case "AllowedOAuthFlows": + if err := awsAwsjson11_deserializeDocumentOAuthFlowsType(&sv.AllowedOAuthFlows, value); err != nil { + return err + } + + case "AllowedOAuthFlowsUserPoolClient": if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CompletionDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected BooleanType to be of type *bool, got %T instead", value) + } + sv.AllowedOAuthFlowsUserPoolClient = ptr.Bool(jtv) + } - default: - return fmt.Errorf("expected DateType to be a JSON Number, got %T instead", value) + case "AllowedOAuthScopes": + if err := awsAwsjson11_deserializeDocumentScopeListType(&sv.AllowedOAuthScopes, value); err != nil { + return err + } + + case "AnalyticsConfiguration": + if err := awsAwsjson11_deserializeDocumentAnalyticsConfigurationType(&sv.AnalyticsConfiguration, value); err != nil { + return err + } + case "AuthSessionValidity": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected AuthSessionValidityType to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err } + sv.AuthSessionValidity = ptr.Int32(int32(i64)) } - case "CompletionMessage": + case "CallbackURLs": + if err := awsAwsjson11_deserializeDocumentCallbackURLsListType(&sv.CallbackURLs, value); err != nil { + return err + } + + case "ClientId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected CompletionMessageType to be of type string, got %T instead", value) + return fmt.Errorf("expected ClientIdType to be of type string, got %T instead", value) } - sv.CompletionMessage = ptr.String(jtv) + sv.ClientId = ptr.String(jtv) + } + + case "ClientName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ClientNameType to be of type string, got %T instead", value) + } + sv.ClientName = ptr.String(jtv) + } + + case "ClientSecret": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ClientSecretType to be of type string, got %T instead", value) + } + sv.ClientSecret = ptr.String(jtv) } case "CreationDate": @@ -20854,73 +23679,52 @@ func awsAwsjson11_deserializeDocumentUserImportJobType(v **types.UserImportJobTy } } - case "FailedUsers": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected LongType to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.FailedUsers = i64 - } - - case "ImportedUsers": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected LongType to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.ImportedUsers = i64 - } - - case "JobId": + case "DefaultRedirectURI": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected UserImportJobIdType to be of type string, got %T instead", value) + return fmt.Errorf("expected RedirectUrlType to be of type string, got %T instead", value) } - sv.JobId = ptr.String(jtv) + sv.DefaultRedirectURI = ptr.String(jtv) } - case "JobName": + case "EnablePropagateAdditionalUserContextData": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(bool) if !ok { - return fmt.Errorf("expected UserImportJobNameType to be of type string, got %T instead", value) + return fmt.Errorf("expected WrappedBooleanType to be of type *bool, got %T instead", value) } - sv.JobName = ptr.String(jtv) + sv.EnablePropagateAdditionalUserContextData = ptr.Bool(jtv) } - case "PreSignedUrl": + case "EnableTokenRevocation": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(bool) if !ok { - return fmt.Errorf("expected PreSignedUrlType to be of type string, got %T instead", value) + return fmt.Errorf("expected WrappedBooleanType to be of type *bool, got %T instead", value) } - sv.PreSignedUrl = ptr.String(jtv) + sv.EnableTokenRevocation = ptr.Bool(jtv) } - case "SkippedUsers": + case "ExplicitAuthFlows": + if err := awsAwsjson11_deserializeDocumentExplicitAuthFlowsListType(&sv.ExplicitAuthFlows, value); err != nil { + return err + } + + case "IdTokenValidity": if value != nil { jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected LongType to be json.Number, got %T instead", value) + return fmt.Errorf("expected IdTokenValidityType to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } - sv.SkippedUsers = i64 + sv.IdTokenValidity = ptr.Int32(int32(i64)) } - case "StartDate": + case "LastModifiedDate": if value != nil { switch jtv := value.(type) { case json.Number: @@ -20928,7 +23732,7 @@ func awsAwsjson11_deserializeDocumentUserImportJobType(v **types.UserImportJobTy if err != nil { return err } - sv.StartDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + sv.LastModifiedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected DateType to be a JSON Number, got %T instead", value) @@ -20936,13 +23740,46 @@ func awsAwsjson11_deserializeDocumentUserImportJobType(v **types.UserImportJobTy } } - case "Status": + case "LogoutURLs": + if err := awsAwsjson11_deserializeDocumentLogoutURLsListType(&sv.LogoutURLs, value); err != nil { + return err + } + + case "PreventUserExistenceErrors": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected UserImportJobStatusType to be of type string, got %T instead", value) + return fmt.Errorf("expected PreventUserExistenceErrorTypes to be of type string, got %T instead", value) } - sv.Status = types.UserImportJobStatusType(jtv) + sv.PreventUserExistenceErrors = types.PreventUserExistenceErrorTypes(jtv) + } + + case "ReadAttributes": + if err := awsAwsjson11_deserializeDocumentClientPermissionListType(&sv.ReadAttributes, value); err != nil { + return err + } + + case "RefreshTokenValidity": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected RefreshTokenValidityType to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.RefreshTokenValidity = int32(i64) + } + + case "SupportedIdentityProviders": + if err := awsAwsjson11_deserializeDocumentSupportedIdentityProvidersListType(&sv.SupportedIdentityProviders, value); err != nil { + return err + } + + case "TokenValidityUnits": + if err := awsAwsjson11_deserializeDocumentTokenValidityUnitsType(&sv.TokenValidityUnits, value); err != nil { + return err } case "UserPoolId": @@ -20954,6 +23791,11 @@ func awsAwsjson11_deserializeDocumentUserImportJobType(v **types.UserImportJobTy sv.UserPoolId = ptr.String(jtv) } + case "WriteAttributes": + if err := awsAwsjson11_deserializeDocumentClientPermissionListType(&sv.WriteAttributes, value); err != nil { + return err + } + default: _, _ = key, value @@ -20963,7 +23805,7 @@ func awsAwsjson11_deserializeDocumentUserImportJobType(v **types.UserImportJobTy return nil } -func awsAwsjson11_deserializeDocumentUserLambdaValidationException(v **types.UserLambdaValidationException, value interface{}) error { +func awsAwsjson11_deserializeDocumentUserPoolDescriptionType(v **types.UserPoolDescriptionType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -20976,134 +23818,77 @@ func awsAwsjson11_deserializeDocumentUserLambdaValidationException(v **types.Use return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.UserLambdaValidationException + var sv *types.UserPoolDescriptionType if *v == nil { - sv = &types.UserLambdaValidationException{} + sv = &types.UserPoolDescriptionType{} } else { sv = *v } for key, value := range shape { switch key { - case "message", "Message": + 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 DateType to be a JSON Number, got %T instead", value) + + } + } + + case "Id": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected MessageType to be of type string, got %T instead", value) + return fmt.Errorf("expected UserPoolIdType to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.Id = ptr.String(jtv) } - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentUserMFASettingListType(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 StringType to be of type string, got %T instead", value) + case "LambdaConfig": + if err := awsAwsjson11_deserializeDocumentLambdaConfigType(&sv.LambdaConfig, value); err != nil { + return err } - col = jtv - } - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsAwsjson11_deserializeDocumentUsernameAttributesListType(v *[]types.UsernameAttributeType, 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) - } + case "LastModifiedDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastModifiedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) - var cv []types.UsernameAttributeType - if *v == nil { - cv = []types.UsernameAttributeType{} - } else { - cv = *v - } + default: + return fmt.Errorf("expected DateType to be a JSON Number, got %T instead", value) - for _, value := range shape { - var col types.UsernameAttributeType - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected UsernameAttributeType to be of type string, got %T instead", value) + } } - col = types.UsernameAttributeType(jtv) - } - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsAwsjson11_deserializeDocumentUsernameConfigurationType(v **types.UsernameConfigurationType, 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.UsernameConfigurationType - if *v == nil { - sv = &types.UsernameConfigurationType{} - } else { - sv = *v - } + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UserPoolNameType to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } - for key, value := range shape { - switch key { - case "CaseSensitive": + case "Status": if value != nil { - jtv, ok := value.(bool) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected WrappedBooleanType to be of type *bool, got %T instead", value) + return fmt.Errorf("expected StatusType to be of type string, got %T instead", value) } - sv.CaseSensitive = ptr.Bool(jtv) + sv.Status = types.StatusType(jtv) } default: @@ -21115,7 +23900,7 @@ func awsAwsjson11_deserializeDocumentUsernameConfigurationType(v **types.Usernam return nil } -func awsAwsjson11_deserializeDocumentUsernameExistsException(v **types.UsernameExistsException, value interface{}) error { +func awsAwsjson11_deserializeDocumentUserPoolListType(v *[]types.UserPoolDescriptionType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -21123,39 +23908,33 @@ func awsAwsjson11_deserializeDocumentUsernameExistsException(v **types.UsernameE return nil } - shape, ok := value.(map[string]interface{}) + shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.UsernameExistsException + var cv []types.UserPoolDescriptionType if *v == nil { - sv = &types.UsernameExistsException{} + cv = []types.UserPoolDescriptionType{} } else { - sv = *v + cv = *v } - for key, value := range shape { - switch key { - case "message", "Message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected MessageType to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - + for _, value := range shape { + var col types.UserPoolDescriptionType + destAddr := &col + if err := awsAwsjson11_deserializeDocumentUserPoolDescriptionType(&destAddr, value); err != nil { + return err } + col = *destAddr + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsAwsjson11_deserializeDocumentUserNotConfirmedException(v **types.UserNotConfirmedException, value interface{}) error { +func awsAwsjson11_deserializeDocumentUserPoolPolicyType(v **types.UserPoolPolicyType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -21168,22 +23947,23 @@ func awsAwsjson11_deserializeDocumentUserNotConfirmedException(v **types.UserNot return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.UserNotConfirmedException + var sv *types.UserPoolPolicyType if *v == nil { - sv = &types.UserNotConfirmedException{} + sv = &types.UserPoolPolicyType{} } else { sv = *v } for key, value := range shape { switch key { - case "message", "Message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected MessageType to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) + case "PasswordPolicy": + if err := awsAwsjson11_deserializeDocumentPasswordPolicyType(&sv.PasswordPolicy, value); err != nil { + return err + } + + case "SignInPolicy": + if err := awsAwsjson11_deserializeDocumentSignInPolicyType(&sv.SignInPolicy, value); err != nil { + return err } default: @@ -21195,7 +23975,7 @@ func awsAwsjson11_deserializeDocumentUserNotConfirmedException(v **types.UserNot return nil } -func awsAwsjson11_deserializeDocumentUserNotFoundException(v **types.UserNotFoundException, value interface{}) error { +func awsAwsjson11_deserializeDocumentUserPoolTaggingException(v **types.UserPoolTaggingException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -21208,9 +23988,9 @@ func awsAwsjson11_deserializeDocumentUserNotFoundException(v **types.UserNotFoun return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.UserNotFoundException + var sv *types.UserPoolTaggingException if *v == nil { - sv = &types.UserNotFoundException{} + sv = &types.UserPoolTaggingException{} } else { sv = *v } @@ -21235,7 +24015,7 @@ func awsAwsjson11_deserializeDocumentUserNotFoundException(v **types.UserNotFoun return nil } -func awsAwsjson11_deserializeDocumentUserPoolAddOnNotEnabledException(v **types.UserPoolAddOnNotEnabledException, value interface{}) error { +func awsAwsjson11_deserializeDocumentUserPoolTagsType(v *map[string]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -21248,34 +24028,30 @@ func awsAwsjson11_deserializeDocumentUserPoolAddOnNotEnabledException(v **types. return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.UserPoolAddOnNotEnabledException + var mv map[string]string if *v == nil { - sv = &types.UserPoolAddOnNotEnabledException{} + mv = map[string]string{} } else { - sv = *v + mv = *v } for key, value := range shape { - switch key { - case "message", "Message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected MessageType to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) + var parsedVal string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TagValueType to be of type string, got %T instead", value) } - - default: - _, _ = key, value - + parsedVal = jtv } + mv[key] = parsedVal + } - *v = sv + *v = mv return nil } -func awsAwsjson11_deserializeDocumentUserPoolAddOnsType(v **types.UserPoolAddOnsType, value interface{}) error { +func awsAwsjson11_deserializeDocumentUserPoolType(v **types.UserPoolType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -21288,85 +24064,273 @@ func awsAwsjson11_deserializeDocumentUserPoolAddOnsType(v **types.UserPoolAddOns return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.UserPoolAddOnsType + var sv *types.UserPoolType if *v == nil { - sv = &types.UserPoolAddOnsType{} + sv = &types.UserPoolType{} } else { sv = *v } for key, value := range shape { switch key { - case "AdvancedSecurityAdditionalFlows": - if err := awsAwsjson11_deserializeDocumentAdvancedSecurityAdditionalFlowsType(&sv.AdvancedSecurityAdditionalFlows, value); err != nil { + case "AccountRecoverySetting": + if err := awsAwsjson11_deserializeDocumentAccountRecoverySettingType(&sv.AccountRecoverySetting, value); err != nil { return err } - case "AdvancedSecurityMode": + case "AdminCreateUserConfig": + if err := awsAwsjson11_deserializeDocumentAdminCreateUserConfigType(&sv.AdminCreateUserConfig, value); err != nil { + return err + } + + case "AliasAttributes": + if err := awsAwsjson11_deserializeDocumentAliasAttributesListType(&sv.AliasAttributes, value); err != nil { + return err + } + + case "Arn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected AdvancedSecurityModeType to be of type string, got %T instead", value) + return fmt.Errorf("expected ArnType to be of type string, got %T instead", value) } - sv.AdvancedSecurityMode = types.AdvancedSecurityModeType(jtv) + sv.Arn = ptr.String(jtv) } - default: - _, _ = key, value + case "AutoVerifiedAttributes": + if err := awsAwsjson11_deserializeDocumentVerifiedAttributesListType(&sv.AutoVerifiedAttributes, value); err != nil { + return err + } - } - } - *v = sv - return 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)) -func awsAwsjson11_deserializeDocumentUserPoolClientDescription(v **types.UserPoolClientDescription, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } + default: + return fmt.Errorf("expected DateType to be a JSON Number, got %T instead", value) + + } + } + + case "CustomDomain": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DomainType to be of type string, got %T instead", value) + } + sv.CustomDomain = ptr.String(jtv) + } + + case "DeletionProtection": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DeletionProtectionType to be of type string, got %T instead", value) + } + sv.DeletionProtection = types.DeletionProtectionType(jtv) + } + + case "DeviceConfiguration": + if err := awsAwsjson11_deserializeDocumentDeviceConfigurationType(&sv.DeviceConfiguration, value); err != nil { + return err + } + + case "Domain": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DomainType to be of type string, got %T instead", value) + } + sv.Domain = ptr.String(jtv) + } + + case "EmailConfiguration": + if err := awsAwsjson11_deserializeDocumentEmailConfigurationType(&sv.EmailConfiguration, value); err != nil { + return err + } + + case "EmailConfigurationFailure": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StringType to be of type string, got %T instead", value) + } + sv.EmailConfigurationFailure = ptr.String(jtv) + } + + case "EmailVerificationMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EmailVerificationMessageType to be of type string, got %T instead", value) + } + sv.EmailVerificationMessage = ptr.String(jtv) + } + + case "EmailVerificationSubject": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EmailVerificationSubjectType to be of type string, got %T instead", value) + } + sv.EmailVerificationSubject = ptr.String(jtv) + } + + case "EstimatedNumberOfUsers": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected IntegerType to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.EstimatedNumberOfUsers = int32(i64) + } + + case "Id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UserPoolIdType to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "LambdaConfig": + if err := awsAwsjson11_deserializeDocumentLambdaConfigType(&sv.LambdaConfig, value); err != nil { + return err + } + + case "LastModifiedDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastModifiedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateType to be a JSON Number, got %T instead", value) + + } + } + + case "MfaConfiguration": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UserPoolMfaType to be of type string, got %T instead", value) + } + sv.MfaConfiguration = types.UserPoolMfaType(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UserPoolNameType to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "Policies": + if err := awsAwsjson11_deserializeDocumentUserPoolPolicyType(&sv.Policies, value); err != nil { + return err + } + + case "SchemaAttributes": + if err := awsAwsjson11_deserializeDocumentSchemaAttributesListType(&sv.SchemaAttributes, value); err != nil { + return err + } + + case "SmsAuthenticationMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SmsVerificationMessageType to be of type string, got %T instead", value) + } + sv.SmsAuthenticationMessage = ptr.String(jtv) + } - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } + case "SmsConfiguration": + if err := awsAwsjson11_deserializeDocumentSmsConfigurationType(&sv.SmsConfiguration, value); err != nil { + return err + } - var sv *types.UserPoolClientDescription - if *v == nil { - sv = &types.UserPoolClientDescription{} - } else { - sv = *v - } + case "SmsConfigurationFailure": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StringType to be of type string, got %T instead", value) + } + sv.SmsConfigurationFailure = ptr.String(jtv) + } - for key, value := range shape { - switch key { - case "ClientId": + case "SmsVerificationMessage": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ClientIdType to be of type string, got %T instead", value) + return fmt.Errorf("expected SmsVerificationMessageType to be of type string, got %T instead", value) } - sv.ClientId = ptr.String(jtv) + sv.SmsVerificationMessage = ptr.String(jtv) } - case "ClientName": + case "Status": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ClientNameType to be of type string, got %T instead", value) + return fmt.Errorf("expected StatusType to be of type string, got %T instead", value) } - sv.ClientName = ptr.String(jtv) + sv.Status = types.StatusType(jtv) } - case "UserPoolId": + case "UserAttributeUpdateSettings": + if err := awsAwsjson11_deserializeDocumentUserAttributeUpdateSettingsType(&sv.UserAttributeUpdateSettings, value); err != nil { + return err + } + + case "UsernameAttributes": + if err := awsAwsjson11_deserializeDocumentUsernameAttributesListType(&sv.UsernameAttributes, value); err != nil { + return err + } + + case "UsernameConfiguration": + if err := awsAwsjson11_deserializeDocumentUsernameConfigurationType(&sv.UsernameConfiguration, value); err != nil { + return err + } + + case "UserPoolAddOns": + if err := awsAwsjson11_deserializeDocumentUserPoolAddOnsType(&sv.UserPoolAddOns, value); err != nil { + return err + } + + case "UserPoolTags": + if err := awsAwsjson11_deserializeDocumentUserPoolTagsType(&sv.UserPoolTags, value); err != nil { + return err + } + + case "UserPoolTier": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected UserPoolIdType to be of type string, got %T instead", value) + return fmt.Errorf("expected UserPoolTierType to be of type string, got %T instead", value) } - sv.UserPoolId = ptr.String(jtv) + sv.UserPoolTier = types.UserPoolTierType(jtv) + } + + case "VerificationMessageTemplate": + if err := awsAwsjson11_deserializeDocumentVerificationMessageTemplateType(&sv.VerificationMessageTemplate, value); err != nil { + return err } default: @@ -21378,7 +24342,7 @@ func awsAwsjson11_deserializeDocumentUserPoolClientDescription(v **types.UserPoo return nil } -func awsAwsjson11_deserializeDocumentUserPoolClientListType(v *[]types.UserPoolClientDescription, value interface{}) error { +func awsAwsjson11_deserializeDocumentUsersListType(v *[]types.UserType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -21391,17 +24355,17 @@ func awsAwsjson11_deserializeDocumentUserPoolClientListType(v *[]types.UserPoolC return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.UserPoolClientDescription + var cv []types.UserType if *v == nil { - cv = []types.UserPoolClientDescription{} + cv = []types.UserType{} } else { cv = *v } for _, value := range shape { - var col types.UserPoolClientDescription + var col types.UserType destAddr := &col - if err := awsAwsjson11_deserializeDocumentUserPoolClientDescription(&destAddr, value); err != nil { + if err := awsAwsjson11_deserializeDocumentUserType(&destAddr, value); err != nil { return err } col = *destAddr @@ -21412,7 +24376,7 @@ func awsAwsjson11_deserializeDocumentUserPoolClientListType(v *[]types.UserPoolC return nil } -func awsAwsjson11_deserializeDocumentUserPoolClientType(v **types.UserPoolClientType, value interface{}) error { +func awsAwsjson11_deserializeDocumentUserType(v **types.UserType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -21425,98 +24389,35 @@ func awsAwsjson11_deserializeDocumentUserPoolClientType(v **types.UserPoolClient return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.UserPoolClientType + var sv *types.UserType if *v == nil { - sv = &types.UserPoolClientType{} + sv = &types.UserType{} } else { sv = *v } for key, value := range shape { switch key { - case "AccessTokenValidity": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected AccessTokenValidityType to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.AccessTokenValidity = ptr.Int32(int32(i64)) - } - - case "AllowedOAuthFlows": - if err := awsAwsjson11_deserializeDocumentOAuthFlowsType(&sv.AllowedOAuthFlows, value); err != nil { + case "Attributes": + if err := awsAwsjson11_deserializeDocumentAttributeListType(&sv.Attributes, value); err != nil { return err } - case "AllowedOAuthFlowsUserPoolClient": + case "Enabled": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected BooleanType to be of type *bool, got %T instead", value) } - sv.AllowedOAuthFlowsUserPoolClient = ptr.Bool(jtv) - } - - case "AllowedOAuthScopes": - if err := awsAwsjson11_deserializeDocumentScopeListType(&sv.AllowedOAuthScopes, value); err != nil { - return err - } - - case "AnalyticsConfiguration": - if err := awsAwsjson11_deserializeDocumentAnalyticsConfigurationType(&sv.AnalyticsConfiguration, value); err != nil { - return err - } - - case "AuthSessionValidity": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected AuthSessionValidityType to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.AuthSessionValidity = ptr.Int32(int32(i64)) + sv.Enabled = jtv } - case "CallbackURLs": - if err := awsAwsjson11_deserializeDocumentCallbackURLsListType(&sv.CallbackURLs, value); err != nil { + case "MFAOptions": + if err := awsAwsjson11_deserializeDocumentMFAOptionListType(&sv.MFAOptions, value); err != nil { return err } - case "ClientId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ClientIdType to be of type string, got %T instead", value) - } - sv.ClientId = ptr.String(jtv) - } - - case "ClientName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ClientNameType to be of type string, got %T instead", value) - } - sv.ClientName = ptr.String(jtv) - } - - case "ClientSecret": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ClientSecretType to be of type string, got %T instead", value) - } - sv.ClientSecret = ptr.String(jtv) - } - - case "CreationDate": + case "UserCreateDate": if value != nil { switch jtv := value.(type) { case json.Number: @@ -21524,7 +24425,7 @@ func awsAwsjson11_deserializeDocumentUserPoolClientType(v **types.UserPoolClient if err != nil { return err } - sv.CreationDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + sv.UserCreateDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected DateType to be a JSON Number, got %T instead", value) @@ -21532,52 +24433,7 @@ func awsAwsjson11_deserializeDocumentUserPoolClientType(v **types.UserPoolClient } } - case "DefaultRedirectURI": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected RedirectUrlType to be of type string, got %T instead", value) - } - sv.DefaultRedirectURI = ptr.String(jtv) - } - - case "EnablePropagateAdditionalUserContextData": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected WrappedBooleanType to be of type *bool, got %T instead", value) - } - sv.EnablePropagateAdditionalUserContextData = ptr.Bool(jtv) - } - - case "EnableTokenRevocation": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected WrappedBooleanType to be of type *bool, got %T instead", value) - } - sv.EnableTokenRevocation = ptr.Bool(jtv) - } - - case "ExplicitAuthFlows": - if err := awsAwsjson11_deserializeDocumentExplicitAuthFlowsListType(&sv.ExplicitAuthFlows, value); err != nil { - return err - } - - case "IdTokenValidity": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected IdTokenValidityType to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.IdTokenValidity = ptr.Int32(int32(i64)) - } - - case "LastModifiedDate": + case "UserLastModifiedDate": if value != nil { switch jtv := value.(type) { case json.Number: @@ -21585,7 +24441,7 @@ func awsAwsjson11_deserializeDocumentUserPoolClientType(v **types.UserPoolClient if err != nil { return err } - sv.LastModifiedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + sv.UserLastModifiedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected DateType to be a JSON Number, got %T instead", value) @@ -21593,60 +24449,22 @@ func awsAwsjson11_deserializeDocumentUserPoolClientType(v **types.UserPoolClient } } - case "LogoutURLs": - if err := awsAwsjson11_deserializeDocumentLogoutURLsListType(&sv.LogoutURLs, value); err != nil { - return err - } - - case "PreventUserExistenceErrors": + case "Username": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected PreventUserExistenceErrorTypes to be of type string, got %T instead", value) - } - sv.PreventUserExistenceErrors = types.PreventUserExistenceErrorTypes(jtv) - } - - case "ReadAttributes": - if err := awsAwsjson11_deserializeDocumentClientPermissionListType(&sv.ReadAttributes, value); err != nil { - return err - } - - case "RefreshTokenValidity": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected RefreshTokenValidityType to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err + return fmt.Errorf("expected UsernameType to be of type string, got %T instead", value) } - sv.RefreshTokenValidity = int32(i64) - } - - case "SupportedIdentityProviders": - if err := awsAwsjson11_deserializeDocumentSupportedIdentityProvidersListType(&sv.SupportedIdentityProviders, value); err != nil { - return err - } - - case "TokenValidityUnits": - if err := awsAwsjson11_deserializeDocumentTokenValidityUnitsType(&sv.TokenValidityUnits, value); err != nil { - return err + sv.Username = ptr.String(jtv) } - case "UserPoolId": + case "UserStatus": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected UserPoolIdType to be of type string, got %T instead", value) + return fmt.Errorf("expected UserStatusType to be of type string, got %T instead", value) } - sv.UserPoolId = ptr.String(jtv) - } - - case "WriteAttributes": - if err := awsAwsjson11_deserializeDocumentClientPermissionListType(&sv.WriteAttributes, value); err != nil { - return err + sv.UserStatus = types.UserStatusType(jtv) } default: @@ -21658,7 +24476,7 @@ func awsAwsjson11_deserializeDocumentUserPoolClientType(v **types.UserPoolClient return nil } -func awsAwsjson11_deserializeDocumentUserPoolDescriptionType(v **types.UserPoolDescriptionType, value interface{}) error { +func awsAwsjson11_deserializeDocumentVerificationMessageTemplateType(v **types.VerificationMessageTemplateType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -21671,77 +24489,67 @@ func awsAwsjson11_deserializeDocumentUserPoolDescriptionType(v **types.UserPoolD return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.UserPoolDescriptionType + var sv *types.VerificationMessageTemplateType if *v == nil { - sv = &types.UserPoolDescriptionType{} + sv = &types.VerificationMessageTemplateType{} } else { sv = *v } for key, value := range shape { switch key { - case "CreationDate": + case "DefaultEmailOption": 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 DateType to be a JSON Number, got %T instead", value) - + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DefaultEmailOptionType to be of type string, got %T instead", value) } + sv.DefaultEmailOption = types.DefaultEmailOptionType(jtv) } - case "Id": + case "EmailMessage": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected UserPoolIdType to be of type string, got %T instead", value) + return fmt.Errorf("expected EmailVerificationMessageType to be of type string, got %T instead", value) } - sv.Id = ptr.String(jtv) + sv.EmailMessage = ptr.String(jtv) } - case "LambdaConfig": - if err := awsAwsjson11_deserializeDocumentLambdaConfigType(&sv.LambdaConfig, value); err != nil { - return err + case "EmailMessageByLink": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EmailVerificationMessageByLinkType to be of type string, got %T instead", value) + } + sv.EmailMessageByLink = ptr.String(jtv) } - case "LastModifiedDate": + case "EmailSubject": if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LastModifiedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected DateType to be a JSON Number, got %T instead", value) - + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EmailVerificationSubjectType to be of type string, got %T instead", value) } + sv.EmailSubject = ptr.String(jtv) } - case "Name": + case "EmailSubjectByLink": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected UserPoolNameType to be of type string, got %T instead", value) + return fmt.Errorf("expected EmailVerificationSubjectByLinkType to be of type string, got %T instead", value) } - sv.Name = ptr.String(jtv) + sv.EmailSubjectByLink = ptr.String(jtv) } - case "Status": + case "SmsMessage": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected StatusType to be of type string, got %T instead", value) + return fmt.Errorf("expected SmsVerificationMessageType to be of type string, got %T instead", value) } - sv.Status = types.StatusType(jtv) + sv.SmsMessage = ptr.String(jtv) } default: @@ -21753,7 +24561,7 @@ func awsAwsjson11_deserializeDocumentUserPoolDescriptionType(v **types.UserPoolD return nil } -func awsAwsjson11_deserializeDocumentUserPoolListType(v *[]types.UserPoolDescriptionType, value interface{}) error { +func awsAwsjson11_deserializeDocumentVerifiedAttributesListType(v *[]types.VerifiedAttributeType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -21766,20 +24574,22 @@ func awsAwsjson11_deserializeDocumentUserPoolListType(v *[]types.UserPoolDescrip return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.UserPoolDescriptionType + var cv []types.VerifiedAttributeType if *v == nil { - cv = []types.UserPoolDescriptionType{} + cv = []types.VerifiedAttributeType{} } else { cv = *v } for _, value := range shape { - var col types.UserPoolDescriptionType - destAddr := &col - if err := awsAwsjson11_deserializeDocumentUserPoolDescriptionType(&destAddr, value); err != nil { - return err + var col types.VerifiedAttributeType + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VerifiedAttributeType to be of type string, got %T instead", value) + } + col = types.VerifiedAttributeType(jtv) } - col = *destAddr cv = append(cv, col) } @@ -21787,7 +24597,7 @@ func awsAwsjson11_deserializeDocumentUserPoolListType(v *[]types.UserPoolDescrip return nil } -func awsAwsjson11_deserializeDocumentUserPoolPolicyType(v **types.UserPoolPolicyType, value interface{}) error { +func awsAwsjson11_deserializeDocumentWebAuthnAuthenticatorTransportsList(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -21795,35 +24605,35 @@ func awsAwsjson11_deserializeDocumentUserPoolPolicyType(v **types.UserPoolPolicy return nil } - shape, ok := value.(map[string]interface{}) + shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.UserPoolPolicyType + var cv []string if *v == nil { - sv = &types.UserPoolPolicyType{} + cv = []string{} } else { - sv = *v + cv = *v } - for key, value := range shape { - switch key { - case "PasswordPolicy": - if err := awsAwsjson11_deserializeDocumentPasswordPolicyType(&sv.PasswordPolicy, value); err != nil { - return err + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WebAuthnAuthenticatorTransportType to be of type string, got %T instead", value) } - - default: - _, _ = key, value - + col = jtv } + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsAwsjson11_deserializeDocumentUserPoolTaggingException(v **types.UserPoolTaggingException, value interface{}) error { +func awsAwsjson11_deserializeDocumentWebAuthnChallengeNotFoundException(v **types.WebAuthnChallengeNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -21836,9 +24646,9 @@ func awsAwsjson11_deserializeDocumentUserPoolTaggingException(v **types.UserPool return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.UserPoolTaggingException + var sv *types.WebAuthnChallengeNotFoundException if *v == nil { - sv = &types.UserPoolTaggingException{} + sv = &types.WebAuthnChallengeNotFoundException{} } else { sv = *v } @@ -21863,7 +24673,7 @@ func awsAwsjson11_deserializeDocumentUserPoolTaggingException(v **types.UserPool return nil } -func awsAwsjson11_deserializeDocumentUserPoolTagsType(v *map[string]string, value interface{}) error { +func awsAwsjson11_deserializeDocumentWebAuthnClientMismatchException(v **types.WebAuthnClientMismatchException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -21876,30 +24686,34 @@ func awsAwsjson11_deserializeDocumentUserPoolTagsType(v *map[string]string, valu return fmt.Errorf("unexpected JSON type %v", value) } - var mv map[string]string + var sv *types.WebAuthnClientMismatchException if *v == nil { - mv = map[string]string{} + sv = &types.WebAuthnClientMismatchException{} } 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 TagValueType to be of type string, got %T instead", value) + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MessageType to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) } - parsedVal = jtv - } - mv[key] = parsedVal + default: + _, _ = key, value + + } } - *v = mv + *v = sv return nil } -func awsAwsjson11_deserializeDocumentUserPoolType(v **types.UserPoolType, value interface{}) error { +func awsAwsjson11_deserializeDocumentWebAuthnConfigurationMissingException(v **types.WebAuthnConfigurationMissingException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -21912,152 +24726,119 @@ func awsAwsjson11_deserializeDocumentUserPoolType(v **types.UserPoolType, value return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.UserPoolType + var sv *types.WebAuthnConfigurationMissingException if *v == nil { - sv = &types.UserPoolType{} + sv = &types.WebAuthnConfigurationMissingException{} } else { sv = *v } for key, value := range shape { switch key { - case "AccountRecoverySetting": - if err := awsAwsjson11_deserializeDocumentAccountRecoverySettingType(&sv.AccountRecoverySetting, value); err != nil { - return err - } - - case "AdminCreateUserConfig": - if err := awsAwsjson11_deserializeDocumentAdminCreateUserConfigType(&sv.AdminCreateUserConfig, value); err != nil { - return err - } - - case "AliasAttributes": - if err := awsAwsjson11_deserializeDocumentAliasAttributesListType(&sv.AliasAttributes, value); err != nil { - return err - } - - case "Arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ArnType to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - - case "AutoVerifiedAttributes": - if err := awsAwsjson11_deserializeDocumentVerifiedAttributesListType(&sv.AutoVerifiedAttributes, value); err != nil { - return err - } - - 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 DateType to be a JSON Number, got %T instead", value) - - } - } - - case "CustomDomain": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected DomainType to be of type string, got %T instead", value) + return fmt.Errorf("expected MessageType to be of type string, got %T instead", value) } - sv.CustomDomain = ptr.String(jtv) + sv.Message = ptr.String(jtv) } - case "DeletionProtection": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected DeletionProtectionType to be of type string, got %T instead", value) - } - sv.DeletionProtection = types.DeletionProtectionType(jtv) - } + default: + _, _ = key, value - case "DeviceConfiguration": - if err := awsAwsjson11_deserializeDocumentDeviceConfigurationType(&sv.DeviceConfiguration, value); err != nil { - return err - } + } + } + *v = sv + return nil +} - case "Domain": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected DomainType to be of type string, got %T instead", value) - } - sv.Domain = ptr.String(jtv) - } +func awsAwsjson11_deserializeDocumentWebAuthnConfigurationType(v **types.WebAuthnConfigurationType, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } - case "EmailConfiguration": - if err := awsAwsjson11_deserializeDocumentEmailConfigurationType(&sv.EmailConfiguration, value); err != nil { - return err - } + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } - case "EmailConfigurationFailure": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StringType to be of type string, got %T instead", value) - } - sv.EmailConfigurationFailure = ptr.String(jtv) - } + var sv *types.WebAuthnConfigurationType + if *v == nil { + sv = &types.WebAuthnConfigurationType{} + } else { + sv = *v + } - case "EmailVerificationMessage": + for key, value := range shape { + switch key { + case "RelyingPartyId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EmailVerificationMessageType to be of type string, got %T instead", value) + return fmt.Errorf("expected RelyingPartyIdType to be of type string, got %T instead", value) } - sv.EmailVerificationMessage = ptr.String(jtv) + sv.RelyingPartyId = ptr.String(jtv) } - case "EmailVerificationSubject": + case "UserVerification": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EmailVerificationSubjectType to be of type string, got %T instead", value) + return fmt.Errorf("expected UserVerificationType to be of type string, got %T instead", value) } - sv.EmailVerificationSubject = ptr.String(jtv) + sv.UserVerification = types.UserVerificationType(jtv) } - case "EstimatedNumberOfUsers": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected IntegerType to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.EstimatedNumberOfUsers = int32(i64) - } + default: + _, _ = key, value - case "Id": + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentWebAuthnCredentialDescription(v **types.WebAuthnCredentialDescription, 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.WebAuthnCredentialDescription + if *v == nil { + sv = &types.WebAuthnCredentialDescription{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AuthenticatorAttachment": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected UserPoolIdType to be of type string, got %T instead", value) + return fmt.Errorf("expected WebAuthnAuthenticatorAttachmentType to be of type string, got %T instead", value) } - sv.Id = ptr.String(jtv) + sv.AuthenticatorAttachment = ptr.String(jtv) } - case "LambdaConfig": - if err := awsAwsjson11_deserializeDocumentLambdaConfigType(&sv.LambdaConfig, value); err != nil { + case "AuthenticatorTransports": + if err := awsAwsjson11_deserializeDocumentWebAuthnAuthenticatorTransportsList(&sv.AuthenticatorTransports, value); err != nil { return err } - case "LastModifiedDate": + case "CreatedAt": if value != nil { switch jtv := value.(type) { case json.Number: @@ -22065,7 +24846,7 @@ func awsAwsjson11_deserializeDocumentUserPoolType(v **types.UserPoolType, value if err != nil { return err } - sv.LastModifiedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected DateType to be a JSON Number, got %T instead", value) @@ -22073,103 +24854,31 @@ func awsAwsjson11_deserializeDocumentUserPoolType(v **types.UserPoolType, value } } - case "MfaConfiguration": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected UserPoolMfaType to be of type string, got %T instead", value) - } - sv.MfaConfiguration = types.UserPoolMfaType(jtv) - } - - case "Name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected UserPoolNameType to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - case "Policies": - if err := awsAwsjson11_deserializeDocumentUserPoolPolicyType(&sv.Policies, value); err != nil { - return err - } - - case "SchemaAttributes": - if err := awsAwsjson11_deserializeDocumentSchemaAttributesListType(&sv.SchemaAttributes, value); err != nil { - return err - } - - case "SmsAuthenticationMessage": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SmsVerificationMessageType to be of type string, got %T instead", value) - } - sv.SmsAuthenticationMessage = ptr.String(jtv) - } - - case "SmsConfiguration": - if err := awsAwsjson11_deserializeDocumentSmsConfigurationType(&sv.SmsConfiguration, value); err != nil { - return err - } - - case "SmsConfigurationFailure": + case "CredentialId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected StringType to be of type string, got %T instead", value) } - sv.SmsConfigurationFailure = ptr.String(jtv) + sv.CredentialId = ptr.String(jtv) } - case "SmsVerificationMessage": + case "FriendlyCredentialName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SmsVerificationMessageType to be of type string, got %T instead", value) + return fmt.Errorf("expected StringType to be of type string, got %T instead", value) } - sv.SmsVerificationMessage = ptr.String(jtv) + sv.FriendlyCredentialName = ptr.String(jtv) } - case "Status": + case "RelyingPartyId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected StatusType to be of type string, got %T instead", value) + return fmt.Errorf("expected StringType to be of type string, got %T instead", value) } - sv.Status = types.StatusType(jtv) - } - - case "UserAttributeUpdateSettings": - if err := awsAwsjson11_deserializeDocumentUserAttributeUpdateSettingsType(&sv.UserAttributeUpdateSettings, value); err != nil { - return err - } - - case "UsernameAttributes": - if err := awsAwsjson11_deserializeDocumentUsernameAttributesListType(&sv.UsernameAttributes, value); err != nil { - return err - } - - case "UsernameConfiguration": - if err := awsAwsjson11_deserializeDocumentUsernameConfigurationType(&sv.UsernameConfiguration, value); err != nil { - return err - } - - case "UserPoolAddOns": - if err := awsAwsjson11_deserializeDocumentUserPoolAddOnsType(&sv.UserPoolAddOns, value); err != nil { - return err - } - - case "UserPoolTags": - if err := awsAwsjson11_deserializeDocumentUserPoolTagsType(&sv.UserPoolTags, value); err != nil { - return err - } - - case "VerificationMessageTemplate": - if err := awsAwsjson11_deserializeDocumentVerificationMessageTemplateType(&sv.VerificationMessageTemplate, value); err != nil { - return err + sv.RelyingPartyId = ptr.String(jtv) } default: @@ -22181,7 +24890,7 @@ func awsAwsjson11_deserializeDocumentUserPoolType(v **types.UserPoolType, value return nil } -func awsAwsjson11_deserializeDocumentUsersListType(v *[]types.UserType, value interface{}) error { +func awsAwsjson11_deserializeDocumentWebAuthnCredentialDescriptionListType(v *[]types.WebAuthnCredentialDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -22194,17 +24903,17 @@ func awsAwsjson11_deserializeDocumentUsersListType(v *[]types.UserType, value in return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.UserType + var cv []types.WebAuthnCredentialDescription if *v == nil { - cv = []types.UserType{} + cv = []types.WebAuthnCredentialDescription{} } else { cv = *v } for _, value := range shape { - var col types.UserType + var col types.WebAuthnCredentialDescription destAddr := &col - if err := awsAwsjson11_deserializeDocumentUserType(&destAddr, value); err != nil { + if err := awsAwsjson11_deserializeDocumentWebAuthnCredentialDescription(&destAddr, value); err != nil { return err } col = *destAddr @@ -22215,7 +24924,7 @@ func awsAwsjson11_deserializeDocumentUsersListType(v *[]types.UserType, value in return nil } -func awsAwsjson11_deserializeDocumentUserType(v **types.UserType, value interface{}) error { +func awsAwsjson11_deserializeDocumentWebAuthnCredentialNotSupportedException(v **types.WebAuthnCredentialNotSupportedException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -22228,82 +24937,22 @@ func awsAwsjson11_deserializeDocumentUserType(v **types.UserType, value interfac return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.UserType + var sv *types.WebAuthnCredentialNotSupportedException if *v == nil { - sv = &types.UserType{} + sv = &types.WebAuthnCredentialNotSupportedException{} } else { sv = *v } for key, value := range shape { switch key { - case "Attributes": - if err := awsAwsjson11_deserializeDocumentAttributeListType(&sv.Attributes, value); err != nil { - return err - } - - case "Enabled": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected BooleanType to be of type *bool, got %T instead", value) - } - sv.Enabled = jtv - } - - case "MFAOptions": - if err := awsAwsjson11_deserializeDocumentMFAOptionListType(&sv.MFAOptions, value); err != nil { - return err - } - - case "UserCreateDate": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.UserCreateDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected DateType to be a JSON Number, got %T instead", value) - - } - } - - case "UserLastModifiedDate": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.UserLastModifiedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected DateType to be a JSON Number, got %T instead", value) - - } - } - - case "Username": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected UsernameType to be of type string, got %T instead", value) - } - sv.Username = ptr.String(jtv) - } - - case "UserStatus": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected UserStatusType to be of type string, got %T instead", value) + return fmt.Errorf("expected MessageType to be of type string, got %T instead", value) } - sv.UserStatus = types.UserStatusType(jtv) + sv.Message = ptr.String(jtv) } default: @@ -22315,7 +24964,7 @@ func awsAwsjson11_deserializeDocumentUserType(v **types.UserType, value interfac return nil } -func awsAwsjson11_deserializeDocumentVerificationMessageTemplateType(v **types.VerificationMessageTemplateType, value interface{}) error { +func awsAwsjson11_deserializeDocumentWebAuthnNotEnabledException(v **types.WebAuthnNotEnabledException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -22328,67 +24977,62 @@ func awsAwsjson11_deserializeDocumentVerificationMessageTemplateType(v **types.V return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.VerificationMessageTemplateType + var sv *types.WebAuthnNotEnabledException if *v == nil { - sv = &types.VerificationMessageTemplateType{} + sv = &types.WebAuthnNotEnabledException{} } else { sv = *v } - for key, value := range shape { - switch key { - case "DefaultEmailOption": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected DefaultEmailOptionType to be of type string, got %T instead", value) - } - sv.DefaultEmailOption = types.DefaultEmailOptionType(jtv) - } - - case "EmailMessage": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EmailVerificationMessageType to be of type string, got %T instead", value) - } - sv.EmailMessage = ptr.String(jtv) - } - - case "EmailMessageByLink": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EmailVerificationMessageByLinkType to be of type string, got %T instead", value) - } - sv.EmailMessageByLink = ptr.String(jtv) - } - - case "EmailSubject": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EmailVerificationSubjectType to be of type string, got %T instead", value) - } - sv.EmailSubject = ptr.String(jtv) - } - - case "EmailSubjectByLink": + for key, value := range shape { + switch key { + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EmailVerificationSubjectByLinkType to be of type string, got %T instead", value) + return fmt.Errorf("expected MessageType to be of type string, got %T instead", value) } - sv.EmailSubjectByLink = ptr.String(jtv) + sv.Message = ptr.String(jtv) } - case "SmsMessage": + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentWebAuthnOriginNotAllowedException(v **types.WebAuthnOriginNotAllowedException, 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.WebAuthnOriginNotAllowedException + if *v == nil { + sv = &types.WebAuthnOriginNotAllowedException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SmsVerificationMessageType to be of type string, got %T instead", value) + return fmt.Errorf("expected MessageType to be of type string, got %T instead", value) } - sv.SmsMessage = ptr.String(jtv) + sv.Message = ptr.String(jtv) } default: @@ -22400,7 +25044,7 @@ func awsAwsjson11_deserializeDocumentVerificationMessageTemplateType(v **types.V return nil } -func awsAwsjson11_deserializeDocumentVerifiedAttributesListType(v *[]types.VerifiedAttributeType, value interface{}) error { +func awsAwsjson11_deserializeDocumentWebAuthnRelyingPartyMismatchException(v **types.WebAuthnRelyingPartyMismatchException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -22408,31 +25052,35 @@ func awsAwsjson11_deserializeDocumentVerifiedAttributesListType(v *[]types.Verif return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.VerifiedAttributeType + var sv *types.WebAuthnRelyingPartyMismatchException if *v == nil { - cv = []types.VerifiedAttributeType{} + sv = &types.WebAuthnRelyingPartyMismatchException{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.VerifiedAttributeType - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected VerifiedAttributeType to be of type string, got %T instead", value) + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MessageType to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) } - col = types.VerifiedAttributeType(jtv) - } - cv = append(cv, col) + default: + _, _ = key, value + + } } - *v = cv + *v = sv return nil } @@ -23420,6 +26068,37 @@ func awsAwsjson11_deserializeOpDocumentChangePasswordOutput(v **ChangePasswordOu return nil } +func awsAwsjson11_deserializeOpDocumentCompleteWebAuthnRegistrationOutput(v **CompleteWebAuthnRegistrationOutput, 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 *CompleteWebAuthnRegistrationOutput + if *v == nil { + sv = &CompleteWebAuthnRegistrationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentConfirmDeviceOutput(v **ConfirmDeviceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -23513,6 +26192,15 @@ func awsAwsjson11_deserializeOpDocumentConfirmSignUpOutput(v **ConfirmSignUpOutp for key, value := range shape { switch key { + case "Session": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SessionType to be of type string, got %T instead", value) + } + sv.Session = ptr.String(jtv) + } + default: _, _ = key, value @@ -23594,6 +26282,42 @@ func awsAwsjson11_deserializeOpDocumentCreateIdentityProviderOutput(v **CreateId return nil } +func awsAwsjson11_deserializeOpDocumentCreateManagedLoginBrandingOutput(v **CreateManagedLoginBrandingOutput, 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 *CreateManagedLoginBrandingOutput + if *v == nil { + sv = &CreateManagedLoginBrandingOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ManagedLoginBranding": + if err := awsAwsjson11_deserializeDocumentManagedLoginBrandingType(&sv.ManagedLoginBranding, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentCreateResourceServerOutput(v **CreateResourceServerOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -23630,7 +26354,132 @@ func awsAwsjson11_deserializeOpDocumentCreateResourceServerOutput(v **CreateReso return nil } -func awsAwsjson11_deserializeOpDocumentCreateUserImportJobOutput(v **CreateUserImportJobOutput, value interface{}) error { +func awsAwsjson11_deserializeOpDocumentCreateUserImportJobOutput(v **CreateUserImportJobOutput, 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 *CreateUserImportJobOutput + if *v == nil { + sv = &CreateUserImportJobOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "UserImportJob": + if err := awsAwsjson11_deserializeDocumentUserImportJobType(&sv.UserImportJob, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentCreateUserPoolClientOutput(v **CreateUserPoolClientOutput, 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 *CreateUserPoolClientOutput + if *v == nil { + sv = &CreateUserPoolClientOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "UserPoolClient": + if err := awsAwsjson11_deserializeDocumentUserPoolClientType(&sv.UserPoolClient, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentCreateUserPoolDomainOutput(v **CreateUserPoolDomainOutput, 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 *CreateUserPoolDomainOutput + if *v == nil { + sv = &CreateUserPoolDomainOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CloudFrontDomain": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DomainType to be of type string, got %T instead", value) + } + sv.CloudFrontDomain = ptr.String(jtv) + } + + case "ManagedLoginVersion": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected WrappedIntegerType to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ManagedLoginVersion = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentCreateUserPoolOutput(v **CreateUserPoolOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -23643,17 +26492,17 @@ func awsAwsjson11_deserializeOpDocumentCreateUserImportJobOutput(v **CreateUserI return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateUserImportJobOutput + var sv *CreateUserPoolOutput if *v == nil { - sv = &CreateUserImportJobOutput{} + sv = &CreateUserPoolOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "UserImportJob": - if err := awsAwsjson11_deserializeDocumentUserImportJobType(&sv.UserImportJob, value); err != nil { + case "UserPool": + if err := awsAwsjson11_deserializeDocumentUserPoolType(&sv.UserPool, value); err != nil { return err } @@ -23666,7 +26515,7 @@ func awsAwsjson11_deserializeOpDocumentCreateUserImportJobOutput(v **CreateUserI return nil } -func awsAwsjson11_deserializeOpDocumentCreateUserPoolClientOutput(v **CreateUserPoolClientOutput, value interface{}) error { +func awsAwsjson11_deserializeOpDocumentDeleteUserAttributesOutput(v **DeleteUserAttributesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -23679,20 +26528,15 @@ func awsAwsjson11_deserializeOpDocumentCreateUserPoolClientOutput(v **CreateUser return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateUserPoolClientOutput + var sv *DeleteUserAttributesOutput if *v == nil { - sv = &CreateUserPoolClientOutput{} + sv = &DeleteUserAttributesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "UserPoolClient": - if err := awsAwsjson11_deserializeDocumentUserPoolClientType(&sv.UserPoolClient, value); err != nil { - return err - } - default: _, _ = key, value @@ -23702,7 +26546,7 @@ func awsAwsjson11_deserializeOpDocumentCreateUserPoolClientOutput(v **CreateUser return nil } -func awsAwsjson11_deserializeOpDocumentCreateUserPoolDomainOutput(v **CreateUserPoolDomainOutput, value interface{}) error { +func awsAwsjson11_deserializeOpDocumentDeleteUserPoolDomainOutput(v **DeleteUserPoolDomainOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -23715,24 +26559,15 @@ func awsAwsjson11_deserializeOpDocumentCreateUserPoolDomainOutput(v **CreateUser return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateUserPoolDomainOutput + var sv *DeleteUserPoolDomainOutput if *v == nil { - sv = &CreateUserPoolDomainOutput{} + sv = &DeleteUserPoolDomainOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "CloudFrontDomain": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected DomainType to be of type string, got %T instead", value) - } - sv.CloudFrontDomain = ptr.String(jtv) - } - default: _, _ = key, value @@ -23742,7 +26577,7 @@ func awsAwsjson11_deserializeOpDocumentCreateUserPoolDomainOutput(v **CreateUser return nil } -func awsAwsjson11_deserializeOpDocumentCreateUserPoolOutput(v **CreateUserPoolOutput, value interface{}) error { +func awsAwsjson11_deserializeOpDocumentDeleteWebAuthnCredentialOutput(v **DeleteWebAuthnCredentialOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -23755,20 +26590,15 @@ func awsAwsjson11_deserializeOpDocumentCreateUserPoolOutput(v **CreateUserPoolOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateUserPoolOutput + var sv *DeleteWebAuthnCredentialOutput if *v == nil { - sv = &CreateUserPoolOutput{} + sv = &DeleteWebAuthnCredentialOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "UserPool": - if err := awsAwsjson11_deserializeDocumentUserPoolType(&sv.UserPool, value); err != nil { - return err - } - default: _, _ = key, value @@ -23778,7 +26608,7 @@ func awsAwsjson11_deserializeOpDocumentCreateUserPoolOutput(v **CreateUserPoolOu return nil } -func awsAwsjson11_deserializeOpDocumentDeleteUserAttributesOutput(v **DeleteUserAttributesOutput, value interface{}) error { +func awsAwsjson11_deserializeOpDocumentDescribeIdentityProviderOutput(v **DescribeIdentityProviderOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -23791,15 +26621,20 @@ func awsAwsjson11_deserializeOpDocumentDeleteUserAttributesOutput(v **DeleteUser return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteUserAttributesOutput + var sv *DescribeIdentityProviderOutput if *v == nil { - sv = &DeleteUserAttributesOutput{} + sv = &DescribeIdentityProviderOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "IdentityProvider": + if err := awsAwsjson11_deserializeDocumentIdentityProviderType(&sv.IdentityProvider, value); err != nil { + return err + } + default: _, _ = key, value @@ -23809,7 +26644,7 @@ func awsAwsjson11_deserializeOpDocumentDeleteUserAttributesOutput(v **DeleteUser return nil } -func awsAwsjson11_deserializeOpDocumentDeleteUserPoolDomainOutput(v **DeleteUserPoolDomainOutput, value interface{}) error { +func awsAwsjson11_deserializeOpDocumentDescribeManagedLoginBrandingByClientOutput(v **DescribeManagedLoginBrandingByClientOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -23822,15 +26657,20 @@ func awsAwsjson11_deserializeOpDocumentDeleteUserPoolDomainOutput(v **DeleteUser return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteUserPoolDomainOutput + var sv *DescribeManagedLoginBrandingByClientOutput if *v == nil { - sv = &DeleteUserPoolDomainOutput{} + sv = &DescribeManagedLoginBrandingByClientOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "ManagedLoginBranding": + if err := awsAwsjson11_deserializeDocumentManagedLoginBrandingType(&sv.ManagedLoginBranding, value); err != nil { + return err + } + default: _, _ = key, value @@ -23840,7 +26680,7 @@ func awsAwsjson11_deserializeOpDocumentDeleteUserPoolDomainOutput(v **DeleteUser return nil } -func awsAwsjson11_deserializeOpDocumentDescribeIdentityProviderOutput(v **DescribeIdentityProviderOutput, value interface{}) error { +func awsAwsjson11_deserializeOpDocumentDescribeManagedLoginBrandingOutput(v **DescribeManagedLoginBrandingOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -23853,17 +26693,17 @@ func awsAwsjson11_deserializeOpDocumentDescribeIdentityProviderOutput(v **Descri return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeIdentityProviderOutput + var sv *DescribeManagedLoginBrandingOutput if *v == nil { - sv = &DescribeIdentityProviderOutput{} + sv = &DescribeManagedLoginBrandingOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "IdentityProvider": - if err := awsAwsjson11_deserializeDocumentIdentityProviderType(&sv.IdentityProvider, value); err != nil { + case "ManagedLoginBranding": + if err := awsAwsjson11_deserializeDocumentManagedLoginBrandingType(&sv.ManagedLoginBranding, value); err != nil { return err } @@ -24429,6 +27269,65 @@ func awsAwsjson11_deserializeOpDocumentGetUserAttributeVerificationCodeOutput(v return nil } +func awsAwsjson11_deserializeOpDocumentGetUserAuthFactorsOutput(v **GetUserAuthFactorsOutput, 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 *GetUserAuthFactorsOutput + if *v == nil { + sv = &GetUserAuthFactorsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ConfiguredUserAuthFactors": + if err := awsAwsjson11_deserializeDocumentConfiguredUserAuthFactorsListType(&sv.ConfiguredUserAuthFactors, value); err != nil { + return err + } + + case "PreferredMfaSetting": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StringType to be of type string, got %T instead", value) + } + sv.PreferredMfaSetting = ptr.String(jtv) + } + + case "UserMFASettingList": + if err := awsAwsjson11_deserializeDocumentUserMFASettingListType(&sv.UserMFASettingList, value); err != nil { + return err + } + + case "Username": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UsernameType to be of type string, got %T instead", value) + } + sv.Username = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentGetUserOutput(v **GetUserOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -24539,6 +27438,11 @@ func awsAwsjson11_deserializeOpDocumentGetUserPoolMfaConfigOutput(v **GetUserPoo return err } + case "WebAuthnConfiguration": + if err := awsAwsjson11_deserializeDocumentWebAuthnConfigurationType(&sv.WebAuthnConfiguration, value); err != nil { + return err + } + default: _, _ = key, value @@ -24606,6 +27510,11 @@ func awsAwsjson11_deserializeOpDocumentInitiateAuthOutput(v **InitiateAuthOutput return err } + case "AvailableChallenges": + if err := awsAwsjson11_deserializeDocumentAvailableChallengeListType(&sv.AvailableChallenges, value); err != nil { + return err + } + case "ChallengeName": if value != nil { jtv, ok := value.(string) @@ -25079,6 +27988,51 @@ func awsAwsjson11_deserializeOpDocumentListUsersOutput(v **ListUsersOutput, valu return nil } +func awsAwsjson11_deserializeOpDocumentListWebAuthnCredentialsOutput(v **ListWebAuthnCredentialsOutput, 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 *ListWebAuthnCredentialsOutput + if *v == nil { + sv = &ListWebAuthnCredentialsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Credentials": + if err := awsAwsjson11_deserializeDocumentWebAuthnCredentialDescriptionListType(&sv.Credentials, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PaginationKey to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentResendConfirmationCodeOutput(v **ResendConfirmationCodeOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -25390,6 +28344,11 @@ func awsAwsjson11_deserializeOpDocumentSetUserPoolMfaConfigOutput(v **SetUserPoo return err } + case "WebAuthnConfiguration": + if err := awsAwsjson11_deserializeDocumentWebAuthnConfigurationType(&sv.WebAuthnConfiguration, value); err != nil { + return err + } + default: _, _ = key, value @@ -25457,6 +28416,15 @@ func awsAwsjson11_deserializeOpDocumentSignUpOutput(v **SignUpOutput, value inte return err } + case "Session": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SessionType to be of type string, got %T instead", value) + } + sv.Session = ptr.String(jtv) + } + case "UserConfirmed": if value != nil { jtv, ok := value.(bool) @@ -25520,6 +28488,42 @@ func awsAwsjson11_deserializeOpDocumentStartUserImportJobOutput(v **StartUserImp return nil } +func awsAwsjson11_deserializeOpDocumentStartWebAuthnRegistrationOutput(v **StartWebAuthnRegistrationOutput, 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 *StartWebAuthnRegistrationOutput + if *v == nil { + sv = &StartWebAuthnRegistrationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CredentialCreationOptions": + if err := awsAwsjson11_deserializeDocumentDocument(&sv.CredentialCreationOptions, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentStopUserImportJobOutput(v **StopUserImportJobOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -25752,6 +28756,42 @@ func awsAwsjson11_deserializeOpDocumentUpdateIdentityProviderOutput(v **UpdateId return nil } +func awsAwsjson11_deserializeOpDocumentUpdateManagedLoginBrandingOutput(v **UpdateManagedLoginBrandingOutput, 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 *UpdateManagedLoginBrandingOutput + if *v == nil { + sv = &UpdateManagedLoginBrandingOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ManagedLoginBranding": + if err := awsAwsjson11_deserializeDocumentManagedLoginBrandingType(&sv.ManagedLoginBranding, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentUpdateResourceServerOutput(v **UpdateResourceServerOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -25891,6 +28931,19 @@ func awsAwsjson11_deserializeOpDocumentUpdateUserPoolDomainOutput(v **UpdateUser sv.CloudFrontDomain = ptr.String(jtv) } + case "ManagedLoginVersion": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected WrappedIntegerType to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ManagedLoginVersion = ptr.Int32(int32(i64)) + } + default: _, _ = key, value diff --git a/service/cognitoidentityprovider/document/doc.go b/service/cognitoidentityprovider/document/doc.go new file mode 100644 index 00000000000..2b06b14f3cd --- /dev/null +++ b/service/cognitoidentityprovider/document/doc.go @@ -0,0 +1,66 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +// Package document implements encoding and decoding of open-content that has a JSON-like data model. +// This data-model allows for UTF-8 strings, arbitrary precision numbers, booleans, nulls, a list of these values, and a +// map of UTF-8 strings to these values. +// +// Interface defines the semantics for how a document type is marshalled and unmarshalled for requests and responses +// for the service. To send a document as input to the service you use NewLazyDocument and pass it the Go type to be +// sent to the service. NewLazyDocument returns a document Interface type that encodes the provided Go type during +// the request serialization step after you have invoked an API client operation that uses the document type. +// +// The following examples show how you can create document types using basic Go types. +// +// NewLazyDocument(map[string]interface{}{ +// "favoriteNumber": 42, +// "fruits": []string{"apple", "orange"}, +// "capitals": map[string]interface{}{ +// "Washington": "Olympia", +// "Oregon": "Salem", +// }, +// "skyIsBlue": true, +// }) +// +// NewLazyDocument(3.14159) +// +// NewLazyDocument([]interface{"One", 2, 3, 3.5, "four"}) +// +// NewLazyDocument(true) +// +// Services can send document types as part of their API responses. To retrieve the content of a response document +// you use the UnmarshalSmithyDocument method on the response document. When calling UnmarshalSmithyDocument you pass +// a reference to the Go type that you want to unmarshal and map the response to. +// +// For example, if you expect to receive key/value map from the service response: +// +// var kv map[string]interface{} +// if err := outputDocument.UnmarshalSmithyDocument(&kv); err != nil { +// // handle error +// } +// +// If a service can return one or more data-types in the response, you can use an empty interface and type switch to +// dynamically handle the response type. +// +// var v interface{} +// if err := outputDocument.UnmarshalSmithyDocument(&v); err != nil { +// // handle error +// } +// +// switch vv := v.(type) { +// case map[string]interface{}: +// // handle key/value map +// case []interface{}: +// // handle array of values +// case bool: +// // handle boolean +// case document.Number: +// // handle an arbitrary precision number +// case string: +// // handle string +// default: +// // handle unknown case +// } +// +// The mapping of Go types to document types is covered in more depth in https://pkg.go.dev/github.com/aws/smithy-go/document +// including more in depth examples that cover user-defined structure types. +package document diff --git a/service/cognitoidentityprovider/document/document.go b/service/cognitoidentityprovider/document/document.go new file mode 100644 index 00000000000..dc1fe3e685e --- /dev/null +++ b/service/cognitoidentityprovider/document/document.go @@ -0,0 +1,34 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package document + +import ( + internaldocument "github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider/internal/document" +) + +// Interface defines a document which is a protocol-agnostic type which supports a +// JSON-like data-model. You can use this type to send UTF-8 strings, arbitrary +// precision numbers, booleans, nulls, a list of these values, and a map of UTF-8 +// strings to these values. +// +// You create a document type using the NewLazyDocument function and passing it +// the Go type to marshal. When receiving a document in an API response, you use +// the document's UnmarshalSmithyDocument function to decode the response to your +// desired Go type. Unless documented specifically generated structure types in +// client packages or client types packages are not supported at this time. Such +// types embed a noSmithyDocumentSerde and will cause an error to be returned when +// attempting to send an API request. +// +// For more information see the accompanying package documentation and linked +// references. +type Interface = internaldocument.Interface + +// You create document type using the NewLazyDocument function and passing it the +// Go type to be marshaled and sent to the service. The document marshaler supports +// semantics similar to the encoding/json Go standard library. +// +// For more information see the accompanying package documentation and linked +// references. +func NewLazyDocument(v interface{}) Interface { + return internaldocument.NewDocumentMarshaler(v) +} diff --git a/service/cognitoidentityprovider/generated.json b/service/cognitoidentityprovider/generated.json index a2ff21c7d83..acfc1ced587 100644 --- a/service/cognitoidentityprovider/generated.json +++ b/service/cognitoidentityprovider/generated.json @@ -37,11 +37,13 @@ "api_op_AdminUserGlobalSignOut.go", "api_op_AssociateSoftwareToken.go", "api_op_ChangePassword.go", + "api_op_CompleteWebAuthnRegistration.go", "api_op_ConfirmDevice.go", "api_op_ConfirmForgotPassword.go", "api_op_ConfirmSignUp.go", "api_op_CreateGroup.go", "api_op_CreateIdentityProvider.go", + "api_op_CreateManagedLoginBranding.go", "api_op_CreateResourceServer.go", "api_op_CreateUserImportJob.go", "api_op_CreateUserPool.go", @@ -49,13 +51,17 @@ "api_op_CreateUserPoolDomain.go", "api_op_DeleteGroup.go", "api_op_DeleteIdentityProvider.go", + "api_op_DeleteManagedLoginBranding.go", "api_op_DeleteResourceServer.go", "api_op_DeleteUser.go", "api_op_DeleteUserAttributes.go", "api_op_DeleteUserPool.go", "api_op_DeleteUserPoolClient.go", "api_op_DeleteUserPoolDomain.go", + "api_op_DeleteWebAuthnCredential.go", "api_op_DescribeIdentityProvider.go", + "api_op_DescribeManagedLoginBranding.go", + "api_op_DescribeManagedLoginBrandingByClient.go", "api_op_DescribeResourceServer.go", "api_op_DescribeRiskConfiguration.go", "api_op_DescribeUserImportJob.go", @@ -73,6 +79,7 @@ "api_op_GetUICustomization.go", "api_op_GetUser.go", "api_op_GetUserAttributeVerificationCode.go", + "api_op_GetUserAuthFactors.go", "api_op_GetUserPoolMfaConfig.go", "api_op_GlobalSignOut.go", "api_op_InitiateAuth.go", @@ -86,6 +93,7 @@ "api_op_ListUserPools.go", "api_op_ListUsers.go", "api_op_ListUsersInGroup.go", + "api_op_ListWebAuthnCredentials.go", "api_op_ResendConfirmationCode.go", "api_op_RespondToAuthChallenge.go", "api_op_RevokeToken.go", @@ -97,6 +105,7 @@ "api_op_SetUserSettings.go", "api_op_SignUp.go", "api_op_StartUserImportJob.go", + "api_op_StartWebAuthnRegistration.go", "api_op_StopUserImportJob.go", "api_op_TagResource.go", "api_op_UntagResource.go", @@ -104,6 +113,7 @@ "api_op_UpdateDeviceStatus.go", "api_op_UpdateGroup.go", "api_op_UpdateIdentityProvider.go", + "api_op_UpdateManagedLoginBranding.go", "api_op_UpdateResourceServer.go", "api_op_UpdateUserAttributes.go", "api_op_UpdateUserPool.go", @@ -114,10 +124,14 @@ "auth.go", "deserializers.go", "doc.go", + "document/doc.go", + "document/document.go", "endpoints.go", "endpoints_config_test.go", "endpoints_test.go", "generated.json", + "internal/document/document.go", + "internal/document/document_test.go", "internal/endpoints/endpoints.go", "internal/endpoints/endpoints_test.go", "options.go", diff --git a/service/cognitoidentityprovider/internal/document/document.go b/service/cognitoidentityprovider/internal/document/document.go new file mode 100644 index 00000000000..f89044b4c34 --- /dev/null +++ b/service/cognitoidentityprovider/internal/document/document.go @@ -0,0 +1,99 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package document + +import ( + "bytes" + "encoding/json" + smithydocument "github.com/aws/smithy-go/document" + smithydocumentjson "github.com/aws/smithy-go/document/json" +) + +// github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider/internal/document.smithyDocument +// is an interface which is used to bind a document type to its service client. +type smithyDocument interface { + isSmithyDocument() +} + +// github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider/internal/document.Interface +// is a JSON-like data model type that is protocol agnostic and is usedto send +// open-content to a service. +type Interface interface { + smithyDocument + smithydocument.Marshaler + smithydocument.Unmarshaler +} + +type documentMarshaler struct { + value interface{} +} + +func (m *documentMarshaler) UnmarshalSmithyDocument(v interface{}) error { + mBytes, err := m.MarshalSmithyDocument() + if err != nil { + return err + } + + jDecoder := json.NewDecoder(bytes.NewReader(mBytes)) + jDecoder.UseNumber() + + var jv interface{} + if err := jDecoder.Decode(&v); err != nil { + return err + } + + return NewDocumentUnmarshaler(v).UnmarshalSmithyDocument(&jv) +} + +func (m *documentMarshaler) MarshalSmithyDocument() ([]byte, error) { + return smithydocumentjson.NewEncoder().Encode(m.value) +} + +func (m *documentMarshaler) isSmithyDocument() {} + +var _ Interface = (*documentMarshaler)(nil) + +type documentUnmarshaler struct { + value interface{} +} + +func (m *documentUnmarshaler) UnmarshalSmithyDocument(v interface{}) error { + decoder := smithydocumentjson.NewDecoder() + return decoder.DecodeJSONInterface(m.value, v) +} + +func (m *documentUnmarshaler) MarshalSmithyDocument() ([]byte, error) { + return json.Marshal(m.value) +} + +func (m *documentUnmarshaler) isSmithyDocument() {} + +var _ Interface = (*documentUnmarshaler)(nil) + +// NewDocumentMarshaler creates a new document marshaler for the given input type +func NewDocumentMarshaler(v interface{}) Interface { + return &documentMarshaler{ + value: v, + } +} + +// NewDocumentUnmarshaler creates a new document unmarshaler for the given service +// response +func NewDocumentUnmarshaler(v interface{}) Interface { + return &documentUnmarshaler{ + value: v, + } +} + +// github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider/internal/document.IsInterface +// returns whether the given Interface implementation is a valid client +// implementation +func IsInterface(v Interface) (ok bool) { + defer func() { + if err := recover(); err != nil { + ok = false + } + }() + v.isSmithyDocument() + return true +} diff --git a/service/cognitoidentityprovider/internal/document/document_test.go b/service/cognitoidentityprovider/internal/document/document_test.go new file mode 100644 index 00000000000..775645dcd6e --- /dev/null +++ b/service/cognitoidentityprovider/internal/document/document_test.go @@ -0,0 +1,11 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package document + +import ( + smithydocument "github.com/aws/smithy-go/document" +) + +var _ smithyDocument = (Interface)(nil) +var _ smithydocument.Marshaler = (Interface)(nil) +var _ smithydocument.Unmarshaler = (Interface)(nil) diff --git a/service/cognitoidentityprovider/serializers.go b/service/cognitoidentityprovider/serializers.go index 8f7d20ebc44..49bba386910 100644 --- a/service/cognitoidentityprovider/serializers.go +++ b/service/cognitoidentityprovider/serializers.go @@ -6,6 +6,8 @@ import ( "bytes" "context" "fmt" + "github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider/document" + internaldocument "github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider/internal/document" "github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/encoding/httpbinding" @@ -1785,6 +1787,67 @@ func (m *awsAwsjson11_serializeOpChangePassword) HandleSerialize(ctx context.Con return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpCompleteWebAuthnRegistration struct { +} + +func (*awsAwsjson11_serializeOpCompleteWebAuthnRegistration) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpCompleteWebAuthnRegistration) 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.(*CompleteWebAuthnRegistrationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSCognitoIdentityProviderService.CompleteWebAuthnRegistration") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentCompleteWebAuthnRegistrationInput(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 awsAwsjson11_serializeOpConfirmDevice struct { } @@ -2090,6 +2153,67 @@ func (m *awsAwsjson11_serializeOpCreateIdentityProvider) HandleSerialize(ctx con return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpCreateManagedLoginBranding struct { +} + +func (*awsAwsjson11_serializeOpCreateManagedLoginBranding) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpCreateManagedLoginBranding) 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.(*CreateManagedLoginBrandingInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSCognitoIdentityProviderService.CreateManagedLoginBranding") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentCreateManagedLoginBrandingInput(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 awsAwsjson11_serializeOpCreateResourceServer struct { } @@ -2517,6 +2641,67 @@ func (m *awsAwsjson11_serializeOpDeleteIdentityProvider) HandleSerialize(ctx con return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpDeleteManagedLoginBranding struct { +} + +func (*awsAwsjson11_serializeOpDeleteManagedLoginBranding) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteManagedLoginBranding) 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.(*DeleteManagedLoginBrandingInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSCognitoIdentityProviderService.DeleteManagedLoginBranding") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteManagedLoginBrandingInput(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 awsAwsjson11_serializeOpDeleteResourceServer struct { } @@ -2740,10 +2925,193 @@ func (m *awsAwsjson11_serializeOpDeleteUserPool) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSCognitoIdentityProviderService.DeleteUserPool") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSCognitoIdentityProviderService.DeleteUserPool") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteUserPoolInput(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 awsAwsjson11_serializeOpDeleteUserPoolClient struct { +} + +func (*awsAwsjson11_serializeOpDeleteUserPoolClient) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteUserPoolClient) 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.(*DeleteUserPoolClientInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSCognitoIdentityProviderService.DeleteUserPoolClient") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteUserPoolClientInput(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 awsAwsjson11_serializeOpDeleteUserPoolDomain struct { +} + +func (*awsAwsjson11_serializeOpDeleteUserPoolDomain) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteUserPoolDomain) 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.(*DeleteUserPoolDomainInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSCognitoIdentityProviderService.DeleteUserPoolDomain") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteUserPoolDomainInput(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 awsAwsjson11_serializeOpDeleteWebAuthnCredential struct { +} + +func (*awsAwsjson11_serializeOpDeleteWebAuthnCredential) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteWebAuthnCredential) 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.(*DeleteWebAuthnCredentialInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSCognitoIdentityProviderService.DeleteWebAuthnCredential") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentDeleteUserPoolInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson11_serializeOpDocumentDeleteWebAuthnCredentialInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2761,14 +3129,14 @@ func (m *awsAwsjson11_serializeOpDeleteUserPool) HandleSerialize(ctx context.Con return next.HandleSerialize(ctx, in) } -type awsAwsjson11_serializeOpDeleteUserPoolClient struct { +type awsAwsjson11_serializeOpDescribeIdentityProvider struct { } -func (*awsAwsjson11_serializeOpDeleteUserPoolClient) ID() string { +func (*awsAwsjson11_serializeOpDescribeIdentityProvider) ID() string { return "OperationSerializer" } -func (m *awsAwsjson11_serializeOpDeleteUserPoolClient) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson11_serializeOpDescribeIdentityProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -2780,7 +3148,7 @@ func (m *awsAwsjson11_serializeOpDeleteUserPoolClient) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteUserPoolClientInput) + input, ok := in.Parameters.(*DescribeIdentityProviderInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -2801,10 +3169,10 @@ func (m *awsAwsjson11_serializeOpDeleteUserPoolClient) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSCognitoIdentityProviderService.DeleteUserPoolClient") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSCognitoIdentityProviderService.DescribeIdentityProvider") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentDeleteUserPoolClientInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson11_serializeOpDocumentDescribeIdentityProviderInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2822,14 +3190,14 @@ func (m *awsAwsjson11_serializeOpDeleteUserPoolClient) HandleSerialize(ctx conte return next.HandleSerialize(ctx, in) } -type awsAwsjson11_serializeOpDeleteUserPoolDomain struct { +type awsAwsjson11_serializeOpDescribeManagedLoginBranding struct { } -func (*awsAwsjson11_serializeOpDeleteUserPoolDomain) ID() string { +func (*awsAwsjson11_serializeOpDescribeManagedLoginBranding) ID() string { return "OperationSerializer" } -func (m *awsAwsjson11_serializeOpDeleteUserPoolDomain) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson11_serializeOpDescribeManagedLoginBranding) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -2841,7 +3209,7 @@ func (m *awsAwsjson11_serializeOpDeleteUserPoolDomain) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteUserPoolDomainInput) + input, ok := in.Parameters.(*DescribeManagedLoginBrandingInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -2862,10 +3230,10 @@ func (m *awsAwsjson11_serializeOpDeleteUserPoolDomain) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSCognitoIdentityProviderService.DeleteUserPoolDomain") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSCognitoIdentityProviderService.DescribeManagedLoginBranding") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentDeleteUserPoolDomainInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson11_serializeOpDocumentDescribeManagedLoginBrandingInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2883,14 +3251,14 @@ func (m *awsAwsjson11_serializeOpDeleteUserPoolDomain) HandleSerialize(ctx conte return next.HandleSerialize(ctx, in) } -type awsAwsjson11_serializeOpDescribeIdentityProvider struct { +type awsAwsjson11_serializeOpDescribeManagedLoginBrandingByClient struct { } -func (*awsAwsjson11_serializeOpDescribeIdentityProvider) ID() string { +func (*awsAwsjson11_serializeOpDescribeManagedLoginBrandingByClient) ID() string { return "OperationSerializer" } -func (m *awsAwsjson11_serializeOpDescribeIdentityProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson11_serializeOpDescribeManagedLoginBrandingByClient) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -2902,7 +3270,7 @@ func (m *awsAwsjson11_serializeOpDescribeIdentityProvider) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeIdentityProviderInput) + input, ok := in.Parameters.(*DescribeManagedLoginBrandingByClientInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -2923,10 +3291,10 @@ func (m *awsAwsjson11_serializeOpDescribeIdentityProvider) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSCognitoIdentityProviderService.DescribeIdentityProvider") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSCognitoIdentityProviderService.DescribeManagedLoginBrandingByClient") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentDescribeIdentityProviderInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson11_serializeOpDocumentDescribeManagedLoginBrandingByClientInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -3981,6 +4349,67 @@ func (m *awsAwsjson11_serializeOpGetUserAttributeVerificationCode) HandleSeriali return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpGetUserAuthFactors struct { +} + +func (*awsAwsjson11_serializeOpGetUserAuthFactors) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetUserAuthFactors) 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.(*GetUserAuthFactorsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSCognitoIdentityProviderService.GetUserAuthFactors") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetUserAuthFactorsInput(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 awsAwsjson11_serializeOpGetUserPoolMfaConfig struct { } @@ -4774,6 +5203,67 @@ func (m *awsAwsjson11_serializeOpListUsersInGroup) HandleSerialize(ctx context.C return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpListWebAuthnCredentials struct { +} + +func (*awsAwsjson11_serializeOpListWebAuthnCredentials) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListWebAuthnCredentials) 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.(*ListWebAuthnCredentialsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSCognitoIdentityProviderService.ListWebAuthnCredentials") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListWebAuthnCredentialsInput(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 awsAwsjson11_serializeOpResendConfirmationCode struct { } @@ -5445,6 +5935,67 @@ func (m *awsAwsjson11_serializeOpStartUserImportJob) HandleSerialize(ctx context return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpStartWebAuthnRegistration struct { +} + +func (*awsAwsjson11_serializeOpStartWebAuthnRegistration) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpStartWebAuthnRegistration) 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.(*StartWebAuthnRegistrationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSCognitoIdentityProviderService.StartWebAuthnRegistration") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentStartWebAuthnRegistrationInput(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 awsAwsjson11_serializeOpStopUserImportJob struct { } @@ -5872,6 +6423,67 @@ func (m *awsAwsjson11_serializeOpUpdateIdentityProvider) HandleSerialize(ctx con return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpUpdateManagedLoginBranding struct { +} + +func (*awsAwsjson11_serializeOpUpdateManagedLoginBranding) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpUpdateManagedLoginBranding) 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.(*UpdateManagedLoginBrandingInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSCognitoIdentityProviderService.UpdateManagedLoginBranding") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentUpdateManagedLoginBrandingInput(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 awsAwsjson11_serializeOpUpdateResourceServer struct { } @@ -6425,6 +7037,17 @@ func awsAwsjson11_serializeDocumentAliasAttributesListType(v []types.AliasAttrib return nil } +func awsAwsjson11_serializeDocumentAllowedFirstAuthFactorsListType(v []types.AuthFactorType, 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 awsAwsjson11_serializeDocumentAnalyticsConfigurationType(v *types.AnalyticsConfigurationType, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -6469,6 +7092,51 @@ func awsAwsjson11_serializeDocumentAnalyticsMetadataType(v *types.AnalyticsMetad return nil } +func awsAwsjson11_serializeDocumentAssetListType(v []types.AssetType, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentAssetType(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentAssetType(v *types.AssetType, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Bytes != nil { + ok := object.Key("Bytes") + ok.Base64EncodeBytes(v.Bytes) + } + + if len(v.Category) > 0 { + ok := object.Key("Category") + ok.String(string(v.Category)) + } + + if len(v.ColorMode) > 0 { + ok := object.Key("ColorMode") + ok.String(string(v.ColorMode)) + } + + if len(v.Extension) > 0 { + ok := object.Key("Extension") + ok.String(string(v.Extension)) + } + + if v.ResourceId != nil { + ok := object.Key("ResourceId") + ok.String(*v.ResourceId) + } + + return nil +} + func awsAwsjson11_serializeDocumentAttributeListType(v []types.AttributeType, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -6781,6 +7449,21 @@ func awsAwsjson11_serializeDocumentDeviceSecretVerifierConfigType(v *types.Devic return nil } +func awsAwsjson11_serializeDocumentDocument(v document.Interface, value smithyjson.Value) error { + if v == nil { + return nil + } + if !internaldocument.IsInterface(v) { + return fmt.Errorf("%T is not a compatible document type", v) + } + db, err := v.MarshalSmithyDocument() + if err != nil { + return err + } + value.Write(db) + return nil +} + func awsAwsjson11_serializeDocumentEmailConfigurationType(v *types.EmailConfigurationType, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -7478,6 +8161,20 @@ func awsAwsjson11_serializeDocumentSearchedAttributeNamesListType(v []string, va return nil } +func awsAwsjson11_serializeDocumentSignInPolicyType(v *types.SignInPolicyType, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AllowedFirstAuthFactors != nil { + ok := object.Key("AllowedFirstAuthFactors") + if err := awsAwsjson11_serializeDocumentAllowedFirstAuthFactorsListType(v.AllowedFirstAuthFactors, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson11_serializeDocumentSkippedIPRangeListType(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -7710,6 +8407,13 @@ func awsAwsjson11_serializeDocumentUserPoolPolicyType(v *types.UserPoolPolicyTyp } } + if v.SignInPolicy != nil { + ok := object.Key("SignInPolicy") + if err := awsAwsjson11_serializeDocumentSignInPolicyType(v.SignInPolicy, ok); err != nil { + return err + } + } + return nil } @@ -7783,6 +8487,23 @@ func awsAwsjson11_serializeDocumentVerifiedAttributesListType(v []types.Verified return nil } +func awsAwsjson11_serializeDocumentWebAuthnConfigurationType(v *types.WebAuthnConfigurationType, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.RelyingPartyId != nil { + ok := object.Key("RelyingPartyId") + ok.String(*v.RelyingPartyId) + } + + if len(v.UserVerification) > 0 { + ok := object.Key("UserVerification") + ok.String(string(v.UserVerification)) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentAddCustomAttributesInput(v *AddCustomAttributesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -8105,6 +8826,11 @@ func awsAwsjson11_serializeOpDocumentAdminInitiateAuthInput(v *AdminInitiateAuth } } + if v.Session != nil { + ok := object.Key("Session") + ok.String(*v.Session) + } + if v.UserPoolId != nil { ok := object.Key("UserPoolId") ok.String(*v.UserPoolId) @@ -8551,6 +9277,25 @@ func awsAwsjson11_serializeOpDocumentChangePasswordInput(v *ChangePasswordInput, return nil } +func awsAwsjson11_serializeOpDocumentCompleteWebAuthnRegistrationInput(v *CompleteWebAuthnRegistrationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AccessToken != nil { + ok := object.Key("AccessToken") + ok.String(*v.AccessToken) + } + + if v.Credential != nil { + ok := object.Key("Credential") + if err := awsAwsjson11_serializeDocumentDocument(v.Credential, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson11_serializeOpDocumentConfirmDeviceInput(v *ConfirmDeviceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -8671,6 +9416,11 @@ func awsAwsjson11_serializeOpDocumentConfirmSignUpInput(v *ConfirmSignUpInput, v ok.String(*v.SecretHash) } + if v.Session != nil { + ok := object.Key("Session") + ok.String(*v.Session) + } + if v.UserContextData != nil { ok := object.Key("UserContextData") if err := awsAwsjson11_serializeDocumentUserContextDataType(v.UserContextData, ok); err != nil { @@ -8761,6 +9511,42 @@ func awsAwsjson11_serializeOpDocumentCreateIdentityProviderInput(v *CreateIdenti return nil } +func awsAwsjson11_serializeOpDocumentCreateManagedLoginBrandingInput(v *CreateManagedLoginBrandingInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Assets != nil { + ok := object.Key("Assets") + if err := awsAwsjson11_serializeDocumentAssetListType(v.Assets, ok); err != nil { + return err + } + } + + if v.ClientId != nil { + ok := object.Key("ClientId") + ok.String(*v.ClientId) + } + + if v.Settings != nil { + ok := object.Key("Settings") + if err := awsAwsjson11_serializeDocumentDocument(v.Settings, ok); err != nil { + return err + } + } + + if v.UseCognitoProvidedValues { + ok := object.Key("UseCognitoProvidedValues") + ok.Boolean(v.UseCognitoProvidedValues) + } + + if v.UserPoolId != nil { + ok := object.Key("UserPoolId") + ok.String(*v.UserPoolId) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentCreateResourceServerInput(v *CreateResourceServerInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -8965,6 +9751,11 @@ func awsAwsjson11_serializeOpDocumentCreateUserPoolDomainInput(v *CreateUserPool ok.String(*v.Domain) } + if v.ManagedLoginVersion != nil { + ok := object.Key("ManagedLoginVersion") + ok.Integer(*v.ManagedLoginVersion) + } + if v.UserPoolId != nil { ok := object.Key("UserPoolId") ok.String(*v.UserPoolId) @@ -9117,6 +9908,11 @@ func awsAwsjson11_serializeOpDocumentCreateUserPoolInput(v *CreateUserPoolInput, } } + if len(v.UserPoolTier) > 0 { + ok := object.Key("UserPoolTier") + ok.String(string(v.UserPoolTier)) + } + if v.VerificationMessageTemplate != nil { ok := object.Key("VerificationMessageTemplate") if err := awsAwsjson11_serializeDocumentVerificationMessageTemplateType(v.VerificationMessageTemplate, ok); err != nil { @@ -9161,6 +9957,23 @@ func awsAwsjson11_serializeOpDocumentDeleteIdentityProviderInput(v *DeleteIdenti return nil } +func awsAwsjson11_serializeOpDocumentDeleteManagedLoginBrandingInput(v *DeleteManagedLoginBrandingInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ManagedLoginBrandingId != nil { + ok := object.Key("ManagedLoginBrandingId") + ok.String(*v.ManagedLoginBrandingId) + } + + if v.UserPoolId != nil { + ok := object.Key("UserPoolId") + ok.String(*v.UserPoolId) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentDeleteResourceServerInput(v *DeleteResourceServerInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -9255,6 +10068,23 @@ func awsAwsjson11_serializeOpDocumentDeleteUserPoolInput(v *DeleteUserPoolInput, return nil } +func awsAwsjson11_serializeOpDocumentDeleteWebAuthnCredentialInput(v *DeleteWebAuthnCredentialInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AccessToken != nil { + ok := object.Key("AccessToken") + ok.String(*v.AccessToken) + } + + if v.CredentialId != nil { + ok := object.Key("CredentialId") + ok.String(*v.CredentialId) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentDescribeIdentityProviderInput(v *DescribeIdentityProviderInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -9272,6 +10102,50 @@ func awsAwsjson11_serializeOpDocumentDescribeIdentityProviderInput(v *DescribeId return nil } +func awsAwsjson11_serializeOpDocumentDescribeManagedLoginBrandingByClientInput(v *DescribeManagedLoginBrandingByClientInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientId != nil { + ok := object.Key("ClientId") + ok.String(*v.ClientId) + } + + if v.ReturnMergedResources { + ok := object.Key("ReturnMergedResources") + ok.Boolean(v.ReturnMergedResources) + } + + if v.UserPoolId != nil { + ok := object.Key("UserPoolId") + ok.String(*v.UserPoolId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeManagedLoginBrandingInput(v *DescribeManagedLoginBrandingInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ManagedLoginBrandingId != nil { + ok := object.Key("ManagedLoginBrandingId") + ok.String(*v.ManagedLoginBrandingId) + } + + if v.ReturnMergedResources { + ok := object.Key("ReturnMergedResources") + ok.Boolean(v.ReturnMergedResources) + } + + if v.UserPoolId != nil { + ok := object.Key("UserPoolId") + ok.String(*v.UserPoolId) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentDescribeResourceServerInput(v *DescribeResourceServerInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -9552,6 +10426,18 @@ func awsAwsjson11_serializeOpDocumentGetUserAttributeVerificationCodeInput(v *Ge return nil } +func awsAwsjson11_serializeOpDocumentGetUserAuthFactorsInput(v *GetUserAuthFactorsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AccessToken != nil { + ok := object.Key("AccessToken") + ok.String(*v.AccessToken) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentGetUserInput(v *GetUserInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -9623,6 +10509,11 @@ func awsAwsjson11_serializeOpDocumentInitiateAuthInput(v *InitiateAuthInput, val } } + if v.Session != nil { + ok := object.Key("Session") + ok.String(*v.Session) + } + if v.UserContextData != nil { ok := object.Key("UserContextData") if err := awsAwsjson11_serializeDocumentUserContextDataType(v.UserContextData, ok); err != nil { @@ -9855,6 +10746,28 @@ func awsAwsjson11_serializeOpDocumentListUsersInput(v *ListUsersInput, value smi return nil } +func awsAwsjson11_serializeOpDocumentListWebAuthnCredentialsInput(v *ListWebAuthnCredentialsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AccessToken != nil { + ok := object.Key("AccessToken") + ok.String(*v.AccessToken) + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentResendConfirmationCodeInput(v *ResendConfirmationCodeInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -10122,6 +11035,13 @@ func awsAwsjson11_serializeOpDocumentSetUserPoolMfaConfigInput(v *SetUserPoolMfa ok.String(*v.UserPoolId) } + if v.WebAuthnConfiguration != nil { + ok := object.Key("WebAuthnConfiguration") + if err := awsAwsjson11_serializeDocumentWebAuthnConfigurationType(v.WebAuthnConfiguration, ok); err != nil { + return err + } + } + return nil } @@ -10223,6 +11143,18 @@ func awsAwsjson11_serializeOpDocumentStartUserImportJobInput(v *StartUserImportJ return nil } +func awsAwsjson11_serializeOpDocumentStartWebAuthnRegistrationInput(v *StartWebAuthnRegistrationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AccessToken != nil { + ok := object.Key("AccessToken") + ok.String(*v.AccessToken) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentStopUserImportJobInput(v *StopUserImportJobInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -10402,6 +11334,42 @@ func awsAwsjson11_serializeOpDocumentUpdateIdentityProviderInput(v *UpdateIdenti return nil } +func awsAwsjson11_serializeOpDocumentUpdateManagedLoginBrandingInput(v *UpdateManagedLoginBrandingInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Assets != nil { + ok := object.Key("Assets") + if err := awsAwsjson11_serializeDocumentAssetListType(v.Assets, ok); err != nil { + return err + } + } + + if v.ManagedLoginBrandingId != nil { + ok := object.Key("ManagedLoginBrandingId") + ok.String(*v.ManagedLoginBrandingId) + } + + if v.Settings != nil { + ok := object.Key("Settings") + if err := awsAwsjson11_serializeDocumentDocument(v.Settings, ok); err != nil { + return err + } + } + + if v.UseCognitoProvidedValues { + ok := object.Key("UseCognitoProvidedValues") + ok.Boolean(v.UseCognitoProvidedValues) + } + + if v.UserPoolId != nil { + ok := object.Key("UserPoolId") + ok.String(*v.UserPoolId) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentUpdateResourceServerInput(v *UpdateResourceServerInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -10610,6 +11578,11 @@ func awsAwsjson11_serializeOpDocumentUpdateUserPoolDomainInput(v *UpdateUserPool ok.String(*v.Domain) } + if v.ManagedLoginVersion != nil { + ok := object.Key("ManagedLoginVersion") + ok.Integer(*v.ManagedLoginVersion) + } + if v.UserPoolId != nil { ok := object.Key("UserPoolId") ok.String(*v.UserPoolId) @@ -10691,6 +11664,11 @@ func awsAwsjson11_serializeOpDocumentUpdateUserPoolInput(v *UpdateUserPoolInput, } } + if v.PoolName != nil { + ok := object.Key("PoolName") + ok.String(*v.PoolName) + } + if v.SmsAuthenticationMessage != nil { ok := object.Key("SmsAuthenticationMessage") ok.String(*v.SmsAuthenticationMessage) @@ -10734,6 +11712,11 @@ func awsAwsjson11_serializeOpDocumentUpdateUserPoolInput(v *UpdateUserPoolInput, } } + if len(v.UserPoolTier) > 0 { + ok := object.Key("UserPoolTier") + ok.String(string(v.UserPoolTier)) + } + if v.VerificationMessageTemplate != nil { ok := object.Key("VerificationMessageTemplate") if err := awsAwsjson11_serializeDocumentVerificationMessageTemplateType(v.VerificationMessageTemplate, ok); err != nil { diff --git a/service/cognitoidentityprovider/snapshot/api_op_CompleteWebAuthnRegistration.go.snap b/service/cognitoidentityprovider/snapshot/api_op_CompleteWebAuthnRegistration.go.snap new file mode 100644 index 00000000000..c0c4986faf0 --- /dev/null +++ b/service/cognitoidentityprovider/snapshot/api_op_CompleteWebAuthnRegistration.go.snap @@ -0,0 +1,40 @@ +CompleteWebAuthnRegistration + 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 + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/cognitoidentityprovider/snapshot/api_op_CreateManagedLoginBranding.go.snap b/service/cognitoidentityprovider/snapshot/api_op_CreateManagedLoginBranding.go.snap new file mode 100644 index 00000000000..4b2edc4a63b --- /dev/null +++ b/service/cognitoidentityprovider/snapshot/api_op_CreateManagedLoginBranding.go.snap @@ -0,0 +1,41 @@ +CreateManagedLoginBranding + 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/cognitoidentityprovider/snapshot/api_op_DeleteManagedLoginBranding.go.snap b/service/cognitoidentityprovider/snapshot/api_op_DeleteManagedLoginBranding.go.snap new file mode 100644 index 00000000000..74a75fde3e4 --- /dev/null +++ b/service/cognitoidentityprovider/snapshot/api_op_DeleteManagedLoginBranding.go.snap @@ -0,0 +1,41 @@ +DeleteManagedLoginBranding + 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/cognitoidentityprovider/snapshot/api_op_DeleteWebAuthnCredential.go.snap b/service/cognitoidentityprovider/snapshot/api_op_DeleteWebAuthnCredential.go.snap new file mode 100644 index 00000000000..af9c6d4dab1 --- /dev/null +++ b/service/cognitoidentityprovider/snapshot/api_op_DeleteWebAuthnCredential.go.snap @@ -0,0 +1,40 @@ +DeleteWebAuthnCredential + 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 + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/cognitoidentityprovider/snapshot/api_op_DescribeManagedLoginBranding.go.snap b/service/cognitoidentityprovider/snapshot/api_op_DescribeManagedLoginBranding.go.snap new file mode 100644 index 00000000000..ed54a5af773 --- /dev/null +++ b/service/cognitoidentityprovider/snapshot/api_op_DescribeManagedLoginBranding.go.snap @@ -0,0 +1,41 @@ +DescribeManagedLoginBranding + 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/cognitoidentityprovider/snapshot/api_op_DescribeManagedLoginBrandingByClient.go.snap b/service/cognitoidentityprovider/snapshot/api_op_DescribeManagedLoginBrandingByClient.go.snap new file mode 100644 index 00000000000..197a870be71 --- /dev/null +++ b/service/cognitoidentityprovider/snapshot/api_op_DescribeManagedLoginBrandingByClient.go.snap @@ -0,0 +1,41 @@ +DescribeManagedLoginBrandingByClient + 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/cognitoidentityprovider/snapshot/api_op_GetUserAuthFactors.go.snap b/service/cognitoidentityprovider/snapshot/api_op_GetUserAuthFactors.go.snap new file mode 100644 index 00000000000..982edd38ab7 --- /dev/null +++ b/service/cognitoidentityprovider/snapshot/api_op_GetUserAuthFactors.go.snap @@ -0,0 +1,40 @@ +GetUserAuthFactors + 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 + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/cognitoidentityprovider/snapshot/api_op_ListWebAuthnCredentials.go.snap b/service/cognitoidentityprovider/snapshot/api_op_ListWebAuthnCredentials.go.snap new file mode 100644 index 00000000000..0770c08543e --- /dev/null +++ b/service/cognitoidentityprovider/snapshot/api_op_ListWebAuthnCredentials.go.snap @@ -0,0 +1,40 @@ +ListWebAuthnCredentials + 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 + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/cognitoidentityprovider/snapshot/api_op_StartWebAuthnRegistration.go.snap b/service/cognitoidentityprovider/snapshot/api_op_StartWebAuthnRegistration.go.snap new file mode 100644 index 00000000000..ed189c0959f --- /dev/null +++ b/service/cognitoidentityprovider/snapshot/api_op_StartWebAuthnRegistration.go.snap @@ -0,0 +1,40 @@ +StartWebAuthnRegistration + 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 + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/cognitoidentityprovider/snapshot/api_op_UpdateManagedLoginBranding.go.snap b/service/cognitoidentityprovider/snapshot/api_op_UpdateManagedLoginBranding.go.snap new file mode 100644 index 00000000000..b034d2df854 --- /dev/null +++ b/service/cognitoidentityprovider/snapshot/api_op_UpdateManagedLoginBranding.go.snap @@ -0,0 +1,41 @@ +UpdateManagedLoginBranding + 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/cognitoidentityprovider/snapshot_test.go b/service/cognitoidentityprovider/snapshot_test.go index 297c65f7681..7d3381cd54d 100644 --- a/service/cognitoidentityprovider/snapshot_test.go +++ b/service/cognitoidentityprovider/snapshot_test.go @@ -410,6 +410,18 @@ func TestCheckSnapshot_ChangePassword(t *testing.T) { } } +func TestCheckSnapshot_CompleteWebAuthnRegistration(t *testing.T) { + svc := New(Options{}) + _, err := svc.CompleteWebAuthnRegistration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CompleteWebAuthnRegistration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ConfirmDevice(t *testing.T) { svc := New(Options{}) _, err := svc.ConfirmDevice(context.Background(), nil, func(o *Options) { @@ -470,6 +482,18 @@ func TestCheckSnapshot_CreateIdentityProvider(t *testing.T) { } } +func TestCheckSnapshot_CreateManagedLoginBranding(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateManagedLoginBranding(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CreateManagedLoginBranding") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_CreateResourceServer(t *testing.T) { svc := New(Options{}) _, err := svc.CreateResourceServer(context.Background(), nil, func(o *Options) { @@ -554,6 +578,18 @@ func TestCheckSnapshot_DeleteIdentityProvider(t *testing.T) { } } +func TestCheckSnapshot_DeleteManagedLoginBranding(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteManagedLoginBranding(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeleteManagedLoginBranding") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DeleteResourceServer(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteResourceServer(context.Background(), nil, func(o *Options) { @@ -626,6 +662,18 @@ func TestCheckSnapshot_DeleteUserPoolDomain(t *testing.T) { } } +func TestCheckSnapshot_DeleteWebAuthnCredential(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteWebAuthnCredential(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeleteWebAuthnCredential") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DescribeIdentityProvider(t *testing.T) { svc := New(Options{}) _, err := svc.DescribeIdentityProvider(context.Background(), nil, func(o *Options) { @@ -638,6 +686,30 @@ func TestCheckSnapshot_DescribeIdentityProvider(t *testing.T) { } } +func TestCheckSnapshot_DescribeManagedLoginBranding(t *testing.T) { + svc := New(Options{}) + _, err := svc.DescribeManagedLoginBranding(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DescribeManagedLoginBranding") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_DescribeManagedLoginBrandingByClient(t *testing.T) { + svc := New(Options{}) + _, err := svc.DescribeManagedLoginBrandingByClient(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DescribeManagedLoginBrandingByClient") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DescribeResourceServer(t *testing.T) { svc := New(Options{}) _, err := svc.DescribeResourceServer(context.Background(), nil, func(o *Options) { @@ -842,6 +914,18 @@ func TestCheckSnapshot_GetUserAttributeVerificationCode(t *testing.T) { } } +func TestCheckSnapshot_GetUserAuthFactors(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetUserAuthFactors(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetUserAuthFactors") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_GetUserPoolMfaConfig(t *testing.T) { svc := New(Options{}) _, err := svc.GetUserPoolMfaConfig(context.Background(), nil, func(o *Options) { @@ -998,6 +1082,18 @@ func TestCheckSnapshot_ListUsersInGroup(t *testing.T) { } } +func TestCheckSnapshot_ListWebAuthnCredentials(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListWebAuthnCredentials(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListWebAuthnCredentials") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ResendConfirmationCode(t *testing.T) { svc := New(Options{}) _, err := svc.ResendConfirmationCode(context.Background(), nil, func(o *Options) { @@ -1130,6 +1226,18 @@ func TestCheckSnapshot_StartUserImportJob(t *testing.T) { } } +func TestCheckSnapshot_StartWebAuthnRegistration(t *testing.T) { + svc := New(Options{}) + _, err := svc.StartWebAuthnRegistration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "StartWebAuthnRegistration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_StopUserImportJob(t *testing.T) { svc := New(Options{}) _, err := svc.StopUserImportJob(context.Background(), nil, func(o *Options) { @@ -1214,6 +1322,18 @@ func TestCheckSnapshot_UpdateIdentityProvider(t *testing.T) { } } +func TestCheckSnapshot_UpdateManagedLoginBranding(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateManagedLoginBranding(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "UpdateManagedLoginBranding") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_UpdateResourceServer(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateResourceServer(context.Background(), nil, func(o *Options) { @@ -1645,6 +1765,18 @@ func TestUpdateSnapshot_ChangePassword(t *testing.T) { } } +func TestUpdateSnapshot_CompleteWebAuthnRegistration(t *testing.T) { + svc := New(Options{}) + _, err := svc.CompleteWebAuthnRegistration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CompleteWebAuthnRegistration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ConfirmDevice(t *testing.T) { svc := New(Options{}) _, err := svc.ConfirmDevice(context.Background(), nil, func(o *Options) { @@ -1705,6 +1837,18 @@ func TestUpdateSnapshot_CreateIdentityProvider(t *testing.T) { } } +func TestUpdateSnapshot_CreateManagedLoginBranding(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateManagedLoginBranding(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CreateManagedLoginBranding") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_CreateResourceServer(t *testing.T) { svc := New(Options{}) _, err := svc.CreateResourceServer(context.Background(), nil, func(o *Options) { @@ -1789,6 +1933,18 @@ func TestUpdateSnapshot_DeleteIdentityProvider(t *testing.T) { } } +func TestUpdateSnapshot_DeleteManagedLoginBranding(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteManagedLoginBranding(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeleteManagedLoginBranding") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DeleteResourceServer(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteResourceServer(context.Background(), nil, func(o *Options) { @@ -1861,6 +2017,18 @@ func TestUpdateSnapshot_DeleteUserPoolDomain(t *testing.T) { } } +func TestUpdateSnapshot_DeleteWebAuthnCredential(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteWebAuthnCredential(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeleteWebAuthnCredential") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DescribeIdentityProvider(t *testing.T) { svc := New(Options{}) _, err := svc.DescribeIdentityProvider(context.Background(), nil, func(o *Options) { @@ -1873,6 +2041,30 @@ func TestUpdateSnapshot_DescribeIdentityProvider(t *testing.T) { } } +func TestUpdateSnapshot_DescribeManagedLoginBranding(t *testing.T) { + svc := New(Options{}) + _, err := svc.DescribeManagedLoginBranding(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DescribeManagedLoginBranding") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_DescribeManagedLoginBrandingByClient(t *testing.T) { + svc := New(Options{}) + _, err := svc.DescribeManagedLoginBrandingByClient(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DescribeManagedLoginBrandingByClient") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DescribeResourceServer(t *testing.T) { svc := New(Options{}) _, err := svc.DescribeResourceServer(context.Background(), nil, func(o *Options) { @@ -2077,6 +2269,18 @@ func TestUpdateSnapshot_GetUserAttributeVerificationCode(t *testing.T) { } } +func TestUpdateSnapshot_GetUserAuthFactors(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetUserAuthFactors(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetUserAuthFactors") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_GetUserPoolMfaConfig(t *testing.T) { svc := New(Options{}) _, err := svc.GetUserPoolMfaConfig(context.Background(), nil, func(o *Options) { @@ -2233,6 +2437,18 @@ func TestUpdateSnapshot_ListUsersInGroup(t *testing.T) { } } +func TestUpdateSnapshot_ListWebAuthnCredentials(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListWebAuthnCredentials(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListWebAuthnCredentials") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ResendConfirmationCode(t *testing.T) { svc := New(Options{}) _, err := svc.ResendConfirmationCode(context.Background(), nil, func(o *Options) { @@ -2365,6 +2581,18 @@ func TestUpdateSnapshot_StartUserImportJob(t *testing.T) { } } +func TestUpdateSnapshot_StartWebAuthnRegistration(t *testing.T) { + svc := New(Options{}) + _, err := svc.StartWebAuthnRegistration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "StartWebAuthnRegistration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_StopUserImportJob(t *testing.T) { svc := New(Options{}) _, err := svc.StopUserImportJob(context.Background(), nil, func(o *Options) { @@ -2449,6 +2677,18 @@ func TestUpdateSnapshot_UpdateIdentityProvider(t *testing.T) { } } +func TestUpdateSnapshot_UpdateManagedLoginBranding(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateManagedLoginBranding(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "UpdateManagedLoginBranding") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_UpdateResourceServer(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateResourceServer(context.Background(), nil, func(o *Options) { diff --git a/service/cognitoidentityprovider/types/enums.go b/service/cognitoidentityprovider/types/enums.go index dd1f0fad5d0..bc8e51d02c0 100644 --- a/service/cognitoidentityprovider/types/enums.go +++ b/service/cognitoidentityprovider/types/enums.go @@ -88,6 +88,76 @@ func (AliasAttributeType) Values() []AliasAttributeType { } } +type AssetCategoryType string + +// Enum values for AssetCategoryType +const ( + AssetCategoryTypeFaviconIco AssetCategoryType = "FAVICON_ICO" + AssetCategoryTypeFaviconSvg AssetCategoryType = "FAVICON_SVG" + AssetCategoryTypeEmailGraphic AssetCategoryType = "EMAIL_GRAPHIC" + AssetCategoryTypeSmsGraphic AssetCategoryType = "SMS_GRAPHIC" + AssetCategoryTypeAuthAppGraphic AssetCategoryType = "AUTH_APP_GRAPHIC" + AssetCategoryTypePasswordGraphic AssetCategoryType = "PASSWORD_GRAPHIC" + AssetCategoryTypePasskeyGraphic AssetCategoryType = "PASSKEY_GRAPHIC" + AssetCategoryTypePageHeaderLogo AssetCategoryType = "PAGE_HEADER_LOGO" + AssetCategoryTypePageHeaderBackground AssetCategoryType = "PAGE_HEADER_BACKGROUND" + AssetCategoryTypePageFooterLogo AssetCategoryType = "PAGE_FOOTER_LOGO" + AssetCategoryTypePageFooterBackground AssetCategoryType = "PAGE_FOOTER_BACKGROUND" + AssetCategoryTypePageBackground AssetCategoryType = "PAGE_BACKGROUND" + AssetCategoryTypeFormBackground AssetCategoryType = "FORM_BACKGROUND" + AssetCategoryTypeFormLogo AssetCategoryType = "FORM_LOGO" + AssetCategoryTypeIdpButtonIcon AssetCategoryType = "IDP_BUTTON_ICON" +) + +// Values returns all known values for AssetCategoryType. 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 (AssetCategoryType) Values() []AssetCategoryType { + return []AssetCategoryType{ + "FAVICON_ICO", + "FAVICON_SVG", + "EMAIL_GRAPHIC", + "SMS_GRAPHIC", + "AUTH_APP_GRAPHIC", + "PASSWORD_GRAPHIC", + "PASSKEY_GRAPHIC", + "PAGE_HEADER_LOGO", + "PAGE_HEADER_BACKGROUND", + "PAGE_FOOTER_LOGO", + "PAGE_FOOTER_BACKGROUND", + "PAGE_BACKGROUND", + "FORM_BACKGROUND", + "FORM_LOGO", + "IDP_BUTTON_ICON", + } +} + +type AssetExtensionType string + +// Enum values for AssetExtensionType +const ( + AssetExtensionTypeIco AssetExtensionType = "ICO" + AssetExtensionTypeJpeg AssetExtensionType = "JPEG" + AssetExtensionTypePng AssetExtensionType = "PNG" + AssetExtensionTypeSvg AssetExtensionType = "SVG" + AssetExtensionTypeWebp AssetExtensionType = "WEBP" +) + +// Values returns all known values for AssetExtensionType. 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 (AssetExtensionType) Values() []AssetExtensionType { + return []AssetExtensionType{ + "ICO", + "JPEG", + "PNG", + "SVG", + "WEBP", + } +} + type AttributeDataType string // Enum values for AttributeDataType @@ -111,6 +181,29 @@ func (AttributeDataType) Values() []AttributeDataType { } } +type AuthFactorType string + +// Enum values for AuthFactorType +const ( + AuthFactorTypePassword AuthFactorType = "PASSWORD" + AuthFactorTypeEmailOtp AuthFactorType = "EMAIL_OTP" + AuthFactorTypeSmsOtp AuthFactorType = "SMS_OTP" + AuthFactorTypeWebAuthn AuthFactorType = "WEB_AUTHN" +) + +// Values returns all known values for AuthFactorType. 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 (AuthFactorType) Values() []AuthFactorType { + return []AuthFactorType{ + "PASSWORD", + "EMAIL_OTP", + "SMS_OTP", + "WEB_AUTHN", + } +} + type AuthFlowType string // Enum values for AuthFlowType @@ -122,6 +215,7 @@ const ( AuthFlowTypeAdminNoSrpAuth AuthFlowType = "ADMIN_NO_SRP_AUTH" AuthFlowTypeUserPasswordAuth AuthFlowType = "USER_PASSWORD_AUTH" AuthFlowTypeAdminUserPasswordAuth AuthFlowType = "ADMIN_USER_PASSWORD_AUTH" + AuthFlowTypeUserAuth AuthFlowType = "USER_AUTH" ) // Values returns all known values for AuthFlowType. Note that this can be @@ -137,6 +231,7 @@ func (AuthFlowType) Values() []AuthFlowType { "ADMIN_NO_SRP_AUTH", "USER_PASSWORD_AUTH", "ADMIN_USER_PASSWORD_AUTH", + "USER_AUTH", } } @@ -170,10 +265,15 @@ const ( ChallengeNameTypeMfaSetup ChallengeNameType = "MFA_SETUP" ChallengeNameTypePasswordVerifier ChallengeNameType = "PASSWORD_VERIFIER" ChallengeNameTypeCustomChallenge ChallengeNameType = "CUSTOM_CHALLENGE" + ChallengeNameTypeSelectChallenge ChallengeNameType = "SELECT_CHALLENGE" ChallengeNameTypeDeviceSrpAuth ChallengeNameType = "DEVICE_SRP_AUTH" ChallengeNameTypeDevicePasswordVerifier ChallengeNameType = "DEVICE_PASSWORD_VERIFIER" ChallengeNameTypeAdminNoSrpAuth ChallengeNameType = "ADMIN_NO_SRP_AUTH" ChallengeNameTypeNewPasswordRequired ChallengeNameType = "NEW_PASSWORD_REQUIRED" + ChallengeNameTypeSmsOtp ChallengeNameType = "SMS_OTP" + ChallengeNameTypePassword ChallengeNameType = "PASSWORD" + ChallengeNameTypeWebAuthn ChallengeNameType = "WEB_AUTHN" + ChallengeNameTypePasswordSrp ChallengeNameType = "PASSWORD_SRP" ) // Values returns all known values for ChallengeNameType. Note that this can be @@ -189,10 +289,15 @@ func (ChallengeNameType) Values() []ChallengeNameType { "MFA_SETUP", "PASSWORD_VERIFIER", "CUSTOM_CHALLENGE", + "SELECT_CHALLENGE", "DEVICE_SRP_AUTH", "DEVICE_PASSWORD_VERIFIER", "ADMIN_NO_SRP_AUTH", "NEW_PASSWORD_REQUIRED", + "SMS_OTP", + "PASSWORD", + "WEB_AUTHN", + "PASSWORD_SRP", } } @@ -215,6 +320,27 @@ func (ChallengeResponse) Values() []ChallengeResponse { } } +type ColorSchemeModeType string + +// Enum values for ColorSchemeModeType +const ( + ColorSchemeModeTypeLight ColorSchemeModeType = "LIGHT" + ColorSchemeModeTypeDark ColorSchemeModeType = "DARK" + ColorSchemeModeTypeDynamic ColorSchemeModeType = "DYNAMIC" +) + +// Values returns all known values for ColorSchemeModeType. 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 (ColorSchemeModeType) Values() []ColorSchemeModeType { + return []ColorSchemeModeType{ + "LIGHT", + "DARK", + "DYNAMIC", + } +} + type CompromisedCredentialsEventActionType string // Enum values for CompromisedCredentialsEventActionType @@ -489,6 +615,7 @@ const ( ExplicitAuthFlowsTypeAllowUserPasswordAuth ExplicitAuthFlowsType = "ALLOW_USER_PASSWORD_AUTH" ExplicitAuthFlowsTypeAllowUserSrpAuth ExplicitAuthFlowsType = "ALLOW_USER_SRP_AUTH" ExplicitAuthFlowsTypeAllowRefreshTokenAuth ExplicitAuthFlowsType = "ALLOW_REFRESH_TOKEN_AUTH" + ExplicitAuthFlowsTypeAllowUserAuth ExplicitAuthFlowsType = "ALLOW_USER_AUTH" ) // Values returns all known values for ExplicitAuthFlowsType. Note that this can @@ -505,6 +632,7 @@ func (ExplicitAuthFlowsType) Values() []ExplicitAuthFlowsType { "ALLOW_USER_PASSWORD_AUTH", "ALLOW_USER_SRP_AUTH", "ALLOW_REFRESH_TOKEN_AUTH", + "ALLOW_USER_AUTH", } } @@ -829,6 +957,27 @@ func (UserPoolMfaType) Values() []UserPoolMfaType { } } +type UserPoolTierType string + +// Enum values for UserPoolTierType +const ( + UserPoolTierTypeLite UserPoolTierType = "LITE" + UserPoolTierTypeEssentials UserPoolTierType = "ESSENTIALS" + UserPoolTierTypePlus UserPoolTierType = "PLUS" +) + +// Values returns all known values for UserPoolTierType. 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 (UserPoolTierType) Values() []UserPoolTierType { + return []UserPoolTierType{ + "LITE", + "ESSENTIALS", + "PLUS", + } +} + type UserStatusType string // Enum values for UserStatusType @@ -860,6 +1009,25 @@ func (UserStatusType) Values() []UserStatusType { } } +type UserVerificationType string + +// Enum values for UserVerificationType +const ( + UserVerificationTypeRequired UserVerificationType = "required" + UserVerificationTypePreferred UserVerificationType = "preferred" +) + +// Values returns all known values for UserVerificationType. 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 (UserVerificationType) Values() []UserVerificationType { + return []UserVerificationType{ + "required", + "preferred", + } +} + type VerifiedAttributeType string // Enum values for VerifiedAttributeType diff --git a/service/cognitoidentityprovider/types/errors.go b/service/cognitoidentityprovider/types/errors.go index 73ba3f31487..b42630d69e7 100644 --- a/service/cognitoidentityprovider/types/errors.go +++ b/service/cognitoidentityprovider/types/errors.go @@ -197,6 +197,33 @@ func (e *ExpiredCodeException) ErrorCode() string { } func (e *ExpiredCodeException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// This exception is thrown when a feature you attempted to configure isn't +// available in your current feature plan. +type FeatureUnavailableInTierException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *FeatureUnavailableInTierException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *FeatureUnavailableInTierException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *FeatureUnavailableInTierException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "FeatureUnavailableInTierException" + } + return *e.ErrorCodeOverride +} +func (e *FeatureUnavailableInTierException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // This exception is thrown when WAF doesn't allow your request based on a web ACL // that's associated with your user pool. type ForbiddenException struct { @@ -366,6 +393,8 @@ type InvalidParameterException struct { ErrorCodeOverride *string + ReasonCode *string + noSmithyDocumentSerde } @@ -527,6 +556,35 @@ func (e *LimitExceededException) ErrorCode() string { } func (e *LimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// This exception is thrown when you attempt to apply a managed login branding +// style to an app client that already has an assigned style. +type ManagedLoginBrandingExistsException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ManagedLoginBrandingExistsException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ManagedLoginBrandingExistsException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ManagedLoginBrandingExistsException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ManagedLoginBrandingExistsException" + } + return *e.ErrorCodeOverride +} +func (e *ManagedLoginBrandingExistsException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + // This exception is thrown when Amazon Cognito can't find a multi-factor // authentication (MFA) method. type MFAMethodNotFoundException struct { @@ -741,6 +799,33 @@ func (e *SoftwareTokenMFANotFoundException) ErrorCode() string { } func (e *SoftwareTokenMFANotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// This exception is thrown when you've attempted to change your feature plan but +// the operation isn't permitted. +type TierChangeNotAllowedException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TierChangeNotAllowedException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TierChangeNotAllowedException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TierChangeNotAllowedException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TierChangeNotAllowedException" + } + return *e.ErrorCodeOverride +} +func (e *TierChangeNotAllowedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // This exception is thrown when the user has made too many failed attempts for a // given action, such as sign-in. type TooManyFailedAttemptsException struct { @@ -1140,3 +1225,200 @@ func (e *UserPoolTaggingException) ErrorCode() string { return *e.ErrorCodeOverride } func (e *UserPoolTaggingException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// This exception is thrown when the challenge from StartWebAuthn registration has +// expired. +type WebAuthnChallengeNotFoundException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *WebAuthnChallengeNotFoundException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *WebAuthnChallengeNotFoundException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *WebAuthnChallengeNotFoundException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "WebAuthnChallengeNotFoundException" + } + return *e.ErrorCodeOverride +} +func (e *WebAuthnChallengeNotFoundException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// This exception is thrown when the access token is for a different client than +// the one in the original StartWebAuthnRegistration request. +type WebAuthnClientMismatchException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *WebAuthnClientMismatchException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *WebAuthnClientMismatchException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *WebAuthnClientMismatchException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "WebAuthnClientMismatchException" + } + return *e.ErrorCodeOverride +} +func (e *WebAuthnClientMismatchException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// This exception is thrown when a user pool doesn't have a configured relying +// party id or a user pool domain. +type WebAuthnConfigurationMissingException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *WebAuthnConfigurationMissingException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *WebAuthnConfigurationMissingException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *WebAuthnConfigurationMissingException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "WebAuthnConfigurationMissingException" + } + return *e.ErrorCodeOverride +} +func (e *WebAuthnConfigurationMissingException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// This exception is thrown when a user presents passkey credentials from an +// unsupported device or provider. +type WebAuthnCredentialNotSupportedException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *WebAuthnCredentialNotSupportedException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *WebAuthnCredentialNotSupportedException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *WebAuthnCredentialNotSupportedException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "WebAuthnCredentialNotSupportedException" + } + return *e.ErrorCodeOverride +} +func (e *WebAuthnCredentialNotSupportedException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// This exception is thrown when the passkey feature isn't enabled for the user +// pool. +type WebAuthnNotEnabledException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *WebAuthnNotEnabledException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *WebAuthnNotEnabledException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *WebAuthnNotEnabledException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "WebAuthnNotEnabledException" + } + return *e.ErrorCodeOverride +} +func (e *WebAuthnNotEnabledException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// This exception is thrown when the passkey credential's registration origin does +// not align with the user pool relying party id. +type WebAuthnOriginNotAllowedException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *WebAuthnOriginNotAllowedException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *WebAuthnOriginNotAllowedException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *WebAuthnOriginNotAllowedException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "WebAuthnOriginNotAllowedException" + } + return *e.ErrorCodeOverride +} +func (e *WebAuthnOriginNotAllowedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// This exception is thrown when the given passkey credential is associated with a +// different relying party ID than the user pool relying party ID. +type WebAuthnRelyingPartyMismatchException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *WebAuthnRelyingPartyMismatchException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *WebAuthnRelyingPartyMismatchException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *WebAuthnRelyingPartyMismatchException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "WebAuthnRelyingPartyMismatchException" + } + return *e.ErrorCodeOverride +} +func (e *WebAuthnRelyingPartyMismatchException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} diff --git a/service/cognitoidentityprovider/types/types.go b/service/cognitoidentityprovider/types/types.go index 0bbc9d469aa..eaa75968c7c 100644 --- a/service/cognitoidentityprovider/types/types.go +++ b/service/cognitoidentityprovider/types/types.go @@ -3,54 +3,88 @@ package types import ( + "github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider/document" smithydocument "github.com/aws/smithy-go/document" "time" ) -// The data type for AccountRecoverySetting . +// The settings for user message delivery in forgot-password operations. Contains +// preference for email or SMS message delivery of password reset codes, or for +// admin-only password reset. +// +// This data type is a request and response parameter of [CreateUserPool] and [UpdateUserPool], and a response +// parameter of [DescribeUserPool]. +// +// [UpdateUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateUserPool.html +// [CreateUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateUserPool.html +// [DescribeUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeUserPool.html type AccountRecoverySettingType struct { - // The list of RecoveryOptionTypes . + // The list of options and priorities for user message delivery in forgot-password + // operations. Sets or displays user pool preferences for email or SMS message + // priority, whether users should fall back to a second delivery method, and + // whether passwords should only be reset by administrators. RecoveryMechanisms []RecoveryOptionType noSmithyDocumentSerde } -// Account takeover actions type. +// A list of account-takeover actions for each level of risk that Amazon Cognito +// might assess with advanced security features. +// +// This data type is a request parameter of [SetRiskConfiguration] and a response parameter of [DescribeRiskConfiguration]. +// +// [DescribeRiskConfiguration]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeRiskConfiguration.html +// [SetRiskConfiguration]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_SetRiskConfiguration.html type AccountTakeoverActionsType struct { - // Action to take for a high risk. + // The action that you assign to a high-risk assessment by advanced security + // features. HighAction *AccountTakeoverActionType - // Action to take for a low risk. + // The action that you assign to a low-risk assessment by advanced security + // features. LowAction *AccountTakeoverActionType - // Action to take for a medium risk. + // The action that you assign to a medium-risk assessment by advanced security + // features. MediumAction *AccountTakeoverActionType noSmithyDocumentSerde } -// Account takeover action type. +// The automated response to a risk level for adaptive authentication in +// full-function, or ENFORCED , mode. You can assign an action to each risk level +// that advanced security features evaluates. +// +// This data type is a request parameter of [SetRiskConfiguration] and a response parameter of [DescribeRiskConfiguration]. +// +// [DescribeRiskConfiguration]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeRiskConfiguration.html +// [SetRiskConfiguration]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_SetRiskConfiguration.html type AccountTakeoverActionType struct { - // The action to take in response to the account takeover action. Valid values are - // as follows: - // - // - BLOCK Choosing this action will block the request. + // The action to take for the attempted account takeover action for the associated + // risk level. Valid values are as follows: // - // - MFA_IF_CONFIGURED Present an MFA challenge if user has configured it, else - // allow the request. + // - BLOCK : Block the request. // - // - MFA_REQUIRED Present an MFA challenge if user has configured it, else block + // - MFA_IF_CONFIGURED : Present an MFA challenge if possible. MFA is possible if + // the user pool has active MFA methods that the user can set up. For example, if + // the user pool only supports SMS message MFA but the user doesn't have a phone + // number attribute, MFA setup isn't possible. If MFA setup isn't possible, allow // the request. // - // - NO_ACTION Allow the user to sign in. + // - MFA_REQUIRED : Present an MFA challenge if possible. Block the request if a + // user hasn't set up MFA. To sign in with required MFA, users must have an email + // address or phone number attribute, or a registered TOTP factor. + // + // - NO_ACTION : Take no action. Permit sign-in. // // This member is required. EventAction AccountTakeoverEventActionType - // Flag specifying whether to send a notification. + // Determines whether Amazon Cognito sends a user a notification message when your + // user pools assesses a user's session at the associated risk level. // // This member is required. Notify bool @@ -58,43 +92,71 @@ type AccountTakeoverActionType struct { noSmithyDocumentSerde } -// Configuration for mitigation actions and notification for different levels of -// risk detected for a potential account takeover. +// The settings for automated responses and notification templates for adaptive +// authentication with advanced security features. +// +// This data type is a request parameter of [SetRiskConfiguration] and a response parameter of [DescribeRiskConfiguration]. +// +// [DescribeRiskConfiguration]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeRiskConfiguration.html +// [SetRiskConfiguration]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_SetRiskConfiguration.html type AccountTakeoverRiskConfigurationType struct { - // Account takeover risk configuration actions. + // A list of account-takeover actions for each level of risk that Amazon Cognito + // might assess with advanced security features. // // This member is required. Actions *AccountTakeoverActionsType - // The notify configuration used to construct email notifications. + // The settings for composing and sending an email message when advanced security + // features assesses a risk level with adaptive authentication. When you choose to + // notify users in AccountTakeoverRiskConfiguration , Amazon Cognito sends an email + // message using the method and template that you set with this data type. NotifyConfiguration *NotifyConfigurationType noSmithyDocumentSerde } -// The configuration for creating a new user profile. +// The settings for administrator creation of users in a user pool. Contains +// settings for allowing user sign-up, customizing invitation messages to new +// users, and the amount of time before temporary passwords expire. +// +// This data type is a request and response parameter of [CreateUserPool] and [UpdateUserPool], and a response +// parameter of [DescribeUserPool]. +// +// [UpdateUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateUserPool.html +// [CreateUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateUserPool.html +// [DescribeUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeUserPool.html type AdminCreateUserConfigType struct { - // Set to True if only the administrator is allowed to create user profiles. Set - // to False if users can sign themselves up via an app. + // The setting for allowing self-service sign-up. When true , only administrators + // can create new user profiles. When false , users can register themselves and + // create a new user profile with the [SignUp]operation. + // + // [SignUp]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_SignUp.html AllowAdminCreateUserOnly bool - // The message template to be used for the welcome message to new users. + // The template for the welcome message to new users. This template must include + // the {####} temporary password placeholder if you are creating users with + // passwords. If your users don't have passwords, you can omit the placeholder. // // See also [Customizing User Invitation Messages]. // // [Customizing User Invitation Messages]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pool-settings-message-customizations.html#cognito-user-pool-settings-user-invitation-message-customization InviteMessageTemplate *MessageTemplateType - // The user account expiration limit, in days, after which a new account that - // hasn't signed in is no longer usable. To reset the account after that time - // limit, you must call AdminCreateUser again, specifying "RESEND" for the - // MessageAction parameter. The default value for this parameter is 7. + // This parameter is no longer in use. Configure the duration of temporary + // passwords with the TemporaryPasswordValidityDays parameter of [PasswordPolicyType]. For older user + // pools that have a UnusedAccountValidityDays configuration, that value is + // effective until you set a value for TemporaryPasswordValidityDays . // - // If you set a value for TemporaryPasswordValidityDays in PasswordPolicy , that - // value will be used, and UnusedAccountValidityDays will be no longer be an - // available parameter for that user pool. + // The password expiration limit in days for administrator-created users. When + // this time expires, the user can't sign in with their temporary password. To + // reset the account after that time limit, you must call AdminCreateUser again, + // specifying RESEND for the MessageAction parameter. + // + // The default value for this parameter is 7. + // + // [PasswordPolicyType]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_PasswordPolicyType.html UnusedAccountValidityDays int32 noSmithyDocumentSerde @@ -113,29 +175,40 @@ type AdvancedSecurityAdditionalFlowsType struct { noSmithyDocumentSerde } -// The Amazon Pinpoint analytics configuration necessary to collect metrics for a -// user pool. +// The settings for Amazon Pinpoint analytics configuration. With an analytics +// configuration, your application can collect user-activity metrics for user +// notifications with a Amazon Pinpoint campaign. +// +// Amazon Pinpoint isn't available in all Amazon Web Services Regions. For a list +// of available Regions, see [Amazon Cognito and Amazon Pinpoint Region availability]. +// +// This data type is a request parameter of [CreateUserPoolClient] and [UpdateUserPoolClient], and a response parameter of [DescribeUserPoolClient]. // -// In Regions where Amazon Pinpoint isn't available, user pools only support -// sending events to Amazon Pinpoint projects in us-east-1. In Regions where Amazon -// Pinpoint is available, user pools support sending events to Amazon Pinpoint -// projects within that same Region. +// [DescribeUserPoolClient]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeUserPoolClient.html +// [CreateUserPoolClient]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateUserPoolClient.html +// [UpdateUserPoolClient]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateUserPoolClient.html +// [Amazon Cognito and Amazon Pinpoint Region availability]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-pinpoint-integration.html#cognito-user-pools-find-region-mappings type AnalyticsConfigurationType struct { - // The Amazon Resource Name (ARN) of an Amazon Pinpoint project. You can use the - // Amazon Pinpoint project to integrate with the chosen user pool Client. Amazon - // Cognito publishes events to the Amazon Pinpoint project that the app ARN - // declares. + // The Amazon Resource Name (ARN) of an Amazon Pinpoint project that you want to + // connect to your user pool app client. Amazon Cognito publishes events to the + // Amazon Pinpoint project that ApplicationArn declares. You can also configure + // your application to pass an endpoint ID in the AnalyticsMetadata parameter of + // sign-in operations. The endpoint ID is information about the destination for + // push notifications ApplicationArn *string - // The application ID for an Amazon Pinpoint application. + // Your Amazon Pinpoint project ID. ApplicationId *string - // The external ID. + // The [external ID] of the role that Amazon Cognito assumes to send analytics data to Amazon + // Pinpoint. + // + // [external ID]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html ExternalId *string - // The ARN of an Identity and Access Management role that authorizes Amazon - // Cognito to publish events to Amazon Pinpoint analytics. + // The ARN of an Identity and Access Management role that has the permissions + // required for Amazon Cognito to publish events to Amazon Pinpoint analytics. RoleArn *string // If UserDataShared is true , Amazon Cognito includes user data in the events that @@ -145,23 +218,75 @@ type AnalyticsConfigurationType struct { noSmithyDocumentSerde } -// An Amazon Pinpoint analytics endpoint. +// Information that your application adds to authentication requests. Applies an +// endpoint ID to the analytics data that your user pool sends to Amazon Pinpoint. +// +// An endpoint ID uniquely identifies a mobile device, email address or phone +// number that can receive messages from Amazon Pinpoint analytics. For more +// information about Amazon Web Services Regions that can contain Amazon Pinpoint +// resources for use with Amazon Cognito user pools, see [Using Amazon Pinpoint analytics with Amazon Cognito user pools]. // -// An endpoint uniquely identifies a mobile device, email address, or phone number -// that can receive messages from Amazon Pinpoint analytics. For more information -// about Amazon Web Services Regions that can contain Amazon Pinpoint resources for -// use with Amazon Cognito user pools, see [Using Amazon Pinpoint analytics with Amazon Cognito user pools]. +// This data type is a request parameter of authentication operations like [InitiateAuth], [AdminInitiateAuth], [RespondToAuthChallenge], +// and [AdminRespondToAuthChallenge]. // +// [AdminInitiateAuth]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminInitiateAuth.html +// [InitiateAuth]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_InitiateAuth.html // [Using Amazon Pinpoint analytics with Amazon Cognito user pools]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-pinpoint-integration.html +// [RespondToAuthChallenge]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_RespondToAuthChallenge.html +// [AdminRespondToAuthChallenge]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminRespondToAuthChallenge.html type AnalyticsMetadataType struct { - // The endpoint ID. + // The endpoint ID. Information that you want to pass to Amazon Pinpoint about + // where to send notifications. AnalyticsEndpointId *string noSmithyDocumentSerde } -// Specifies whether the attribute is standard or custom. +// An image file from a managed login branding style in a user pool. +// +// This data type is a request parameter of [CreateManagedLoginBranding] and [UpdateManagedLoginBranding], and a response parameter of [DescribeManagedLoginBranding]. +// +// [UpdateManagedLoginBranding]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateManagedLoginBranding.html +// [CreateManagedLoginBranding]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateManagedLoginBranding.html +// [DescribeManagedLoginBranding]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeManagedLoginBranding.html +type AssetType struct { + + // The category that the image corresponds to in your managed login configuration. + // Managed login has asset categories for different types of logos, backgrounds, + // and icons. + // + // This member is required. + Category AssetCategoryType + + // The display-mode target of the asset: light, dark, or browser-adaptive. For + // example, Amazon Cognito displays a dark-mode image only when the browser or + // application is in dark mode, but displays a browser-adaptive file in all + // contexts. + // + // This member is required. + ColorMode ColorSchemeModeType + + // The file type of the image file. + // + // This member is required. + Extension AssetExtensionType + + // The image file, in Base64-encoded binary. + Bytes []byte + + // The ID of the asset. + ResourceId *string + + noSmithyDocumentSerde +} + +// The name and value of a user attribute. +// +// This data type is a request parameter of [AdminUpdateUserAttributes] and [UpdateUserAttributes]. +// +// [UpdateUserAttributes]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateUserAttributes.html +// [AdminUpdateUserAttributes]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminUpdateUserAttributes.html type AttributeType struct { // The name of the attribute. @@ -175,35 +300,50 @@ type AttributeType struct { noSmithyDocumentSerde } -// The authentication result. +// The object that your application receives after authentication. Contains tokens +// and information for device authentication. +// +// This data type is a response parameter of authentication operations like [InitiateAuth], [AdminInitiateAuth], [RespondToAuthChallenge], +// and [AdminRespondToAuthChallenge]. +// +// [AdminInitiateAuth]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminInitiateAuth.html +// [InitiateAuth]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_InitiateAuth.html +// [RespondToAuthChallenge]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_RespondToAuthChallenge.html +// [AdminRespondToAuthChallenge]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminRespondToAuthChallenge.html type AuthenticationResultType struct { - // A valid access token that Amazon Cognito issued to the user who you want to - // authenticate. + // Your user's access token. AccessToken *string // The expiration period of the authentication result in seconds. ExpiresIn int32 - // The ID token. + // Your user's ID token. IdToken *string // The new device metadata from an authentication result. NewDeviceMetadata *NewDeviceMetadataType - // The refresh token. + // Your user's refresh token. RefreshToken *string - // The token type. + // The intended use of the token, for example Bearer . TokenType *string noSmithyDocumentSerde } -// The authentication event type. +// One authentication event that Amazon Cognito logged in a user pool with +// advanced security features active. Contains user and device metadata and a risk +// assessment from your user pool. +// +// This data type is a request parameter of [AdminListUserAuthEvents]. +// +// [AdminListUserAuthEvents]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminListUserAuthEvents.html type AuthEventType struct { - // The challenge responses. + // A list of the challenges that the user was requested to answer, for example + // Password , and the result, for example Success . ChallengeResponses []ChallengeResponseType // The date and time when the item was created. Amazon Cognito returns this @@ -216,8 +356,14 @@ type AuthEventType struct { // received. EventContextData *EventContextDataType - // A flag specifying the user feedback captured at the time of an event request is - // good or bad. + // The [UpdateAuthEventFeedback] or [AdminUpdateAuthEventFeedback] feedback that you or your user provided in response to the event. A + // value of Valid indicates that you disagreed with the level of risk that your + // user pool assigned, and evaluated a session to be valid, or likely safe. A value + // of Invalid indicates that you agreed with the user pool risk level and + // evaluated a session to be invalid, or likely malicious. + // + // [UpdateAuthEventFeedback]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateAuthEventFeedback.html + // [AdminUpdateAuthEventFeedback]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminUpdateAuthEventFeedback.html EventFeedback *EventFeedbackType // The event ID. @@ -226,22 +372,128 @@ type AuthEventType struct { // The event response. EventResponse EventResponseType - // The event risk. + // The threat evaluation from your user pool about an event. Contains information + // about whether your user pool detected compromised credentials, whether the event + // triggered an automated response, and the level of risk. EventRisk *EventRiskType - // The event type. + // The type of authentication event. EventType EventType noSmithyDocumentSerde } -// The challenge response type. +// The responses to the challenge that you received in the previous request. Each +// challenge has its own required response parameters. The following examples are +// partial JSON request bodies that highlight challenge-response parameters. +// +// You must provide a SECRET_HASH parameter in all challenge responses to an app +// client that has a client secret. Include a DEVICE_KEY for device authentication. +// +// SELECT_CHALLENGE "ChallengeName": "SELECT_CHALLENGE", "ChallengeResponses": { +// "USERNAME": "[username]", "ANSWER": "[Challenge name]"} +// +// Available challenges are PASSWORD , PASSWORD_SRP , EMAIL_OTP , SMS_OTP , and +// WEB_AUTHN . +// +// Complete authentication in the SELECT_CHALLENGE response for PASSWORD , +// PASSWORD_SRP , and WEB_AUTHN : +// +// - "ChallengeName": "SELECT_CHALLENGE", "ChallengeResponses": { "ANSWER": +// "WEB_AUTHN", "USERNAME": "[username]", "CREDENTIAL": +// "[AuthenticationResponseJSON]"} +// +// See [AuthenticationResponseJSON]. +// +// - "ChallengeName": "SELECT_CHALLENGE", "ChallengeResponses": { "ANSWER": +// "PASSWORD", "USERNAME": "[username]", "PASSWORD": "[password]"} +// +// - "ChallengeName": "SELECT_CHALLENGE", "ChallengeResponses": { "ANSWER": +// "PASSWORD_SRP", "USERNAME": "[username]", "SRP_A": "[SRP_A]"} +// +// For SMS_OTP and EMAIL_OTP , respond with the username and answer. Your user pool +// will send a code for the user to submit in the next challenge response. +// +// - "ChallengeName": "SELECT_CHALLENGE", "ChallengeResponses": { "ANSWER": +// "SMS_OTP", "USERNAME": "[username]"} +// +// - "ChallengeName": "SELECT_CHALLENGE", "ChallengeResponses": { "ANSWER": +// "EMAIL_OTP", "USERNAME": "[username]"} +// +// SMS_OTP "ChallengeName": "SMS_OTP", "ChallengeResponses": {"SMS_OTP_CODE": +// "[code]", "USERNAME": "[username]"} +// +// EMAIL_OTP "ChallengeName": "EMAIL_OTP", "ChallengeResponses": +// {"EMAIL_OTP_CODE": "[code]", "USERNAME": "[username]"} +// +// SMS_MFA "ChallengeName": "SMS_MFA", "ChallengeResponses": {"SMS_MFA_CODE": +// "[code]", "USERNAME": "[username]"} +// +// PASSWORD_VERIFIER This challenge response is part of the SRP flow. Amazon +// Cognito requires that your application respond to this challenge within a few +// seconds. When the response time exceeds this period, your user pool returns a +// NotAuthorizedException error. +// +// "ChallengeName": "PASSWORD_VERIFIER", "ChallengeResponses": +// {"PASSWORD_CLAIM_SIGNATURE": "[claim_signature]", "PASSWORD_CLAIM_SECRET_BLOCK": +// "[secret_block]", "TIMESTAMP": [timestamp], "USERNAME": "[username]"} +// +// Add "DEVICE_KEY" when you sign in with a remembered device. +// +// CUSTOM_CHALLENGE "ChallengeName": "CUSTOM_CHALLENGE", "ChallengeResponses": +// {"USERNAME": "[username]", "ANSWER": "[challenge_answer]"} +// +// Add "DEVICE_KEY" when you sign in with a remembered device. +// +// NEW_PASSWORD_REQUIRED "ChallengeName": "NEW_PASSWORD_REQUIRED", +// "ChallengeResponses": {"NEW_PASSWORD": "[new_password]", "USERNAME": +// "[username]"} +// +// To set any required attributes that InitiateAuth returned in an +// requiredAttributes parameter, add "userAttributes.[attribute_name]": +// "[attribute_value]" . This parameter can also set values for writable attributes +// that aren't required by your user pool. +// +// In a NEW_PASSWORD_REQUIRED challenge response, you can't modify a required +// attribute that already has a value. In RespondToAuthChallenge , set a value for +// any keys that Amazon Cognito returned in the requiredAttributes parameter, then +// use the UpdateUserAttributes API operation to modify the value of any +// additional attributes. +// +// SOFTWARE_TOKEN_MFA "ChallengeName": "SOFTWARE_TOKEN_MFA", "ChallengeResponses": +// {"USERNAME": "[username]", "SOFTWARE_TOKEN_MFA_CODE": [authenticator_code]} +// +// DEVICE_SRP_AUTH "ChallengeName": "DEVICE_SRP_AUTH", "ChallengeResponses": +// {"USERNAME": "[username]", "DEVICE_KEY": "[device_key]", "SRP_A": "[srp_a]"} +// +// DEVICE_PASSWORD_VERIFIER "ChallengeName": "DEVICE_PASSWORD_VERIFIER", +// "ChallengeResponses": {"DEVICE_KEY": "[device_key]", "PASSWORD_CLAIM_SIGNATURE": +// "[claim_signature]", "PASSWORD_CLAIM_SECRET_BLOCK": "[secret_block]", +// "TIMESTAMP": [timestamp], "USERNAME": "[username]"} +// +// MFA_SETUP "ChallengeName": "MFA_SETUP", "ChallengeResponses": {"USERNAME": +// "[username]"}, "SESSION": "[Session ID from VerifySoftwareToken]" +// +// SELECT_MFA_TYPE "ChallengeName": "SELECT_MFA_TYPE", "ChallengeResponses": +// {"USERNAME": "[username]", "ANSWER": "[SMS_MFA or SOFTWARE_TOKEN_MFA]"} +// +// For more information about SECRET_HASH , see [Computing secret hash values]. For information about DEVICE_KEY +// , see [Working with user devices in your user pool]. +// +// This data type is a request parameter of [RespondToAuthChallenge] and [AdminRespondToAuthChallenge]. +// +// [Computing secret hash values]: https://docs.aws.amazon.com/cognito/latest/developerguide/signing-up-users-in-your-app.html#cognito-user-pools-computing-secret-hash +// [AuthenticationResponseJSON]: https://www.w3.org/TR/webauthn-3/#dictdef-authenticationresponsejson +// [Working with user devices in your user pool]: https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-device-tracking.html +// [RespondToAuthChallenge]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_RespondToAuthChallenge.html +// [AdminRespondToAuthChallenge]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminRespondToAuthChallenge.html type ChallengeResponseType struct { - // The challenge name. + // The type of challenge that your previous authentication request returned in the + // parameter ChallengeName , for example SMS_MFA . ChallengeName ChallengeName - // The challenge response. + // The set of key-value pairs that provides a response to the requested challenge. ChallengeResponse ChallengeResponse noSmithyDocumentSerde @@ -250,6 +502,11 @@ type ChallengeResponseType struct { // Configuration for the CloudWatch log group destination of user pool detailed // activity logging, or of user activity log export with advanced security // features. +// +// This data type is a request parameter of [SetLogDeliveryConfiguration] and a response parameter of [GetLogDeliveryConfiguration]. +// +// [SetLogDeliveryConfiguration]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_SetLogDeliveryConfiguration.html +// [GetLogDeliveryConfiguration]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_GetLogDeliveryConfiguration.html type CloudWatchLogsConfigurationType struct { // The Amazon Resource Name (arn) of a CloudWatch Logs log group where your user @@ -268,6 +525,12 @@ type CloudWatchLogsConfigurationType struct { // The delivery details for an email or SMS message that Amazon Cognito sent for // authentication or verification. +// +// This data type is a response parameter of operations that send a code for user +// profile confirmation, verification, or management, for example [ForgotPassword]and [SignUp]. +// +// [SignUp]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_SignUp.html +// [ForgotPassword]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_ForgotPassword.html type CodeDeliveryDetailsType struct { // The name of the attribute that Amazon Cognito verifies with the code. @@ -283,10 +546,16 @@ type CodeDeliveryDetailsType struct { noSmithyDocumentSerde } -// The compromised credentials actions type. +// Settings for user pool actions when Amazon Cognito detects compromised +// credentials with advanced security features in full-function ENFORCED mode. +// +// This data type is a request parameter of [SetRiskConfiguration] and a response parameter of [DescribeRiskConfiguration]. +// +// [DescribeRiskConfiguration]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeRiskConfiguration.html +// [SetRiskConfiguration]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_SetRiskConfiguration.html type CompromisedCredentialsActionsType struct { - // The event action. + // The action that Amazon Cognito takes when it detects compromised credentials. // // This member is required. EventAction CompromisedCredentialsEventActionType @@ -294,26 +563,39 @@ type CompromisedCredentialsActionsType struct { noSmithyDocumentSerde } -// The compromised credentials risk configuration type. +// Settings for compromised-credentials actions and authentication-event sources +// with advanced security features in full-function ENFORCED mode. +// +// This data type is a request parameter of [SetRiskConfiguration] and a response parameter of [DescribeRiskConfiguration]. +// +// [DescribeRiskConfiguration]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeRiskConfiguration.html +// [SetRiskConfiguration]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_SetRiskConfiguration.html type CompromisedCredentialsRiskConfigurationType struct { - // The compromised credentials risk configuration actions. + // Settings for the actions that you want your user pool to take when Amazon + // Cognito detects compromised credentials. // // This member is required. Actions *CompromisedCredentialsActionsType - // Perform the action for these events. The default is to perform all events if no - // event filter is specified. + // Settings for the sign-in activity where you want to configure + // compromised-credentials actions. Defaults to all events. EventFilter []EventFilterType noSmithyDocumentSerde } -// Contextual user data type used for evaluating the risk of an unexpected event -// by Amazon Cognito advanced security. +// Contextual user data used for evaluating the risk of an authentication event by +// user pool threat protection. +// +// This data type is a request parameter of server-side authentication operations +// like [AdminInitiateAuth]and [AdminRespondToAuthChallenge]. +// +// [AdminInitiateAuth]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminInitiateAuth.html +// [AdminRespondToAuthChallenge]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminRespondToAuthChallenge.html type ContextDataType struct { - // HttpHeaders received on your server in same order. + // The HTTP headers from your user's authentication request. // // This member is required. HttpHeaders []HttpHeader @@ -323,12 +605,12 @@ type ContextDataType struct { // This member is required. IpAddress *string - // Your server endpoint where this API is invoked. + // The name of your application's service endpoint. // // This member is required. ServerName *string - // Your server path where this API is invoked. + // The path of your application's service endpoint. // // This member is required. ServerPath *string @@ -342,8 +624,12 @@ type ContextDataType struct { noSmithyDocumentSerde } -// The configuration for a custom domain that hosts the sign-up and sign-in -// webpages for your application. +// The configuration for a hosted UI custom domain. +// +// This data type is a request parameter of [CreateUserPoolDomain] and [UpdateUserPoolDomain]. +// +// [UpdateUserPoolDomain]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateUserPoolDomain.html +// [CreateUserPoolDomain]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateUserPoolDomain.html type CustomDomainConfigType struct { // The Amazon Resource Name (ARN) of an Certificate Manager SSL certificate. You @@ -356,6 +642,13 @@ type CustomDomainConfigType struct { } // The properties of a custom email sender Lambda trigger. +// +// This data type is a request and response parameter of [CreateUserPool] and [UpdateUserPool], and a response +// parameter of [DescribeUserPool]. +// +// [UpdateUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateUserPool.html +// [CreateUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateUserPool.html +// [DescribeUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeUserPool.html type CustomEmailLambdaVersionConfigType struct { // The Amazon Resource Name (ARN) of the function that you want to assign to your @@ -376,6 +669,13 @@ type CustomEmailLambdaVersionConfigType struct { } // The properties of a custom SMS sender Lambda trigger. +// +// This data type is a request and response parameter of [CreateUserPool] and [UpdateUserPool], and a response +// parameter of [DescribeUserPool]. +// +// [UpdateUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateUserPool.html +// [CreateUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateUserPool.html +// [DescribeUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeUserPool.html type CustomSMSLambdaVersionConfigType struct { // The Amazon Resource Name (ARN) of the function that you want to assign to your @@ -411,7 +711,12 @@ type CustomSMSLambdaVersionConfigType struct { // When you provide a value for any property of DeviceConfiguration , you activate // the device remembering for the user pool. // +// This data type is a request and response parameter of [CreateUserPool] and [UpdateUserPool], and a response +// parameter of [DescribeUserPool]. +// +// [UpdateUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateUserPool.html // [UpdateDeviceStatus]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateDeviceStatus.html +// [CreateUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateUserPool.html // [InitiateAuth]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_InitiateAuth.html // [response]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_InitiateAuth.html#API_InitiateAuth_ResponseSyntax // [DescribeUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeUserPool.html @@ -442,33 +747,48 @@ type DeviceConfigurationType struct { noSmithyDocumentSerde } -// The device verifier against which it is authenticated. +// A Secure Remote Password (SRP) value that your application generates when you +// register a user's device. For more information, see [Getting a device key]. +// +// This data type is a request parameter of [ConfirmDevice]. +// +// [Getting a device key]: https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-device-tracking.html#user-pools-remembered-devices-getting-a-device-key +// [ConfirmDevice]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_ConfirmDevice.html type DeviceSecretVerifierConfigType struct { - // The password verifier. + // A password verifier for a user's device. Used in SRP authentication. PasswordVerifier *string - // The [salt] - // - // [salt]: https://en.wikipedia.org/wiki/Salt_(cryptography) + // The salt that you want to use in SRP authentication with the user's device. Salt *string noSmithyDocumentSerde } -// The device type. +// Information about a user's device that they've registered for device SRP +// authentication in your application. For more information, see [Working with user devices in your user pool]. +// +// The data type is a response parameter of [AdminGetDevice], [AdminListDevices], and [GetDevice]. +// +// [Working with user devices in your user pool]: https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-device-tracking.html +// [GetDevice]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_GetDevice.html +// [AdminListDevices]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminListDevices.html +// [AdminGetDevice]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminGetDevice.html type DeviceType struct { - // The device attributes. + // Metadata about a user's device, like name and last-access source IP. DeviceAttributes []AttributeType - // The creation date of the device. + // The date and time when the item was created. Amazon Cognito returns this + // timestamp in UNIX epoch time format. Your SDK might render the output in a + // human-readable format like ISO 8601 or a Java Date object. DeviceCreateDate *time.Time - // The device key. + // The device key, for example + // us-west-2_EXAMPLE-a1b2c3d4-5678-90ab-cdef-EXAMPLE22222 . DeviceKey *string - // The date when the device was last authenticated. + // The date when the user last signed in with the device. DeviceLastAuthenticatedDate *time.Time // The date and time when the item was modified. Amazon Cognito returns this @@ -479,14 +799,18 @@ type DeviceType struct { noSmithyDocumentSerde } -// A container for information about a domain. +// A container for information about the user pool domain associated with the +// hosted UI and OAuth endpoints. +// +// This data type is a response parameter of [DescribeUserPoolDomain]. +// +// [DescribeUserPoolDomain]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeUserPoolDomain.html type DomainDescriptionType struct { - // The Amazon Web Services ID for the user pool owner. + // The Amazon Web Services account that you created the user pool in. AWSAccountId *string - // The Amazon CloudFront endpoint that you use as the target of the alias that you - // set up with your Domain Name Service (DNS) provider. + // The Amazon CloudFront endpoint that hosts your custom domain. CloudFrontDistribution *string // The configuration for a custom domain that hosts the sign-up and sign-in @@ -498,13 +822,23 @@ type DomainDescriptionType struct { // alone, such as auth . Domain *string + // The version of managed login branding that you want to apply to your domain. A + // value of 1 indicates hosted UI (classic) branding and a version of 2 indicates + // managed login branding. + // + // Managed login requires that your user pool be configured for any [feature plan] other than + // Lite . + // + // [feature plan]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-sign-in-feature-plans.html + ManagedLoginVersion *int32 + // The Amazon S3 bucket where the static files for this domain are stored. S3Bucket *string // The domain status. Status DomainStatusType - // The user pool ID. + // The ID of the user pool that the domain is attached to. UserPoolId *string // The app version. @@ -522,7 +856,14 @@ type DomainDescriptionType struct { // and in alternate Regions in some cases. For more information on the supported // Regions, see [Email settings for Amazon Cognito user pools]. // +// This data type is a request parameter of [CreateUserPool], [UpdateUserPool], and [SetUserPoolMfaConfig], and a response parameter of [CreateUserPool] +// , [UpdateUserPool], and [GetUserPoolMfaConfig]. +// +// [UpdateUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateUserPool.html +// [CreateUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateUserPool.html +// [SetUserPoolMfaConfig]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_SetUserPoolMfaConfig.html // [Email settings for Amazon Cognito user pools]: https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-email.html +// [GetUserPoolMfaConfig]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_GetUserPoolMfaConfig.html type EmailConfigurationType struct { // The set of configuration rules that can be applied to emails sent using Amazon @@ -616,7 +957,11 @@ type EmailConfigurationType struct { // subject and body of the email message template for MFA messages. To activate // this setting, [advanced security features]must be active in your user pool. // +// This data type is a request parameter of [SetUserPoolMfaConfig] and a response parameter of [GetUserPoolMfaConfig]. +// +// [SetUserPoolMfaConfig]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_SetUserPoolMfaConfig.html // [advanced security features]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pool-settings-advanced-security.html +// [GetUserPoolMfaConfig]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_GetUserPoolMfaConfig.html type EmailMfaConfigType struct { // The template for the email message that your user pool sends to users with an @@ -637,7 +982,11 @@ type EmailMfaConfigType struct { // methods are available. To activate this setting, [advanced security features]must be active in your user // pool. // +// This data type is a request parameter of [SetUserMFAPreference] and [AdminSetUserMFAPreference]. +// // [advanced security features]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pool-settings-advanced-security.html +// [SetUserMFAPreference]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_SetUserMFAPreference.html +// [AdminSetUserMFAPreference]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminSetUserMFAPreference.html type EmailMfaSettingsType struct { // Specifies whether email message MFA is active for a user. When the value of @@ -651,7 +1000,10 @@ type EmailMfaSettingsType struct { noSmithyDocumentSerde } -// Specifies the user context data captured at the time of an event request. +// The context data that your application submitted in an authentication request +// with advanced security features, as displayed in an [AdminListUserAuthEvents]response. +// +// [AdminListUserAuthEvents]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminListUserAuthEvents.html type EventContextDataType struct { // The user's city. @@ -672,7 +1024,10 @@ type EventContextDataType struct { noSmithyDocumentSerde } -// Specifies the event feedback type. +// The feedback that your application submitted to an advanced security features +// event log, as displayed in an [AdminListUserAuthEvents]response. +// +// [AdminListUserAuthEvents]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminListUserAuthEvents.html type EventFeedbackType struct { // The authentication event feedback value. When you provide a FeedbackValue value @@ -684,28 +1039,37 @@ type EventFeedbackType struct { // This member is required. FeedbackValue FeedbackValueType - // The provider. + // The submitter of the event feedback. For example, if you submit event feedback + // in the Amazon Cognito console, this value is Admin . // // This member is required. Provider *string - // The event feedback date. + // The date that you or your user submitted the feedback. FeedbackDate *time.Time noSmithyDocumentSerde } -// The event risk type. +// The risk evaluation by adaptive authentication, as displayed in an [AdminListUserAuthEvents] response. +// Contains evaluations of compromised-credentials detection and assessed risk +// level and action taken by adaptive authentication. +// +// [AdminListUserAuthEvents]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminListUserAuthEvents.html type EventRiskType struct { // Indicates whether compromised credentials were detected during an // authentication event. CompromisedCredentialsDetected *bool - // The risk decision. + // The action taken by adaptive authentication. If NoRisk , your user pool took no + // action. If AccountTakeover , your user pool applied the adaptive authentication + // automated response that you configured. If Block , your user pool prevented the + // attempt. RiskDecision RiskDecisionType - // The risk level. + // The risk level that adaptive authentication assessed for the authentication + // event. RiskLevel RiskLevelType noSmithyDocumentSerde @@ -722,7 +1086,18 @@ type FirehoseConfigurationType struct { noSmithyDocumentSerde } -// The group type. +// A user pool group. Contains details about the group and the way that it +// contributes to IAM role decisions with identity pools. Identity pools can make +// decisions about the IAM role to assign based on groups: users get credentials +// for the role associated with their highest-priority group. +// +// This data type is a response parameter of [AdminListGroupsForUser], [CreateGroup], [GetGroup], [ListGroups], and [UpdateGroup]. +// +// [GetGroup]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_GetGroup.html +// [AdminListGroupsForUser]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminListGroupsForUser.html +// [CreateGroup]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateGroup.html +// [ListGroups]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_ListGroups.html +// [UpdateGroup]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateGroup.html type GroupType struct { // The date and time when the item was created. Amazon Cognito returns this @@ -730,7 +1105,7 @@ type GroupType struct { // human-readable format like ISO 8601 or a Java Date object. CreationDate *time.Time - // A string containing the description of the group. + // A friendly description of the group. Description *string // The name of the group. @@ -755,19 +1130,27 @@ type GroupType struct { // tokens for users in each group. If the two groups have different role ARNs, the // cognito:preferred_role claim isn't set in users' tokens. // - // The default Precedence value is null. + // The default Precedence value is null . Precedence *int32 - // The role Amazon Resource Name (ARN) for the group. + // The ARN of the IAM role associated with the group. If a group has the highest + // priority of a user's groups, users who authenticate with an identity pool get + // credentials for the RoleArn that's associated with the group. RoleArn *string - // The user pool ID for the user pool. + // The ID of the user pool that contains the group. UserPoolId *string noSmithyDocumentSerde } -// The HTTP header. +// The HTTP header in the ContextData parameter. +// +// This data type is a request parameter of server-side authentication operations +// like [AdminInitiateAuth]and [AdminRespondToAuthChallenge]. +// +// [AdminInitiateAuth]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminInitiateAuth.html +// [AdminRespondToAuthChallenge]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminRespondToAuthChallenge.html type HttpHeader struct { // The header name. @@ -779,7 +1162,16 @@ type HttpHeader struct { noSmithyDocumentSerde } -// A container for information about an IdP. +// A user pool identity provider (IdP). Contains information about a third-party +// IdP to a user pool, the attributes that it populates to user profiles, and the +// trust relationship between the IdP and your user pool. +// +// This data type is a response parameter of [CreateIdentityProvider], [DescribeIdentityProvider], [GetIdentityProviderByIdentifier], and [UpdateIdentityProvider]. +// +// [CreateIdentityProvider]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateIdentityProvider.html +// [DescribeIdentityProvider]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeIdentityProvider.html +// [UpdateIdentityProvider]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateIdentityProvider.html +// [GetIdentityProviderByIdentifier]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_GetIdentityProviderByIdentifier.html type IdentityProviderType struct { // A mapping of IdP attributes to standard and custom user pool attributes. @@ -790,7 +1182,13 @@ type IdentityProviderType struct { // human-readable format like ISO 8601 or a Java Date object. CreationDate *time.Time - // A list of IdP identifiers. + // A list of IdP identifiers. IdP identifiers are strings that represent friendly + // names or domain names of IdPs, for example MyIdP or auth.example.com . You can + // choose to route user authorization requests to the right IdP with either IdP + // identifiers or IdP names. For more information, see identity_provider and + // idp_identifier at [Authorize endpoint]. + // + // [Authorize endpoint]: https://docs.aws.amazon.com/cognito/latest/developerguide/authorization-endpoint.html#get-authorize-request-parameters IdpIdentifiers []string // The date and time when the item was modified. Amazon Cognito returns this @@ -893,78 +1291,130 @@ type IdentityProviderType struct { // "https://graph.facebook.com/v17.0/oauth/access_token" } ProviderDetails map[string]string - // The IdP name. + // A friendly name for the IdP. ProviderName *string - // The IdP type. + // The type of IdP. Either SAML, OIDC, or a named social identity provider. ProviderType IdentityProviderTypeType - // The user pool ID. + // The ID of the user pool associated with the IdP. UserPoolId *string noSmithyDocumentSerde } -// Specifies the configuration for Lambda triggers. +// A collection of user pool Lambda triggers. Amazon Cognito invokes triggers at +// several possible stages of user pool operations. Triggers can modify the outcome +// of the operations that invoked them. +// +// This data type is a request and response parameter of [CreateUserPool] and [UpdateUserPool], and a response +// parameter of [DescribeUserPool]. +// +// [UpdateUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateUserPool.html +// [CreateUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateUserPool.html +// [DescribeUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeUserPool.html type LambdaConfigType struct { - // Creates an authentication challenge. + // The configuration of a create auth challenge Lambda trigger, one of three + // triggers in the sequence of the [custom authentication challenge triggers]. + // + // [custom authentication challenge triggers]: https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-challenge.html CreateAuthChallenge *string - // A custom email sender Lambda trigger. + // The configuration of a custom email sender Lambda trigger. This trigger routes + // all email notifications from a user pool to a Lambda function that delivers the + // message using custom logic. CustomEmailSender *CustomEmailLambdaVersionConfigType - // A custom Message Lambda trigger. + // A custom message Lambda trigger. This trigger is an opportunity to customize + // all SMS and email messages from your user pool. When a custom message trigger is + // active, your user pool routes all messages to a Lambda function that returns a + // runtime-customized message subject and body for your user pool to deliver to a + // user. CustomMessage *string - // A custom SMS sender Lambda trigger. + // The configuration of a custom SMS sender Lambda trigger. This trigger routes + // all SMS notifications from a user pool to a Lambda function that delivers the + // message using custom logic. CustomSMSSender *CustomSMSLambdaVersionConfigType - // Defines the authentication challenge. + // The configuration of a define auth challenge Lambda trigger, one of three + // triggers in the sequence of the [custom authentication challenge triggers]. + // + // [custom authentication challenge triggers]: https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-challenge.html DefineAuthChallenge *string - // The Amazon Resource Name (ARN) of an KMS key. Amazon Cognito uses the key to encrypt - // codes and temporary passwords sent to CustomEmailSender and CustomSMSSender . + // The ARN of an [KMS key]. Amazon Cognito uses the key to encrypt codes and temporary + // passwords sent to custom sender Lambda triggers. + // + // [KMS key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#master_keys KMSKeyID *string - // A post-authentication Lambda trigger. + // The configuration of a [post authentication Lambda trigger] in a user pool. This trigger can take custom actions + // after a user signs in. + // + // [post authentication Lambda trigger]: https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-post-authentication.html PostAuthentication *string - // A post-confirmation Lambda trigger. + // The configuration of a [post confirmation Lambda trigger] in a user pool. This trigger can take custom actions + // after a user confirms their user account and their email address or phone + // number. + // + // [post confirmation Lambda trigger]: https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-post-confirmation.html PostConfirmation *string - // A pre-authentication Lambda trigger. + // The configuration of a [pre authentication trigger] in a user pool. This trigger can evaluate and modify + // user sign-in events. + // + // [pre authentication trigger]: https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-pre-authentication.html PreAuthentication *string - // A pre-registration Lambda trigger. + // The configuration of a [pre sign-up Lambda trigger] in a user pool. This trigger evaluates new users and + // can bypass confirmation, [link a federated user profile], or block sign-up requests. + // + // [link a federated user profile]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-identity-federation-consolidate-users.html + // [pre sign-up Lambda trigger]: https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-pre-sign-up.html PreSignUp *string - // The Amazon Resource Name (ARN) of the function that you want to assign to your - // Lambda trigger. + // The legacy configuration of a [pre token generation Lambda trigger] in a user pool. // // Set this parameter for legacy purposes. If you also set an ARN in // PreTokenGenerationConfig , its value must be identical to PreTokenGeneration . // For new instances of pre token generation triggers, set the LambdaArn of // PreTokenGenerationConfig . // - // You can set + // [pre token generation Lambda trigger]: https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-pre-token-generation.html PreTokenGeneration *string - // The detailed configuration of a pre token generation trigger. If you also set - // an ARN in PreTokenGeneration , its value must be identical to - // PreTokenGenerationConfig . + // The detailed configuration of a [pre token generation Lambda trigger] in a user pool. If you also set an ARN in + // PreTokenGeneration , its value must be identical to PreTokenGenerationConfig . + // + // [pre token generation Lambda trigger]: https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-pre-token-generation.html PreTokenGenerationConfig *PreTokenGenerationVersionConfigType - // The user migration Lambda config type. + // The configuration of a [migrate user Lambda trigger] in a user pool. This trigger can create user profiles + // when users sign in or attempt to reset their password with credentials that + // don't exist yet. + // + // [migrate user Lambda trigger]: https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-migrate-user.html UserMigration *string - // Verifies the authentication challenge response. + // The configuration of a verify auth challenge Lambda trigger, one of three + // triggers in the sequence of the [custom authentication challenge triggers]. + // + // [custom authentication challenge triggers]: https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-challenge.html VerifyAuthChallengeResponse *string noSmithyDocumentSerde } -// The logging parameters of a user pool. +// The configuration of user event logs to an external Amazon Web Services service +// like Amazon Data Firehose, Amazon S3, or Amazon CloudWatch Logs. +// +// This data type is a request parameter of [SetLogDeliveryConfiguration] and a response parameter of [GetLogDeliveryConfiguration]. +// +// [SetLogDeliveryConfiguration]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_SetLogDeliveryConfiguration.html +// [GetLogDeliveryConfiguration]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_GetLogDeliveryConfiguration.html type LogConfigurationType struct { // The source of events that your user pool sends for logging. To send error-level @@ -1006,8 +1456,10 @@ type LogConfigurationType struct { noSmithyDocumentSerde } -// The logging parameters of a user pool returned in response to -// GetLogDeliveryConfiguration . +// The logging parameters of a user pool, as returned in the response to a [GetLogDeliveryConfiguration] +// request. +// +// [GetLogDeliveryConfiguration]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_GetLogDeliveryConfiguration.html type LogDeliveryConfigurationType struct { // A logging destination of a user pool. User pools can have multiple logging @@ -1024,6 +1476,48 @@ type LogDeliveryConfigurationType struct { noSmithyDocumentSerde } +// A managed login branding style that's assigned to a user pool app client. +// +// This data type is a response parameter of [CreateManagedLoginBranding], [UpdateManagedLoginBranding], [DescribeManagedLoginBranding], and [DescribeManagedLoginBrandingByClient]. +// +// [UpdateManagedLoginBranding]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateManagedLoginBranding.html +// [DescribeManagedLoginBrandingByClient]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeManagedLoginBrandingByClient.html +// [CreateManagedLoginBranding]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateManagedLoginBranding.html +// [DescribeManagedLoginBranding]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeManagedLoginBranding.html +type ManagedLoginBrandingType struct { + + // An array of image files that you want to apply to roles like backgrounds, + // logos, and icons. Each object must also indicate whether it is for dark mode, + // light mode, or browser-adaptive mode. + Assets []AssetType + + // The date and time when the item was created. Amazon Cognito returns this + // timestamp in UNIX epoch time format. Your SDK might render the output in a + // human-readable format like ISO 8601 or a Java Date object. + CreationDate *time.Time + + // The date and time when the item was modified. Amazon Cognito returns this + // timestamp in UNIX epoch time format. Your SDK might render the output in a + // human-readable format like ISO 8601 or a Java Date object. + LastModifiedDate *time.Time + + // The ID of the managed login branding style. + ManagedLoginBrandingId *string + + // A JSON file, encoded as a Document type, with the the settings that you want to + // apply to your style. + Settings document.Interface + + // When true, applies the default branding style options. This option reverts to a + // "blank" style that you can modify later in the branding designer. + UseCognitoProvidedValues bool + + // The user pool where the branding style is assigned. + UserPoolId *string + + noSmithyDocumentSerde +} + // The message template structure. type MessageTemplateType struct { @@ -1061,19 +1555,40 @@ type MFAOptionType struct { noSmithyDocumentSerde } -// The new device metadata type. +// Information that your user pool responds with in AuthenticationResult when you +// configure it to remember devices and a user signs in with an unrecognized +// device. Amazon Cognito presents a new device key that you can use to set up [device authentication]in +// a "Remember me on this device" authentication model. +// +// This data type is a response parameter of authentication operations like [InitiateAuth], [AdminInitiateAuth], [RespondToAuthChallenge], +// and [AdminRespondToAuthChallenge]. +// +// [AdminInitiateAuth]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminInitiateAuth.html +// [InitiateAuth]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_InitiateAuth.html +// [device authentication]: https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-device-tracking.html +// [RespondToAuthChallenge]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_RespondToAuthChallenge.html +// [AdminRespondToAuthChallenge]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminRespondToAuthChallenge.html type NewDeviceMetadataType struct { - // The device group key. + // The device group key, an identifier used in generating the + // DEVICE_PASSWORD_VERIFIER for device SRP authentication. DeviceGroupKey *string - // The device key. + // The device key, an identifier used in generating the DEVICE_PASSWORD_VERIFIER + // for device SRP authentication. DeviceKey *string noSmithyDocumentSerde } -// The notify configuration type. +// The configuration for Amazon SES email messages that advanced security features +// sends to a user when your adaptive authentication automated response has a +// Notify action. +// +// This data type is a request parameter of [SetRiskConfiguration] and a response parameter of [DescribeRiskConfiguration]. +// +// [DescribeRiskConfiguration]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeRiskConfiguration.html +// [SetRiskConfiguration]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_SetRiskConfiguration.html type NotifyConfigurationType struct { // The Amazon Resource Name (ARN) of the identity that is associated with the @@ -1083,45 +1598,65 @@ type NotifyConfigurationType struct { // This member is required. SourceArn *string - // Email template used when a detected risk event is blocked. + // The template for the email message that your user pool sends when a detected + // risk event is blocked. BlockEmail *NotifyEmailType - // The email address that is sending the email. The address must be either + // The email address that sends the email message. The address must be either // individually verified with Amazon Simple Email Service, or from a domain that // has been verified with Amazon SES. From *string - // The multi-factor authentication (MFA) email template used when MFA is - // challenged as part of a detected risk. + // The template for the email message that your user pool sends when MFA is + // challenged in response to a detected risk. MfaEmail *NotifyEmailType - // The email template used when a detected risk event is allowed. + // The template for the email message that your user pool sends when no action is + // taken in response to a detected risk. NoActionEmail *NotifyEmailType - // The destination to which the receiver of an email should reply to. + // The reply-to email address of an email template. ReplyTo *string noSmithyDocumentSerde } -// The notify email type. +// The template for email messages that advanced security features sends to a user +// when your threat protection automated response has a Notify action. +// +// This data type is a request parameter of [SetRiskConfiguration] and a response parameter of [DescribeRiskConfiguration]. +// +// [DescribeRiskConfiguration]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeRiskConfiguration.html +// [SetRiskConfiguration]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_SetRiskConfiguration.html type NotifyEmailType struct { - // The email subject. + // The subject of the threat protection email notification. // // This member is required. Subject *string - // The email HTML body. + // The body of an email notification formatted in HTML. Choose an HtmlBody or a + // TextBody to send an HTML-formatted or plaintext message, respectively. HtmlBody *string - // The email text body. + // The body of an email notification formatted in plaintext. Choose an HtmlBody or + // a TextBody to send an HTML-formatted or plaintext message, respectively. TextBody *string noSmithyDocumentSerde } -// The minimum and maximum values of an attribute that is of the number data type. +// The minimum and maximum values of an attribute that is of the number type, for +// example custom:age . +// +// This data type is part of [SchemaAttributeType]. It defines the length constraints on number-type +// attributes that you configure in [CreateUserPool]and [UpdateUserPool], and displays the length constraints of +// all number-type attributes in the response to [DescribeUserPool] +// +// [UpdateUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateUserPool.html +// [CreateUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateUserPool.html +// [SchemaAttributeType]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_SchemaAttributeType.html +// [DescribeUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeUserPool.html type NumberAttributeConstraintsType struct { // The maximum length of a number attribute value. Must be a number less than or @@ -1135,7 +1670,15 @@ type NumberAttributeConstraintsType struct { noSmithyDocumentSerde } -// The password policy type. +// The password policy settings for a user pool, including complexity, history, +// and length requirements. +// +// This data type is a request and response parameter of [CreateUserPool] and [UpdateUserPool], and a response +// parameter of [DescribeUserPool]. +// +// [UpdateUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateUserPool.html +// [CreateUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateUserPool.html +// [DescribeUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeUserPool.html type PasswordPolicyType struct { // The minimum length of the password in the policy that you have set. This value @@ -1154,20 +1697,20 @@ type PasswordPolicyType struct { // [DescribeUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeUserPool.html PasswordHistorySize *int32 - // In the password policy that you have set, refers to whether you have required - // users to use at least one lowercase letter in their password. + // The requirement in a password policy that users must include at least one + // lowercase letter in their password. RequireLowercase bool - // In the password policy that you have set, refers to whether you have required - // users to use at least one number in their password. + // The requirement in a password policy that users must include at least one + // number in their password. RequireNumbers bool - // In the password policy that you have set, refers to whether you have required - // users to use at least one symbol in their password. + // The requirement in a password policy that users must include at least one + // symbol in their password. RequireSymbols bool - // In the password policy that you have set, refers to whether you have required - // users to use at least one uppercase letter in their password. + // The requirement in a password policy that users must include at least one + // uppercase letter in their password. RequireUppercase bool // The number of days a temporary password is valid in the password policy. If the @@ -1184,6 +1727,13 @@ type PasswordPolicyType struct { } // The properties of a pre token generation Lambda trigger. +// +// This data type is a request and response parameter of [CreateUserPool] and [UpdateUserPool], and a response +// parameter of [DescribeUserPool]. +// +// [UpdateUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateUserPool.html +// [CreateUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateUserPool.html +// [DescribeUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeUserPool.html type PreTokenGenerationVersionConfigType struct { // The Amazon Resource Name (ARN) of the function that you want to assign to your @@ -1204,7 +1754,11 @@ type PreTokenGenerationVersionConfigType struct { noSmithyDocumentSerde } -// A container for IdP details. +// The details of a user pool identity provider (IdP), including name and type. +// +// This data type is a response parameter of [ListIdentityProviders]. +// +// [ListIdentityProviders]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_ListIdentityProviders.html type ProviderDescription struct { // The date and time when the item was created. Amazon Cognito returns this @@ -1212,19 +1766,29 @@ type ProviderDescription struct { // human-readable format like ISO 8601 or a Java Date object. CreationDate *time.Time - // The date the provider was last modified. + // The date and time when the item was modified. Amazon Cognito returns this + // timestamp in UNIX epoch time format. Your SDK might render the output in a + // human-readable format like ISO 8601 or a Java Date object. LastModifiedDate *time.Time - // The IdP name. + // The name of the IdP, for example MySAMLProvider . ProviderName *string - // The IdP type. + // The type of the provider, for example SAML . Amazon Cognito supports SAML 2.0, + // OIDC, and social IdPs. User pools list supported social IdPs by name in this + // response parameter: Facebook, Google, Login with Amazon, and Sign in with Apple. ProviderType IdentityProviderTypeType noSmithyDocumentSerde } -// A container for information about an IdP for a user pool. +// The characteristics of a source or destination user for linking a federated +// user profile to a local user profile. +// +// This data type is a request parameter of [AdminLinkProviderForUser] and [AdminDisableProviderForUser]. +// +// [AdminDisableProviderForUser]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminDisableProviderForUser.html +// [AdminLinkProviderForUser]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminLinkProviderForUser.html type ProviderUserIdentifierType struct { // The name of the provider attribute to link to, such as NameID . @@ -1239,16 +1803,31 @@ type ProviderUserIdentifierType struct { noSmithyDocumentSerde } -// A map containing a priority as a key, and recovery method name as a value. +// A recovery option for a user. The AccountRecoverySettingType data type is an +// array of this object. Each RecoveryOptionType has a priority property that +// determines whether it is a primary or secondary option. +// +// For example, if verified_email has a priority of 1 and verified_phone_number +// has a priority of 2 , your user pool sends account-recovery messages to a +// verified email address but falls back to an SMS message if the user has a +// verified phone number. The admin_only option prevents self-service account +// recovery. +// +// This data type is a request and response parameter of [CreateUserPool] and [UpdateUserPool], and a response +// parameter of [DescribeUserPool]. +// +// [UpdateUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateUserPool.html +// [CreateUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateUserPool.html +// [DescribeUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeUserPool.html type RecoveryOptionType struct { - // The recovery method for a user. + // The recovery method that this object sets a recovery option for. // // This member is required. Name RecoveryOptionNameType - // A positive integer specifying priority of a method with 1 being the highest - // priority. + // Your priority preference for using the specified attribute in account recovery. + // The highest priority is 1 . // // This member is required. Priority *int32 @@ -1256,15 +1835,25 @@ type RecoveryOptionType struct { noSmithyDocumentSerde } -// A resource server scope. +// One custom scope associated with a user pool resource server. This data type is +// a member of ResourceServerScopeType . For more information, see [Scopes, M2M, and API authorization with resource servers]. +// +// This data type is a request parameter of [CreateResourceServer] and a response parameter of [DescribeResourceServer]. +// +// [CreateResourceServer]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateResourceServer.html +// [DescribeResourceServer]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeResourceServer.html +// [Scopes, M2M, and API authorization with resource servers]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-define-resource-servers.html type ResourceServerScopeType struct { - // A description of the scope. + // A friendly description of a custom scope. // // This member is required. ScopeDescription *string - // The name of the scope. + // The name of the scope. Amazon Cognito renders custom scopes in the format + // resourceServerIdentifier/ScopeName . For example, if this parameter is + // exampleScope in the resource server with the identifier exampleResourceServer , + // you request and receive the scope exampleResourceServer/exampleScope . // // This member is required. ScopeName *string @@ -1272,7 +1861,13 @@ type ResourceServerScopeType struct { noSmithyDocumentSerde } -// A container for information about a resource server for a user pool. +// The details of a resource server configuration and associated custom scopes in +// a user pool. +// +// This data type is a request parameter of [CreateResourceServer] and a response parameter of [DescribeResourceServer]. +// +// [CreateResourceServer]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateResourceServer.html +// [DescribeResourceServer]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeResourceServer.html type ResourceServerType struct { // A unique resource server identifier for the resource server. The identifier can @@ -1290,24 +1885,32 @@ type ResourceServerType struct { // A list of scopes that are defined for the resource server. Scopes []ResourceServerScopeType - // The user pool ID for the user pool that hosts the resource server. + // The ID of the user pool that contains the resource server configuration. UserPoolId *string noSmithyDocumentSerde } -// The risk configuration type. +// The settings of risk configuration for threat protection with advanced security +// features in a user pool. +// +// This data type is a response parameter of [DescribeRiskConfiguration] and [SetRiskConfiguration]. +// +// [DescribeRiskConfiguration]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeRiskConfiguration.html +// [SetRiskConfiguration]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_SetRiskConfiguration.html type RiskConfigurationType struct { - // The account takeover risk configuration object, including the - // NotifyConfiguration object and Actions to take if there is an account takeover. + // The settings for automated responses and notification templates for adaptive + // authentication with advanced security features. AccountTakeoverRiskConfiguration *AccountTakeoverRiskConfigurationType - // The app client ID. + // The app client where this configuration is applied. When this parameter isn't + // present, the risk configuration applies to all user pool app clients that don't + // have client-level settings. ClientId *string - // The compromised credentials risk configuration object, including the EventFilter - // and the EventAction . + // Settings for compromised-credentials actions and authentication types with + // advanced security features in full-function ENFORCED mode. CompromisedCredentialsRiskConfiguration *CompromisedCredentialsRiskConfigurationType // The date and time when the item was modified. Amazon Cognito returns this @@ -1315,25 +1918,32 @@ type RiskConfigurationType struct { // human-readable format like ISO 8601 or a Java Date object. LastModifiedDate *time.Time - // The configuration to override the risk decision. + // Exceptions to the risk evaluation configuration, including always-allow and + // always-block IP address ranges. RiskExceptionConfiguration *RiskExceptionConfigurationType - // The user pool ID. + // The ID of the user pool that has the risk configuration applied. UserPoolId *string noSmithyDocumentSerde } -// The type of the configuration to override the risk decision. +// Exceptions to the risk evaluation configuration, including always-allow and +// always-block IP address ranges. +// +// This data type is a request parameter of [SetRiskConfiguration] and a response parameter of [DescribeRiskConfiguration]. +// +// [DescribeRiskConfiguration]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeRiskConfiguration.html +// [SetRiskConfiguration]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_SetRiskConfiguration.html type RiskExceptionConfigurationType struct { - // Overrides the risk decision to always block the pre-authentication requests. - // The IP range is in CIDR notation, a compact representation of an IP address and - // its routing prefix. + // An always-block IP address list. Overrides the risk decision and always blocks + // authentication requests. This parameter is displayed and set in CIDR notation. BlockedIPRangeList []string - // Risk detection isn't performed on the IP addresses in this range list. The IP - // range is in CIDR notation. + // An always-allow IP address list. Risk detection isn't performed on the IP + // addresses in this range list. This parameter is displayed and set in CIDR + // notation. SkippedIPRangeList []string noSmithyDocumentSerde @@ -1354,11 +1964,18 @@ type S3ConfigurationType struct { // attribute schema contains standard attributes, custom attributes with a custom: // prefix, and developer attributes with a dev: prefix. For more information, see [User pool attributes]. // -// Developer-only attributes are a legacy feature of user pools, are read-only to -// all app clients. You can create and update developer-only attributes only with -// IAM-authenticated API operations. Use app client read/write permissions instead. +// Developer-only dev: attributes are a legacy feature of user pools, and are +// read-only to all app clients. You can create and update developer-only +// attributes only with IAM-authenticated API operations. Use app client read/write +// permissions instead. // +// This data type is a request and response parameter of [CreateUserPool] and [UpdateUserPool], and a response +// parameter of [DescribeUserPool]. +// +// [UpdateUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateUserPool.html +// [CreateUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateUserPool.html // [User pool attributes]: https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-attributes.html +// [DescribeUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeUserPool.html type SchemaAttributeType struct { // The data format of the values for your attribute. When you choose an @@ -1413,11 +2030,36 @@ type SchemaAttributeType struct { noSmithyDocumentSerde } -// The SMS configuration type is the settings that your Amazon Cognito user pool -// must use to send an SMS message from your Amazon Web Services account through -// Amazon Simple Notification Service. To send SMS messages with Amazon SNS in the -// Amazon Web Services Region that you want, the Amazon Cognito user pool uses an -// Identity and Access Management (IAM) role in your Amazon Web Services account. +// The policy for allowed types of authentication in a user pool. +// +// This data type is a request and response parameter of [CreateUserPool] and [UpdateUserPool], and a response +// parameter of [DescribeUserPool]. +// +// [UpdateUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateUserPool.html +// [CreateUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateUserPool.html +// [DescribeUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeUserPool.html +type SignInPolicyType struct { + + // The sign-in methods that a user pool supports as the first factor. You can + // permit users to start authentication with a standard username and password, or + // with other one-time password and hardware factors. + AllowedFirstAuthFactors []AuthFactorType + + noSmithyDocumentSerde +} + +// User pool configuration for delivery of SMS messages with Amazon Simple +// Notification Service. To send SMS messages with Amazon SNS in the Amazon Web +// Services Region that you want, the Amazon Cognito user pool uses an Identity and +// Access Management (IAM) role in your Amazon Web Services account. +// +// This data type is a request parameter of [CreateUserPool], [UpdateUserPool], and [SetUserPoolMfaConfig], and a response parameter of [CreateUserPool] +// , [UpdateUserPool], and [GetUserPoolMfaConfig]. +// +// [UpdateUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateUserPool.html +// [CreateUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateUserPool.html +// [SetUserPoolMfaConfig]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_SetUserPoolMfaConfig.html +// [GetUserPoolMfaConfig]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_GetUserPoolMfaConfig.html type SmsConfigurationType struct { // The Amazon Resource Name (ARN) of the Amazon SNS caller. This is the ARN of the @@ -1439,7 +2081,7 @@ type SmsConfigurationType struct { // the required permissions and a trust policy that demonstrates use of the // ExternalId . // - // For more information about the ExternalId of a role, see [How to use an external ID when granting access to your Amazon Web Services resources to a third party] + // For more information about the ExternalId of a role, see [How to use an external ID when granting access to your Amazon Web Services resources to a third party]. // // [How to use an external ID when granting access to your Amazon Web Services resources to a third party]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html ExternalId *string @@ -1458,33 +2100,42 @@ type SmsConfigurationType struct { noSmithyDocumentSerde } -// Configures user pool SMS messages for multi-factor authentication (MFA). Sets -// the message template and the SMS message sending configuration for Amazon SNS. +// The configuration of multi-factor authentication (MFA) with SMS messages in a +// user pool. +// +// This data type is a request parameter of [SetUserPoolMfaConfig] and a response parameter of [GetUserPoolMfaConfig]. +// +// [SetUserPoolMfaConfig]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_SetUserPoolMfaConfig.html +// [GetUserPoolMfaConfig]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_GetUserPoolMfaConfig.html type SmsMfaConfigType struct { - // The SMS message that your user pool sends to users with an MFA code. The - // message must contain the {####} placeholder. In the message, Amazon Cognito - // replaces this placeholder with the code. If you don't provide this parameter, - // Amazon Cognito sends messages in the default format. + // The SMS authentication message that will be sent to users with the code they + // must sign in with. The message must contain the {####} placeholder. Your user + // pool replaces the placeholder with the MFA code. If this parameter isn't + // provided, your user pool sends a default message. SmsAuthenticationMessage *string - // The SMS configuration with the settings that your Amazon Cognito user pool must - // use to send an SMS message from your Amazon Web Services account through Amazon - // Simple Notification Service. To request Amazon SNS in the Amazon Web Services - // Region that you want, the Amazon Cognito user pool uses an Identity and Access - // Management (IAM) role that you provide for your Amazon Web Services account. + // User pool configuration for delivery of SMS messages with Amazon Simple + // Notification Service. To send SMS messages with Amazon SNS in the Amazon Web + // Services Region that you want, the Amazon Cognito user pool uses an Identity and + // Access Management (IAM) role in your Amazon Web Services account. + // + // You can set SmsConfiguration in CreateUserPool and UpdateUserPool , or in + // SetUserPoolMfaConfig . SmsConfiguration *SmsConfigurationType noSmithyDocumentSerde } -// The type used for enabling SMS multi-factor authentication (MFA) at the user -// level. Phone numbers don't need to be verified to be used for SMS MFA. If an MFA -// type is activated for a user, the user will be prompted for MFA during all -// sign-in attempts, unless device tracking is turned on and the device has been -// trusted. If you would like MFA to be applied selectively based on the assessed -// risk level of sign-in attempts, deactivate MFA for users and turn on Adaptive -// Authentication for the user pool. +// A user's preference for using SMS message multi-factor authentication (MFA). +// Turns SMS MFA on and off, and can set SMS as preferred when other MFA options +// are available. You can't turn off SMS MFA for any of your users when MFA is +// required in your user pool; you can only set the type that your user prefers. +// +// This data type is a request parameter of [SetUserMFAPreference] and [AdminSetUserMFAPreference]. +// +// [SetUserMFAPreference]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_SetUserMFAPreference.html +// [AdminSetUserMFAPreference]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminSetUserMFAPreference.html type SMSMfaSettingsType struct { // Specifies whether SMS message MFA is activated. If an MFA type is activated for @@ -1492,28 +2143,39 @@ type SMSMfaSettingsType struct { // device tracking is turned on and the device has been trusted. Enabled bool - // Specifies whether SMS is the preferred MFA method. + // Specifies whether SMS is the preferred MFA method. If true, your user pool + // prompts the specified user for a code delivered by SMS message after + // username-password sign-in succeeds. PreferredMfa bool noSmithyDocumentSerde } -// Configures a user pool for time-based one-time password (TOTP) multi-factor -// authentication (MFA). Enables or disables TOTP. +// Settings for time-based one-time password (TOTP) multi-factor authentication +// (MFA) in a user pool. Enables and disables availability of this feature. +// +// This data type is a request parameter of [SetUserPoolMfaConfig] and a response parameter of [GetUserPoolMfaConfig]. +// +// [SetUserPoolMfaConfig]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_SetUserPoolMfaConfig.html +// [GetUserPoolMfaConfig]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_GetUserPoolMfaConfig.html type SoftwareTokenMfaConfigType struct { - // Specifies whether software token MFA is activated. + // The activation state of TOTP MFA. Enabled bool noSmithyDocumentSerde } -// The type used for enabling software token MFA at the user level. If an MFA type -// is activated for a user, the user will be prompted for MFA during all sign-in -// attempts, unless device tracking is turned on and the device has been trusted. -// If you want MFA to be applied selectively based on the assessed risk level of -// sign-in attempts, deactivate MFA for users and turn on Adaptive Authentication -// for the user pool. +// A user's preference for using time-based one-time password (TOTP) multi-factor +// authentication (MFA). Turns TOTP MFA on and off, and can set TOTP as preferred +// when other MFA options are available. You can't turn off TOTP MFA for any of +// your users when MFA is required in your user pool; you can only set the type +// that your user prefers. +// +// This data type is a request parameter of [SetUserMFAPreference] and [AdminSetUserMFAPreference]. +// +// [SetUserMFAPreference]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_SetUserMFAPreference.html +// [AdminSetUserMFAPreference]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminSetUserMFAPreference.html type SoftwareTokenMfaSettingsType struct { // Specifies whether software token MFA is activated. If an MFA type is activated @@ -1527,7 +2189,17 @@ type SoftwareTokenMfaSettingsType struct { noSmithyDocumentSerde } -// The constraints associated with a string attribute. +// The minimum and maximum length values of an attribute that is of the string +// type, for example custom:department . +// +// This data type is part of [SchemaAttributeType]. It defines the length constraints on string-type +// attributes that you configure in [CreateUserPool]and [UpdateUserPool], and displays the length constraints of +// all string-type attributes in the response to [DescribeUserPool] +// +// [UpdateUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateUserPool.html +// [CreateUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateUserPool.html +// [SchemaAttributeType]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_SchemaAttributeType.html +// [DescribeUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeUserPool.html type StringAttributeConstraintsType struct { // The maximum length of a string attribute value. Must be a number less than or @@ -1535,46 +2207,62 @@ type StringAttributeConstraintsType struct { // fewer. MaxLength *string - // The minimum length. + // The minimum length of a string attribute value. MinLength *string noSmithyDocumentSerde } -// The data type TokenValidityUnits specifies the time units you use when you set -// the duration of ID, access, and refresh tokens. +// The time units that, with IdTokenValidity , AccessTokenValidity , and +// RefreshTokenValidity , set and display the duration of ID, access, and refresh +// tokens for an app client. You can assign a separate token validity unit to each +// type of token. +// +// This data type is a request parameter of [CreateUserPoolClient] and [UpdateUserPoolClient], and a response parameter of [DescribeUserPoolClient]. +// +// [DescribeUserPoolClient]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeUserPoolClient.html +// [CreateUserPoolClient]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateUserPoolClient.html +// [UpdateUserPoolClient]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateUserPoolClient.html type TokenValidityUnitsType struct { - // A time unit of seconds , minutes , hours , or days for the value that you set - // in the AccessTokenValidity parameter. The default AccessTokenValidity time unit - // is hours. AccessTokenValidity duration can range from five minutes to one day. + // A time unit for the value that you set in the AccessTokenValidity parameter. + // The default AccessTokenValidity time unit is hours . AccessTokenValidity + // duration can range from five minutes to one day. AccessToken TimeUnitsType - // A time unit of seconds , minutes , hours , or days for the value that you set - // in the IdTokenValidity parameter. The default IdTokenValidity time unit is - // hours. IdTokenValidity duration can range from five minutes to one day. + // A time unit for the value that you set in the IdTokenValidity parameter. The + // default IdTokenValidity time unit is hours . IdTokenValidity duration can range + // from five minutes to one day. IdToken TimeUnitsType - // A time unit of seconds , minutes , hours , or days for the value that you set - // in the RefreshTokenValidity parameter. The default RefreshTokenValidity time - // unit is days. RefreshTokenValidity duration can range from 60 minutes to 10 - // years. + // A time unit for the value that you set in the RefreshTokenValidity parameter. + // The default RefreshTokenValidity time unit is days . RefreshTokenValidity + // duration can range from 60 minutes to 10 years. RefreshToken TimeUnitsType noSmithyDocumentSerde } -// A container for the UI customization information for a user pool's built-in app -// UI. +// A container for the UI customization information for the hosted UI in a user +// pool. +// +// This data type is a response parameter of [GetUICustomization]. +// +// [GetUICustomization]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeUserPoolClient.html type UICustomizationType struct { - // The CSS values in the UI customization. + // The CSS values in the UI customization. To get a template with your UI + // customization options, make a [GetUiCustomization]request. + // + // [GetUiCustomization]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_GetUiCustomization.html CSS *string // The CSS version number. CSSVersion *string - // The client ID for the client app. + // The app client ID for your UI customization. When this value isn't present, the + // customization applies to all user pool app clients that don't have client-level + // settings.. ClientId *string // The date and time when the item was created. Amazon Cognito returns this @@ -1582,7 +2270,7 @@ type UICustomizationType struct { // human-readable format like ISO 8601 or a Java Date object. CreationDate *time.Time - // The logo image for the UI customization. + // A URL path to the hosted logo image of your UI customization. ImageUrl *string // The date and time when the item was modified. Amazon Cognito returns this @@ -1590,7 +2278,7 @@ type UICustomizationType struct { // human-readable format like ISO 8601 or a Java Date object. LastModifiedDate *time.Time - // The user pool ID for the user pool. + // The ID of the user pool with hosted UI customizations. UserPoolId *string noSmithyDocumentSerde @@ -1601,7 +2289,13 @@ type UICustomizationType struct { // tells Amazon Cognito how to handle changes to the value of your users' email // address and phone number attributes. For more information, see [Verifying updates to email addresses and phone numbers]. // +// This data type is a request and response parameter of [CreateUserPool] and [UpdateUserPool], and a response +// parameter of [DescribeUserPool]. +// +// [UpdateUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateUserPool.html +// [CreateUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateUserPool.html // [Verifying updates to email addresses and phone numbers]: https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-email-phone-verification.html#user-pool-settings-verifications-verify-attribute-updates +// [DescribeUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeUserPool.html type UserAttributeUpdateSettingsType struct { // Requires that your user verifies their email address, phone number, or both @@ -1631,6 +2325,12 @@ type UserAttributeUpdateSettingsType struct { // Contextual data, such as the user's device fingerprint, IP address, or // location, used for evaluating the risk of an unexpected event by Amazon Cognito // advanced security. +// +// This data type is a request parameter of public-client authentication +// operations like [InitiateAuth]and [RespondToAuthChallenge]. +// +// [InitiateAuth]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_InitiateAuth.html +// [RespondToAuthChallenge]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_RespondToAuthChallenge.html type UserContextDataType struct { // Encoded device-fingerprint details that your app collected with the Amazon @@ -1645,7 +2345,17 @@ type UserContextDataType struct { noSmithyDocumentSerde } -// The user import job type. +// A user import job in a user pool. Describes the status of user import with a +// CSV file. For more information, see [Importing users into user pools from a CSV file]. +// +// This data type is a request parameter of [CreateUserImportJob], [DescribeUserImportJob], [ListUserImportJobs], [StartUserImportJob], and [StopUserImportJob]. +// +// [ListUserImportJobs]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_ListUserImportJobs.html +// [Importing users into user pools from a CSV file]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-using-import-tool.html +// [StopUserImportJob]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_StopUserImportJob.html +// [CreateUserImportJob]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateUserImportJob.html +// [StartUserImportJob]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_StartUserImportJob.html +// [DescribeUserImportJob]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeUserImportJob.html type UserImportJobType struct { // The role Amazon Resource Name (ARN) for the Amazon CloudWatch Logging role for @@ -1670,13 +2380,13 @@ type UserImportJobType struct { // The number of users that were successfully imported. ImportedUsers int64 - // The job ID for the user import job. + // The ID of the user import job. JobId *string - // The job name for the user import job. + // The friendly name of the user import job. JobName *string - // The pre-signed URL to be used to upload the .csv file. + // The pre-signed URL target for uploading the CSV file. PreSignedUrl *string // The number of users that were skipped. @@ -1707,13 +2417,20 @@ type UserImportJobType struct { // All data associated with the job was deleted, and the job can't be started. Status UserImportJobStatusType - // The user pool ID for the user pool that the users are being imported into. + // The ID of the user pool that the users are being imported into. UserPoolId *string noSmithyDocumentSerde } -// The username configuration type. +// The configuration of a user pool for username case sensitivity. +// +// This data type is a request and response parameter of [CreateUserPool] and [UpdateUserPool], and a response +// parameter of [DescribeUserPool]. +// +// [UpdateUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateUserPool.html +// [CreateUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateUserPool.html +// [DescribeUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeUserPool.html type UsernameConfigurationType struct { // Specifies whether user name case sensitivity will be applied for all users in @@ -1724,12 +2441,12 @@ type UsernameConfigurationType struct { // // Valid values include: // - // True Enables case sensitivity for all username input. When this option is set - // to True , users must sign in using the exact capitalization of their given + // true Enables case sensitivity for all username input. When this option is set + // to true , users must sign in using the exact capitalization of their given // username, such as “UserName”. This is the default value. // - // False Enables case insensitivity for all username input. For example, when this - // option is set to False , users can sign in using username , USERNAME , or + // false Enables case insensitivity for all username input. For example, when this + // option is set to false , users can sign in using username , USERNAME , or // UserName . This option also enables both preferred_username and email alias to // be case insensitive, in addition to the username attribute. // @@ -1746,6 +2463,12 @@ type UsernameConfigurationType struct { // // For more information, see [Adding advanced security to a user pool]. // +// This data type is a request and response parameter of [CreateUserPool] and [UpdateUserPool], and a response +// parameter of [DescribeUserPool]. +// +// [UpdateUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateUserPool.html +// [CreateUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateUserPool.html +// [DescribeUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeUserPool.html // [Adding advanced security to a user pool]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pool-settings-advanced-security.html type UserPoolAddOnsType struct { @@ -1763,23 +2486,32 @@ type UserPoolAddOnsType struct { noSmithyDocumentSerde } -// The description of the user pool client. +// A short description of a user pool app client. +// +// This data type is a response parameter of [ListUserPoolClients]. +// +// [ListUserPoolClients]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_ListUserPoolClients.html type UserPoolClientDescription struct { - // The ID of the client associated with the user pool. + // The app client ID. ClientId *string - // The client name from the user pool client description. + // The app client name. ClientName *string - // The user pool ID for the user pool where you want to describe the user pool - // client. + // The ID of the user pool that's associated with the app client. UserPoolId *string noSmithyDocumentSerde } -// Contains information about a user pool client. +// The configuration of a user pool client. +// +// This data type is a request parameter of [CreateUserPoolClient] and [UpdateUserPoolClient], and a response parameter of [DescribeUserPoolClient]. +// +// [DescribeUserPoolClient]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeUserPoolClient.html +// [CreateUserPoolClient]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateUserPoolClient.html +// [UpdateUserPoolClient]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateUserPoolClient.html type UserPoolClientType struct { // The access token time limit. After this limit expires, your user can't use @@ -1797,7 +2529,9 @@ type UserPoolClientType struct { // access tokens are valid for one hour. AccessTokenValidity *int32 - // The allowed OAuth flows. + // The OAuth grant types that you want your app client to generate. To create an + // app client that generates client credentials grants, you must add + // client_credentials as the only allowed OAuth flow. // // code Use a code grant flow, which provides an authorization code as the // response. This code can be exchanged for access tokens with the /oauth2/token @@ -1832,17 +2566,20 @@ type UserPoolClientType struct { // defaults to false . AllowedOAuthFlowsUserPoolClient *bool - // The OAuth scopes that your app client supports. Possible values that OAuth - // provides are phone , email , openid , and profile . Possible values that Amazon - // Web Services provides are aws.cognito.signin.user.admin . Amazon Cognito also - // supports custom scopes that you create in Resource Servers. + // The OAuth 2.0 scopes that you want your app client to support. Can include + // standard OAuth scopes like phone , email , openid , and profile . Can also + // include the aws.cognito.signin.user.admin scope that authorizes user profile + // self-service operations and custom scopes from resource servers. AllowedOAuthScopes []string - // The Amazon Pinpoint analytics configuration for the user pool client. + // The user pool analytics configuration for collecting metrics and sending them + // to your Amazon Pinpoint campaign. // - // Amazon Cognito user pools only support sending events to Amazon Pinpoint - // projects in the US East (N. Virginia) us-east-1 Region, regardless of the Region - // where the user pool resides. + // In Amazon Web Services Regions where Amazon Pinpoint isn't available, user + // pools only support sending events to Amazon Pinpoint projects in Amazon Web + // Services Region us-east-1. In Regions where Amazon Pinpoint is available, user + // pools support sending events to Amazon Pinpoint projects within that same + // Region. AnalyticsConfiguration *AnalyticsConfigurationType // Amazon Cognito creates a session token for each API request in an @@ -1871,13 +2608,13 @@ type UserPoolClientType struct { // [OAuth 2.0 - Redirection Endpoint]: https://tools.ietf.org/html/rfc6749#section-3.1.2 CallbackURLs []string - // The ID of the client associated with the user pool. + // The ID of the app client. ClientId *string - // The client name from the user pool request of the client type. + // The name of the app client. ClientName *string - // The client secret from the user pool request of the client type. + // The app client secret. ClientSecret *string // The date and time when the item was created. Amazon Cognito returns this @@ -1943,6 +2680,14 @@ type UserPoolClientType struct { // // Valid values include: // + // - ALLOW_USER_AUTH : Enable selection-based sign-in with USER_AUTH . This + // setting covers username-password, secure remote password (SRP), passwordless, + // and passkey authentication. This authentiation flow can do username-password and + // SRP authentication without other ExplicitAuthFlows permitting them. For + // example users can complete an SRP challenge through USER_AUTH without the flow + // USER_SRP_AUTH being active for the app client. This flow doesn't include + // CUSTOM_AUTH . + // // - ALLOW_ADMIN_USER_PASSWORD_AUTH : Enable admin based user password // authentication flow ADMIN_USER_PASSWORD_AUTH . This setting replaces the // ADMIN_NO_SRP_AUTH setting. With this authentication flow, your app passes a @@ -2041,16 +2786,28 @@ type UserPoolClientType struct { // refresh tokens are valid for 30 days. RefreshTokenValidity int32 - // A list of provider names for the IdPs that this client supports. The following - // are supported: COGNITO , Facebook , Google , SignInWithApple , LoginWithAmazon , - // and the names of your own SAML and OIDC providers. + // A list of provider names for the identity providers (IdPs) that are supported + // on this client. The following are supported: COGNITO , Facebook , Google , + // SignInWithApple , and LoginWithAmazon . You can also specify the names that you + // configured for the SAML and OIDC IdPs in your user pool, for example MySAMLIdP + // or MyOIDCIdP . + // + // This setting applies to providers that you can access with the [hosted UI and OAuth 2.0 authorization server]. The removal of + // COGNITO from this list doesn't prevent authentication operations for local users + // with the user pools API in an Amazon Web Services SDK. The only way to prevent + // API-based authentication is to block access with a [WAF rule]. + // + // [WAF rule]: https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-waf.html + // [hosted UI and OAuth 2.0 authorization server]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-app-integration.html SupportedIdentityProviders []string - // The time units used to specify the token validity times of each token type: ID, - // access, and refresh. + // The time units that, with IdTokenValidity , AccessTokenValidity , and + // RefreshTokenValidity , set and display the duration of ID, access, and refresh + // tokens for an app client. You can assign a separate token validity unit to each + // type of token. TokenValidityUnits *TokenValidityUnitsType - // The user pool ID for the user pool client. + // The ID of the user pool associated with the app client. UserPoolId *string // The list of user attributes that you want your app client to have write access @@ -2080,7 +2837,11 @@ type UserPoolClientType struct { noSmithyDocumentSerde } -// A user pool description. +// A short description of a user pool. +// +// This data type is a response parameter of [ListUserPools]. +// +// [ListUserPools]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_ListUserPools.html type UserPoolDescriptionType struct { // The date and time when the item was created. Amazon Cognito returns this @@ -2088,10 +2849,12 @@ type UserPoolDescriptionType struct { // human-readable format like ISO 8601 or a Java Date object. CreationDate *time.Time - // The ID in a user pool description. + // The user pool ID. Id *string - // The Lambda configuration information in a user pool description. + // A collection of user pool Lambda triggers. Amazon Cognito invokes triggers at + // several possible stages of user pool operations. Triggers can modify the outcome + // of the operations that invoked them. LambdaConfig *LambdaConfigType // The date and time when the item was modified. Amazon Cognito returns this @@ -2099,10 +2862,10 @@ type UserPoolDescriptionType struct { // human-readable format like ISO 8601 or a Java Date object. LastModifiedDate *time.Time - // The name in a user pool description. + // The user pool name. Name *string - // The user pool status in a user pool description. + // The user pool status. // // Deprecated: This property is no longer available. Status StatusType @@ -2110,16 +2873,34 @@ type UserPoolDescriptionType struct { noSmithyDocumentSerde } -// The policy associated with a user pool. +// A list of user pool policies. Contains the policy that sets password-complexity +// requirements. +// +// This data type is a request and response parameter of [CreateUserPool] and [UpdateUserPool], and a response +// parameter of [DescribeUserPool]. +// +// [UpdateUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateUserPool.html +// [CreateUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateUserPool.html +// [DescribeUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeUserPool.html type UserPoolPolicyType struct { - // The password policy. + // The password policy settings for a user pool, including complexity, history, + // and length requirements. PasswordPolicy *PasswordPolicyType + // The policy for allowed types of authentication in a user pool. + SignInPolicy *SignInPolicyType + noSmithyDocumentSerde } -// A container for information about the user pool. +// The configuration of a user pool. +// +// This data type is a response parameter of [CreateUserPool], [UpdateUserPool], and [DescribeUserPool]. +// +// [UpdateUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateUserPool.html +// [CreateUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateUserPool.html +// [DescribeUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeUserPool.html type UserPoolType struct { // The available verified method a user can use to recover their password when @@ -2134,10 +2915,12 @@ type UserPoolType struct { // The configuration for AdminCreateUser requests. AdminCreateUserConfig *AdminCreateUserConfigType - // The attributes that are aliased in a user pool. + // Attributes supported as an alias for this user pool. An alias is an attribute + // that users can enter as an alternative username. Possible values: phone_number, + // email, or preferred_username. AliasAttributes []AliasAttributeType - // The Amazon Resource Name (ARN) for the user pool. + // The Amazon Resource Name (ARN) of the user pool. Arn *string // The attributes that are auto-verified in a user pool. @@ -2203,7 +2986,9 @@ type UserPoolType struct { // The ID of the user pool. Id *string - // The Lambda triggers associated with the user pool. + // A collection of user pool Lambda triggers. Amazon Cognito invokes triggers at + // several possible stages of user pool operations. Triggers can modify the outcome + // of the operations that invoked them. LambdaConfig *LambdaConfigType // The date and time when the item was modified. Amazon Cognito returns this @@ -2225,16 +3010,18 @@ type UserPoolType struct { // The name of the user pool. Name *string - // The policies associated with the user pool. + // A list of user pool policies. Contains the policy that sets password-complexity + // requirements. Policies *UserPoolPolicyType // A list of the user attributes and their properties in your user pool. The // attribute schema contains standard attributes, custom attributes with a custom: // prefix, and developer attributes with a dev: prefix. For more information, see [User pool attributes]. // - // Developer-only attributes are a legacy feature of user pools, are read-only to - // all app clients. You can create and update developer-only attributes only with - // IAM-authenticated API operations. Use app client read/write permissions instead. + // Developer-only attributes are a legacy feature of user pools, and are read-only + // to all app clients. You can create and update developer-only attributes only + // with IAM-authenticated API operations. Use app client read/write permissions + // instead. // // [User pool attributes]: https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-attributes.html SchemaAttributes []SchemaAttributeType @@ -2242,11 +3029,10 @@ type UserPoolType struct { // The contents of the SMS authentication message. SmsAuthenticationMessage *string - // The SMS configuration with the settings that your Amazon Cognito user pool must - // use to send an SMS message from your Amazon Web Services account through Amazon - // Simple Notification Service. To send SMS messages with Amazon SNS in the Amazon - // Web Services Region that you want, the Amazon Cognito user pool uses an Identity - // and Access Management (IAM) role in your Amazon Web Services account. + // User pool configuration for delivery of SMS messages with Amazon Simple + // Notification Service. To send SMS messages with Amazon SNS in the Amazon Web + // Services Region that you want, the Amazon Cognito user pool uses an Identity and + // Access Management (IAM) role in your Amazon Web Services account. SmsConfiguration *SmsConfigurationType // The reason why the SMS configuration can't send the messages to your users. @@ -2300,37 +3086,58 @@ type UserPoolType struct { // purpose, owner, environment, or other criteria. UserPoolTags map[string]string + // The user pool [feature plan], or tier. This parameter determines the eligibility of the user + // pool for features like managed login, access-token customization, and threat + // protection. Defaults to ESSENTIALS . + // + // [feature plan]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-sign-in-feature-plans.html + UserPoolTier UserPoolTierType + // Specifies whether a user can use an email address or phone number as a username // when they sign up. UsernameAttributes []UsernameAttributeType - // Case sensitivity of the username input for the selected sign-in option. For - // example, when case sensitivity is set to False , users can sign in using either - // "username" or "Username". This configuration is immutable once it has been set. - // For more information, see [UsernameConfigurationType]. + // Case sensitivity of the username input for the selected sign-in option. When + // case sensitivity is set to False (case insensitive), users can sign in with any + // combination of capital and lowercase letters. For example, username , USERNAME , + // or UserName , or for email, email@example.com or EMaiL@eXamplE.Com . For most + // use cases, set case sensitivity to False (case insensitive) as a best practice. + // When usernames and email addresses are case insensitive, Amazon Cognito treats + // any variation in case as the same user, and prevents a case variation from being + // assigned to the same attribute for a different user. + // + // This configuration is immutable after you set it. For more information, see [UsernameConfigurationType]. // // [UsernameConfigurationType]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UsernameConfigurationType.html UsernameConfiguration *UsernameConfigurationType - // The template for verification messages. + // The template for the verification message that your user pool delivers to users + // who set an email address or phone number attribute. VerificationMessageTemplate *VerificationMessageTemplateType noSmithyDocumentSerde } // A user profile in a Amazon Cognito user pool. +// +// This data type is a response parameter to [AdminCreateUser] and [ListUsers]. +// +// [ListUsers]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_ListUsers.html +// [AdminCreateUser]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminCreateUser.html type UserType struct { - // A container with information about the user type attributes. + // Names and values of a user's attributes, for example email . Attributes []AttributeType - // Specifies whether the user is enabled. + // Indicates whether the user's account is enabled or disabled. Enabled bool - // The MFA options for the user. + // The user's MFA configuration. MFAOptions []MFAOptionType - // The creation date of the user. + // The date and time when the item was created. Amazon Cognito returns this + // timestamp in UNIX epoch time format. Your SDK might render the output in a + // human-readable format like ISO 8601 or a Java Date object. UserCreateDate *time.Time // The date and time when the item was modified. Amazon Cognito returns this @@ -2356,16 +3163,29 @@ type UserType struct { // password to a new value before doing anything else. UserStatus UserStatusType - // The user name of the user you want to describe. + // The user's username. Username *string noSmithyDocumentSerde } -// The template for verification messages. +// The template for the verification message that your user pool delivers to users +// who set an email address or phone number attribute. +// +// This data type is a request and response parameter of [CreateUserPool] and [UpdateUserPool], and a response +// parameter of [DescribeUserPool]. +// +// [UpdateUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateUserPool.html +// [CreateUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateUserPool.html +// [DescribeUserPool]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeUserPool.html type VerificationMessageTemplateType struct { - // The default email option. + // The configuration of verification emails to contain a clickable link or a + // verification code. + // + // For link, your template body must contain link text in the format {##Click + // here##} . "Click here" in the example is a customizable string. For code, your + // template body must contain a code placeholder in the format {####} . DefaultEmailOption DefaultEmailOptionType // The template for email messages that Amazon Cognito sends to your users. You @@ -2405,4 +3225,89 @@ type VerificationMessageTemplateType struct { noSmithyDocumentSerde } +// Settings for multi-factor authentication (MFA) with passkey, or webauthN, +// biometric and security-key devices in a user pool. Configures the following: +// +// - Configuration at the user-pool level for whether you want to require +// passkey configuration as an MFA factor, or include it as a choice. +// +// - The user pool relying-party ID. This is the user pool domain that user's +// passkey providers should trust as a receiver of passkey authentication. +// +// - The providers that you want to allow as origins for passkey authentication. +// +// This data type is a request parameter of [SetUserPoolMfaConfig] and a response parameter of [GetUserPoolMfaConfig]. +// +// [SetUserPoolMfaConfig]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_SetUserPoolMfaConfig.html +// [GetUserPoolMfaConfig]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_GetUserPoolMfaConfig.html +type WebAuthnConfigurationType struct { + + // Sets or displays the authentication domain, typically your user pool domain, + // that passkey providers must use as a relying party (RP) in their configuration. + // + // Under the following conditions, the passkey relying party ID must be the + // fully-qualified domain name of your custom domain: + // + // - The user pool is configured for passkey authentication. + // + // - The user pool has a custom domain, whether or not it also has a prefix + // domain. + // + // - Your application performs authentication with managed login or the classic + // hosted UI. + RelyingPartyId *string + + // Sets or displays your user-pool treatment for MFA with a passkey. You can + // override other MFA options and require passkey MFA, or you can set it as + // preferred. When passkey MFA is preferred, the hosted UI encourages users to + // register a passkey at sign-in. + UserVerification UserVerificationType + + noSmithyDocumentSerde +} + +// The details of a passkey, or webauthN, biometric or security-key authentication +// factor for a user. +// +// This data type is a response parameter of [ListWebAuthnCredentials]. +// +// [ListWebAuthnCredentials]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_ListWebAuthnCredentials.html +type WebAuthnCredentialDescription struct { + + // Information about the transport methods of the passkey credential, for example + // USB or Bluetooth Low Energy. + // + // This member is required. + AuthenticatorTransports []string + + // The date and time when the item was created. Amazon Cognito returns this + // timestamp in UNIX epoch time format. Your SDK might render the output in a + // human-readable format like ISO 8601 or a Java Date object. + // + // This member is required. + CreatedAt *time.Time + + // The unique identifier of the passkey credential. + // + // This member is required. + CredentialId *string + + // An automatically-generated friendly name for the passkey credential. + // + // This member is required. + FriendlyCredentialName *string + + // The relying-party ID of the provider for the passkey credential. + // + // This member is required. + RelyingPartyId *string + + // The general category of the passkey authenticator. Can be a platform, or + // on-device authenticator like a built-in fingerprint scanner, or a cross-platform + // device that's not attached to the device like a Bluetooth security key. + AuthenticatorAttachment *string + + noSmithyDocumentSerde +} + type noSmithyDocumentSerde = smithydocument.NoSerde diff --git a/service/cognitoidentityprovider/validators.go b/service/cognitoidentityprovider/validators.go index f78a49c6b63..286e613ac43 100644 --- a/service/cognitoidentityprovider/validators.go +++ b/service/cognitoidentityprovider/validators.go @@ -570,6 +570,26 @@ func (m *validateOpChangePassword) HandleInitialize(ctx context.Context, in midd return next.HandleInitialize(ctx, in) } +type validateOpCompleteWebAuthnRegistration struct { +} + +func (*validateOpCompleteWebAuthnRegistration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCompleteWebAuthnRegistration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CompleteWebAuthnRegistrationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCompleteWebAuthnRegistrationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpConfirmDevice struct { } @@ -670,6 +690,26 @@ func (m *validateOpCreateIdentityProvider) HandleInitialize(ctx context.Context, return next.HandleInitialize(ctx, in) } +type validateOpCreateManagedLoginBranding struct { +} + +func (*validateOpCreateManagedLoginBranding) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateManagedLoginBranding) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateManagedLoginBrandingInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateManagedLoginBrandingInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateResourceServer struct { } @@ -810,6 +850,26 @@ func (m *validateOpDeleteIdentityProvider) HandleInitialize(ctx context.Context, return next.HandleInitialize(ctx, in) } +type validateOpDeleteManagedLoginBranding struct { +} + +func (*validateOpDeleteManagedLoginBranding) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteManagedLoginBranding) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteManagedLoginBrandingInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteManagedLoginBrandingInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteResourceServer struct { } @@ -930,6 +990,26 @@ func (m *validateOpDeleteUserPool) HandleInitialize(ctx context.Context, in midd return next.HandleInitialize(ctx, in) } +type validateOpDeleteWebAuthnCredential struct { +} + +func (*validateOpDeleteWebAuthnCredential) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteWebAuthnCredential) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteWebAuthnCredentialInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteWebAuthnCredentialInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDescribeIdentityProvider struct { } @@ -950,6 +1030,46 @@ func (m *validateOpDescribeIdentityProvider) HandleInitialize(ctx context.Contex return next.HandleInitialize(ctx, in) } +type validateOpDescribeManagedLoginBrandingByClient struct { +} + +func (*validateOpDescribeManagedLoginBrandingByClient) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeManagedLoginBrandingByClient) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeManagedLoginBrandingByClientInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeManagedLoginBrandingByClientInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeManagedLoginBranding struct { +} + +func (*validateOpDescribeManagedLoginBranding) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeManagedLoginBranding) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeManagedLoginBrandingInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeManagedLoginBrandingInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDescribeResourceServer struct { } @@ -1270,6 +1390,26 @@ func (m *validateOpGetUserAttributeVerificationCode) HandleInitialize(ctx contex return next.HandleInitialize(ctx, in) } +type validateOpGetUserAuthFactors struct { +} + +func (*validateOpGetUserAuthFactors) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetUserAuthFactors) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetUserAuthFactorsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetUserAuthFactorsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetUser struct { } @@ -1550,6 +1690,26 @@ func (m *validateOpListUsers) HandleInitialize(ctx context.Context, in middlewar return next.HandleInitialize(ctx, in) } +type validateOpListWebAuthnCredentials struct { +} + +func (*validateOpListWebAuthnCredentials) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListWebAuthnCredentials) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListWebAuthnCredentialsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListWebAuthnCredentialsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpResendConfirmationCode struct { } @@ -1770,6 +1930,26 @@ func (m *validateOpStartUserImportJob) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpStartWebAuthnRegistration struct { +} + +func (*validateOpStartWebAuthnRegistration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStartWebAuthnRegistration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StartWebAuthnRegistrationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStartWebAuthnRegistrationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpStopUserImportJob struct { } @@ -1910,6 +2090,26 @@ func (m *validateOpUpdateIdentityProvider) HandleInitialize(ctx context.Context, return next.HandleInitialize(ctx, in) } +type validateOpUpdateManagedLoginBranding struct { +} + +func (*validateOpUpdateManagedLoginBranding) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateManagedLoginBranding) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateManagedLoginBrandingInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateManagedLoginBrandingInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateResourceServer struct { } @@ -2162,6 +2362,10 @@ func addOpChangePasswordValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpChangePassword{}, middleware.After) } +func addOpCompleteWebAuthnRegistrationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCompleteWebAuthnRegistration{}, middleware.After) +} + func addOpConfirmDeviceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpConfirmDevice{}, middleware.After) } @@ -2182,6 +2386,10 @@ func addOpCreateIdentityProviderValidationMiddleware(stack *middleware.Stack) er return stack.Initialize.Add(&validateOpCreateIdentityProvider{}, middleware.After) } +func addOpCreateManagedLoginBrandingValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateManagedLoginBranding{}, middleware.After) +} + func addOpCreateResourceServerValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateResourceServer{}, middleware.After) } @@ -2210,6 +2418,10 @@ func addOpDeleteIdentityProviderValidationMiddleware(stack *middleware.Stack) er return stack.Initialize.Add(&validateOpDeleteIdentityProvider{}, middleware.After) } +func addOpDeleteManagedLoginBrandingValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteManagedLoginBranding{}, middleware.After) +} + func addOpDeleteResourceServerValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteResourceServer{}, middleware.After) } @@ -2234,10 +2446,22 @@ func addOpDeleteUserPoolValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteUserPool{}, middleware.After) } +func addOpDeleteWebAuthnCredentialValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteWebAuthnCredential{}, middleware.After) +} + func addOpDescribeIdentityProviderValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeIdentityProvider{}, middleware.After) } +func addOpDescribeManagedLoginBrandingByClientValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeManagedLoginBrandingByClient{}, middleware.After) +} + +func addOpDescribeManagedLoginBrandingValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeManagedLoginBranding{}, middleware.After) +} + func addOpDescribeResourceServerValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeResourceServer{}, middleware.After) } @@ -2302,6 +2526,10 @@ func addOpGetUserAttributeVerificationCodeValidationMiddleware(stack *middleware return stack.Initialize.Add(&validateOpGetUserAttributeVerificationCode{}, middleware.After) } +func addOpGetUserAuthFactorsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetUserAuthFactors{}, middleware.After) +} + func addOpGetUserValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetUser{}, middleware.After) } @@ -2358,6 +2586,10 @@ func addOpListUsersValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListUsers{}, middleware.After) } +func addOpListWebAuthnCredentialsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListWebAuthnCredentials{}, middleware.After) +} + func addOpResendConfirmationCodeValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpResendConfirmationCode{}, middleware.After) } @@ -2402,6 +2634,10 @@ func addOpStartUserImportJobValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpStartUserImportJob{}, middleware.After) } +func addOpStartWebAuthnRegistrationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStartWebAuthnRegistration{}, middleware.After) +} + func addOpStopUserImportJobValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpStopUserImportJob{}, middleware.After) } @@ -2430,6 +2666,10 @@ func addOpUpdateIdentityProviderValidationMiddleware(stack *middleware.Stack) er return stack.Initialize.Add(&validateOpUpdateIdentityProvider{}, middleware.After) } +func addOpUpdateManagedLoginBrandingValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateManagedLoginBranding{}, middleware.After) +} + func addOpUpdateResourceServerValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateResourceServer{}, middleware.After) } @@ -2541,6 +2781,44 @@ func validateAccountTakeoverRiskConfigurationType(v *types.AccountTakeoverRiskCo } } +func validateAssetListType(v []types.AssetType) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AssetListType"} + for i := range v { + if err := validateAssetType(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateAssetType(v *types.AssetType) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AssetType"} + if len(v.Category) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Category")) + } + if len(v.ColorMode) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ColorMode")) + } + if len(v.Extension) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Extension")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateAttributeListType(v []types.AttributeType) error { if v == nil { return nil @@ -3496,9 +3774,6 @@ func validateOpChangePasswordInput(v *ChangePasswordInput) error { return nil } invalidParams := smithy.InvalidParamsError{Context: "ChangePasswordInput"} - if v.PreviousPassword == nil { - invalidParams.Add(smithy.NewErrParamRequired("PreviousPassword")) - } if v.ProposedPassword == nil { invalidParams.Add(smithy.NewErrParamRequired("ProposedPassword")) } @@ -3512,6 +3787,24 @@ func validateOpChangePasswordInput(v *ChangePasswordInput) error { } } +func validateOpCompleteWebAuthnRegistrationInput(v *CompleteWebAuthnRegistrationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CompleteWebAuthnRegistrationInput"} + if v.AccessToken == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccessToken")) + } + if v.Credential == nil { + invalidParams.Add(smithy.NewErrParamRequired("Credential")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpConfirmDeviceInput(v *ConfirmDeviceInput) error { if v == nil { return nil @@ -3617,6 +3910,29 @@ func validateOpCreateIdentityProviderInput(v *CreateIdentityProviderInput) error } } +func validateOpCreateManagedLoginBrandingInput(v *CreateManagedLoginBrandingInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateManagedLoginBrandingInput"} + if v.UserPoolId == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserPoolId")) + } + if v.ClientId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ClientId")) + } + if v.Assets != nil { + if err := validateAssetListType(v.Assets); err != nil { + invalidParams.AddNested("Assets", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateResourceServerInput(v *CreateResourceServerInput) error { if v == nil { return nil @@ -3781,6 +4097,24 @@ func validateOpDeleteIdentityProviderInput(v *DeleteIdentityProviderInput) error } } +func validateOpDeleteManagedLoginBrandingInput(v *DeleteManagedLoginBrandingInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteManagedLoginBrandingInput"} + if v.ManagedLoginBrandingId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ManagedLoginBrandingId")) + } + if v.UserPoolId == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserPoolId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteResourceServerInput(v *DeleteResourceServerInput) error { if v == nil { return nil @@ -3883,6 +4217,24 @@ func validateOpDeleteUserPoolInput(v *DeleteUserPoolInput) error { } } +func validateOpDeleteWebAuthnCredentialInput(v *DeleteWebAuthnCredentialInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteWebAuthnCredentialInput"} + if v.AccessToken == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccessToken")) + } + if v.CredentialId == nil { + invalidParams.Add(smithy.NewErrParamRequired("CredentialId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDescribeIdentityProviderInput(v *DescribeIdentityProviderInput) error { if v == nil { return nil @@ -3901,6 +4253,42 @@ func validateOpDescribeIdentityProviderInput(v *DescribeIdentityProviderInput) e } } +func validateOpDescribeManagedLoginBrandingByClientInput(v *DescribeManagedLoginBrandingByClientInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeManagedLoginBrandingByClientInput"} + if v.UserPoolId == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserPoolId")) + } + if v.ClientId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ClientId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeManagedLoginBrandingInput(v *DescribeManagedLoginBrandingInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeManagedLoginBrandingInput"} + if v.UserPoolId == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserPoolId")) + } + if v.ManagedLoginBrandingId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ManagedLoginBrandingId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDescribeResourceServerInput(v *DescribeResourceServerInput) error { if v == nil { return nil @@ -4162,6 +4550,21 @@ func validateOpGetUserAttributeVerificationCodeInput(v *GetUserAttributeVerifica } } +func validateOpGetUserAuthFactorsInput(v *GetUserAuthFactorsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetUserAuthFactorsInput"} + if v.AccessToken == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccessToken")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetUserInput(v *GetUserInput) error { if v == nil { return nil @@ -4381,6 +4784,21 @@ func validateOpListUsersInput(v *ListUsersInput) error { } } +func validateOpListWebAuthnCredentialsInput(v *ListWebAuthnCredentialsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListWebAuthnCredentialsInput"} + if v.AccessToken == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccessToken")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpResendConfirmationCodeInput(v *ResendConfirmationCodeInput) error { if v == nil { return nil @@ -4561,9 +4979,6 @@ func validateOpSignUpInput(v *SignUpInput) error { if v.Username == nil { invalidParams.Add(smithy.NewErrParamRequired("Username")) } - if v.Password == nil { - invalidParams.Add(smithy.NewErrParamRequired("Password")) - } if v.UserAttributes != nil { if err := validateAttributeListType(v.UserAttributes); err != nil { invalidParams.AddNested("UserAttributes", err.(smithy.InvalidParamsError)) @@ -4599,6 +5014,21 @@ func validateOpStartUserImportJobInput(v *StartUserImportJobInput) error { } } +func validateOpStartWebAuthnRegistrationInput(v *StartWebAuthnRegistrationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StartWebAuthnRegistrationInput"} + if v.AccessToken == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccessToken")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpStopUserImportJobInput(v *StopUserImportJobInput) error { if v == nil { return nil @@ -4734,6 +5164,23 @@ func validateOpUpdateIdentityProviderInput(v *UpdateIdentityProviderInput) error } } +func validateOpUpdateManagedLoginBrandingInput(v *UpdateManagedLoginBrandingInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateManagedLoginBrandingInput"} + if v.Assets != nil { + if err := validateAssetListType(v.Assets); err != nil { + invalidParams.AddNested("Assets", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateResourceServerInput(v *UpdateResourceServerInput) error { if v == nil { return nil diff --git a/service/connect/api_op_CreateContact.go b/service/connect/api_op_CreateContact.go new file mode 100644 index 00000000000..0f4039b8f63 --- /dev/null +++ b/service/connect/api_op_CreateContact.go @@ -0,0 +1,235 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package connect + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/connect/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +func (c *Client) CreateContact(ctx context.Context, params *CreateContactInput, optFns ...func(*Options)) (*CreateContactOutput, error) { + if params == nil { + params = &CreateContactInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateContact", params, optFns, c.addOperationCreateContactMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateContactOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateContactInput struct { + + // + // + // This member is required. + Channel types.Channel + + // + // + // This member is required. + InitiationMethod types.ContactInitiationMethod + + // + // + // This member is required. + InstanceId *string + + // + Attributes map[string]string + + // + ClientToken *string + + // + Description *string + + // + ExpiryDurationInMinutes *int32 + + // + InitiateAs types.InitiateAs + + // + Name *string + + // + References map[string]types.Reference + + // + RelatedContactId *string + + // + SegmentAttributes map[string]types.SegmentAttributeValue + + // + UserInfo *types.UserInfo + + noSmithyDocumentSerde +} + +type CreateContactOutput struct { + + // + ContactArn *string + + // + ContactId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateContactMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateContact{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateContact{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateContact"); 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_opCreateContactMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateContactValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateContact(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_initializeOpCreateContact struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateContact) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateContact) 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.(*CreateContactInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateContactInput ") + } + + 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_opCreateContactMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateContact{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateContact(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateContact", + } +} diff --git a/service/connect/api_op_CreateEmailAddress.go b/service/connect/api_op_CreateEmailAddress.go new file mode 100644 index 00000000000..fe68bcf39c9 --- /dev/null +++ b/service/connect/api_op_CreateEmailAddress.go @@ -0,0 +1,175 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package connect + +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" +) + +func (c *Client) CreateEmailAddress(ctx context.Context, params *CreateEmailAddressInput, optFns ...func(*Options)) (*CreateEmailAddressOutput, error) { + if params == nil { + params = &CreateEmailAddressInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateEmailAddress", params, optFns, c.addOperationCreateEmailAddressMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateEmailAddressOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateEmailAddressInput struct { + + // + // + // This member is required. + EmailAddress *string + + // + // + // This member is required. + InstanceId *string + + // + ClientToken *string + + // + Description *string + + // + DisplayName *string + + // + Tags map[string]string + + noSmithyDocumentSerde +} + +type CreateEmailAddressOutput struct { + + // + EmailAddressArn *string + + // + EmailAddressId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateEmailAddressMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateEmailAddress{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateEmailAddress{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateEmailAddress"); 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 = addOpCreateEmailAddressValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateEmailAddress(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_opCreateEmailAddress(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateEmailAddress", + } +} diff --git a/service/connect/api_op_CreateQueue.go b/service/connect/api_op_CreateQueue.go index 943b9739630..2157143f803 100644 --- a/service/connect/api_op_CreateQueue.go +++ b/service/connect/api_op_CreateQueue.go @@ -79,6 +79,9 @@ type CreateQueueInput struct { // The outbound caller ID name, number, and outbound whisper flow. OutboundCallerConfig *types.OutboundCallerConfig + // + OutboundEmailConfig *types.OutboundEmailConfig + // The quick connects available to agents who are working the queue. QuickConnectIds []string diff --git a/service/connect/api_op_CreateTaskTemplate.go b/service/connect/api_op_CreateTaskTemplate.go index 138b1fc2694..fb032936349 100644 --- a/service/connect/api_op_CreateTaskTemplate.go +++ b/service/connect/api_op_CreateTaskTemplate.go @@ -68,6 +68,9 @@ type CreateTaskTemplateInput struct { // The description of the task template. Description *string + // + SelfAssignFlowId *string + // Marks a template as ACTIVE or INACTIVE for a task to refer to it. Tasks can // only be created from ACTIVE templates. If a template is marked as INACTIVE , // then a task that refers to this template cannot be created. diff --git a/service/connect/api_op_DeleteEmailAddress.go b/service/connect/api_op_DeleteEmailAddress.go new file mode 100644 index 00000000000..68abef82e8c --- /dev/null +++ b/service/connect/api_op_DeleteEmailAddress.go @@ -0,0 +1,156 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package connect + +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" +) + +func (c *Client) DeleteEmailAddress(ctx context.Context, params *DeleteEmailAddressInput, optFns ...func(*Options)) (*DeleteEmailAddressOutput, error) { + if params == nil { + params = &DeleteEmailAddressInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteEmailAddress", params, optFns, c.addOperationDeleteEmailAddressMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteEmailAddressOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteEmailAddressInput struct { + + // + // + // This member is required. + EmailAddressId *string + + // + // + // This member is required. + InstanceId *string + + noSmithyDocumentSerde +} + +type DeleteEmailAddressOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteEmailAddressMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteEmailAddress{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteEmailAddress{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteEmailAddress"); 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 = addOpDeleteEmailAddressValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteEmailAddress(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_opDeleteEmailAddress(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteEmailAddress", + } +} diff --git a/service/connect/api_op_DescribeEmailAddress.go b/service/connect/api_op_DescribeEmailAddress.go new file mode 100644 index 00000000000..d8306a67915 --- /dev/null +++ b/service/connect/api_op_DescribeEmailAddress.go @@ -0,0 +1,181 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package connect + +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" +) + +func (c *Client) DescribeEmailAddress(ctx context.Context, params *DescribeEmailAddressInput, optFns ...func(*Options)) (*DescribeEmailAddressOutput, error) { + if params == nil { + params = &DescribeEmailAddressInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeEmailAddress", params, optFns, c.addOperationDescribeEmailAddressMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeEmailAddressOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeEmailAddressInput struct { + + // + // + // This member is required. + EmailAddressId *string + + // + // + // This member is required. + InstanceId *string + + noSmithyDocumentSerde +} + +type DescribeEmailAddressOutput struct { + + // + CreateTimestamp *string + + // + Description *string + + // + DisplayName *string + + // + EmailAddress *string + + // + EmailAddressArn *string + + // + EmailAddressId *string + + // + ModifiedTimestamp *string + + // + Tags map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeEmailAddressMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeEmailAddress{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeEmailAddress{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeEmailAddress"); 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 = addOpDescribeEmailAddressValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEmailAddress(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_opDescribeEmailAddress(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeEmailAddress", + } +} diff --git a/service/connect/api_op_GetTaskTemplate.go b/service/connect/api_op_GetTaskTemplate.go index daae18050f9..ef210bb1f19 100644 --- a/service/connect/api_op_GetTaskTemplate.go +++ b/service/connect/api_op_GetTaskTemplate.go @@ -97,6 +97,9 @@ type GetTaskTemplateOutput struct { // The timestamp when the task template was last modified. LastModifiedTime *time.Time + // + SelfAssignFlowId *string + // Marks a template as ACTIVE or INACTIVE for a task to refer to it. Tasks can // only be created from ACTIVE templates. If a template is marked as INACTIVE , // then a task that refers to this template cannot be created. diff --git a/service/connect/api_op_ListAssociatedContacts.go b/service/connect/api_op_ListAssociatedContacts.go new file mode 100644 index 00000000000..2985b94cb3e --- /dev/null +++ b/service/connect/api_op_ListAssociatedContacts.go @@ -0,0 +1,170 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package connect + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/connect/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +func (c *Client) ListAssociatedContacts(ctx context.Context, params *ListAssociatedContactsInput, optFns ...func(*Options)) (*ListAssociatedContactsOutput, error) { + if params == nil { + params = &ListAssociatedContactsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListAssociatedContacts", params, optFns, c.addOperationListAssociatedContactsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListAssociatedContactsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListAssociatedContactsInput struct { + + // + // + // This member is required. + ContactId *string + + // + // + // This member is required. + InstanceId *string + + // + MaxResults *int32 + + // + NextToken *string + + noSmithyDocumentSerde +} + +type ListAssociatedContactsOutput struct { + + // + ContactSummaryList []types.AssociatedContactSummary + + // + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListAssociatedContactsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListAssociatedContacts{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListAssociatedContacts{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListAssociatedContacts"); 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 = addOpListAssociatedContactsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAssociatedContacts(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_opListAssociatedContacts(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListAssociatedContacts", + } +} diff --git a/service/connect/api_op_SearchEmailAddresses.go b/service/connect/api_op_SearchEmailAddresses.go new file mode 100644 index 00000000000..0dbd829db03 --- /dev/null +++ b/service/connect/api_op_SearchEmailAddresses.go @@ -0,0 +1,174 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package connect + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/connect/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +func (c *Client) SearchEmailAddresses(ctx context.Context, params *SearchEmailAddressesInput, optFns ...func(*Options)) (*SearchEmailAddressesOutput, error) { + if params == nil { + params = &SearchEmailAddressesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "SearchEmailAddresses", params, optFns, c.addOperationSearchEmailAddressesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*SearchEmailAddressesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type SearchEmailAddressesInput struct { + + // + // + // This member is required. + InstanceId *string + + // + MaxResults *int32 + + // + NextToken *string + + // + SearchCriteria *types.EmailAddressSearchCriteria + + // + SearchFilter *types.EmailAddressSearchFilter + + noSmithyDocumentSerde +} + +type SearchEmailAddressesOutput struct { + + // + ApproximateTotalCount *int64 + + // + EmailAddresses []types.EmailAddressMetadata + + // + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationSearchEmailAddressesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpSearchEmailAddresses{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpSearchEmailAddresses{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "SearchEmailAddresses"); 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 = addOpSearchEmailAddressesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSearchEmailAddresses(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_opSearchEmailAddresses(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "SearchEmailAddresses", + } +} diff --git a/service/connect/api_op_SendOutboundEmail.go b/service/connect/api_op_SendOutboundEmail.go new file mode 100644 index 00000000000..71edbb1d067 --- /dev/null +++ b/service/connect/api_op_SendOutboundEmail.go @@ -0,0 +1,217 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package connect + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/connect/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +func (c *Client) SendOutboundEmail(ctx context.Context, params *SendOutboundEmailInput, optFns ...func(*Options)) (*SendOutboundEmailOutput, error) { + if params == nil { + params = &SendOutboundEmailInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "SendOutboundEmail", params, optFns, c.addOperationSendOutboundEmailMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*SendOutboundEmailOutput) + out.ResultMetadata = metadata + return out, nil +} + +type SendOutboundEmailInput struct { + + // + // + // This member is required. + DestinationEmailAddress *types.EmailAddressInfo + + // + // + // This member is required. + EmailMessage *types.OutboundEmailContent + + // + // + // This member is required. + FromEmailAddress *types.EmailAddressInfo + + // + // + // This member is required. + InstanceId *string + + // + // + // This member is required. + TrafficType types.TrafficType + + // + AdditionalRecipients *types.OutboundAdditionalRecipients + + // + ClientToken *string + + // + SourceCampaign *types.SourceCampaign + + noSmithyDocumentSerde +} + +type SendOutboundEmailOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationSendOutboundEmailMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpSendOutboundEmail{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpSendOutboundEmail{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "SendOutboundEmail"); 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_opSendOutboundEmailMiddleware(stack, options); err != nil { + return err + } + if err = addOpSendOutboundEmailValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSendOutboundEmail(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_initializeOpSendOutboundEmail struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpSendOutboundEmail) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpSendOutboundEmail) 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.(*SendOutboundEmailInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *SendOutboundEmailInput ") + } + + 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_opSendOutboundEmailMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpSendOutboundEmail{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opSendOutboundEmail(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "SendOutboundEmail", + } +} diff --git a/service/connect/api_op_StartEmailContact.go b/service/connect/api_op_StartEmailContact.go new file mode 100644 index 00000000000..0723c4cdca3 --- /dev/null +++ b/service/connect/api_op_StartEmailContact.go @@ -0,0 +1,237 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package connect + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/connect/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +func (c *Client) StartEmailContact(ctx context.Context, params *StartEmailContactInput, optFns ...func(*Options)) (*StartEmailContactOutput, error) { + if params == nil { + params = &StartEmailContactInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StartEmailContact", params, optFns, c.addOperationStartEmailContactMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StartEmailContactOutput) + out.ResultMetadata = metadata + return out, nil +} + +type StartEmailContactInput struct { + + // + // + // This member is required. + DestinationEmailAddress *string + + // + // + // This member is required. + EmailMessage *types.InboundEmailContent + + // + // + // This member is required. + FromEmailAddress *types.EmailAddressInfo + + // + // + // This member is required. + InstanceId *string + + // + AdditionalRecipients *types.InboundAdditionalRecipients + + // + Attachments []types.EmailAttachment + + // + Attributes map[string]string + + // + ClientToken *string + + // + ContactFlowId *string + + // + Description *string + + // + Name *string + + // + References map[string]types.Reference + + // + RelatedContactId *string + + // + SegmentAttributes map[string]types.SegmentAttributeValue + + noSmithyDocumentSerde +} + +type StartEmailContactOutput struct { + + // + ContactId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationStartEmailContactMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpStartEmailContact{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpStartEmailContact{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "StartEmailContact"); 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_opStartEmailContactMiddleware(stack, options); err != nil { + return err + } + if err = addOpStartEmailContactValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartEmailContact(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_initializeOpStartEmailContact struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpStartEmailContact) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpStartEmailContact) 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.(*StartEmailContactInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *StartEmailContactInput ") + } + + 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_opStartEmailContactMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpStartEmailContact{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opStartEmailContact(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "StartEmailContact", + } +} diff --git a/service/connect/api_op_StartOutboundEmailContact.go b/service/connect/api_op_StartOutboundEmailContact.go new file mode 100644 index 00000000000..bb7f9c36d75 --- /dev/null +++ b/service/connect/api_op_StartOutboundEmailContact.go @@ -0,0 +1,216 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package connect + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/connect/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +func (c *Client) StartOutboundEmailContact(ctx context.Context, params *StartOutboundEmailContactInput, optFns ...func(*Options)) (*StartOutboundEmailContactOutput, error) { + if params == nil { + params = &StartOutboundEmailContactInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StartOutboundEmailContact", params, optFns, c.addOperationStartOutboundEmailContactMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StartOutboundEmailContactOutput) + out.ResultMetadata = metadata + return out, nil +} + +type StartOutboundEmailContactInput struct { + + // + // + // This member is required. + ContactId *string + + // + // + // This member is required. + DestinationEmailAddress *types.EmailAddressInfo + + // + // + // This member is required. + EmailMessage *types.OutboundEmailContent + + // + // + // This member is required. + InstanceId *string + + // + AdditionalRecipients *types.OutboundAdditionalRecipients + + // + ClientToken *string + + // + FromEmailAddress *types.EmailAddressInfo + + noSmithyDocumentSerde +} + +type StartOutboundEmailContactOutput struct { + + // + ContactId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationStartOutboundEmailContactMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpStartOutboundEmailContact{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpStartOutboundEmailContact{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "StartOutboundEmailContact"); 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_opStartOutboundEmailContactMiddleware(stack, options); err != nil { + return err + } + if err = addOpStartOutboundEmailContactValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartOutboundEmailContact(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_initializeOpStartOutboundEmailContact struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpStartOutboundEmailContact) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpStartOutboundEmailContact) 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.(*StartOutboundEmailContactInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *StartOutboundEmailContactInput ") + } + + 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_opStartOutboundEmailContactMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpStartOutboundEmailContact{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opStartOutboundEmailContact(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "StartOutboundEmailContact", + } +} diff --git a/service/connect/api_op_StartTaskContact.go b/service/connect/api_op_StartTaskContact.go index d3e81a8ff83..2fbe912904c 100644 --- a/service/connect/api_op_StartTaskContact.go +++ b/service/connect/api_op_StartTaskContact.go @@ -143,6 +143,9 @@ type StartTaskContactInput struct { // 6 days in future. ScheduledTime *time.Time + // + SegmentAttributes map[string]types.SegmentAttributeValue + // A unique identifier for the task template. For more information about task // templates, see [Create task templates]in the Amazon Connect Administrator Guide. // diff --git a/service/connect/api_op_UpdateContact.go b/service/connect/api_op_UpdateContact.go index 23a2210f543..317288364e4 100644 --- a/service/connect/api_op_UpdateContact.go +++ b/service/connect/api_op_UpdateContact.go @@ -58,6 +58,9 @@ type UpdateContactInput struct { // Well-formed data on contact, shown to agents on Contact Control Panel (CCP). References map[string]types.Reference + // + SegmentAttributes map[string]types.SegmentAttributeValue + noSmithyDocumentSerde } diff --git a/service/connect/api_op_UpdateEmailAddressMetadata.go b/service/connect/api_op_UpdateEmailAddressMetadata.go new file mode 100644 index 00000000000..56aaa23d4c4 --- /dev/null +++ b/service/connect/api_op_UpdateEmailAddressMetadata.go @@ -0,0 +1,172 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package connect + +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" +) + +func (c *Client) UpdateEmailAddressMetadata(ctx context.Context, params *UpdateEmailAddressMetadataInput, optFns ...func(*Options)) (*UpdateEmailAddressMetadataOutput, error) { + if params == nil { + params = &UpdateEmailAddressMetadataInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateEmailAddressMetadata", params, optFns, c.addOperationUpdateEmailAddressMetadataMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateEmailAddressMetadataOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateEmailAddressMetadataInput struct { + + // + // + // This member is required. + EmailAddressId *string + + // + // + // This member is required. + InstanceId *string + + // + ClientToken *string + + // + Description *string + + // + DisplayName *string + + noSmithyDocumentSerde +} + +type UpdateEmailAddressMetadataOutput struct { + + // + EmailAddressArn *string + + // + EmailAddressId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateEmailAddressMetadataMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateEmailAddressMetadata{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateEmailAddressMetadata{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateEmailAddressMetadata"); 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 = addOpUpdateEmailAddressMetadataValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateEmailAddressMetadata(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_opUpdateEmailAddressMetadata(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateEmailAddressMetadata", + } +} diff --git a/service/connect/api_op_UpdateQueueOutboundEmailConfig.go b/service/connect/api_op_UpdateQueueOutboundEmailConfig.go new file mode 100644 index 00000000000..6a6bb658482 --- /dev/null +++ b/service/connect/api_op_UpdateQueueOutboundEmailConfig.go @@ -0,0 +1,162 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package connect + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/connect/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +func (c *Client) UpdateQueueOutboundEmailConfig(ctx context.Context, params *UpdateQueueOutboundEmailConfigInput, optFns ...func(*Options)) (*UpdateQueueOutboundEmailConfigOutput, error) { + if params == nil { + params = &UpdateQueueOutboundEmailConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateQueueOutboundEmailConfig", params, optFns, c.addOperationUpdateQueueOutboundEmailConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateQueueOutboundEmailConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateQueueOutboundEmailConfigInput struct { + + // + // + // This member is required. + InstanceId *string + + // + // + // This member is required. + OutboundEmailConfig *types.OutboundEmailConfig + + // + // + // This member is required. + QueueId *string + + noSmithyDocumentSerde +} + +type UpdateQueueOutboundEmailConfigOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateQueueOutboundEmailConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateQueueOutboundEmailConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateQueueOutboundEmailConfig{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateQueueOutboundEmailConfig"); 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 = addOpUpdateQueueOutboundEmailConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateQueueOutboundEmailConfig(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_opUpdateQueueOutboundEmailConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateQueueOutboundEmailConfig", + } +} diff --git a/service/connect/api_op_UpdateTaskTemplate.go b/service/connect/api_op_UpdateTaskTemplate.go index 73c527c2ee1..2988a7893b2 100644 --- a/service/connect/api_op_UpdateTaskTemplate.go +++ b/service/connect/api_op_UpdateTaskTemplate.go @@ -65,6 +65,9 @@ type UpdateTaskTemplateInput struct { // The name of the task template. Name *string + // + SelfAssignFlowId *string + // Marks a template as ACTIVE or INACTIVE for a task to refer to it. Tasks can // only be created from ACTIVE templates. If a template is marked as INACTIVE , // then a task that refers to this template cannot be created. @@ -113,6 +116,9 @@ type UpdateTaskTemplateOutput struct { // The name of the task template. Name *string + // + SelfAssignFlowId *string + // Marks a template as ACTIVE or INACTIVE for a task to refer to it. Tasks can // only be created from ACTIVE templates. If a template is marked as INACTIVE , // then a task that refers to this template cannot be created. diff --git a/service/connect/deserializers.go b/service/connect/deserializers.go index aceb5117f59..6fbdc2a0bf6 100644 --- a/service/connect/deserializers.go +++ b/service/connect/deserializers.go @@ -3251,6 +3251,195 @@ func awsRestjson1_deserializeOpDocumentCreateAgentStatusOutput(v **CreateAgentSt return nil } +type awsRestjson1_deserializeOpCreateContact struct { +} + +func (*awsRestjson1_deserializeOpCreateContact) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateContact) HandleDeserialize(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_deserializeOpErrorCreateContact(response, &metadata) + } + output := &CreateContactOutput{} + 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_deserializeOpDocumentCreateContactOutput(&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_deserializeOpErrorCreateContact(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("IdempotencyException", errorCode): + return awsRestjson1_deserializeErrorIdempotencyException(response, errorBody) + + case strings.EqualFold("InternalServiceException", errorCode): + return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateContactOutput(v **CreateContactOutput, 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 *CreateContactOutput + if *v == nil { + sv = &CreateContactOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ContactArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.ContactArn = ptr.String(jtv) + } + + case "ContactId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ContactId to be of type string, got %T instead", value) + } + sv.ContactId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpCreateContactFlow struct { } @@ -3825,14 +4014,14 @@ func awsRestjson1_deserializeOpDocumentCreateContactFlowVersionOutput(v **Create return nil } -type awsRestjson1_deserializeOpCreateEvaluationForm struct { +type awsRestjson1_deserializeOpCreateEmailAddress struct { } -func (*awsRestjson1_deserializeOpCreateEvaluationForm) ID() string { +func (*awsRestjson1_deserializeOpCreateEmailAddress) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateEvaluationForm) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateEmailAddress) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3850,9 +4039,9 @@ func (m *awsRestjson1_deserializeOpCreateEvaluationForm) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateEvaluationForm(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateEmailAddress(response, &metadata) } - output := &CreateEvaluationFormOutput{} + output := &CreateEmailAddressOutput{} out.Result = output var buff [1024]byte @@ -3873,7 +4062,7 @@ func (m *awsRestjson1_deserializeOpCreateEvaluationForm) HandleDeserialize(ctx c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateEvaluationFormOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateEmailAddressOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3887,7 +4076,7 @@ func (m *awsRestjson1_deserializeOpCreateEvaluationForm) HandleDeserialize(ctx c return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateEvaluationForm(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateEmailAddress(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3928,12 +4117,24 @@ func awsRestjson1_deserializeOpErrorCreateEvaluationForm(response *smithyhttp.Re } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("DuplicateResourceException", errorCode): + return awsRestjson1_deserializeErrorDuplicateResourceException(response, errorBody) + + case strings.EqualFold("IdempotencyException", errorCode): + return awsRestjson1_deserializeErrorIdempotencyException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + case strings.EqualFold("ResourceConflictException", errorCode): return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) @@ -3956,7 +4157,7 @@ func awsRestjson1_deserializeOpErrorCreateEvaluationForm(response *smithyhttp.Re } } -func awsRestjson1_deserializeOpDocumentCreateEvaluationFormOutput(v **CreateEvaluationFormOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateEmailAddressOutput(v **CreateEmailAddressOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3969,31 +4170,31 @@ func awsRestjson1_deserializeOpDocumentCreateEvaluationFormOutput(v **CreateEval return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateEvaluationFormOutput + var sv *CreateEmailAddressOutput if *v == nil { - sv = &CreateEvaluationFormOutput{} + sv = &CreateEmailAddressOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "EvaluationFormArn": + case "EmailAddressArn": 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 EmailAddressArn to be of type string, got %T instead", value) } - sv.EvaluationFormArn = ptr.String(jtv) + sv.EmailAddressArn = ptr.String(jtv) } - case "EvaluationFormId": + case "EmailAddressId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + return fmt.Errorf("expected EmailAddressId to be of type string, got %T instead", value) } - sv.EvaluationFormId = ptr.String(jtv) + sv.EmailAddressId = ptr.String(jtv) } default: @@ -4005,14 +4206,14 @@ func awsRestjson1_deserializeOpDocumentCreateEvaluationFormOutput(v **CreateEval return nil } -type awsRestjson1_deserializeOpCreateHoursOfOperation struct { +type awsRestjson1_deserializeOpCreateEvaluationForm struct { } -func (*awsRestjson1_deserializeOpCreateHoursOfOperation) ID() string { +func (*awsRestjson1_deserializeOpCreateEvaluationForm) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateHoursOfOperation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateEvaluationForm) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4030,9 +4231,9 @@ func (m *awsRestjson1_deserializeOpCreateHoursOfOperation) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateHoursOfOperation(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateEvaluationForm(response, &metadata) } - output := &CreateHoursOfOperationOutput{} + output := &CreateEvaluationFormOutput{} out.Result = output var buff [1024]byte @@ -4053,7 +4254,7 @@ func (m *awsRestjson1_deserializeOpCreateHoursOfOperation) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateHoursOfOperationOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateEvaluationFormOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4067,7 +4268,7 @@ func (m *awsRestjson1_deserializeOpCreateHoursOfOperation) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateHoursOfOperation(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateEvaluationForm(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4108,24 +4309,21 @@ func awsRestjson1_deserializeOpErrorCreateHoursOfOperation(response *smithyhttp. } switch { - case strings.EqualFold("DuplicateResourceException", errorCode): - return awsRestjson1_deserializeErrorDuplicateResourceException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidRequestException", errorCode): - return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - - case strings.EqualFold("LimitExceededException", errorCode): - return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -4139,7 +4337,7 @@ func awsRestjson1_deserializeOpErrorCreateHoursOfOperation(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentCreateHoursOfOperationOutput(v **CreateHoursOfOperationOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateEvaluationFormOutput(v **CreateEvaluationFormOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4152,31 +4350,31 @@ func awsRestjson1_deserializeOpDocumentCreateHoursOfOperationOutput(v **CreateHo return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateHoursOfOperationOutput + var sv *CreateEvaluationFormOutput if *v == nil { - sv = &CreateHoursOfOperationOutput{} + sv = &CreateEvaluationFormOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "HoursOfOperationArn": + case "EvaluationFormArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ARN to be of type string, got %T instead", value) } - sv.HoursOfOperationArn = ptr.String(jtv) + sv.EvaluationFormArn = ptr.String(jtv) } - case "HoursOfOperationId": + case "EvaluationFormId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected HoursOfOperationId to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } - sv.HoursOfOperationId = ptr.String(jtv) + sv.EvaluationFormId = ptr.String(jtv) } default: @@ -4188,14 +4386,14 @@ func awsRestjson1_deserializeOpDocumentCreateHoursOfOperationOutput(v **CreateHo return nil } -type awsRestjson1_deserializeOpCreateInstance struct { +type awsRestjson1_deserializeOpCreateHoursOfOperation struct { } -func (*awsRestjson1_deserializeOpCreateInstance) ID() string { +func (*awsRestjson1_deserializeOpCreateHoursOfOperation) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateInstance) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateHoursOfOperation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4213,9 +4411,9 @@ func (m *awsRestjson1_deserializeOpCreateInstance) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateInstance(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateHoursOfOperation(response, &metadata) } - output := &CreateInstanceOutput{} + output := &CreateHoursOfOperationOutput{} out.Result = output var buff [1024]byte @@ -4236,7 +4434,7 @@ func (m *awsRestjson1_deserializeOpCreateInstance) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateInstanceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateHoursOfOperationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4250,7 +4448,190 @@ func (m *awsRestjson1_deserializeOpCreateInstance) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateInstance(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateHoursOfOperation(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("DuplicateResourceException", errorCode): + return awsRestjson1_deserializeErrorDuplicateResourceException(response, errorBody) + + case strings.EqualFold("InternalServiceException", errorCode): + return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateHoursOfOperationOutput(v **CreateHoursOfOperationOutput, 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 *CreateHoursOfOperationOutput + if *v == nil { + sv = &CreateHoursOfOperationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "HoursOfOperationArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.HoursOfOperationArn = ptr.String(jtv) + } + + case "HoursOfOperationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected HoursOfOperationId to be of type string, got %T instead", value) + } + sv.HoursOfOperationId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpCreateInstance struct { +} + +func (*awsRestjson1_deserializeOpCreateInstance) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateInstance) HandleDeserialize(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_deserializeOpErrorCreateInstance(response, &metadata) + } + output := &CreateInstanceOutput{} + 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_deserializeOpDocumentCreateInstanceOutput(&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_deserializeOpErrorCreateInstance(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8145,14 +8526,14 @@ func awsRestjson1_deserializeOpErrorDeleteContactFlowModule(response *smithyhttp } } -type awsRestjson1_deserializeOpDeleteEvaluationForm struct { +type awsRestjson1_deserializeOpDeleteEmailAddress struct { } -func (*awsRestjson1_deserializeOpDeleteEvaluationForm) ID() string { +func (*awsRestjson1_deserializeOpDeleteEmailAddress) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteEvaluationForm) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteEmailAddress) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8170,22 +8551,16 @@ func (m *awsRestjson1_deserializeOpDeleteEvaluationForm) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteEvaluationForm(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteEmailAddress(response, &metadata) } - output := &DeleteEvaluationFormOutput{} + output := &DeleteEmailAddressOutput{} 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_deserializeOpErrorDeleteEvaluationForm(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteEmailAddress(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8226,12 +8601,18 @@ func awsRestjson1_deserializeOpErrorDeleteEvaluationForm(response *smithyhttp.Re } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + case strings.EqualFold("ResourceConflictException", errorCode): return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) @@ -8251,14 +8632,14 @@ func awsRestjson1_deserializeOpErrorDeleteEvaluationForm(response *smithyhttp.Re } } -type awsRestjson1_deserializeOpDeleteHoursOfOperation struct { +type awsRestjson1_deserializeOpDeleteEvaluationForm struct { } -func (*awsRestjson1_deserializeOpDeleteHoursOfOperation) ID() string { +func (*awsRestjson1_deserializeOpDeleteEvaluationForm) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteHoursOfOperation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteEvaluationForm) HandleDeserialize(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 +8657,9 @@ func (m *awsRestjson1_deserializeOpDeleteHoursOfOperation) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteHoursOfOperation(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteEvaluationForm(response, &metadata) } - output := &DeleteHoursOfOperationOutput{} + output := &DeleteEvaluationFormOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -8291,7 +8672,7 @@ func (m *awsRestjson1_deserializeOpDeleteHoursOfOperation) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteHoursOfOperation(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteEvaluationForm(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8338,8 +8719,8 @@ func awsRestjson1_deserializeOpErrorDeleteHoursOfOperation(response *smithyhttp. case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidRequestException", errorCode): - return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -8357,14 +8738,14 @@ func awsRestjson1_deserializeOpErrorDeleteHoursOfOperation(response *smithyhttp. } } -type awsRestjson1_deserializeOpDeleteInstance struct { +type awsRestjson1_deserializeOpDeleteHoursOfOperation struct { } -func (*awsRestjson1_deserializeOpDeleteInstance) ID() string { +func (*awsRestjson1_deserializeOpDeleteHoursOfOperation) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteInstance) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteHoursOfOperation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8382,9 +8763,9 @@ func (m *awsRestjson1_deserializeOpDeleteInstance) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteInstance(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteHoursOfOperation(response, &metadata) } - output := &DeleteInstanceOutput{} + output := &DeleteHoursOfOperationOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -8397,7 +8778,7 @@ func (m *awsRestjson1_deserializeOpDeleteInstance) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteInstance(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteHoursOfOperation(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8441,12 +8822,18 @@ func awsRestjson1_deserializeOpErrorDeleteInstance(response *smithyhttp.Response case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -8457,14 +8844,14 @@ func awsRestjson1_deserializeOpErrorDeleteInstance(response *smithyhttp.Response } } -type awsRestjson1_deserializeOpDeleteIntegrationAssociation struct { +type awsRestjson1_deserializeOpDeleteInstance struct { } -func (*awsRestjson1_deserializeOpDeleteIntegrationAssociation) ID() string { +func (*awsRestjson1_deserializeOpDeleteInstance) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteIntegrationAssociation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteInstance) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8482,9 +8869,9 @@ func (m *awsRestjson1_deserializeOpDeleteIntegrationAssociation) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteIntegrationAssociation(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteInstance(response, &metadata) } - output := &DeleteIntegrationAssociationOutput{} + output := &DeleteInstanceOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -8497,7 +8884,7 @@ func (m *awsRestjson1_deserializeOpDeleteIntegrationAssociation) HandleDeseriali return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteIntegrationAssociation(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteInstance(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8547,9 +8934,6 @@ func awsRestjson1_deserializeOpErrorDeleteIntegrationAssociation(response *smith case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): - return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -8560,14 +8944,14 @@ func awsRestjson1_deserializeOpErrorDeleteIntegrationAssociation(response *smith } } -type awsRestjson1_deserializeOpDeletePredefinedAttribute struct { +type awsRestjson1_deserializeOpDeleteIntegrationAssociation struct { } -func (*awsRestjson1_deserializeOpDeletePredefinedAttribute) ID() string { +func (*awsRestjson1_deserializeOpDeleteIntegrationAssociation) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeletePredefinedAttribute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteIntegrationAssociation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8585,9 +8969,9 @@ func (m *awsRestjson1_deserializeOpDeletePredefinedAttribute) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeletePredefinedAttribute(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteIntegrationAssociation(response, &metadata) } - output := &DeletePredefinedAttributeOutput{} + output := &DeleteIntegrationAssociationOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -8600,7 +8984,7 @@ func (m *awsRestjson1_deserializeOpDeletePredefinedAttribute) HandleDeserialize( return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeletePredefinedAttribute(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteIntegrationAssociation(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8644,15 +9028,9 @@ func awsRestjson1_deserializeOpErrorDeletePredefinedAttribute(response *smithyht case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - case strings.EqualFold("ResourceInUseException", errorCode): - return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -8669,14 +9047,14 @@ func awsRestjson1_deserializeOpErrorDeletePredefinedAttribute(response *smithyht } } -type awsRestjson1_deserializeOpDeletePrompt struct { +type awsRestjson1_deserializeOpDeletePredefinedAttribute struct { } -func (*awsRestjson1_deserializeOpDeletePrompt) ID() string { +func (*awsRestjson1_deserializeOpDeletePredefinedAttribute) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeletePrompt) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeletePredefinedAttribute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8694,9 +9072,9 @@ func (m *awsRestjson1_deserializeOpDeletePrompt) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeletePrompt(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeletePredefinedAttribute(response, &metadata) } - output := &DeletePromptOutput{} + output := &DeletePredefinedAttributeOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -8709,7 +9087,7 @@ func (m *awsRestjson1_deserializeOpDeletePrompt) HandleDeserialize(ctx context.C return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeletePrompt(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeletePredefinedAttribute(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8759,6 +9137,9 @@ func awsRestjson1_deserializeOpErrorDeletePrompt(response *smithyhttp.Response, case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + case strings.EqualFold("ResourceInUseException", errorCode): + return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -8775,14 +9156,14 @@ func awsRestjson1_deserializeOpErrorDeletePrompt(response *smithyhttp.Response, } } -type awsRestjson1_deserializeOpDeleteQueue struct { +type awsRestjson1_deserializeOpDeletePrompt struct { } -func (*awsRestjson1_deserializeOpDeleteQueue) ID() string { +func (*awsRestjson1_deserializeOpDeletePrompt) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteQueue) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeletePrompt) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8800,9 +9181,9 @@ func (m *awsRestjson1_deserializeOpDeleteQueue) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteQueue(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeletePrompt(response, &metadata) } - output := &DeleteQueueOutput{} + output := &DeletePromptOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -8815,7 +9196,7 @@ func (m *awsRestjson1_deserializeOpDeleteQueue) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteQueue(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeletePrompt(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8865,9 +9246,6 @@ func awsRestjson1_deserializeOpErrorDeleteQueue(response *smithyhttp.Response, m case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - case strings.EqualFold("ResourceInUseException", errorCode): - return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -8884,14 +9262,14 @@ func awsRestjson1_deserializeOpErrorDeleteQueue(response *smithyhttp.Response, m } } -type awsRestjson1_deserializeOpDeleteQuickConnect struct { +type awsRestjson1_deserializeOpDeleteQueue struct { } -func (*awsRestjson1_deserializeOpDeleteQuickConnect) ID() string { +func (*awsRestjson1_deserializeOpDeleteQueue) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteQuickConnect) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteQueue) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8909,9 +9287,9 @@ func (m *awsRestjson1_deserializeOpDeleteQuickConnect) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteQuickConnect(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteQueue(response, &metadata) } - output := &DeleteQuickConnectOutput{} + output := &DeleteQueueOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -8924,7 +9302,7 @@ func (m *awsRestjson1_deserializeOpDeleteQuickConnect) HandleDeserialize(ctx con return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteQuickConnect(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteQueue(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8974,6 +9352,9 @@ func awsRestjson1_deserializeOpErrorDeleteQuickConnect(response *smithyhttp.Resp case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + case strings.EqualFold("ResourceInUseException", errorCode): + return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -8990,14 +9371,14 @@ func awsRestjson1_deserializeOpErrorDeleteQuickConnect(response *smithyhttp.Resp } } -type awsRestjson1_deserializeOpDeleteRoutingProfile struct { +type awsRestjson1_deserializeOpDeleteQuickConnect struct { } -func (*awsRestjson1_deserializeOpDeleteRoutingProfile) ID() string { +func (*awsRestjson1_deserializeOpDeleteQuickConnect) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteRoutingProfile) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteQuickConnect) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -9015,9 +9396,9 @@ func (m *awsRestjson1_deserializeOpDeleteRoutingProfile) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteRoutingProfile(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteQuickConnect(response, &metadata) } - output := &DeleteRoutingProfileOutput{} + output := &DeleteQuickConnectOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -9030,7 +9411,7 @@ func (m *awsRestjson1_deserializeOpDeleteRoutingProfile) HandleDeserialize(ctx c return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteRoutingProfile(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteQuickConnect(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -9080,9 +9461,6 @@ func awsRestjson1_deserializeOpErrorDeleteRoutingProfile(response *smithyhttp.Re case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - case strings.EqualFold("ResourceInUseException", errorCode): - return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -9099,14 +9477,14 @@ func awsRestjson1_deserializeOpErrorDeleteRoutingProfile(response *smithyhttp.Re } } -type awsRestjson1_deserializeOpDeleteRule struct { +type awsRestjson1_deserializeOpDeleteRoutingProfile struct { } -func (*awsRestjson1_deserializeOpDeleteRule) ID() string { +func (*awsRestjson1_deserializeOpDeleteRoutingProfile) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteRule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteRoutingProfile) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -9124,9 +9502,9 @@ func (m *awsRestjson1_deserializeOpDeleteRule) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteRule(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteRoutingProfile(response, &metadata) } - output := &DeleteRuleOutput{} + output := &DeleteRoutingProfileOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -9139,7 +9517,7 @@ func (m *awsRestjson1_deserializeOpDeleteRule) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteRule(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteRoutingProfile(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -9180,15 +9558,18 @@ func awsRestjson1_deserializeOpErrorDeleteRule(response *smithyhttp.Response, me } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + case strings.EqualFold("ResourceInUseException", errorCode): + return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -9205,14 +9586,14 @@ func awsRestjson1_deserializeOpErrorDeleteRule(response *smithyhttp.Response, me } } -type awsRestjson1_deserializeOpDeleteSecurityProfile struct { +type awsRestjson1_deserializeOpDeleteRule struct { } -func (*awsRestjson1_deserializeOpDeleteSecurityProfile) ID() string { +func (*awsRestjson1_deserializeOpDeleteRule) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteSecurityProfile) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +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) @@ -9230,9 +9611,9 @@ func (m *awsRestjson1_deserializeOpDeleteSecurityProfile) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteSecurityProfile(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteRule(response, &metadata) } - output := &DeleteSecurityProfileOutput{} + output := &DeleteRuleOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -9245,7 +9626,7 @@ func (m *awsRestjson1_deserializeOpDeleteSecurityProfile) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteSecurityProfile(response *smithyhttp.Response, metadata *middleware.Metadata) error { +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)} @@ -9292,15 +9673,9 @@ func awsRestjson1_deserializeOpErrorDeleteSecurityProfile(response *smithyhttp.R case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - case strings.EqualFold("ResourceInUseException", errorCode): - return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -9317,14 +9692,14 @@ func awsRestjson1_deserializeOpErrorDeleteSecurityProfile(response *smithyhttp.R } } -type awsRestjson1_deserializeOpDeleteTaskTemplate struct { +type awsRestjson1_deserializeOpDeleteSecurityProfile struct { } -func (*awsRestjson1_deserializeOpDeleteTaskTemplate) ID() string { +func (*awsRestjson1_deserializeOpDeleteSecurityProfile) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteTaskTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteSecurityProfile) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -9342,116 +9717,22 @@ func (m *awsRestjson1_deserializeOpDeleteTaskTemplate) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteTaskTemplate(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteSecurityProfile(response, &metadata) } - output := &DeleteTaskTemplateOutput{} + output := &DeleteSecurityProfileOutput{} out.Result = output - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorDeleteTaskTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.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("InternalServiceException", errorCode): - return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) - - case strings.EqualFold("InvalidParameterException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - - case strings.EqualFold("InvalidRequestException", errorCode): - return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ThrottlingException", errorCode): - return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), } - return genericError - } -} - -type awsRestjson1_deserializeOpDeleteTrafficDistributionGroup struct { -} - -func (*awsRestjson1_deserializeOpDeleteTrafficDistributionGroup) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpDeleteTrafficDistributionGroup) HandleDeserialize(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_deserializeOpErrorDeleteTrafficDistributionGroup(response, &metadata) - } - output := &DeleteTrafficDistributionGroupOutput{} - out.Result = output span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteTrafficDistributionGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteSecurityProfile(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -9498,12 +9779,18 @@ func awsRestjson1_deserializeOpErrorDeleteTrafficDistributionGroup(response *smi case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceInUseException", errorCode): return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -9517,14 +9804,14 @@ func awsRestjson1_deserializeOpErrorDeleteTrafficDistributionGroup(response *smi } } -type awsRestjson1_deserializeOpDeleteUseCase struct { +type awsRestjson1_deserializeOpDeleteTaskTemplate struct { } -func (*awsRestjson1_deserializeOpDeleteUseCase) ID() string { +func (*awsRestjson1_deserializeOpDeleteTaskTemplate) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteUseCase) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteTaskTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -9542,22 +9829,16 @@ func (m *awsRestjson1_deserializeOpDeleteUseCase) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteUseCase(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteTaskTemplate(response, &metadata) } - output := &DeleteUseCaseOutput{} + output := &DeleteTaskTemplateOutput{} 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_deserializeOpErrorDeleteUseCase(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteTaskTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -9601,6 +9882,9 @@ func awsRestjson1_deserializeOpErrorDeleteUseCase(response *smithyhttp.Response, case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) @@ -9620,14 +9904,14 @@ func awsRestjson1_deserializeOpErrorDeleteUseCase(response *smithyhttp.Response, } } -type awsRestjson1_deserializeOpDeleteUser struct { +type awsRestjson1_deserializeOpDeleteTrafficDistributionGroup struct { } -func (*awsRestjson1_deserializeOpDeleteUser) ID() string { +func (*awsRestjson1_deserializeOpDeleteTrafficDistributionGroup) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteTrafficDistributionGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -9645,22 +9929,16 @@ func (m *awsRestjson1_deserializeOpDeleteUser) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteUser(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteTrafficDistributionGroup(response, &metadata) } - output := &DeleteUserOutput{} + output := &DeleteTrafficDistributionGroupOutput{} 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_deserializeOpErrorDeleteUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteTrafficDistributionGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -9701,17 +9979,17 @@ func awsRestjson1_deserializeOpErrorDeleteUser(response *smithyhttp.Response, me } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ResourceInUseException", errorCode): + return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -9726,14 +10004,14 @@ func awsRestjson1_deserializeOpErrorDeleteUser(response *smithyhttp.Response, me } } -type awsRestjson1_deserializeOpDeleteUserHierarchyGroup struct { +type awsRestjson1_deserializeOpDeleteUseCase struct { } -func (*awsRestjson1_deserializeOpDeleteUserHierarchyGroup) ID() string { +func (*awsRestjson1_deserializeOpDeleteUseCase) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteUserHierarchyGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteUseCase) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -9751,9 +10029,9 @@ func (m *awsRestjson1_deserializeOpDeleteUserHierarchyGroup) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteUserHierarchyGroup(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteUseCase(response, &metadata) } - output := &DeleteUserHierarchyGroupOutput{} + output := &DeleteUseCaseOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -9766,7 +10044,7 @@ func (m *awsRestjson1_deserializeOpDeleteUserHierarchyGroup) HandleDeserialize(c return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteUserHierarchyGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteUseCase(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -9810,15 +10088,9 @@ func awsRestjson1_deserializeOpErrorDeleteUserHierarchyGroup(response *smithyhtt case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - case strings.EqualFold("ResourceInUseException", errorCode): - return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -9835,14 +10107,14 @@ func awsRestjson1_deserializeOpErrorDeleteUserHierarchyGroup(response *smithyhtt } } -type awsRestjson1_deserializeOpDeleteView struct { +type awsRestjson1_deserializeOpDeleteUser struct { } -func (*awsRestjson1_deserializeOpDeleteView) ID() string { +func (*awsRestjson1_deserializeOpDeleteUser) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteView) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -9860,16 +10132,22 @@ func (m *awsRestjson1_deserializeOpDeleteView) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteView(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteUser(response, &metadata) } - output := &DeleteViewOutput{} + output := &DeleteUserOutput{} 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_deserializeOpErrorDeleteView(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -9910,9 +10188,6 @@ func awsRestjson1_deserializeOpErrorDeleteView(response *smithyhttp.Response, me } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) @@ -9922,14 +10197,11 @@ func awsRestjson1_deserializeOpErrorDeleteView(response *smithyhttp.Response, me case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - case strings.EqualFold("ResourceInUseException", errorCode): - return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("TooManyRequestsException", errorCode): - return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -9941,14 +10213,14 @@ func awsRestjson1_deserializeOpErrorDeleteView(response *smithyhttp.Response, me } } -type awsRestjson1_deserializeOpDeleteViewVersion struct { +type awsRestjson1_deserializeOpDeleteUserHierarchyGroup struct { } -func (*awsRestjson1_deserializeOpDeleteViewVersion) ID() string { +func (*awsRestjson1_deserializeOpDeleteUserHierarchyGroup) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteViewVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteUserHierarchyGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -9966,16 +10238,22 @@ func (m *awsRestjson1_deserializeOpDeleteViewVersion) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteViewVersion(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteUserHierarchyGroup(response, &metadata) } - output := &DeleteViewVersionOutput{} + output := &DeleteUserHierarchyGroupOutput{} 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_deserializeOpErrorDeleteViewVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteUserHierarchyGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -10016,9 +10294,6 @@ func awsRestjson1_deserializeOpErrorDeleteViewVersion(response *smithyhttp.Respo } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) @@ -10034,8 +10309,8 @@ func awsRestjson1_deserializeOpErrorDeleteViewVersion(response *smithyhttp.Respo case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("TooManyRequestsException", errorCode): - return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -10047,14 +10322,14 @@ func awsRestjson1_deserializeOpErrorDeleteViewVersion(response *smithyhttp.Respo } } -type awsRestjson1_deserializeOpDeleteVocabulary struct { +type awsRestjson1_deserializeOpDeleteView struct { } -func (*awsRestjson1_deserializeOpDeleteVocabulary) ID() string { +func (*awsRestjson1_deserializeOpDeleteView) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteVocabulary) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteView) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -10072,44 +10347,122 @@ func (m *awsRestjson1_deserializeOpDeleteVocabulary) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteVocabulary(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteView(response, &metadata) } - output := &DeleteVocabularyOutput{} + output := &DeleteViewOutput{} out.Result = output + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteView(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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(response.Body, ringBuffer) - + body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return out, metadata, err + return err } - err = awsRestjson1_deserializeOpDocumentDeleteVocabularyOutput(&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(), + 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("InternalServiceException", errorCode): + return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceInUseException", errorCode): + return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, } + return genericError + } +} + +type awsRestjson1_deserializeOpDeleteViewVersion struct { +} + +func (*awsRestjson1_deserializeOpDeleteViewVersion) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteViewVersion) HandleDeserialize(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_deserializeOpErrorDeleteViewVersion(response, &metadata) + } + output := &DeleteViewVersionOutput{} + out.Result = output span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteVocabulary(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteViewVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -10156,6 +10509,9 @@ func awsRestjson1_deserializeOpErrorDeleteVocabulary(response *smithyhttp.Respon case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) @@ -10165,8 +10521,8 @@ func awsRestjson1_deserializeOpErrorDeleteVocabulary(response *smithyhttp.Respon case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): - return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -10178,72 +10534,14 @@ func awsRestjson1_deserializeOpErrorDeleteVocabulary(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentDeleteVocabularyOutput(v **DeleteVocabularyOutput, 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 *DeleteVocabularyOutput - if *v == nil { - sv = &DeleteVocabularyOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "State": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected VocabularyState to be of type string, got %T instead", value) - } - sv.State = types.VocabularyState(jtv) - } - - case "VocabularyArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ARN to be of type string, got %T instead", value) - } - sv.VocabularyArn = ptr.String(jtv) - } - - case "VocabularyId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected VocabularyId to be of type string, got %T instead", value) - } - sv.VocabularyId = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpDescribeAgentStatus struct { +type awsRestjson1_deserializeOpDeleteVocabulary struct { } -func (*awsRestjson1_deserializeOpDescribeAgentStatus) ID() string { +func (*awsRestjson1_deserializeOpDeleteVocabulary) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeAgentStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteVocabulary) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -10261,9 +10559,9 @@ func (m *awsRestjson1_deserializeOpDescribeAgentStatus) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeAgentStatus(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteVocabulary(response, &metadata) } - output := &DescribeAgentStatusOutput{} + output := &DeleteVocabularyOutput{} out.Result = output var buff [1024]byte @@ -10284,7 +10582,7 @@ func (m *awsRestjson1_deserializeOpDescribeAgentStatus) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeAgentStatusOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteVocabularyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10298,7 +10596,196 @@ func (m *awsRestjson1_deserializeOpDescribeAgentStatus) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeAgentStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteVocabulary(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("InternalServiceException", errorCode): + return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceInUseException", errorCode): + return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDeleteVocabularyOutput(v **DeleteVocabularyOutput, 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 *DeleteVocabularyOutput + if *v == nil { + sv = &DeleteVocabularyOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VocabularyState to be of type string, got %T instead", value) + } + sv.State = types.VocabularyState(jtv) + } + + case "VocabularyArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.VocabularyArn = ptr.String(jtv) + } + + case "VocabularyId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VocabularyId to be of type string, got %T instead", value) + } + sv.VocabularyId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeAgentStatus struct { +} + +func (*awsRestjson1_deserializeOpDescribeAgentStatus) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeAgentStatus) HandleDeserialize(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_deserializeOpErrorDescribeAgentStatus(response, &metadata) + } + output := &DescribeAgentStatusOutput{} + 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_deserializeOpDocumentDescribeAgentStatusOutput(&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_deserializeOpErrorDescribeAgentStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -11228,14 +11715,14 @@ func awsRestjson1_deserializeOpDocumentDescribeContactFlowModuleOutput(v **Descr return nil } -type awsRestjson1_deserializeOpDescribeEvaluationForm struct { +type awsRestjson1_deserializeOpDescribeEmailAddress struct { } -func (*awsRestjson1_deserializeOpDescribeEvaluationForm) ID() string { +func (*awsRestjson1_deserializeOpDescribeEmailAddress) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeEvaluationForm) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeEmailAddress) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -11253,9 +11740,9 @@ func (m *awsRestjson1_deserializeOpDescribeEvaluationForm) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeEvaluationForm(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeEmailAddress(response, &metadata) } - output := &DescribeEvaluationFormOutput{} + output := &DescribeEmailAddressOutput{} out.Result = output var buff [1024]byte @@ -11276,7 +11763,7 @@ func (m *awsRestjson1_deserializeOpDescribeEvaluationForm) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeEvaluationFormOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeEmailAddressOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11290,7 +11777,7 @@ func (m *awsRestjson1_deserializeOpDescribeEvaluationForm) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeEvaluationForm(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeEmailAddress(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -11331,12 +11818,18 @@ func awsRestjson1_deserializeOpErrorDescribeEvaluationForm(response *smithyhttp. } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -11353,7 +11846,7 @@ func awsRestjson1_deserializeOpErrorDescribeEvaluationForm(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentDescribeEvaluationFormOutput(v **DescribeEvaluationFormOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeEmailAddressOutput(v **DescribeEmailAddressOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11366,17 +11859,80 @@ func awsRestjson1_deserializeOpDocumentDescribeEvaluationFormOutput(v **Describe return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeEvaluationFormOutput + var sv *DescribeEmailAddressOutput if *v == nil { - sv = &DescribeEvaluationFormOutput{} + sv = &DescribeEmailAddressOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "EvaluationForm": - if err := awsRestjson1_deserializeDocumentEvaluationForm(&sv.EvaluationForm, value); err != nil { + case "CreateTimestamp": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ISO8601Datetime to be of type string, got %T instead", value) + } + sv.CreateTimestamp = 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 "DisplayName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EmailAddressDisplayName to be of type string, got %T instead", value) + } + sv.DisplayName = ptr.String(jtv) + } + + case "EmailAddress": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EmailAddress to be of type string, got %T instead", value) + } + sv.EmailAddress = ptr.String(jtv) + } + + case "EmailAddressArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EmailAddressArn to be of type string, got %T instead", value) + } + sv.EmailAddressArn = ptr.String(jtv) + } + + case "EmailAddressId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EmailAddressId to be of type string, got %T instead", value) + } + sv.EmailAddressId = ptr.String(jtv) + } + + case "ModifiedTimestamp": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ISO8601Datetime to be of type string, got %T instead", value) + } + sv.ModifiedTimestamp = ptr.String(jtv) + } + + case "Tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { return err } @@ -11389,14 +11945,14 @@ func awsRestjson1_deserializeOpDocumentDescribeEvaluationFormOutput(v **Describe return nil } -type awsRestjson1_deserializeOpDescribeHoursOfOperation struct { +type awsRestjson1_deserializeOpDescribeEvaluationForm struct { } -func (*awsRestjson1_deserializeOpDescribeHoursOfOperation) ID() string { +func (*awsRestjson1_deserializeOpDescribeEvaluationForm) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeHoursOfOperation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeEvaluationForm) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -11414,9 +11970,9 @@ func (m *awsRestjson1_deserializeOpDescribeHoursOfOperation) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeHoursOfOperation(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeEvaluationForm(response, &metadata) } - output := &DescribeHoursOfOperationOutput{} + output := &DescribeEvaluationFormOutput{} out.Result = output var buff [1024]byte @@ -11437,7 +11993,7 @@ func (m *awsRestjson1_deserializeOpDescribeHoursOfOperation) HandleDeserialize(c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeHoursOfOperationOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeEvaluationFormOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11451,7 +12007,168 @@ func (m *awsRestjson1_deserializeOpDescribeHoursOfOperation) HandleDeserialize(c return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeHoursOfOperation(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeEvaluationForm(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("InternalServiceException", errorCode): + return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeEvaluationFormOutput(v **DescribeEvaluationFormOutput, 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 *DescribeEvaluationFormOutput + if *v == nil { + sv = &DescribeEvaluationFormOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "EvaluationForm": + if err := awsRestjson1_deserializeDocumentEvaluationForm(&sv.EvaluationForm, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeHoursOfOperation struct { +} + +func (*awsRestjson1_deserializeOpDescribeHoursOfOperation) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeHoursOfOperation) HandleDeserialize(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_deserializeOpErrorDescribeHoursOfOperation(response, &metadata) + } + output := &DescribeHoursOfOperationOutput{} + 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_deserializeOpDocumentDescribeHoursOfOperationOutput(&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_deserializeOpErrorDescribeHoursOfOperation(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -17784,6 +18501,15 @@ func awsRestjson1_deserializeOpDocumentGetTaskTemplateOutput(v **GetTaskTemplate sv.Name = ptr.String(jtv) } + case "SelfAssignFlowId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ContactFlowId to be of type string, got %T instead", value) + } + sv.SelfAssignFlowId = ptr.String(jtv) + } + case "Status": if value != nil { jtv, ok := value.(string) @@ -18698,14 +19424,14 @@ func awsRestjson1_deserializeOpDocumentListApprovedOriginsOutput(v **ListApprove return nil } -type awsRestjson1_deserializeOpListAuthenticationProfiles struct { +type awsRestjson1_deserializeOpListAssociatedContacts struct { } -func (*awsRestjson1_deserializeOpListAuthenticationProfiles) ID() string { +func (*awsRestjson1_deserializeOpListAssociatedContacts) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListAuthenticationProfiles) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListAssociatedContacts) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -18723,9 +19449,9 @@ func (m *awsRestjson1_deserializeOpListAuthenticationProfiles) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListAuthenticationProfiles(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListAssociatedContacts(response, &metadata) } - output := &ListAuthenticationProfilesOutput{} + output := &ListAssociatedContactsOutput{} out.Result = output var buff [1024]byte @@ -18746,7 +19472,7 @@ func (m *awsRestjson1_deserializeOpListAuthenticationProfiles) HandleDeserialize return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListAuthenticationProfilesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListAssociatedContactsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18760,7 +19486,7 @@ func (m *awsRestjson1_deserializeOpListAuthenticationProfiles) HandleDeserialize return out, metadata, err } -func awsRestjson1_deserializeOpErrorListAuthenticationProfiles(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListAssociatedContacts(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -18826,7 +19552,7 @@ func awsRestjson1_deserializeOpErrorListAuthenticationProfiles(response *smithyh } } -func awsRestjson1_deserializeOpDocumentListAuthenticationProfilesOutput(v **ListAuthenticationProfilesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListAssociatedContactsOutput(v **ListAssociatedContactsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -18839,17 +19565,17 @@ func awsRestjson1_deserializeOpDocumentListAuthenticationProfilesOutput(v **List return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListAuthenticationProfilesOutput + var sv *ListAssociatedContactsOutput if *v == nil { - sv = &ListAuthenticationProfilesOutput{} + sv = &ListAssociatedContactsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "AuthenticationProfileSummaryList": - if err := awsRestjson1_deserializeDocumentAuthenticationProfileSummaryList(&sv.AuthenticationProfileSummaryList, value); err != nil { + case "ContactSummaryList": + if err := awsRestjson1_deserializeDocumentAssociatedContactSummaryList(&sv.ContactSummaryList, value); err != nil { return err } @@ -18871,14 +19597,14 @@ func awsRestjson1_deserializeOpDocumentListAuthenticationProfilesOutput(v **List return nil } -type awsRestjson1_deserializeOpListBots struct { +type awsRestjson1_deserializeOpListAuthenticationProfiles struct { } -func (*awsRestjson1_deserializeOpListBots) ID() string { +func (*awsRestjson1_deserializeOpListAuthenticationProfiles) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListBots) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListAuthenticationProfiles) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -18896,9 +19622,9 @@ func (m *awsRestjson1_deserializeOpListBots) HandleDeserialize(ctx context.Conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListBots(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListAuthenticationProfiles(response, &metadata) } - output := &ListBotsOutput{} + output := &ListAuthenticationProfilesOutput{} out.Result = output var buff [1024]byte @@ -18919,7 +19645,7 @@ func (m *awsRestjson1_deserializeOpListBots) HandleDeserialize(ctx context.Conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListBotsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListAuthenticationProfilesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18933,7 +19659,7 @@ func (m *awsRestjson1_deserializeOpListBots) HandleDeserialize(ctx context.Conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorListBots(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListAuthenticationProfiles(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -18977,6 +19703,9 @@ func awsRestjson1_deserializeOpErrorListBots(response *smithyhttp.Response, meta case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) @@ -18996,7 +19725,7 @@ func awsRestjson1_deserializeOpErrorListBots(response *smithyhttp.Response, meta } } -func awsRestjson1_deserializeOpDocumentListBotsOutput(v **ListBotsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListAuthenticationProfilesOutput(v **ListAuthenticationProfilesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -19009,17 +19738,17 @@ func awsRestjson1_deserializeOpDocumentListBotsOutput(v **ListBotsOutput, value return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListBotsOutput + var sv *ListAuthenticationProfilesOutput if *v == nil { - sv = &ListBotsOutput{} + sv = &ListAuthenticationProfilesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "LexBots": - if err := awsRestjson1_deserializeDocumentLexBotConfigList(&sv.LexBots, value); err != nil { + case "AuthenticationProfileSummaryList": + if err := awsRestjson1_deserializeDocumentAuthenticationProfileSummaryList(&sv.AuthenticationProfileSummaryList, value); err != nil { return err } @@ -19041,14 +19770,14 @@ func awsRestjson1_deserializeOpDocumentListBotsOutput(v **ListBotsOutput, value return nil } -type awsRestjson1_deserializeOpListContactEvaluations struct { +type awsRestjson1_deserializeOpListBots struct { } -func (*awsRestjson1_deserializeOpListContactEvaluations) ID() string { +func (*awsRestjson1_deserializeOpListBots) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListContactEvaluations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListBots) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -19066,9 +19795,9 @@ func (m *awsRestjson1_deserializeOpListContactEvaluations) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListContactEvaluations(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListBots(response, &metadata) } - output := &ListContactEvaluationsOutput{} + output := &ListBotsOutput{} out.Result = output var buff [1024]byte @@ -19089,7 +19818,7 @@ func (m *awsRestjson1_deserializeOpListContactEvaluations) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListContactEvaluationsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListBotsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19103,7 +19832,7 @@ func (m *awsRestjson1_deserializeOpListContactEvaluations) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorListContactEvaluations(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListBots(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -19147,8 +19876,8 @@ func awsRestjson1_deserializeOpErrorListContactEvaluations(response *smithyhttp. case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -19166,7 +19895,7 @@ func awsRestjson1_deserializeOpErrorListContactEvaluations(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentListContactEvaluationsOutput(v **ListContactEvaluationsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListBotsOutput(v **ListBotsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -19179,17 +19908,17 @@ func awsRestjson1_deserializeOpDocumentListContactEvaluationsOutput(v **ListCont return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListContactEvaluationsOutput + var sv *ListBotsOutput if *v == nil { - sv = &ListContactEvaluationsOutput{} + sv = &ListBotsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "EvaluationSummaryList": - if err := awsRestjson1_deserializeDocumentEvaluationSummaryList(&sv.EvaluationSummaryList, value); err != nil { + case "LexBots": + if err := awsRestjson1_deserializeDocumentLexBotConfigList(&sv.LexBots, value); err != nil { return err } @@ -19211,14 +19940,14 @@ func awsRestjson1_deserializeOpDocumentListContactEvaluationsOutput(v **ListCont return nil } -type awsRestjson1_deserializeOpListContactFlowModules struct { +type awsRestjson1_deserializeOpListContactEvaluations struct { } -func (*awsRestjson1_deserializeOpListContactFlowModules) ID() string { +func (*awsRestjson1_deserializeOpListContactEvaluations) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListContactFlowModules) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListContactEvaluations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -19236,9 +19965,9 @@ func (m *awsRestjson1_deserializeOpListContactFlowModules) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListContactFlowModules(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListContactEvaluations(response, &metadata) } - output := &ListContactFlowModulesOutput{} + output := &ListContactEvaluationsOutput{} out.Result = output var buff [1024]byte @@ -19259,7 +19988,7 @@ func (m *awsRestjson1_deserializeOpListContactFlowModules) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListContactFlowModulesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListContactEvaluationsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19273,7 +20002,7 @@ func (m *awsRestjson1_deserializeOpListContactFlowModules) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorListContactFlowModules(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListContactEvaluations(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -19314,18 +20043,12 @@ func awsRestjson1_deserializeOpErrorListContactFlowModules(response *smithyhttp. } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidRequestException", errorCode): - return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -19342,7 +20065,7 @@ func awsRestjson1_deserializeOpErrorListContactFlowModules(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentListContactFlowModulesOutput(v **ListContactFlowModulesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListContactEvaluationsOutput(v **ListContactEvaluationsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -19355,17 +20078,17 @@ func awsRestjson1_deserializeOpDocumentListContactFlowModulesOutput(v **ListCont return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListContactFlowModulesOutput + var sv *ListContactEvaluationsOutput if *v == nil { - sv = &ListContactFlowModulesOutput{} + sv = &ListContactEvaluationsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "ContactFlowModulesSummaryList": - if err := awsRestjson1_deserializeDocumentContactFlowModulesSummaryList(&sv.ContactFlowModulesSummaryList, value); err != nil { + case "EvaluationSummaryList": + if err := awsRestjson1_deserializeDocumentEvaluationSummaryList(&sv.EvaluationSummaryList, value); err != nil { return err } @@ -19387,14 +20110,14 @@ func awsRestjson1_deserializeOpDocumentListContactFlowModulesOutput(v **ListCont return nil } -type awsRestjson1_deserializeOpListContactFlows struct { +type awsRestjson1_deserializeOpListContactFlowModules struct { } -func (*awsRestjson1_deserializeOpListContactFlows) ID() string { +func (*awsRestjson1_deserializeOpListContactFlowModules) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListContactFlows) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListContactFlowModules) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -19412,9 +20135,9 @@ func (m *awsRestjson1_deserializeOpListContactFlows) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListContactFlows(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListContactFlowModules(response, &metadata) } - output := &ListContactFlowsOutput{} + output := &ListContactFlowModulesOutput{} out.Result = output var buff [1024]byte @@ -19435,7 +20158,7 @@ func (m *awsRestjson1_deserializeOpListContactFlows) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListContactFlowsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListContactFlowModulesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19449,7 +20172,7 @@ func (m *awsRestjson1_deserializeOpListContactFlows) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorListContactFlows(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListContactFlowModules(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -19490,6 +20213,9 @@ func awsRestjson1_deserializeOpErrorListContactFlows(response *smithyhttp.Respon } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) @@ -19515,7 +20241,7 @@ func awsRestjson1_deserializeOpErrorListContactFlows(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentListContactFlowsOutput(v **ListContactFlowsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListContactFlowModulesOutput(v **ListContactFlowModulesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -19528,17 +20254,17 @@ func awsRestjson1_deserializeOpDocumentListContactFlowsOutput(v **ListContactFlo return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListContactFlowsOutput + var sv *ListContactFlowModulesOutput if *v == nil { - sv = &ListContactFlowsOutput{} + sv = &ListContactFlowModulesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "ContactFlowSummaryList": - if err := awsRestjson1_deserializeDocumentContactFlowSummaryList(&sv.ContactFlowSummaryList, value); err != nil { + case "ContactFlowModulesSummaryList": + if err := awsRestjson1_deserializeDocumentContactFlowModulesSummaryList(&sv.ContactFlowModulesSummaryList, value); err != nil { return err } @@ -19560,14 +20286,14 @@ func awsRestjson1_deserializeOpDocumentListContactFlowsOutput(v **ListContactFlo return nil } -type awsRestjson1_deserializeOpListContactFlowVersions struct { +type awsRestjson1_deserializeOpListContactFlows struct { } -func (*awsRestjson1_deserializeOpListContactFlowVersions) ID() string { +func (*awsRestjson1_deserializeOpListContactFlows) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListContactFlowVersions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListContactFlows) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -19585,9 +20311,9 @@ func (m *awsRestjson1_deserializeOpListContactFlowVersions) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListContactFlowVersions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListContactFlows(response, &metadata) } - output := &ListContactFlowVersionsOutput{} + output := &ListContactFlowsOutput{} out.Result = output var buff [1024]byte @@ -19608,7 +20334,7 @@ func (m *awsRestjson1_deserializeOpListContactFlowVersions) HandleDeserialize(ct return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListContactFlowVersionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListContactFlowsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19622,7 +20348,7 @@ func (m *awsRestjson1_deserializeOpListContactFlowVersions) HandleDeserialize(ct return out, metadata, err } -func awsRestjson1_deserializeOpErrorListContactFlowVersions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListContactFlows(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -19663,9 +20389,6 @@ func awsRestjson1_deserializeOpErrorListContactFlowVersions(response *smithyhttp } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) @@ -19691,7 +20414,7 @@ func awsRestjson1_deserializeOpErrorListContactFlowVersions(response *smithyhttp } } -func awsRestjson1_deserializeOpDocumentListContactFlowVersionsOutput(v **ListContactFlowVersionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListContactFlowsOutput(v **ListContactFlowsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -19704,17 +20427,17 @@ func awsRestjson1_deserializeOpDocumentListContactFlowVersionsOutput(v **ListCon return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListContactFlowVersionsOutput + var sv *ListContactFlowsOutput if *v == nil { - sv = &ListContactFlowVersionsOutput{} + sv = &ListContactFlowsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "ContactFlowVersionSummaryList": - if err := awsRestjson1_deserializeDocumentContactFlowVersionSummaryList(&sv.ContactFlowVersionSummaryList, value); err != nil { + case "ContactFlowSummaryList": + if err := awsRestjson1_deserializeDocumentContactFlowSummaryList(&sv.ContactFlowSummaryList, value); err != nil { return err } @@ -19736,14 +20459,14 @@ func awsRestjson1_deserializeOpDocumentListContactFlowVersionsOutput(v **ListCon return nil } -type awsRestjson1_deserializeOpListContactReferences struct { +type awsRestjson1_deserializeOpListContactFlowVersions struct { } -func (*awsRestjson1_deserializeOpListContactReferences) ID() string { +func (*awsRestjson1_deserializeOpListContactFlowVersions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListContactReferences) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListContactFlowVersions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -19761,9 +20484,9 @@ func (m *awsRestjson1_deserializeOpListContactReferences) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListContactReferences(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListContactFlowVersions(response, &metadata) } - output := &ListContactReferencesOutput{} + output := &ListContactFlowVersionsOutput{} out.Result = output var buff [1024]byte @@ -19784,7 +20507,7 @@ func (m *awsRestjson1_deserializeOpListContactReferences) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListContactReferencesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListContactFlowVersionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19798,7 +20521,7 @@ func (m *awsRestjson1_deserializeOpListContactReferences) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorListContactReferences(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListContactFlowVersions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -19839,6 +20562,9 @@ func awsRestjson1_deserializeOpErrorListContactReferences(response *smithyhttp.R } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) @@ -19864,7 +20590,7 @@ func awsRestjson1_deserializeOpErrorListContactReferences(response *smithyhttp.R } } -func awsRestjson1_deserializeOpDocumentListContactReferencesOutput(v **ListContactReferencesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListContactFlowVersionsOutput(v **ListContactFlowVersionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -19877,15 +20603,20 @@ func awsRestjson1_deserializeOpDocumentListContactReferencesOutput(v **ListConta return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListContactReferencesOutput + var sv *ListContactFlowVersionsOutput if *v == nil { - sv = &ListContactReferencesOutput{} + sv = &ListContactFlowVersionsOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "ContactFlowVersionSummaryList": + if err := awsRestjson1_deserializeDocumentContactFlowVersionSummaryList(&sv.ContactFlowVersionSummaryList, value); err != nil { + return err + } + case "NextToken": if value != nil { jtv, ok := value.(string) @@ -19895,11 +20626,6 @@ func awsRestjson1_deserializeOpDocumentListContactReferencesOutput(v **ListConta sv.NextToken = ptr.String(jtv) } - case "ReferenceSummaryList": - if err := awsRestjson1_deserializeDocumentReferenceSummaryList(&sv.ReferenceSummaryList, value); err != nil { - return err - } - default: _, _ = key, value @@ -19909,14 +20635,14 @@ func awsRestjson1_deserializeOpDocumentListContactReferencesOutput(v **ListConta return nil } -type awsRestjson1_deserializeOpListDefaultVocabularies struct { +type awsRestjson1_deserializeOpListContactReferences struct { } -func (*awsRestjson1_deserializeOpListDefaultVocabularies) ID() string { +func (*awsRestjson1_deserializeOpListContactReferences) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListDefaultVocabularies) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListContactReferences) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -19934,9 +20660,9 @@ func (m *awsRestjson1_deserializeOpListDefaultVocabularies) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListDefaultVocabularies(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListContactReferences(response, &metadata) } - output := &ListDefaultVocabulariesOutput{} + output := &ListContactReferencesOutput{} out.Result = output var buff [1024]byte @@ -19957,7 +20683,7 @@ func (m *awsRestjson1_deserializeOpListDefaultVocabularies) HandleDeserialize(ct return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListDefaultVocabulariesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListContactReferencesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19971,7 +20697,7 @@ func (m *awsRestjson1_deserializeOpListDefaultVocabularies) HandleDeserialize(ct return out, metadata, err } -func awsRestjson1_deserializeOpErrorListDefaultVocabularies(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListContactReferences(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -20012,15 +20738,18 @@ func awsRestjson1_deserializeOpErrorListDefaultVocabularies(response *smithyhttp } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -20034,7 +20763,7 @@ func awsRestjson1_deserializeOpErrorListDefaultVocabularies(response *smithyhttp } } -func awsRestjson1_deserializeOpDocumentListDefaultVocabulariesOutput(v **ListDefaultVocabulariesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListContactReferencesOutput(v **ListContactReferencesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -20047,29 +20776,29 @@ func awsRestjson1_deserializeOpDocumentListDefaultVocabulariesOutput(v **ListDef return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListDefaultVocabulariesOutput + var sv *ListContactReferencesOutput if *v == nil { - sv = &ListDefaultVocabulariesOutput{} + sv = &ListContactReferencesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DefaultVocabularyList": - if err := awsRestjson1_deserializeDocumentDefaultVocabularyList(&sv.DefaultVocabularyList, value); err != nil { - return err - } - case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected VocabularyNextToken to be of type string, got %T instead", value) + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } + case "ReferenceSummaryList": + if err := awsRestjson1_deserializeDocumentReferenceSummaryList(&sv.ReferenceSummaryList, value); err != nil { + return err + } + default: _, _ = key, value @@ -20079,14 +20808,14 @@ func awsRestjson1_deserializeOpDocumentListDefaultVocabulariesOutput(v **ListDef return nil } -type awsRestjson1_deserializeOpListEvaluationForms struct { +type awsRestjson1_deserializeOpListDefaultVocabularies struct { } -func (*awsRestjson1_deserializeOpListEvaluationForms) ID() string { +func (*awsRestjson1_deserializeOpListDefaultVocabularies) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListEvaluationForms) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListDefaultVocabularies) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -20104,9 +20833,9 @@ func (m *awsRestjson1_deserializeOpListEvaluationForms) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListEvaluationForms(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListDefaultVocabularies(response, &metadata) } - output := &ListEvaluationFormsOutput{} + output := &ListDefaultVocabulariesOutput{} out.Result = output var buff [1024]byte @@ -20127,7 +20856,7 @@ func (m *awsRestjson1_deserializeOpListEvaluationForms) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListEvaluationFormsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListDefaultVocabulariesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -20141,7 +20870,7 @@ func (m *awsRestjson1_deserializeOpListEvaluationForms) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorListEvaluationForms(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListDefaultVocabularies(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -20182,14 +20911,14 @@ func awsRestjson1_deserializeOpErrorListEvaluationForms(response *smithyhttp.Res } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -20204,7 +20933,7 @@ func awsRestjson1_deserializeOpErrorListEvaluationForms(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentListEvaluationFormsOutput(v **ListEvaluationFormsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListDefaultVocabulariesOutput(v **ListDefaultVocabulariesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -20217,17 +20946,17 @@ func awsRestjson1_deserializeOpDocumentListEvaluationFormsOutput(v **ListEvaluat return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListEvaluationFormsOutput + var sv *ListDefaultVocabulariesOutput if *v == nil { - sv = &ListEvaluationFormsOutput{} + sv = &ListDefaultVocabulariesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "EvaluationFormSummaryList": - if err := awsRestjson1_deserializeDocumentEvaluationFormSummaryList(&sv.EvaluationFormSummaryList, value); err != nil { + case "DefaultVocabularyList": + if err := awsRestjson1_deserializeDocumentDefaultVocabularyList(&sv.DefaultVocabularyList, value); err != nil { return err } @@ -20235,7 +20964,7 @@ func awsRestjson1_deserializeOpDocumentListEvaluationFormsOutput(v **ListEvaluat 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 VocabularyNextToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } @@ -20249,14 +20978,14 @@ func awsRestjson1_deserializeOpDocumentListEvaluationFormsOutput(v **ListEvaluat return nil } -type awsRestjson1_deserializeOpListEvaluationFormVersions struct { +type awsRestjson1_deserializeOpListEvaluationForms struct { } -func (*awsRestjson1_deserializeOpListEvaluationFormVersions) ID() string { +func (*awsRestjson1_deserializeOpListEvaluationForms) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListEvaluationFormVersions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListEvaluationForms) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -20274,9 +21003,9 @@ func (m *awsRestjson1_deserializeOpListEvaluationFormVersions) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListEvaluationFormVersions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListEvaluationForms(response, &metadata) } - output := &ListEvaluationFormVersionsOutput{} + output := &ListEvaluationFormsOutput{} out.Result = output var buff [1024]byte @@ -20297,7 +21026,7 @@ func (m *awsRestjson1_deserializeOpListEvaluationFormVersions) HandleDeserialize return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListEvaluationFormVersionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListEvaluationFormsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -20311,7 +21040,7 @@ func (m *awsRestjson1_deserializeOpListEvaluationFormVersions) HandleDeserialize return out, metadata, err } -func awsRestjson1_deserializeOpErrorListEvaluationFormVersions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListEvaluationForms(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -20374,7 +21103,7 @@ func awsRestjson1_deserializeOpErrorListEvaluationFormVersions(response *smithyh } } -func awsRestjson1_deserializeOpDocumentListEvaluationFormVersionsOutput(v **ListEvaluationFormVersionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListEvaluationFormsOutput(v **ListEvaluationFormsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -20387,17 +21116,17 @@ func awsRestjson1_deserializeOpDocumentListEvaluationFormVersionsOutput(v **List return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListEvaluationFormVersionsOutput + var sv *ListEvaluationFormsOutput if *v == nil { - sv = &ListEvaluationFormVersionsOutput{} + sv = &ListEvaluationFormsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "EvaluationFormVersionSummaryList": - if err := awsRestjson1_deserializeDocumentEvaluationFormVersionSummaryList(&sv.EvaluationFormVersionSummaryList, value); err != nil { + case "EvaluationFormSummaryList": + if err := awsRestjson1_deserializeDocumentEvaluationFormSummaryList(&sv.EvaluationFormSummaryList, value); err != nil { return err } @@ -20419,14 +21148,14 @@ func awsRestjson1_deserializeOpDocumentListEvaluationFormVersionsOutput(v **List return nil } -type awsRestjson1_deserializeOpListFlowAssociations struct { +type awsRestjson1_deserializeOpListEvaluationFormVersions struct { } -func (*awsRestjson1_deserializeOpListFlowAssociations) ID() string { +func (*awsRestjson1_deserializeOpListEvaluationFormVersions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListFlowAssociations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListEvaluationFormVersions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -20444,9 +21173,9 @@ func (m *awsRestjson1_deserializeOpListFlowAssociations) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListFlowAssociations(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListEvaluationFormVersions(response, &metadata) } - output := &ListFlowAssociationsOutput{} + output := &ListEvaluationFormVersionsOutput{} out.Result = output var buff [1024]byte @@ -20467,7 +21196,7 @@ func (m *awsRestjson1_deserializeOpListFlowAssociations) HandleDeserialize(ctx c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListFlowAssociationsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListEvaluationFormVersionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -20481,7 +21210,7 @@ func (m *awsRestjson1_deserializeOpListFlowAssociations) HandleDeserialize(ctx c return out, metadata, err } -func awsRestjson1_deserializeOpErrorListFlowAssociations(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListEvaluationFormVersions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -20522,18 +21251,12 @@ func awsRestjson1_deserializeOpErrorListFlowAssociations(response *smithyhttp.Re } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidRequestException", errorCode): - return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -20550,7 +21273,7 @@ func awsRestjson1_deserializeOpErrorListFlowAssociations(response *smithyhttp.Re } } -func awsRestjson1_deserializeOpDocumentListFlowAssociationsOutput(v **ListFlowAssociationsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListEvaluationFormVersionsOutput(v **ListEvaluationFormVersionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -20563,17 +21286,17 @@ func awsRestjson1_deserializeOpDocumentListFlowAssociationsOutput(v **ListFlowAs return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListFlowAssociationsOutput + var sv *ListEvaluationFormVersionsOutput if *v == nil { - sv = &ListFlowAssociationsOutput{} + sv = &ListEvaluationFormVersionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "FlowAssociationSummaryList": - if err := awsRestjson1_deserializeDocumentFlowAssociationSummaryList(&sv.FlowAssociationSummaryList, value); err != nil { + case "EvaluationFormVersionSummaryList": + if err := awsRestjson1_deserializeDocumentEvaluationFormVersionSummaryList(&sv.EvaluationFormVersionSummaryList, value); err != nil { return err } @@ -20595,14 +21318,14 @@ func awsRestjson1_deserializeOpDocumentListFlowAssociationsOutput(v **ListFlowAs return nil } -type awsRestjson1_deserializeOpListHoursOfOperations struct { +type awsRestjson1_deserializeOpListFlowAssociations struct { } -func (*awsRestjson1_deserializeOpListHoursOfOperations) ID() string { +func (*awsRestjson1_deserializeOpListFlowAssociations) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListHoursOfOperations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListFlowAssociations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -20620,9 +21343,9 @@ func (m *awsRestjson1_deserializeOpListHoursOfOperations) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListHoursOfOperations(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListFlowAssociations(response, &metadata) } - output := &ListHoursOfOperationsOutput{} + output := &ListFlowAssociationsOutput{} out.Result = output var buff [1024]byte @@ -20643,7 +21366,7 @@ func (m *awsRestjson1_deserializeOpListHoursOfOperations) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListHoursOfOperationsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListFlowAssociationsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -20657,7 +21380,7 @@ func (m *awsRestjson1_deserializeOpListHoursOfOperations) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorListHoursOfOperations(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListFlowAssociations(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -20698,6 +21421,9 @@ func awsRestjson1_deserializeOpErrorListHoursOfOperations(response *smithyhttp.R } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) @@ -20723,7 +21449,7 @@ func awsRestjson1_deserializeOpErrorListHoursOfOperations(response *smithyhttp.R } } -func awsRestjson1_deserializeOpDocumentListHoursOfOperationsOutput(v **ListHoursOfOperationsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListFlowAssociationsOutput(v **ListFlowAssociationsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -20736,17 +21462,17 @@ func awsRestjson1_deserializeOpDocumentListHoursOfOperationsOutput(v **ListHours return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListHoursOfOperationsOutput + var sv *ListFlowAssociationsOutput if *v == nil { - sv = &ListHoursOfOperationsOutput{} + sv = &ListFlowAssociationsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "HoursOfOperationSummaryList": - if err := awsRestjson1_deserializeDocumentHoursOfOperationSummaryList(&sv.HoursOfOperationSummaryList, value); err != nil { + case "FlowAssociationSummaryList": + if err := awsRestjson1_deserializeDocumentFlowAssociationSummaryList(&sv.FlowAssociationSummaryList, value); err != nil { return err } @@ -20768,14 +21494,14 @@ func awsRestjson1_deserializeOpDocumentListHoursOfOperationsOutput(v **ListHours return nil } -type awsRestjson1_deserializeOpListInstanceAttributes struct { +type awsRestjson1_deserializeOpListHoursOfOperations struct { } -func (*awsRestjson1_deserializeOpListInstanceAttributes) ID() string { +func (*awsRestjson1_deserializeOpListHoursOfOperations) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListInstanceAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListHoursOfOperations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -20793,9 +21519,9 @@ func (m *awsRestjson1_deserializeOpListInstanceAttributes) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListInstanceAttributes(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListHoursOfOperations(response, &metadata) } - output := &ListInstanceAttributesOutput{} + output := &ListHoursOfOperationsOutput{} out.Result = output var buff [1024]byte @@ -20816,7 +21542,7 @@ func (m *awsRestjson1_deserializeOpListInstanceAttributes) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListInstanceAttributesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListHoursOfOperationsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -20830,7 +21556,180 @@ func (m *awsRestjson1_deserializeOpListInstanceAttributes) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorListInstanceAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListHoursOfOperations(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("InternalServiceException", errorCode): + return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListHoursOfOperationsOutput(v **ListHoursOfOperationsOutput, 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 *ListHoursOfOperationsOutput + if *v == nil { + sv = &ListHoursOfOperationsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "HoursOfOperationSummaryList": + if err := awsRestjson1_deserializeDocumentHoursOfOperationSummaryList(&sv.HoursOfOperationSummaryList, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListInstanceAttributes struct { +} + +func (*awsRestjson1_deserializeOpListInstanceAttributes) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListInstanceAttributes) HandleDeserialize(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_deserializeOpErrorListInstanceAttributes(response, &metadata) + } + output := &ListInstanceAttributesOutput{} + 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_deserializeOpDocumentListInstanceAttributesOutput(&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_deserializeOpErrorListInstanceAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -28063,14 +28962,14 @@ func awsRestjson1_deserializeOpDocumentSearchContactsOutput(v **SearchContactsOu return nil } -type awsRestjson1_deserializeOpSearchHoursOfOperations struct { +type awsRestjson1_deserializeOpSearchEmailAddresses struct { } -func (*awsRestjson1_deserializeOpSearchHoursOfOperations) ID() string { +func (*awsRestjson1_deserializeOpSearchEmailAddresses) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpSearchHoursOfOperations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpSearchEmailAddresses) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -28088,9 +28987,9 @@ func (m *awsRestjson1_deserializeOpSearchHoursOfOperations) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorSearchHoursOfOperations(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorSearchEmailAddresses(response, &metadata) } - output := &SearchHoursOfOperationsOutput{} + output := &SearchEmailAddressesOutput{} out.Result = output var buff [1024]byte @@ -28111,7 +29010,7 @@ func (m *awsRestjson1_deserializeOpSearchHoursOfOperations) HandleDeserialize(ct return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentSearchHoursOfOperationsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentSearchEmailAddressesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -28125,7 +29024,7 @@ func (m *awsRestjson1_deserializeOpSearchHoursOfOperations) HandleDeserialize(ct return out, metadata, err } -func awsRestjson1_deserializeOpErrorSearchHoursOfOperations(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorSearchEmailAddresses(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -28166,6 +29065,9 @@ func awsRestjson1_deserializeOpErrorSearchHoursOfOperations(response *smithyhttp } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) @@ -28191,7 +29093,7 @@ func awsRestjson1_deserializeOpErrorSearchHoursOfOperations(response *smithyhttp } } -func awsRestjson1_deserializeOpDocumentSearchHoursOfOperationsOutput(v **SearchHoursOfOperationsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentSearchEmailAddressesOutput(v **SearchEmailAddressesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -28204,9 +29106,9 @@ func awsRestjson1_deserializeOpDocumentSearchHoursOfOperationsOutput(v **SearchH return fmt.Errorf("unexpected JSON type %v", value) } - var sv *SearchHoursOfOperationsOutput + var sv *SearchEmailAddressesOutput if *v == nil { - sv = &SearchHoursOfOperationsOutput{} + sv = &SearchEmailAddressesOutput{} } else { sv = *v } @@ -28226,8 +29128,8 @@ func awsRestjson1_deserializeOpDocumentSearchHoursOfOperationsOutput(v **SearchH sv.ApproximateTotalCount = ptr.Int64(i64) } - case "HoursOfOperations": - if err := awsRestjson1_deserializeDocumentHoursOfOperationList(&sv.HoursOfOperations, value); err != nil { + case "EmailAddresses": + if err := awsRestjson1_deserializeDocumentEmailAddressList(&sv.EmailAddresses, value); err != nil { return err } @@ -28235,7 +29137,7 @@ func awsRestjson1_deserializeOpDocumentSearchHoursOfOperationsOutput(v **SearchH if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected NextToken2500 to be of type string, got %T instead", value) + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } @@ -28249,14 +29151,14 @@ func awsRestjson1_deserializeOpDocumentSearchHoursOfOperationsOutput(v **SearchH return nil } -type awsRestjson1_deserializeOpSearchPredefinedAttributes struct { +type awsRestjson1_deserializeOpSearchHoursOfOperations struct { } -func (*awsRestjson1_deserializeOpSearchPredefinedAttributes) ID() string { +func (*awsRestjson1_deserializeOpSearchHoursOfOperations) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpSearchPredefinedAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpSearchHoursOfOperations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -28274,9 +29176,9 @@ func (m *awsRestjson1_deserializeOpSearchPredefinedAttributes) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorSearchPredefinedAttributes(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorSearchHoursOfOperations(response, &metadata) } - output := &SearchPredefinedAttributesOutput{} + output := &SearchHoursOfOperationsOutput{} out.Result = output var buff [1024]byte @@ -28297,7 +29199,7 @@ func (m *awsRestjson1_deserializeOpSearchPredefinedAttributes) HandleDeserialize return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentSearchPredefinedAttributesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentSearchHoursOfOperationsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -28311,7 +29213,7 @@ func (m *awsRestjson1_deserializeOpSearchPredefinedAttributes) HandleDeserialize return out, metadata, err } -func awsRestjson1_deserializeOpErrorSearchPredefinedAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorSearchHoursOfOperations(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -28377,7 +29279,7 @@ func awsRestjson1_deserializeOpErrorSearchPredefinedAttributes(response *smithyh } } -func awsRestjson1_deserializeOpDocumentSearchPredefinedAttributesOutput(v **SearchPredefinedAttributesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentSearchHoursOfOperationsOutput(v **SearchHoursOfOperationsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -28390,9 +29292,9 @@ func awsRestjson1_deserializeOpDocumentSearchPredefinedAttributesOutput(v **Sear return fmt.Errorf("unexpected JSON type %v", value) } - var sv *SearchPredefinedAttributesOutput + var sv *SearchHoursOfOperationsOutput if *v == nil { - sv = &SearchPredefinedAttributesOutput{} + sv = &SearchHoursOfOperationsOutput{} } else { sv = *v } @@ -28412,6 +29314,11 @@ func awsRestjson1_deserializeOpDocumentSearchPredefinedAttributesOutput(v **Sear sv.ApproximateTotalCount = ptr.Int64(i64) } + case "HoursOfOperations": + if err := awsRestjson1_deserializeDocumentHoursOfOperationList(&sv.HoursOfOperations, value); err != nil { + return err + } + case "NextToken": if value != nil { jtv, ok := value.(string) @@ -28421,11 +29328,6 @@ func awsRestjson1_deserializeOpDocumentSearchPredefinedAttributesOutput(v **Sear sv.NextToken = ptr.String(jtv) } - case "PredefinedAttributes": - if err := awsRestjson1_deserializeDocumentPredefinedAttributeSearchSummaryList(&sv.PredefinedAttributes, value); err != nil { - return err - } - default: _, _ = key, value @@ -28435,14 +29337,14 @@ func awsRestjson1_deserializeOpDocumentSearchPredefinedAttributesOutput(v **Sear return nil } -type awsRestjson1_deserializeOpSearchPrompts struct { +type awsRestjson1_deserializeOpSearchPredefinedAttributes struct { } -func (*awsRestjson1_deserializeOpSearchPrompts) ID() string { +func (*awsRestjson1_deserializeOpSearchPredefinedAttributes) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpSearchPrompts) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpSearchPredefinedAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -28460,9 +29362,9 @@ func (m *awsRestjson1_deserializeOpSearchPrompts) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorSearchPrompts(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorSearchPredefinedAttributes(response, &metadata) } - output := &SearchPromptsOutput{} + output := &SearchPredefinedAttributesOutput{} out.Result = output var buff [1024]byte @@ -28483,7 +29385,7 @@ func (m *awsRestjson1_deserializeOpSearchPrompts) HandleDeserialize(ctx context. return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentSearchPromptsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentSearchPredefinedAttributesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -28497,7 +29399,7 @@ func (m *awsRestjson1_deserializeOpSearchPrompts) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorSearchPrompts(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorSearchPredefinedAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -28563,7 +29465,7 @@ func awsRestjson1_deserializeOpErrorSearchPrompts(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentSearchPromptsOutput(v **SearchPromptsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentSearchPredefinedAttributesOutput(v **SearchPredefinedAttributesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -28576,9 +29478,9 @@ func awsRestjson1_deserializeOpDocumentSearchPromptsOutput(v **SearchPromptsOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *SearchPromptsOutput + var sv *SearchPredefinedAttributesOutput if *v == nil { - sv = &SearchPromptsOutput{} + sv = &SearchPredefinedAttributesOutput{} } else { sv = *v } @@ -28607,8 +29509,8 @@ func awsRestjson1_deserializeOpDocumentSearchPromptsOutput(v **SearchPromptsOutp sv.NextToken = ptr.String(jtv) } - case "Prompts": - if err := awsRestjson1_deserializeDocumentPromptList(&sv.Prompts, value); err != nil { + case "PredefinedAttributes": + if err := awsRestjson1_deserializeDocumentPredefinedAttributeSearchSummaryList(&sv.PredefinedAttributes, value); err != nil { return err } @@ -28621,14 +29523,14 @@ func awsRestjson1_deserializeOpDocumentSearchPromptsOutput(v **SearchPromptsOutp return nil } -type awsRestjson1_deserializeOpSearchQueues struct { +type awsRestjson1_deserializeOpSearchPrompts struct { } -func (*awsRestjson1_deserializeOpSearchQueues) ID() string { +func (*awsRestjson1_deserializeOpSearchPrompts) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpSearchQueues) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpSearchPrompts) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -28646,9 +29548,9 @@ func (m *awsRestjson1_deserializeOpSearchQueues) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorSearchQueues(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorSearchPrompts(response, &metadata) } - output := &SearchQueuesOutput{} + output := &SearchPromptsOutput{} out.Result = output var buff [1024]byte @@ -28669,7 +29571,7 @@ func (m *awsRestjson1_deserializeOpSearchQueues) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentSearchQueuesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentSearchPromptsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -28683,7 +29585,193 @@ func (m *awsRestjson1_deserializeOpSearchQueues) HandleDeserialize(ctx context.C return out, metadata, err } -func awsRestjson1_deserializeOpErrorSearchQueues(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorSearchPrompts(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("InternalServiceException", errorCode): + return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentSearchPromptsOutput(v **SearchPromptsOutput, 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 *SearchPromptsOutput + if *v == nil { + sv = &SearchPromptsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ApproximateTotalCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ApproximateTotalCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ApproximateTotalCount = ptr.Int64(i64) + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken2500 to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "Prompts": + if err := awsRestjson1_deserializeDocumentPromptList(&sv.Prompts, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpSearchQueues struct { +} + +func (*awsRestjson1_deserializeOpSearchQueues) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpSearchQueues) HandleDeserialize(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_deserializeOpErrorSearchQueues(response, &metadata) + } + output := &SearchQueuesOutput{} + 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_deserializeOpDocumentSearchQueuesOutput(&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_deserializeOpErrorSearchQueues(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -30260,6 +31348,112 @@ func awsRestjson1_deserializeOpDocumentSendChatIntegrationEventOutput(v **SendCh return nil } +type awsRestjson1_deserializeOpSendOutboundEmail struct { +} + +func (*awsRestjson1_deserializeOpSendOutboundEmail) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpSendOutboundEmail) HandleDeserialize(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_deserializeOpErrorSendOutboundEmail(response, &metadata) + } + output := &SendOutboundEmailOutput{} + out.Result = output + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorSendOutboundEmail(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("IdempotencyException", errorCode): + return awsRestjson1_deserializeErrorIdempotencyException(response, errorBody) + + case strings.EqualFold("InternalServiceException", errorCode): + return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsRestjson1_deserializeOpStartAttachedFileUpload struct { } @@ -31108,14 +32302,14 @@ func awsRestjson1_deserializeOpDocumentStartContactStreamingOutput(v **StartCont return nil } -type awsRestjson1_deserializeOpStartOutboundChatContact struct { +type awsRestjson1_deserializeOpStartEmailContact struct { } -func (*awsRestjson1_deserializeOpStartOutboundChatContact) ID() string { +func (*awsRestjson1_deserializeOpStartEmailContact) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpStartOutboundChatContact) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpStartEmailContact) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -31133,9 +32327,9 @@ func (m *awsRestjson1_deserializeOpStartOutboundChatContact) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorStartOutboundChatContact(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorStartEmailContact(response, &metadata) } - output := &StartOutboundChatContactOutput{} + output := &StartEmailContactOutput{} out.Result = output var buff [1024]byte @@ -31156,7 +32350,7 @@ func (m *awsRestjson1_deserializeOpStartOutboundChatContact) HandleDeserialize(c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentStartOutboundChatContactOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentStartEmailContactOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -31170,7 +32364,7 @@ func (m *awsRestjson1_deserializeOpStartOutboundChatContact) HandleDeserialize(c return out, metadata, err } -func awsRestjson1_deserializeOpErrorStartOutboundChatContact(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorStartEmailContact(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -31214,8 +32408,8 @@ func awsRestjson1_deserializeOpErrorStartOutboundChatContact(response *smithyhtt case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("IdempotencyException", errorCode): + return awsRestjson1_deserializeErrorIdempotencyException(response, errorBody) case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) @@ -31223,12 +32417,12 @@ func awsRestjson1_deserializeOpErrorStartOutboundChatContact(response *smithyhtt case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -31242,7 +32436,7 @@ func awsRestjson1_deserializeOpErrorStartOutboundChatContact(response *smithyhtt } } -func awsRestjson1_deserializeOpDocumentStartOutboundChatContactOutput(v **StartOutboundChatContactOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentStartEmailContactOutput(v **StartEmailContactOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -31255,9 +32449,9 @@ func awsRestjson1_deserializeOpDocumentStartOutboundChatContactOutput(v **StartO return fmt.Errorf("unexpected JSON type %v", value) } - var sv *StartOutboundChatContactOutput + var sv *StartEmailContactOutput if *v == nil { - sv = &StartOutboundChatContactOutput{} + sv = &StartEmailContactOutput{} } else { sv = *v } @@ -31282,14 +32476,14 @@ func awsRestjson1_deserializeOpDocumentStartOutboundChatContactOutput(v **StartO return nil } -type awsRestjson1_deserializeOpStartOutboundVoiceContact struct { +type awsRestjson1_deserializeOpStartOutboundChatContact struct { } -func (*awsRestjson1_deserializeOpStartOutboundVoiceContact) ID() string { +func (*awsRestjson1_deserializeOpStartOutboundChatContact) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpStartOutboundVoiceContact) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpStartOutboundChatContact) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -31307,9 +32501,9 @@ func (m *awsRestjson1_deserializeOpStartOutboundVoiceContact) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorStartOutboundVoiceContact(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorStartOutboundChatContact(response, &metadata) } - output := &StartOutboundVoiceContactOutput{} + output := &StartOutboundChatContactOutput{} out.Result = output var buff [1024]byte @@ -31330,7 +32524,7 @@ func (m *awsRestjson1_deserializeOpStartOutboundVoiceContact) HandleDeserialize( return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentStartOutboundVoiceContactOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentStartOutboundChatContactOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -31344,7 +32538,7 @@ func (m *awsRestjson1_deserializeOpStartOutboundVoiceContact) HandleDeserialize( return out, metadata, err } -func awsRestjson1_deserializeOpErrorStartOutboundVoiceContact(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorStartOutboundChatContact(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -31385,27 +32579,27 @@ func awsRestjson1_deserializeOpErrorStartOutboundVoiceContact(response *smithyht } switch { - case strings.EqualFold("DestinationNotAllowedException", errorCode): - return awsRestjson1_deserializeErrorDestinationNotAllowedException(response, errorBody) + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("LimitExceededException", errorCode): return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) - case strings.EqualFold("OutboundContactNotPermittedException", errorCode): - return awsRestjson1_deserializeErrorOutboundContactNotPermittedException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -31416,7 +32610,7 @@ func awsRestjson1_deserializeOpErrorStartOutboundVoiceContact(response *smithyht } } -func awsRestjson1_deserializeOpDocumentStartOutboundVoiceContactOutput(v **StartOutboundVoiceContactOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentStartOutboundChatContactOutput(v **StartOutboundChatContactOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -31429,9 +32623,9 @@ func awsRestjson1_deserializeOpDocumentStartOutboundVoiceContactOutput(v **Start return fmt.Errorf("unexpected JSON type %v", value) } - var sv *StartOutboundVoiceContactOutput + var sv *StartOutboundChatContactOutput if *v == nil { - sv = &StartOutboundVoiceContactOutput{} + sv = &StartOutboundChatContactOutput{} } else { sv = *v } @@ -31456,117 +32650,14 @@ func awsRestjson1_deserializeOpDocumentStartOutboundVoiceContactOutput(v **Start return nil } -type awsRestjson1_deserializeOpStartScreenSharing struct { -} - -func (*awsRestjson1_deserializeOpStartScreenSharing) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpStartScreenSharing) HandleDeserialize(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_deserializeOpErrorStartScreenSharing(response, &metadata) - } - output := &StartScreenSharingOutput{} - out.Result = output - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorStartScreenSharing(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.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("InternalServiceException", errorCode): - return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) - - case strings.EqualFold("InvalidParameterException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - - case strings.EqualFold("InvalidRequestException", errorCode): - return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ThrottlingException", errorCode): - return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsRestjson1_deserializeOpStartTaskContact struct { +type awsRestjson1_deserializeOpStartOutboundEmailContact struct { } -func (*awsRestjson1_deserializeOpStartTaskContact) ID() string { +func (*awsRestjson1_deserializeOpStartOutboundEmailContact) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpStartTaskContact) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpStartOutboundEmailContact) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -31584,9 +32675,9 @@ func (m *awsRestjson1_deserializeOpStartTaskContact) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorStartTaskContact(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorStartOutboundEmailContact(response, &metadata) } - output := &StartTaskContactOutput{} + output := &StartOutboundEmailContactOutput{} out.Result = output var buff [1024]byte @@ -31607,7 +32698,7 @@ func (m *awsRestjson1_deserializeOpStartTaskContact) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentStartTaskContactOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentStartOutboundEmailContactOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -31621,7 +32712,7 @@ func (m *awsRestjson1_deserializeOpStartTaskContact) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorStartTaskContact(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorStartOutboundEmailContact(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -31662,12 +32753,15 @@ func awsRestjson1_deserializeOpErrorStartTaskContact(response *smithyhttp.Respon } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("IdempotencyException", errorCode): + return awsRestjson1_deserializeErrorIdempotencyException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) @@ -31690,7 +32784,7 @@ func awsRestjson1_deserializeOpErrorStartTaskContact(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentStartTaskContactOutput(v **StartTaskContactOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentStartOutboundEmailContactOutput(v **StartOutboundEmailContactOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -31703,9 +32797,9 @@ func awsRestjson1_deserializeOpDocumentStartTaskContactOutput(v **StartTaskConta return fmt.Errorf("unexpected JSON type %v", value) } - var sv *StartTaskContactOutput + var sv *StartOutboundEmailContactOutput if *v == nil { - sv = &StartTaskContactOutput{} + sv = &StartOutboundEmailContactOutput{} } else { sv = *v } @@ -31730,14 +32824,14 @@ func awsRestjson1_deserializeOpDocumentStartTaskContactOutput(v **StartTaskConta return nil } -type awsRestjson1_deserializeOpStartWebRTCContact struct { +type awsRestjson1_deserializeOpStartOutboundVoiceContact struct { } -func (*awsRestjson1_deserializeOpStartWebRTCContact) ID() string { +func (*awsRestjson1_deserializeOpStartOutboundVoiceContact) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpStartWebRTCContact) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpStartOutboundVoiceContact) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -31755,9 +32849,9 @@ func (m *awsRestjson1_deserializeOpStartWebRTCContact) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorStartWebRTCContact(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorStartOutboundVoiceContact(response, &metadata) } - output := &StartWebRTCContactOutput{} + output := &StartOutboundVoiceContactOutput{} out.Result = output var buff [1024]byte @@ -31778,7 +32872,7 @@ func (m *awsRestjson1_deserializeOpStartWebRTCContact) HandleDeserialize(ctx con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentStartWebRTCContactOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentStartOutboundVoiceContactOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -31792,7 +32886,7 @@ func (m *awsRestjson1_deserializeOpStartWebRTCContact) HandleDeserialize(ctx con return out, metadata, err } -func awsRestjson1_deserializeOpErrorStartWebRTCContact(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorStartOutboundVoiceContact(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -31833,6 +32927,9 @@ func awsRestjson1_deserializeOpErrorStartWebRTCContact(response *smithyhttp.Resp } switch { + case strings.EqualFold("DestinationNotAllowedException", errorCode): + return awsRestjson1_deserializeErrorDestinationNotAllowedException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) @@ -31845,6 +32942,9 @@ func awsRestjson1_deserializeOpErrorStartWebRTCContact(response *smithyhttp.Resp case strings.EqualFold("LimitExceededException", errorCode): return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("OutboundContactNotPermittedException", errorCode): + return awsRestjson1_deserializeErrorOutboundContactNotPermittedException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -31858,7 +32958,7 @@ func awsRestjson1_deserializeOpErrorStartWebRTCContact(response *smithyhttp.Resp } } -func awsRestjson1_deserializeOpDocumentStartWebRTCContactOutput(v **StartWebRTCContactOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentStartOutboundVoiceContactOutput(v **StartOutboundVoiceContactOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -31871,20 +32971,15 @@ func awsRestjson1_deserializeOpDocumentStartWebRTCContactOutput(v **StartWebRTCC return fmt.Errorf("unexpected JSON type %v", value) } - var sv *StartWebRTCContactOutput + var sv *StartOutboundVoiceContactOutput if *v == nil { - sv = &StartWebRTCContactOutput{} + sv = &StartOutboundVoiceContactOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "ConnectionData": - if err := awsRestjson1_deserializeDocumentConnectionData(&sv.ConnectionData, value); err != nil { - return err - } - case "ContactId": if value != nil { jtv, ok := value.(string) @@ -31894,24 +32989,6 @@ func awsRestjson1_deserializeOpDocumentStartWebRTCContactOutput(v **StartWebRTCC sv.ContactId = ptr.String(jtv) } - case "ParticipantId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ParticipantId to be of type string, got %T instead", value) - } - sv.ParticipantId = ptr.String(jtv) - } - - case "ParticipantToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ParticipantToken to be of type string, got %T instead", value) - } - sv.ParticipantToken = ptr.String(jtv) - } - default: _, _ = key, value @@ -31921,14 +32998,14 @@ func awsRestjson1_deserializeOpDocumentStartWebRTCContactOutput(v **StartWebRTCC return nil } -type awsRestjson1_deserializeOpStopContact struct { +type awsRestjson1_deserializeOpStartScreenSharing struct { } -func (*awsRestjson1_deserializeOpStopContact) ID() string { +func (*awsRestjson1_deserializeOpStartScreenSharing) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpStopContact) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpStartScreenSharing) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -31946,16 +33023,16 @@ func (m *awsRestjson1_deserializeOpStopContact) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorStopContact(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorStartScreenSharing(response, &metadata) } - output := &StopContactOutput{} + output := &StartScreenSharingOutput{} out.Result = output span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorStopContact(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorStartScreenSharing(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -31996,8 +33073,8 @@ func awsRestjson1_deserializeOpErrorStopContact(response *smithyhttp.Response, m } switch { - case strings.EqualFold("ContactNotFoundException", errorCode): - return awsRestjson1_deserializeErrorContactNotFoundException(response, errorBody) + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) @@ -32011,6 +33088,9 @@ func awsRestjson1_deserializeOpErrorStopContact(response *smithyhttp.Response, m case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -32021,14 +33101,14 @@ func awsRestjson1_deserializeOpErrorStopContact(response *smithyhttp.Response, m } } -type awsRestjson1_deserializeOpStopContactRecording struct { +type awsRestjson1_deserializeOpStartTaskContact struct { } -func (*awsRestjson1_deserializeOpStopContactRecording) ID() string { +func (*awsRestjson1_deserializeOpStartTaskContact) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpStopContactRecording) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpStartTaskContact) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -32046,16 +33126,44 @@ func (m *awsRestjson1_deserializeOpStopContactRecording) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorStopContactRecording(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorStartTaskContact(response, &metadata) } - output := &StopContactRecordingOutput{} + output := &StartTaskContactOutput{} 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_deserializeOpDocumentStartTaskContactOutput(&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_deserializeOpErrorStopContactRecording(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorStartTaskContact(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -32099,12 +33207,21 @@ func awsRestjson1_deserializeOpErrorStopContactRecording(response *smithyhttp.Re case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -32115,111 +33232,54 @@ func awsRestjson1_deserializeOpErrorStopContactRecording(response *smithyhttp.Re } } -type awsRestjson1_deserializeOpStopContactStreaming struct { -} - -func (*awsRestjson1_deserializeOpStopContactStreaming) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpStopContactStreaming) HandleDeserialize(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_deserializeOpErrorStopContactStreaming(response, &metadata) - } - output := &StopContactStreamingOutput{} - out.Result = output - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorStopContactStreaming(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} +func awsRestjson1_deserializeOpDocumentStartTaskContactOutput(v **StartTaskContactOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) + if value == nil { + return nil } - 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 + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) } - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message + var sv *StartTaskContactOutput + if *v == nil { + sv = &StartTaskContactOutput{} + } else { + sv = *v } - switch { - case strings.EqualFold("InternalServiceException", errorCode): - return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) - - case strings.EqualFold("InvalidParameterException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - - case strings.EqualFold("InvalidRequestException", errorCode): - return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + for key, value := range shape { + switch key { + case "ContactId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ContactId to be of type string, got %T instead", value) + } + sv.ContactId = ptr.String(jtv) + } - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + default: + _, _ = key, value - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, } - return genericError - } + *v = sv + return nil } -type awsRestjson1_deserializeOpSubmitContactEvaluation struct { +type awsRestjson1_deserializeOpStartWebRTCContact struct { } -func (*awsRestjson1_deserializeOpSubmitContactEvaluation) ID() string { +func (*awsRestjson1_deserializeOpStartWebRTCContact) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpSubmitContactEvaluation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpStartWebRTCContact) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -32237,9 +33297,9 @@ func (m *awsRestjson1_deserializeOpSubmitContactEvaluation) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorSubmitContactEvaluation(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorStartWebRTCContact(response, &metadata) } - output := &SubmitContactEvaluationOutput{} + output := &StartWebRTCContactOutput{} out.Result = output var buff [1024]byte @@ -32260,7 +33320,7 @@ func (m *awsRestjson1_deserializeOpSubmitContactEvaluation) HandleDeserialize(ct return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentSubmitContactEvaluationOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentStartWebRTCContactOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -32274,7 +33334,7 @@ func (m *awsRestjson1_deserializeOpSubmitContactEvaluation) HandleDeserialize(ct return out, metadata, err } -func awsRestjson1_deserializeOpErrorSubmitContactEvaluation(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorStartWebRTCContact(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -32321,15 +33381,15 @@ func awsRestjson1_deserializeOpErrorSubmitContactEvaluation(response *smithyhttp case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("ResourceConflictException", errorCode): - return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): - return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -32340,7 +33400,7 @@ func awsRestjson1_deserializeOpErrorSubmitContactEvaluation(response *smithyhttp } } -func awsRestjson1_deserializeOpDocumentSubmitContactEvaluationOutput(v **SubmitContactEvaluationOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentStartWebRTCContactOutput(v **StartWebRTCContactOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -32353,31 +33413,45 @@ func awsRestjson1_deserializeOpDocumentSubmitContactEvaluationOutput(v **SubmitC return fmt.Errorf("unexpected JSON type %v", value) } - var sv *SubmitContactEvaluationOutput + var sv *StartWebRTCContactOutput if *v == nil { - sv = &SubmitContactEvaluationOutput{} + sv = &StartWebRTCContactOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "EvaluationArn": + case "ConnectionData": + if err := awsRestjson1_deserializeDocumentConnectionData(&sv.ConnectionData, value); err != nil { + return err + } + + case "ContactId": 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 ContactId to be of type string, got %T instead", value) } - sv.EvaluationArn = ptr.String(jtv) + sv.ContactId = ptr.String(jtv) } - case "EvaluationId": + case "ParticipantId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + return fmt.Errorf("expected ParticipantId to be of type string, got %T instead", value) } - sv.EvaluationId = ptr.String(jtv) + sv.ParticipantId = ptr.String(jtv) + } + + case "ParticipantToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ParticipantToken to be of type string, got %T instead", value) + } + sv.ParticipantToken = ptr.String(jtv) } default: @@ -32389,14 +33463,14 @@ func awsRestjson1_deserializeOpDocumentSubmitContactEvaluationOutput(v **SubmitC return nil } -type awsRestjson1_deserializeOpSuspendContactRecording struct { +type awsRestjson1_deserializeOpStopContact struct { } -func (*awsRestjson1_deserializeOpSuspendContactRecording) ID() string { +func (*awsRestjson1_deserializeOpStopContact) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpSuspendContactRecording) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpStopContact) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -32414,16 +33488,16 @@ func (m *awsRestjson1_deserializeOpSuspendContactRecording) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorSuspendContactRecording(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorStopContact(response, &metadata) } - output := &SuspendContactRecordingOutput{} + output := &StopContactOutput{} out.Result = output span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorSuspendContactRecording(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorStopContact(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -32464,9 +33538,15 @@ func awsRestjson1_deserializeOpErrorSuspendContactRecording(response *smithyhttp } switch { + case strings.EqualFold("ContactNotFoundException", errorCode): + return awsRestjson1_deserializeErrorContactNotFoundException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) @@ -32483,14 +33563,14 @@ func awsRestjson1_deserializeOpErrorSuspendContactRecording(response *smithyhttp } } -type awsRestjson1_deserializeOpTagContact struct { +type awsRestjson1_deserializeOpStopContactRecording struct { } -func (*awsRestjson1_deserializeOpTagContact) ID() string { +func (*awsRestjson1_deserializeOpStopContactRecording) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpTagContact) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpStopContactRecording) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -32508,16 +33588,16 @@ func (m *awsRestjson1_deserializeOpTagContact) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorTagContact(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorStopContactRecording(response, &metadata) } - output := &TagContactOutput{} + output := &StopContactRecordingOutput{} out.Result = output span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorTagContact(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorStopContactRecording(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -32561,18 +33641,12 @@ func awsRestjson1_deserializeOpErrorTagContact(response *smithyhttp.Response, me case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): - return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -32583,14 +33657,14 @@ func awsRestjson1_deserializeOpErrorTagContact(response *smithyhttp.Response, me } } -type awsRestjson1_deserializeOpTagResource struct { +type awsRestjson1_deserializeOpStopContactStreaming struct { } -func (*awsRestjson1_deserializeOpTagResource) ID() string { +func (*awsRestjson1_deserializeOpStopContactStreaming) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpStopContactStreaming) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -32608,22 +33682,16 @@ func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorTagResource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorStopContactStreaming(response, &metadata) } - output := &TagResourceOutput{} + output := &StopContactStreamingOutput{} 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_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorStopContactStreaming(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -32676,9 +33744,6 @@ func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, m case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): - return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -32689,14 +33754,14 @@ func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, m } } -type awsRestjson1_deserializeOpTransferContact struct { +type awsRestjson1_deserializeOpSubmitContactEvaluation struct { } -func (*awsRestjson1_deserializeOpTransferContact) ID() string { +func (*awsRestjson1_deserializeOpSubmitContactEvaluation) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpTransferContact) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpSubmitContactEvaluation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -32714,9 +33779,9 @@ func (m *awsRestjson1_deserializeOpTransferContact) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorTransferContact(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorSubmitContactEvaluation(response, &metadata) } - output := &TransferContactOutput{} + output := &SubmitContactEvaluationOutput{} out.Result = output var buff [1024]byte @@ -32737,7 +33802,7 @@ func (m *awsRestjson1_deserializeOpTransferContact) HandleDeserialize(ctx contex return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentTransferContactOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentSubmitContactEvaluationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -32751,7 +33816,7 @@ func (m *awsRestjson1_deserializeOpTransferContact) HandleDeserialize(ctx contex return out, metadata, err } -func awsRestjson1_deserializeOpErrorTransferContact(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorSubmitContactEvaluation(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -32792,24 +33857,18 @@ func awsRestjson1_deserializeOpErrorTransferContact(response *smithyhttp.Respons } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("IdempotencyException", errorCode): - return awsRestjson1_deserializeErrorIdempotencyException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) - case strings.EqualFold("InvalidRequestException", errorCode): - return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -32823,7 +33882,7 @@ func awsRestjson1_deserializeOpErrorTransferContact(response *smithyhttp.Respons } } -func awsRestjson1_deserializeOpDocumentTransferContactOutput(v **TransferContactOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentSubmitContactEvaluationOutput(v **SubmitContactEvaluationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -32836,31 +33895,31 @@ func awsRestjson1_deserializeOpDocumentTransferContactOutput(v **TransferContact return fmt.Errorf("unexpected JSON type %v", value) } - var sv *TransferContactOutput + var sv *SubmitContactEvaluationOutput if *v == nil { - sv = &TransferContactOutput{} + sv = &SubmitContactEvaluationOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "ContactArn": + case "EvaluationArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ARN to be of type string, got %T instead", value) } - sv.ContactArn = ptr.String(jtv) + sv.EvaluationArn = ptr.String(jtv) } - case "ContactId": + case "EvaluationId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ContactId to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } - sv.ContactId = ptr.String(jtv) + sv.EvaluationId = ptr.String(jtv) } default: @@ -32872,14 +33931,14 @@ func awsRestjson1_deserializeOpDocumentTransferContactOutput(v **TransferContact return nil } -type awsRestjson1_deserializeOpUntagContact struct { +type awsRestjson1_deserializeOpSuspendContactRecording struct { } -func (*awsRestjson1_deserializeOpUntagContact) ID() string { +func (*awsRestjson1_deserializeOpSuspendContactRecording) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUntagContact) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpSuspendContactRecording) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -32897,16 +33956,16 @@ func (m *awsRestjson1_deserializeOpUntagContact) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUntagContact(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorSuspendContactRecording(response, &metadata) } - output := &UntagContactOutput{} + output := &SuspendContactRecordingOutput{} out.Result = output span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorUntagContact(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorSuspendContactRecording(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -32950,18 +34009,12 @@ func awsRestjson1_deserializeOpErrorUntagContact(response *smithyhttp.Response, case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): - return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -32972,14 +34025,14 @@ func awsRestjson1_deserializeOpErrorUntagContact(response *smithyhttp.Response, } } -type awsRestjson1_deserializeOpUntagResource struct { +type awsRestjson1_deserializeOpTagContact struct { } -func (*awsRestjson1_deserializeOpUntagResource) ID() string { +func (*awsRestjson1_deserializeOpTagContact) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpTagContact) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -32997,22 +34050,16 @@ func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUntagResource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorTagContact(response, &metadata) } - output := &UntagResourceOutput{} + output := &TagContactOutput{} 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_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorTagContact(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -33078,14 +34125,14 @@ func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, } } -type awsRestjson1_deserializeOpUpdateAgentStatus struct { +type awsRestjson1_deserializeOpTagResource struct { } -func (*awsRestjson1_deserializeOpUpdateAgentStatus) ID() string { +func (*awsRestjson1_deserializeOpTagResource) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateAgentStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -33103,9 +34150,9 @@ func (m *awsRestjson1_deserializeOpUpdateAgentStatus) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateAgentStatus(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorTagResource(response, &metadata) } - output := &UpdateAgentStatusOutput{} + output := &TagResourceOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -33118,7 +34165,7 @@ func (m *awsRestjson1_deserializeOpUpdateAgentStatus) HandleDeserialize(ctx cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateAgentStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -33159,9 +34206,6 @@ func awsRestjson1_deserializeOpErrorUpdateAgentStatus(response *smithyhttp.Respo } switch { - case strings.EqualFold("DuplicateResourceException", errorCode): - return awsRestjson1_deserializeErrorDuplicateResourceException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) @@ -33171,9 +34215,6 @@ func awsRestjson1_deserializeOpErrorUpdateAgentStatus(response *smithyhttp.Respo case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -33190,14 +34231,14 @@ func awsRestjson1_deserializeOpErrorUpdateAgentStatus(response *smithyhttp.Respo } } -type awsRestjson1_deserializeOpUpdateAuthenticationProfile struct { +type awsRestjson1_deserializeOpTransferContact struct { } -func (*awsRestjson1_deserializeOpUpdateAuthenticationProfile) ID() string { +func (*awsRestjson1_deserializeOpTransferContact) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateAuthenticationProfile) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpTransferContact) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -33215,14 +34256,36 @@ func (m *awsRestjson1_deserializeOpUpdateAuthenticationProfile) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateAuthenticationProfile(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorTransferContact(response, &metadata) } - output := &UpdateAuthenticationProfileOutput{} + output := &TransferContactOutput{} 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) + + 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_deserializeOpDocumentTransferContactOutput(&output, shape) + 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 with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), } } @@ -33230,7 +34293,7 @@ func (m *awsRestjson1_deserializeOpUpdateAuthenticationProfile) HandleDeserializ return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateAuthenticationProfile(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorTransferContact(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -33271,18 +34334,24 @@ func awsRestjson1_deserializeOpErrorUpdateAuthenticationProfile(response *smithy } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("IdempotencyException", errorCode): + return awsRestjson1_deserializeErrorIdempotencyException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -33296,114 +34365,63 @@ func awsRestjson1_deserializeOpErrorUpdateAuthenticationProfile(response *smithy } } -type awsRestjson1_deserializeOpUpdateContact struct { -} - -func (*awsRestjson1_deserializeOpUpdateContact) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpUpdateContact) HandleDeserialize(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_deserializeOpErrorUpdateContact(response, &metadata) - } - output := &UpdateContactOutput{} - out.Result = output - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorUpdateContact(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} +func awsRestjson1_deserializeOpDocumentTransferContactOutput(v **TransferContactOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) + if value == nil { + return nil } - 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 + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) } - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message + var sv *TransferContactOutput + if *v == nil { + sv = &TransferContactOutput{} + } else { + sv = *v } - switch { - case strings.EqualFold("InternalServiceException", errorCode): - return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) - - case strings.EqualFold("InvalidParameterException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - - case strings.EqualFold("InvalidRequestException", errorCode): - return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + for key, value := range shape { + switch key { + case "ContactArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.ContactArn = ptr.String(jtv) + } - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case "ContactId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ContactId to be of type string, got %T instead", value) + } + sv.ContactId = ptr.String(jtv) + } - case strings.EqualFold("ThrottlingException", errorCode): - return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + default: + _, _ = key, value - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, } - return genericError - } + *v = sv + return nil } -type awsRestjson1_deserializeOpUpdateContactAttributes struct { +type awsRestjson1_deserializeOpUntagContact struct { } -func (*awsRestjson1_deserializeOpUpdateContactAttributes) ID() string { +func (*awsRestjson1_deserializeOpUntagContact) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateContactAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUntagContact) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -33421,16 +34439,16 @@ func (m *awsRestjson1_deserializeOpUpdateContactAttributes) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateContactAttributes(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUntagContact(response, &metadata) } - output := &UpdateContactAttributesOutput{} + output := &UntagContactOutput{} out.Result = output span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateContactAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUntagContact(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -33483,6 +34501,9 @@ func awsRestjson1_deserializeOpErrorUpdateContactAttributes(response *smithyhttp case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -33493,14 +34514,14 @@ func awsRestjson1_deserializeOpErrorUpdateContactAttributes(response *smithyhttp } } -type awsRestjson1_deserializeOpUpdateContactEvaluation struct { +type awsRestjson1_deserializeOpUntagResource struct { } -func (*awsRestjson1_deserializeOpUpdateContactEvaluation) ID() string { +func (*awsRestjson1_deserializeOpUntagResource) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateContactEvaluation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -33518,36 +34539,14 @@ func (m *awsRestjson1_deserializeOpUpdateContactEvaluation) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateContactEvaluation(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUntagResource(response, &metadata) } - output := &UpdateContactEvaluationOutput{} + output := &UntagResourceOutput{} 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_deserializeOpDocumentUpdateContactEvaluationOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), + Err: fmt.Errorf("failed to discard response body, %w", err), } } @@ -33555,7 +34554,7 @@ func (m *awsRestjson1_deserializeOpUpdateContactEvaluation) HandleDeserialize(ct return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateContactEvaluation(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -33602,8 +34601,8 @@ func awsRestjson1_deserializeOpErrorUpdateContactEvaluation(response *smithyhttp case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("ResourceConflictException", errorCode): - return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -33621,63 +34620,14 @@ func awsRestjson1_deserializeOpErrorUpdateContactEvaluation(response *smithyhttp } } -func awsRestjson1_deserializeOpDocumentUpdateContactEvaluationOutput(v **UpdateContactEvaluationOutput, 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 *UpdateContactEvaluationOutput - if *v == nil { - sv = &UpdateContactEvaluationOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "EvaluationArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ARN to be of type string, got %T instead", value) - } - sv.EvaluationArn = ptr.String(jtv) - } - - case "EvaluationId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) - } - sv.EvaluationId = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpUpdateContactFlowContent struct { +type awsRestjson1_deserializeOpUpdateAgentStatus struct { } -func (*awsRestjson1_deserializeOpUpdateContactFlowContent) ID() string { +func (*awsRestjson1_deserializeOpUpdateAgentStatus) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateContactFlowContent) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateAgentStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -33695,16 +34645,22 @@ func (m *awsRestjson1_deserializeOpUpdateContactFlowContent) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateContactFlowContent(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateAgentStatus(response, &metadata) } - output := &UpdateContactFlowContentOutput{} + output := &UpdateAgentStatusOutput{} 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_deserializeOpErrorUpdateContactFlowContent(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateAgentStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -33745,18 +34701,21 @@ func awsRestjson1_deserializeOpErrorUpdateContactFlowContent(response *smithyhtt } switch { + case strings.EqualFold("DuplicateResourceException", errorCode): + return awsRestjson1_deserializeErrorDuplicateResourceException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) - case strings.EqualFold("InvalidContactFlowException", errorCode): - return awsRestjson1_deserializeErrorInvalidContactFlowException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -33773,14 +34732,14 @@ func awsRestjson1_deserializeOpErrorUpdateContactFlowContent(response *smithyhtt } } -type awsRestjson1_deserializeOpUpdateContactFlowMetadata struct { +type awsRestjson1_deserializeOpUpdateAuthenticationProfile struct { } -func (*awsRestjson1_deserializeOpUpdateContactFlowMetadata) ID() string { +func (*awsRestjson1_deserializeOpUpdateAuthenticationProfile) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateContactFlowMetadata) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateAuthenticationProfile) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -33798,16 +34757,22 @@ func (m *awsRestjson1_deserializeOpUpdateContactFlowMetadata) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateContactFlowMetadata(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateAuthenticationProfile(response, &metadata) } - output := &UpdateContactFlowMetadataOutput{} + output := &UpdateAuthenticationProfileOutput{} 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_deserializeOpErrorUpdateContactFlowMetadata(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateAuthenticationProfile(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -33848,9 +34813,6 @@ func awsRestjson1_deserializeOpErrorUpdateContactFlowMetadata(response *smithyht } switch { - case strings.EqualFold("DuplicateResourceException", errorCode): - return awsRestjson1_deserializeErrorDuplicateResourceException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) @@ -33876,14 +34838,14 @@ func awsRestjson1_deserializeOpErrorUpdateContactFlowMetadata(response *smithyht } } -type awsRestjson1_deserializeOpUpdateContactFlowModuleContent struct { +type awsRestjson1_deserializeOpUpdateContact struct { } -func (*awsRestjson1_deserializeOpUpdateContactFlowModuleContent) ID() string { +func (*awsRestjson1_deserializeOpUpdateContact) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateContactFlowModuleContent) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateContact) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -33901,16 +34863,16 @@ func (m *awsRestjson1_deserializeOpUpdateContactFlowModuleContent) HandleDeseria } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateContactFlowModuleContent(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateContact(response, &metadata) } - output := &UpdateContactFlowModuleContentOutput{} + output := &UpdateContactOutput{} out.Result = output span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateContactFlowModuleContent(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateContact(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -33951,14 +34913,11 @@ func awsRestjson1_deserializeOpErrorUpdateContactFlowModuleContent(response *smi } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) - case strings.EqualFold("InvalidContactFlowModuleException", errorCode): - return awsRestjson1_deserializeErrorInvalidContactFlowModuleException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) @@ -33979,14 +34938,14 @@ func awsRestjson1_deserializeOpErrorUpdateContactFlowModuleContent(response *smi } } -type awsRestjson1_deserializeOpUpdateContactFlowModuleMetadata struct { +type awsRestjson1_deserializeOpUpdateContactAttributes struct { } -func (*awsRestjson1_deserializeOpUpdateContactFlowModuleMetadata) ID() string { +func (*awsRestjson1_deserializeOpUpdateContactAttributes) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateContactFlowModuleMetadata) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateContactAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -34004,16 +34963,16 @@ func (m *awsRestjson1_deserializeOpUpdateContactFlowModuleMetadata) HandleDeseri } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateContactFlowModuleMetadata(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateContactAttributes(response, &metadata) } - output := &UpdateContactFlowModuleMetadataOutput{} + output := &UpdateContactAttributesOutput{} out.Result = output span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateContactFlowModuleMetadata(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateContactAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -34054,12 +35013,6 @@ func awsRestjson1_deserializeOpErrorUpdateContactFlowModuleMetadata(response *sm } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("DuplicateResourceException", errorCode): - return awsRestjson1_deserializeErrorDuplicateResourceException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) @@ -34072,9 +35025,6 @@ func awsRestjson1_deserializeOpErrorUpdateContactFlowModuleMetadata(response *sm case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): - return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -34085,14 +35035,14 @@ func awsRestjson1_deserializeOpErrorUpdateContactFlowModuleMetadata(response *sm } } -type awsRestjson1_deserializeOpUpdateContactFlowName struct { +type awsRestjson1_deserializeOpUpdateContactEvaluation struct { } -func (*awsRestjson1_deserializeOpUpdateContactFlowName) ID() string { +func (*awsRestjson1_deserializeOpUpdateContactEvaluation) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateContactFlowName) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateContactEvaluation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -34110,16 +35060,44 @@ func (m *awsRestjson1_deserializeOpUpdateContactFlowName) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateContactFlowName(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateContactEvaluation(response, &metadata) } - output := &UpdateContactFlowNameOutput{} + output := &UpdateContactEvaluationOutput{} 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_deserializeOpDocumentUpdateContactEvaluationOutput(&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_deserializeOpErrorUpdateContactFlowName(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateContactEvaluation(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -34160,17 +35138,14 @@ func awsRestjson1_deserializeOpErrorUpdateContactFlowName(response *smithyhttp.R } switch { - case strings.EqualFold("DuplicateResourceException", errorCode): - return awsRestjson1_deserializeErrorDuplicateResourceException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidRequestException", errorCode): - return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -34188,14 +35163,63 @@ func awsRestjson1_deserializeOpErrorUpdateContactFlowName(response *smithyhttp.R } } -type awsRestjson1_deserializeOpUpdateContactRoutingData struct { +func awsRestjson1_deserializeOpDocumentUpdateContactEvaluationOutput(v **UpdateContactEvaluationOutput, 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 *UpdateContactEvaluationOutput + if *v == nil { + sv = &UpdateContactEvaluationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "EvaluationArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.EvaluationArn = ptr.String(jtv) + } + + case "EvaluationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + } + sv.EvaluationId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil } -func (*awsRestjson1_deserializeOpUpdateContactRoutingData) ID() string { +type awsRestjson1_deserializeOpUpdateContactFlowContent struct { +} + +func (*awsRestjson1_deserializeOpUpdateContactFlowContent) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateContactRoutingData) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateContactFlowContent) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -34213,16 +35237,16 @@ func (m *awsRestjson1_deserializeOpUpdateContactRoutingData) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateContactRoutingData(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateContactFlowContent(response, &metadata) } - output := &UpdateContactRoutingDataOutput{} + output := &UpdateContactFlowContentOutput{} out.Result = output span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateContactRoutingData(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateContactFlowContent(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -34263,17 +35287,17 @@ func awsRestjson1_deserializeOpErrorUpdateContactRoutingData(response *smithyhtt } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + case strings.EqualFold("InvalidContactFlowException", errorCode): + return awsRestjson1_deserializeErrorInvalidContactFlowException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("ResourceConflictException", errorCode): - return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -34291,14 +35315,14 @@ func awsRestjson1_deserializeOpErrorUpdateContactRoutingData(response *smithyhtt } } -type awsRestjson1_deserializeOpUpdateContactSchedule struct { +type awsRestjson1_deserializeOpUpdateContactFlowMetadata struct { } -func (*awsRestjson1_deserializeOpUpdateContactSchedule) ID() string { +func (*awsRestjson1_deserializeOpUpdateContactFlowMetadata) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateContactSchedule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateContactFlowMetadata) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -34316,16 +35340,16 @@ func (m *awsRestjson1_deserializeOpUpdateContactSchedule) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateContactSchedule(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateContactFlowMetadata(response, &metadata) } - output := &UpdateContactScheduleOutput{} + output := &UpdateContactFlowMetadataOutput{} out.Result = output span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateContactSchedule(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateContactFlowMetadata(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -34366,6 +35390,9 @@ func awsRestjson1_deserializeOpErrorUpdateContactSchedule(response *smithyhttp.R } switch { + case strings.EqualFold("DuplicateResourceException", errorCode): + return awsRestjson1_deserializeErrorDuplicateResourceException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) @@ -34375,9 +35402,6 @@ func awsRestjson1_deserializeOpErrorUpdateContactSchedule(response *smithyhttp.R case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -34394,14 +35418,14 @@ func awsRestjson1_deserializeOpErrorUpdateContactSchedule(response *smithyhttp.R } } -type awsRestjson1_deserializeOpUpdateEvaluationForm struct { +type awsRestjson1_deserializeOpUpdateContactFlowModuleContent struct { } -func (*awsRestjson1_deserializeOpUpdateEvaluationForm) ID() string { +func (*awsRestjson1_deserializeOpUpdateContactFlowModuleContent) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateEvaluationForm) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateContactFlowModuleContent) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -34419,44 +35443,16 @@ func (m *awsRestjson1_deserializeOpUpdateEvaluationForm) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateEvaluationForm(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateContactFlowModuleContent(response, &metadata) } - output := &UpdateEvaluationFormOutput{} + output := &UpdateContactFlowModuleContentOutput{} 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_deserializeOpDocumentUpdateEvaluationFormOutput(&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_deserializeOpErrorUpdateEvaluationForm(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateContactFlowModuleContent(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -34497,21 +35493,21 @@ func awsRestjson1_deserializeOpErrorUpdateEvaluationForm(response *smithyhttp.Re } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("InvalidContactFlowModuleException", errorCode): + return awsRestjson1_deserializeErrorInvalidContactFlowModuleException(response, errorBody) - case strings.EqualFold("ResourceConflictException", errorCode): - return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -34525,76 +35521,14 @@ func awsRestjson1_deserializeOpErrorUpdateEvaluationForm(response *smithyhttp.Re } } -func awsRestjson1_deserializeOpDocumentUpdateEvaluationFormOutput(v **UpdateEvaluationFormOutput, 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 *UpdateEvaluationFormOutput - if *v == nil { - sv = &UpdateEvaluationFormOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "EvaluationFormArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ARN to be of type string, got %T instead", value) - } - sv.EvaluationFormArn = ptr.String(jtv) - } - - case "EvaluationFormId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) - } - sv.EvaluationFormId = ptr.String(jtv) - } - - case "EvaluationFormVersion": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected VersionNumber to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.EvaluationFormVersion = int32(i64) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpUpdateHoursOfOperation struct { +type awsRestjson1_deserializeOpUpdateContactFlowModuleMetadata struct { } -func (*awsRestjson1_deserializeOpUpdateHoursOfOperation) ID() string { +func (*awsRestjson1_deserializeOpUpdateContactFlowModuleMetadata) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateHoursOfOperation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateContactFlowModuleMetadata) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -34612,22 +35546,16 @@ func (m *awsRestjson1_deserializeOpUpdateHoursOfOperation) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateHoursOfOperation(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateContactFlowModuleMetadata(response, &metadata) } - output := &UpdateHoursOfOperationOutput{} + output := &UpdateContactFlowModuleMetadataOutput{} 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_deserializeOpErrorUpdateHoursOfOperation(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateContactFlowModuleMetadata(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -34668,6 +35596,9 @@ func awsRestjson1_deserializeOpErrorUpdateHoursOfOperation(response *smithyhttp. } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("DuplicateResourceException", errorCode): return awsRestjson1_deserializeErrorDuplicateResourceException(response, errorBody) @@ -34696,14 +35627,14 @@ func awsRestjson1_deserializeOpErrorUpdateHoursOfOperation(response *smithyhttp. } } -type awsRestjson1_deserializeOpUpdateInstanceAttribute struct { +type awsRestjson1_deserializeOpUpdateContactFlowName struct { } -func (*awsRestjson1_deserializeOpUpdateInstanceAttribute) ID() string { +func (*awsRestjson1_deserializeOpUpdateContactFlowName) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateInstanceAttribute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateContactFlowName) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -34721,22 +35652,16 @@ func (m *awsRestjson1_deserializeOpUpdateInstanceAttribute) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateInstanceAttribute(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateContactFlowName(response, &metadata) } - output := &UpdateInstanceAttributeOutput{} + output := &UpdateContactFlowNameOutput{} 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_deserializeOpErrorUpdateInstanceAttribute(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateContactFlowName(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -34777,6 +35702,9 @@ func awsRestjson1_deserializeOpErrorUpdateInstanceAttribute(response *smithyhttp } switch { + case strings.EqualFold("DuplicateResourceException", errorCode): + return awsRestjson1_deserializeErrorDuplicateResourceException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) @@ -34802,14 +35730,14 @@ func awsRestjson1_deserializeOpErrorUpdateInstanceAttribute(response *smithyhttp } } -type awsRestjson1_deserializeOpUpdateInstanceStorageConfig struct { +type awsRestjson1_deserializeOpUpdateContactRoutingData struct { } -func (*awsRestjson1_deserializeOpUpdateInstanceStorageConfig) ID() string { +func (*awsRestjson1_deserializeOpUpdateContactRoutingData) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateInstanceStorageConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateContactRoutingData) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -34827,22 +35755,16 @@ func (m *awsRestjson1_deserializeOpUpdateInstanceStorageConfig) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateInstanceStorageConfig(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateContactRoutingData(response, &metadata) } - output := &UpdateInstanceStorageConfigOutput{} + output := &UpdateContactRoutingDataOutput{} 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_deserializeOpErrorUpdateInstanceStorageConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateContactRoutingData(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -34883,14 +35805,17 @@ func awsRestjson1_deserializeOpErrorUpdateInstanceStorageConfig(response *smithy } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidRequestException", errorCode): - return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -34908,14 +35833,14 @@ func awsRestjson1_deserializeOpErrorUpdateInstanceStorageConfig(response *smithy } } -type awsRestjson1_deserializeOpUpdateParticipantRoleConfig struct { +type awsRestjson1_deserializeOpUpdateContactSchedule struct { } -func (*awsRestjson1_deserializeOpUpdateParticipantRoleConfig) ID() string { +func (*awsRestjson1_deserializeOpUpdateContactSchedule) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateParticipantRoleConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateContactSchedule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -34933,16 +35858,16 @@ func (m *awsRestjson1_deserializeOpUpdateParticipantRoleConfig) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateParticipantRoleConfig(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateContactSchedule(response, &metadata) } - output := &UpdateParticipantRoleConfigOutput{} + output := &UpdateContactScheduleOutput{} out.Result = output span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateParticipantRoleConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateContactSchedule(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -34983,9 +35908,6 @@ func awsRestjson1_deserializeOpErrorUpdateParticipantRoleConfig(response *smithy } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) @@ -34995,6 +35917,9 @@ func awsRestjson1_deserializeOpErrorUpdateParticipantRoleConfig(response *smithy case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -35011,14 +35936,14 @@ func awsRestjson1_deserializeOpErrorUpdateParticipantRoleConfig(response *smithy } } -type awsRestjson1_deserializeOpUpdatePhoneNumber struct { +type awsRestjson1_deserializeOpUpdateEmailAddressMetadata struct { } -func (*awsRestjson1_deserializeOpUpdatePhoneNumber) ID() string { +func (*awsRestjson1_deserializeOpUpdateEmailAddressMetadata) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdatePhoneNumber) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateEmailAddressMetadata) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -35036,9 +35961,9 @@ func (m *awsRestjson1_deserializeOpUpdatePhoneNumber) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdatePhoneNumber(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateEmailAddressMetadata(response, &metadata) } - output := &UpdatePhoneNumberOutput{} + output := &UpdateEmailAddressMetadataOutput{} out.Result = output var buff [1024]byte @@ -35059,7 +35984,7 @@ func (m *awsRestjson1_deserializeOpUpdatePhoneNumber) HandleDeserialize(ctx cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdatePhoneNumberOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateEmailAddressMetadataOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -35073,7 +35998,7 @@ func (m *awsRestjson1_deserializeOpUpdatePhoneNumber) HandleDeserialize(ctx cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdatePhoneNumber(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateEmailAddressMetadata(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -35126,8 +36051,8 @@ func awsRestjson1_deserializeOpErrorUpdatePhoneNumber(response *smithyhttp.Respo case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("ResourceInUseException", errorCode): - return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -35145,7 +36070,7 @@ func awsRestjson1_deserializeOpErrorUpdatePhoneNumber(response *smithyhttp.Respo } } -func awsRestjson1_deserializeOpDocumentUpdatePhoneNumberOutput(v **UpdatePhoneNumberOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateEmailAddressMetadataOutput(v **UpdateEmailAddressMetadataOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -35158,31 +36083,31 @@ func awsRestjson1_deserializeOpDocumentUpdatePhoneNumberOutput(v **UpdatePhoneNu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdatePhoneNumberOutput + var sv *UpdateEmailAddressMetadataOutput if *v == nil { - sv = &UpdatePhoneNumberOutput{} + sv = &UpdateEmailAddressMetadataOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "PhoneNumberArn": + case "EmailAddressArn": 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 EmailAddressArn to be of type string, got %T instead", value) } - sv.PhoneNumberArn = ptr.String(jtv) + sv.EmailAddressArn = ptr.String(jtv) } - case "PhoneNumberId": + case "EmailAddressId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected PhoneNumberId to be of type string, got %T instead", value) + return fmt.Errorf("expected EmailAddressId to be of type string, got %T instead", value) } - sv.PhoneNumberId = ptr.String(jtv) + sv.EmailAddressId = ptr.String(jtv) } default: @@ -35194,14 +36119,14 @@ func awsRestjson1_deserializeOpDocumentUpdatePhoneNumberOutput(v **UpdatePhoneNu return nil } -type awsRestjson1_deserializeOpUpdatePhoneNumberMetadata struct { +type awsRestjson1_deserializeOpUpdateEvaluationForm struct { } -func (*awsRestjson1_deserializeOpUpdatePhoneNumberMetadata) ID() string { +func (*awsRestjson1_deserializeOpUpdateEvaluationForm) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdatePhoneNumberMetadata) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateEvaluationForm) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -35219,14 +36144,36 @@ func (m *awsRestjson1_deserializeOpUpdatePhoneNumberMetadata) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdatePhoneNumberMetadata(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateEvaluationForm(response, &metadata) } - output := &UpdatePhoneNumberMetadataOutput{} + output := &UpdateEvaluationFormOutput{} 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) + + 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_deserializeOpDocumentUpdateEvaluationFormOutput(&output, shape) + 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 with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), } } @@ -35234,7 +36181,7 @@ func (m *awsRestjson1_deserializeOpUpdatePhoneNumberMetadata) HandleDeserialize( return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdatePhoneNumberMetadata(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateEvaluationForm(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -35275,27 +36222,21 @@ func awsRestjson1_deserializeOpErrorUpdatePhoneNumberMetadata(response *smithyht } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("IdempotencyException", errorCode): - return awsRestjson1_deserializeErrorIdempotencyException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidRequestException", errorCode): - return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - - case strings.EqualFold("ResourceInUseException", errorCode): - return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -35309,14 +36250,76 @@ func awsRestjson1_deserializeOpErrorUpdatePhoneNumberMetadata(response *smithyht } } -type awsRestjson1_deserializeOpUpdatePredefinedAttribute struct { +func awsRestjson1_deserializeOpDocumentUpdateEvaluationFormOutput(v **UpdateEvaluationFormOutput, 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 *UpdateEvaluationFormOutput + if *v == nil { + sv = &UpdateEvaluationFormOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "EvaluationFormArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.EvaluationFormArn = ptr.String(jtv) + } + + case "EvaluationFormId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + } + sv.EvaluationFormId = ptr.String(jtv) + } + + case "EvaluationFormVersion": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected VersionNumber to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.EvaluationFormVersion = int32(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil } -func (*awsRestjson1_deserializeOpUpdatePredefinedAttribute) ID() string { +type awsRestjson1_deserializeOpUpdateHoursOfOperation struct { +} + +func (*awsRestjson1_deserializeOpUpdateHoursOfOperation) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdatePredefinedAttribute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateHoursOfOperation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -35334,9 +36337,9 @@ func (m *awsRestjson1_deserializeOpUpdatePredefinedAttribute) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdatePredefinedAttribute(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateHoursOfOperation(response, &metadata) } - output := &UpdatePredefinedAttributeOutput{} + output := &UpdateHoursOfOperationOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -35349,7 +36352,7 @@ func (m *awsRestjson1_deserializeOpUpdatePredefinedAttribute) HandleDeserialize( return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdatePredefinedAttribute(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateHoursOfOperation(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -35390,6 +36393,9 @@ func awsRestjson1_deserializeOpErrorUpdatePredefinedAttribute(response *smithyht } switch { + case strings.EqualFold("DuplicateResourceException", errorCode): + return awsRestjson1_deserializeErrorDuplicateResourceException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) @@ -35415,14 +36421,14 @@ func awsRestjson1_deserializeOpErrorUpdatePredefinedAttribute(response *smithyht } } -type awsRestjson1_deserializeOpUpdatePrompt struct { +type awsRestjson1_deserializeOpUpdateInstanceAttribute struct { } -func (*awsRestjson1_deserializeOpUpdatePrompt) ID() string { +func (*awsRestjson1_deserializeOpUpdateInstanceAttribute) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdatePrompt) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateInstanceAttribute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -35440,36 +36446,14 @@ func (m *awsRestjson1_deserializeOpUpdatePrompt) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdatePrompt(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateInstanceAttribute(response, &metadata) } - output := &UpdatePromptOutput{} + output := &UpdateInstanceAttributeOutput{} 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_deserializeOpDocumentUpdatePromptOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), + Err: fmt.Errorf("failed to discard response body, %w", err), } } @@ -35477,7 +36461,7 @@ func (m *awsRestjson1_deserializeOpUpdatePrompt) HandleDeserialize(ctx context.C return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdatePrompt(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateInstanceAttribute(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -35543,63 +36527,14 @@ func awsRestjson1_deserializeOpErrorUpdatePrompt(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentUpdatePromptOutput(v **UpdatePromptOutput, 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 *UpdatePromptOutput - if *v == nil { - sv = &UpdatePromptOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "PromptARN": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ARN to be of type string, got %T instead", value) - } - sv.PromptARN = ptr.String(jtv) - } - - case "PromptId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected PromptId to be of type string, got %T instead", value) - } - sv.PromptId = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpUpdateQueueHoursOfOperation struct { +type awsRestjson1_deserializeOpUpdateInstanceStorageConfig struct { } -func (*awsRestjson1_deserializeOpUpdateQueueHoursOfOperation) ID() string { +func (*awsRestjson1_deserializeOpUpdateInstanceStorageConfig) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateQueueHoursOfOperation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateInstanceStorageConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -35617,9 +36552,9 @@ func (m *awsRestjson1_deserializeOpUpdateQueueHoursOfOperation) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateQueueHoursOfOperation(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateInstanceStorageConfig(response, &metadata) } - output := &UpdateQueueHoursOfOperationOutput{} + output := &UpdateInstanceStorageConfigOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -35632,7 +36567,7 @@ func (m *awsRestjson1_deserializeOpUpdateQueueHoursOfOperation) HandleDeserializ return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateQueueHoursOfOperation(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateInstanceStorageConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -35698,14 +36633,14 @@ func awsRestjson1_deserializeOpErrorUpdateQueueHoursOfOperation(response *smithy } } -type awsRestjson1_deserializeOpUpdateQueueMaxContacts struct { +type awsRestjson1_deserializeOpUpdateParticipantRoleConfig struct { } -func (*awsRestjson1_deserializeOpUpdateQueueMaxContacts) ID() string { +func (*awsRestjson1_deserializeOpUpdateParticipantRoleConfig) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateQueueMaxContacts) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateParticipantRoleConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -35723,22 +36658,16 @@ func (m *awsRestjson1_deserializeOpUpdateQueueMaxContacts) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateQueueMaxContacts(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateParticipantRoleConfig(response, &metadata) } - output := &UpdateQueueMaxContactsOutput{} + output := &UpdateParticipantRoleConfigOutput{} 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_deserializeOpErrorUpdateQueueMaxContacts(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateParticipantRoleConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -35779,6 +36708,9 @@ func awsRestjson1_deserializeOpErrorUpdateQueueMaxContacts(response *smithyhttp. } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) @@ -35804,14 +36736,14 @@ func awsRestjson1_deserializeOpErrorUpdateQueueMaxContacts(response *smithyhttp. } } -type awsRestjson1_deserializeOpUpdateQueueName struct { +type awsRestjson1_deserializeOpUpdatePhoneNumber struct { } -func (*awsRestjson1_deserializeOpUpdateQueueName) ID() string { +func (*awsRestjson1_deserializeOpUpdatePhoneNumber) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateQueueName) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdatePhoneNumber) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -35829,14 +36761,36 @@ func (m *awsRestjson1_deserializeOpUpdateQueueName) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateQueueName(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdatePhoneNumber(response, &metadata) } - output := &UpdateQueueNameOutput{} + output := &UpdatePhoneNumberOutput{} 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) + + 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_deserializeOpDocumentUpdatePhoneNumberOutput(&output, shape) + 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 with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), } } @@ -35844,7 +36798,7 @@ func (m *awsRestjson1_deserializeOpUpdateQueueName) HandleDeserialize(ctx contex return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateQueueName(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdatePhoneNumber(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -35885,8 +36839,11 @@ func awsRestjson1_deserializeOpErrorUpdateQueueName(response *smithyhttp.Respons } switch { - case strings.EqualFold("DuplicateResourceException", errorCode): - return awsRestjson1_deserializeErrorDuplicateResourceException(response, errorBody) + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("IdempotencyException", errorCode): + return awsRestjson1_deserializeErrorIdempotencyException(response, errorBody) case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) @@ -35894,8 +36851,8 @@ func awsRestjson1_deserializeOpErrorUpdateQueueName(response *smithyhttp.Respons case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidRequestException", errorCode): - return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + case strings.EqualFold("ResourceInUseException", errorCode): + return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -35913,14 +36870,63 @@ func awsRestjson1_deserializeOpErrorUpdateQueueName(response *smithyhttp.Respons } } -type awsRestjson1_deserializeOpUpdateQueueOutboundCallerConfig struct { +func awsRestjson1_deserializeOpDocumentUpdatePhoneNumberOutput(v **UpdatePhoneNumberOutput, 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 *UpdatePhoneNumberOutput + if *v == nil { + sv = &UpdatePhoneNumberOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "PhoneNumberArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.PhoneNumberArn = ptr.String(jtv) + } + + case "PhoneNumberId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PhoneNumberId to be of type string, got %T instead", value) + } + sv.PhoneNumberId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil } -func (*awsRestjson1_deserializeOpUpdateQueueOutboundCallerConfig) ID() string { +type awsRestjson1_deserializeOpUpdatePhoneNumberMetadata struct { +} + +func (*awsRestjson1_deserializeOpUpdatePhoneNumberMetadata) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateQueueOutboundCallerConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdatePhoneNumberMetadata) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -35938,9 +36944,9 @@ func (m *awsRestjson1_deserializeOpUpdateQueueOutboundCallerConfig) HandleDeseri } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateQueueOutboundCallerConfig(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdatePhoneNumberMetadata(response, &metadata) } - output := &UpdateQueueOutboundCallerConfigOutput{} + output := &UpdatePhoneNumberMetadataOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -35953,7 +36959,7 @@ func (m *awsRestjson1_deserializeOpUpdateQueueOutboundCallerConfig) HandleDeseri return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateQueueOutboundCallerConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdatePhoneNumberMetadata(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -35994,6 +37000,12 @@ func awsRestjson1_deserializeOpErrorUpdateQueueOutboundCallerConfig(response *sm } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("IdempotencyException", errorCode): + return awsRestjson1_deserializeErrorIdempotencyException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) @@ -36003,6 +37015,9 @@ func awsRestjson1_deserializeOpErrorUpdateQueueOutboundCallerConfig(response *sm case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + case strings.EqualFold("ResourceInUseException", errorCode): + return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -36019,14 +37034,14 @@ func awsRestjson1_deserializeOpErrorUpdateQueueOutboundCallerConfig(response *sm } } -type awsRestjson1_deserializeOpUpdateQueueStatus struct { +type awsRestjson1_deserializeOpUpdatePredefinedAttribute struct { } -func (*awsRestjson1_deserializeOpUpdateQueueStatus) ID() string { +func (*awsRestjson1_deserializeOpUpdatePredefinedAttribute) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateQueueStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdatePredefinedAttribute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -36044,9 +37059,9 @@ func (m *awsRestjson1_deserializeOpUpdateQueueStatus) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateQueueStatus(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdatePredefinedAttribute(response, &metadata) } - output := &UpdateQueueStatusOutput{} + output := &UpdatePredefinedAttributeOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -36059,7 +37074,7 @@ func (m *awsRestjson1_deserializeOpUpdateQueueStatus) HandleDeserialize(ctx cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateQueueStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdatePredefinedAttribute(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -36125,14 +37140,14 @@ func awsRestjson1_deserializeOpErrorUpdateQueueStatus(response *smithyhttp.Respo } } -type awsRestjson1_deserializeOpUpdateQuickConnectConfig struct { +type awsRestjson1_deserializeOpUpdatePrompt struct { } -func (*awsRestjson1_deserializeOpUpdateQuickConnectConfig) ID() string { +func (*awsRestjson1_deserializeOpUpdatePrompt) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateQuickConnectConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdatePrompt) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -36150,9 +37165,186 @@ func (m *awsRestjson1_deserializeOpUpdateQuickConnectConfig) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateQuickConnectConfig(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdatePrompt(response, &metadata) } - output := &UpdateQuickConnectConfigOutput{} + output := &UpdatePromptOutput{} + 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_deserializeOpDocumentUpdatePromptOutput(&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_deserializeOpErrorUpdatePrompt(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("InternalServiceException", errorCode): + return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdatePromptOutput(v **UpdatePromptOutput, 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 *UpdatePromptOutput + if *v == nil { + sv = &UpdatePromptOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "PromptARN": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.PromptARN = ptr.String(jtv) + } + + case "PromptId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PromptId to be of type string, got %T instead", value) + } + sv.PromptId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateQueueHoursOfOperation struct { +} + +func (*awsRestjson1_deserializeOpUpdateQueueHoursOfOperation) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateQueueHoursOfOperation) HandleDeserialize(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_deserializeOpErrorUpdateQueueHoursOfOperation(response, &metadata) + } + output := &UpdateQueueHoursOfOperationOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -36165,7 +37357,7 @@ func (m *awsRestjson1_deserializeOpUpdateQuickConnectConfig) HandleDeserialize(c return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateQuickConnectConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateQueueHoursOfOperation(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -36231,14 +37423,14 @@ func awsRestjson1_deserializeOpErrorUpdateQuickConnectConfig(response *smithyhtt } } -type awsRestjson1_deserializeOpUpdateQuickConnectName struct { +type awsRestjson1_deserializeOpUpdateQueueMaxContacts struct { } -func (*awsRestjson1_deserializeOpUpdateQuickConnectName) ID() string { +func (*awsRestjson1_deserializeOpUpdateQueueMaxContacts) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateQuickConnectName) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateQueueMaxContacts) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -36256,9 +37448,9 @@ func (m *awsRestjson1_deserializeOpUpdateQuickConnectName) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateQuickConnectName(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateQueueMaxContacts(response, &metadata) } - output := &UpdateQuickConnectNameOutput{} + output := &UpdateQueueMaxContactsOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -36271,7 +37463,7 @@ func (m *awsRestjson1_deserializeOpUpdateQuickConnectName) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateQuickConnectName(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateQueueMaxContacts(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -36337,14 +37529,14 @@ func awsRestjson1_deserializeOpErrorUpdateQuickConnectName(response *smithyhttp. } } -type awsRestjson1_deserializeOpUpdateRoutingProfileAgentAvailabilityTimer struct { +type awsRestjson1_deserializeOpUpdateQueueName struct { } -func (*awsRestjson1_deserializeOpUpdateRoutingProfileAgentAvailabilityTimer) ID() string { +func (*awsRestjson1_deserializeOpUpdateQueueName) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateRoutingProfileAgentAvailabilityTimer) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateQueueName) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -36362,9 +37554,9 @@ func (m *awsRestjson1_deserializeOpUpdateRoutingProfileAgentAvailabilityTimer) H } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateRoutingProfileAgentAvailabilityTimer(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateQueueName(response, &metadata) } - output := &UpdateRoutingProfileAgentAvailabilityTimerOutput{} + output := &UpdateQueueNameOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -36377,7 +37569,7 @@ func (m *awsRestjson1_deserializeOpUpdateRoutingProfileAgentAvailabilityTimer) H return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateRoutingProfileAgentAvailabilityTimer(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateQueueName(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -36418,6 +37610,9 @@ func awsRestjson1_deserializeOpErrorUpdateRoutingProfileAgentAvailabilityTimer(r } switch { + case strings.EqualFold("DuplicateResourceException", errorCode): + return awsRestjson1_deserializeErrorDuplicateResourceException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) @@ -36443,14 +37638,14 @@ func awsRestjson1_deserializeOpErrorUpdateRoutingProfileAgentAvailabilityTimer(r } } -type awsRestjson1_deserializeOpUpdateRoutingProfileConcurrency struct { +type awsRestjson1_deserializeOpUpdateQueueOutboundCallerConfig struct { } -func (*awsRestjson1_deserializeOpUpdateRoutingProfileConcurrency) ID() string { +func (*awsRestjson1_deserializeOpUpdateQueueOutboundCallerConfig) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateRoutingProfileConcurrency) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateQueueOutboundCallerConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -36468,9 +37663,9 @@ func (m *awsRestjson1_deserializeOpUpdateRoutingProfileConcurrency) HandleDeseri } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateRoutingProfileConcurrency(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateQueueOutboundCallerConfig(response, &metadata) } - output := &UpdateRoutingProfileConcurrencyOutput{} + output := &UpdateQueueOutboundCallerConfigOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -36483,7 +37678,7 @@ func (m *awsRestjson1_deserializeOpUpdateRoutingProfileConcurrency) HandleDeseri return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateRoutingProfileConcurrency(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateQueueOutboundCallerConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -36549,14 +37744,14 @@ func awsRestjson1_deserializeOpErrorUpdateRoutingProfileConcurrency(response *sm } } -type awsRestjson1_deserializeOpUpdateRoutingProfileDefaultOutboundQueue struct { +type awsRestjson1_deserializeOpUpdateQueueOutboundEmailConfig struct { } -func (*awsRestjson1_deserializeOpUpdateRoutingProfileDefaultOutboundQueue) ID() string { +func (*awsRestjson1_deserializeOpUpdateQueueOutboundEmailConfig) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateRoutingProfileDefaultOutboundQueue) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateQueueOutboundEmailConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -36574,9 +37769,9 @@ func (m *awsRestjson1_deserializeOpUpdateRoutingProfileDefaultOutboundQueue) Han } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateRoutingProfileDefaultOutboundQueue(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateQueueOutboundEmailConfig(response, &metadata) } - output := &UpdateRoutingProfileDefaultOutboundQueueOutput{} + output := &UpdateQueueOutboundEmailConfigOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -36589,7 +37784,7 @@ func (m *awsRestjson1_deserializeOpUpdateRoutingProfileDefaultOutboundQueue) Han return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateRoutingProfileDefaultOutboundQueue(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateQueueOutboundEmailConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -36630,6 +37825,12 @@ func awsRestjson1_deserializeOpErrorUpdateRoutingProfileDefaultOutboundQueue(res } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConditionalOperationFailedException", errorCode): + return awsRestjson1_deserializeErrorConditionalOperationFailedException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) @@ -36655,14 +37856,14 @@ func awsRestjson1_deserializeOpErrorUpdateRoutingProfileDefaultOutboundQueue(res } } -type awsRestjson1_deserializeOpUpdateRoutingProfileName struct { +type awsRestjson1_deserializeOpUpdateQueueStatus struct { } -func (*awsRestjson1_deserializeOpUpdateRoutingProfileName) ID() string { +func (*awsRestjson1_deserializeOpUpdateQueueStatus) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateRoutingProfileName) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateQueueStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -36680,9 +37881,9 @@ func (m *awsRestjson1_deserializeOpUpdateRoutingProfileName) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateRoutingProfileName(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateQueueStatus(response, &metadata) } - output := &UpdateRoutingProfileNameOutput{} + output := &UpdateQueueStatusOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -36695,7 +37896,7 @@ func (m *awsRestjson1_deserializeOpUpdateRoutingProfileName) HandleDeserialize(c return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateRoutingProfileName(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateQueueStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -36736,9 +37937,6 @@ func awsRestjson1_deserializeOpErrorUpdateRoutingProfileName(response *smithyhtt } switch { - case strings.EqualFold("DuplicateResourceException", errorCode): - return awsRestjson1_deserializeErrorDuplicateResourceException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) @@ -36764,14 +37962,14 @@ func awsRestjson1_deserializeOpErrorUpdateRoutingProfileName(response *smithyhtt } } -type awsRestjson1_deserializeOpUpdateRoutingProfileQueues struct { +type awsRestjson1_deserializeOpUpdateQuickConnectConfig struct { } -func (*awsRestjson1_deserializeOpUpdateRoutingProfileQueues) ID() string { +func (*awsRestjson1_deserializeOpUpdateQuickConnectConfig) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateRoutingProfileQueues) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateQuickConnectConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -36789,9 +37987,9 @@ func (m *awsRestjson1_deserializeOpUpdateRoutingProfileQueues) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateRoutingProfileQueues(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateQuickConnectConfig(response, &metadata) } - output := &UpdateRoutingProfileQueuesOutput{} + output := &UpdateQuickConnectConfigOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -36804,7 +38002,7 @@ func (m *awsRestjson1_deserializeOpUpdateRoutingProfileQueues) HandleDeserialize return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateRoutingProfileQueues(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateQuickConnectConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -36870,14 +38068,14 @@ func awsRestjson1_deserializeOpErrorUpdateRoutingProfileQueues(response *smithyh } } -type awsRestjson1_deserializeOpUpdateRule struct { +type awsRestjson1_deserializeOpUpdateQuickConnectName struct { } -func (*awsRestjson1_deserializeOpUpdateRule) ID() string { +func (*awsRestjson1_deserializeOpUpdateQuickConnectName) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateRule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateQuickConnectName) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -36895,9 +38093,9 @@ func (m *awsRestjson1_deserializeOpUpdateRule) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateRule(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateQuickConnectName(response, &metadata) } - output := &UpdateRuleOutput{} + output := &UpdateQuickConnectNameOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -36910,7 +38108,7 @@ func (m *awsRestjson1_deserializeOpUpdateRule) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateRule(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateQuickConnectName(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -36951,18 +38149,15 @@ func awsRestjson1_deserializeOpErrorUpdateRule(response *smithyhttp.Response, me } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - case strings.EqualFold("ResourceConflictException", errorCode): - return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -36979,14 +38174,14 @@ func awsRestjson1_deserializeOpErrorUpdateRule(response *smithyhttp.Response, me } } -type awsRestjson1_deserializeOpUpdateSecurityProfile struct { +type awsRestjson1_deserializeOpUpdateRoutingProfileAgentAvailabilityTimer struct { } -func (*awsRestjson1_deserializeOpUpdateSecurityProfile) ID() string { +func (*awsRestjson1_deserializeOpUpdateRoutingProfileAgentAvailabilityTimer) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateSecurityProfile) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateRoutingProfileAgentAvailabilityTimer) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -37004,9 +38199,9 @@ func (m *awsRestjson1_deserializeOpUpdateSecurityProfile) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateSecurityProfile(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateRoutingProfileAgentAvailabilityTimer(response, &metadata) } - output := &UpdateSecurityProfileOutput{} + output := &UpdateRoutingProfileAgentAvailabilityTimerOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -37019,7 +38214,7 @@ func (m *awsRestjson1_deserializeOpUpdateSecurityProfile) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateSecurityProfile(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateRoutingProfileAgentAvailabilityTimer(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -37085,14 +38280,14 @@ func awsRestjson1_deserializeOpErrorUpdateSecurityProfile(response *smithyhttp.R } } -type awsRestjson1_deserializeOpUpdateTaskTemplate struct { +type awsRestjson1_deserializeOpUpdateRoutingProfileConcurrency struct { } -func (*awsRestjson1_deserializeOpUpdateTaskTemplate) ID() string { +func (*awsRestjson1_deserializeOpUpdateRoutingProfileConcurrency) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateTaskTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateRoutingProfileConcurrency) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -37110,36 +38305,14 @@ func (m *awsRestjson1_deserializeOpUpdateTaskTemplate) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateTaskTemplate(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateRoutingProfileConcurrency(response, &metadata) } - output := &UpdateTaskTemplateOutput{} + output := &UpdateRoutingProfileConcurrencyOutput{} 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_deserializeOpDocumentUpdateTaskTemplateOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), + Err: fmt.Errorf("failed to discard response body, %w", err), } } @@ -37147,7 +38320,7 @@ func (m *awsRestjson1_deserializeOpUpdateTaskTemplate) HandleDeserialize(ctx con return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateTaskTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateRoutingProfileConcurrency(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -37194,15 +38367,12 @@ func awsRestjson1_deserializeOpErrorUpdateTaskTemplate(response *smithyhttp.Resp case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("PropertyValidationException", errorCode): - return awsRestjson1_deserializeErrorPropertyValidationException(response, errorBody) + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -37216,155 +38386,14 @@ func awsRestjson1_deserializeOpErrorUpdateTaskTemplate(response *smithyhttp.Resp } } -func awsRestjson1_deserializeOpDocumentUpdateTaskTemplateOutput(v **UpdateTaskTemplateOutput, 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 *UpdateTaskTemplateOutput - if *v == nil { - sv = &UpdateTaskTemplateOutput{} - } 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 TaskTemplateArn to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - - case "Constraints": - if err := awsRestjson1_deserializeDocumentTaskTemplateConstraints(&sv.Constraints, value); err != nil { - return err - } - - case "ContactFlowId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ContactFlowId to be of type string, got %T instead", value) - } - sv.ContactFlowId = ptr.String(jtv) - } - - case "CreatedTime": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CreatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - - } - } - - case "Defaults": - if err := awsRestjson1_deserializeDocumentTaskTemplateDefaults(&sv.Defaults, value); err != nil { - return err - } - - case "Description": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected TaskTemplateDescription to be of type string, got %T instead", value) - } - sv.Description = ptr.String(jtv) - } - - case "Fields": - if err := awsRestjson1_deserializeDocumentTaskTemplateFields(&sv.Fields, value); err != nil { - return err - } - - case "Id": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected TaskTemplateId to be of type string, got %T instead", value) - } - sv.Id = ptr.String(jtv) - } - - case "InstanceId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected InstanceId to be of type string, got %T instead", value) - } - sv.InstanceId = ptr.String(jtv) - } - - case "LastModifiedTime": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - - } - } - - case "Name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected TaskTemplateName 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 TaskTemplateStatus to be of type string, got %T instead", value) - } - sv.Status = types.TaskTemplateStatus(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpUpdateTrafficDistribution struct { +type awsRestjson1_deserializeOpUpdateRoutingProfileDefaultOutboundQueue struct { } -func (*awsRestjson1_deserializeOpUpdateTrafficDistribution) ID() string { +func (*awsRestjson1_deserializeOpUpdateRoutingProfileDefaultOutboundQueue) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateTrafficDistribution) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateRoutingProfileDefaultOutboundQueue) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -37382,16 +38411,22 @@ func (m *awsRestjson1_deserializeOpUpdateTrafficDistribution) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateTrafficDistribution(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateRoutingProfileDefaultOutboundQueue(response, &metadata) } - output := &UpdateTrafficDistributionOutput{} + output := &UpdateRoutingProfileDefaultOutboundQueueOutput{} 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_deserializeOpErrorUpdateTrafficDistribution(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateRoutingProfileDefaultOutboundQueue(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -37432,18 +38467,15 @@ func awsRestjson1_deserializeOpErrorUpdateTrafficDistribution(response *smithyht } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - case strings.EqualFold("ResourceConflictException", errorCode): - return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -37460,14 +38492,14 @@ func awsRestjson1_deserializeOpErrorUpdateTrafficDistribution(response *smithyht } } -type awsRestjson1_deserializeOpUpdateUserHierarchy struct { +type awsRestjson1_deserializeOpUpdateRoutingProfileName struct { } -func (*awsRestjson1_deserializeOpUpdateUserHierarchy) ID() string { +func (*awsRestjson1_deserializeOpUpdateRoutingProfileName) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateUserHierarchy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateRoutingProfileName) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -37485,9 +38517,9 @@ func (m *awsRestjson1_deserializeOpUpdateUserHierarchy) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateUserHierarchy(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateRoutingProfileName(response, &metadata) } - output := &UpdateUserHierarchyOutput{} + output := &UpdateRoutingProfileNameOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -37500,7 +38532,7 @@ func (m *awsRestjson1_deserializeOpUpdateUserHierarchy) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateUserHierarchy(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateRoutingProfileName(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -37541,6 +38573,9 @@ func awsRestjson1_deserializeOpErrorUpdateUserHierarchy(response *smithyhttp.Res } switch { + case strings.EqualFold("DuplicateResourceException", errorCode): + return awsRestjson1_deserializeErrorDuplicateResourceException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) @@ -37566,14 +38601,14 @@ func awsRestjson1_deserializeOpErrorUpdateUserHierarchy(response *smithyhttp.Res } } -type awsRestjson1_deserializeOpUpdateUserHierarchyGroupName struct { +type awsRestjson1_deserializeOpUpdateRoutingProfileQueues struct { } -func (*awsRestjson1_deserializeOpUpdateUserHierarchyGroupName) ID() string { +func (*awsRestjson1_deserializeOpUpdateRoutingProfileQueues) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateUserHierarchyGroupName) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateRoutingProfileQueues) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -37591,9 +38626,9 @@ func (m *awsRestjson1_deserializeOpUpdateUserHierarchyGroupName) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateUserHierarchyGroupName(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateRoutingProfileQueues(response, &metadata) } - output := &UpdateUserHierarchyGroupNameOutput{} + output := &UpdateRoutingProfileQueuesOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -37606,7 +38641,7 @@ func (m *awsRestjson1_deserializeOpUpdateUserHierarchyGroupName) HandleDeseriali return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateUserHierarchyGroupName(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateRoutingProfileQueues(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -37647,9 +38682,6 @@ func awsRestjson1_deserializeOpErrorUpdateUserHierarchyGroupName(response *smith } switch { - case strings.EqualFold("DuplicateResourceException", errorCode): - return awsRestjson1_deserializeErrorDuplicateResourceException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) @@ -37675,14 +38707,14 @@ func awsRestjson1_deserializeOpErrorUpdateUserHierarchyGroupName(response *smith } } -type awsRestjson1_deserializeOpUpdateUserHierarchyStructure struct { +type awsRestjson1_deserializeOpUpdateRule struct { } -func (*awsRestjson1_deserializeOpUpdateUserHierarchyStructure) ID() string { +func (*awsRestjson1_deserializeOpUpdateRule) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateUserHierarchyStructure) 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) @@ -37700,9 +38732,9 @@ func (m *awsRestjson1_deserializeOpUpdateUserHierarchyStructure) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateUserHierarchyStructure(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateRule(response, &metadata) } - output := &UpdateUserHierarchyStructureOutput{} + output := &UpdateRuleOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -37715,7 +38747,7 @@ func (m *awsRestjson1_deserializeOpUpdateUserHierarchyStructure) HandleDeseriali return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateUserHierarchyStructure(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)} @@ -37756,17 +38788,17 @@ func awsRestjson1_deserializeOpErrorUpdateUserHierarchyStructure(response *smith } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - case strings.EqualFold("ResourceInUseException", errorCode): - return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -37784,14 +38816,14 @@ func awsRestjson1_deserializeOpErrorUpdateUserHierarchyStructure(response *smith } } -type awsRestjson1_deserializeOpUpdateUserIdentityInfo struct { +type awsRestjson1_deserializeOpUpdateSecurityProfile struct { } -func (*awsRestjson1_deserializeOpUpdateUserIdentityInfo) ID() string { +func (*awsRestjson1_deserializeOpUpdateSecurityProfile) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateUserIdentityInfo) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateSecurityProfile) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -37809,9 +38841,9 @@ func (m *awsRestjson1_deserializeOpUpdateUserIdentityInfo) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateUserIdentityInfo(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateSecurityProfile(response, &metadata) } - output := &UpdateUserIdentityInfoOutput{} + output := &UpdateSecurityProfileOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -37824,7 +38856,7 @@ func (m *awsRestjson1_deserializeOpUpdateUserIdentityInfo) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateUserIdentityInfo(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateSecurityProfile(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -37890,14 +38922,14 @@ func awsRestjson1_deserializeOpErrorUpdateUserIdentityInfo(response *smithyhttp. } } -type awsRestjson1_deserializeOpUpdateUserPhoneConfig struct { +type awsRestjson1_deserializeOpUpdateTaskTemplate struct { } -func (*awsRestjson1_deserializeOpUpdateUserPhoneConfig) ID() string { +func (*awsRestjson1_deserializeOpUpdateTaskTemplate) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateUserPhoneConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateTaskTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -37915,14 +38947,36 @@ func (m *awsRestjson1_deserializeOpUpdateUserPhoneConfig) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateUserPhoneConfig(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateTaskTemplate(response, &metadata) } - output := &UpdateUserPhoneConfigOutput{} + output := &UpdateTaskTemplateOutput{} 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) + + 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_deserializeOpDocumentUpdateTaskTemplateOutput(&output, shape) + 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 with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), } } @@ -37930,7 +38984,7 @@ func (m *awsRestjson1_deserializeOpUpdateUserPhoneConfig) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateUserPhoneConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateTaskTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -37977,12 +39031,15 @@ func awsRestjson1_deserializeOpErrorUpdateUserPhoneConfig(response *smithyhttp.R case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidRequestException", errorCode): - return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + case strings.EqualFold("PropertyValidationException", errorCode): + return awsRestjson1_deserializeErrorPropertyValidationException(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) @@ -37996,14 +39053,164 @@ func awsRestjson1_deserializeOpErrorUpdateUserPhoneConfig(response *smithyhttp.R } } -type awsRestjson1_deserializeOpUpdateUserProficiencies struct { +func awsRestjson1_deserializeOpDocumentUpdateTaskTemplateOutput(v **UpdateTaskTemplateOutput, 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 *UpdateTaskTemplateOutput + if *v == nil { + sv = &UpdateTaskTemplateOutput{} + } 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 TaskTemplateArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "Constraints": + if err := awsRestjson1_deserializeDocumentTaskTemplateConstraints(&sv.Constraints, value); err != nil { + return err + } + + case "ContactFlowId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ContactFlowId to be of type string, got %T instead", value) + } + sv.ContactFlowId = ptr.String(jtv) + } + + case "CreatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Defaults": + if err := awsRestjson1_deserializeDocumentTaskTemplateDefaults(&sv.Defaults, value); err != nil { + return err + } + + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TaskTemplateDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "Fields": + if err := awsRestjson1_deserializeDocumentTaskTemplateFields(&sv.Fields, value); err != nil { + return err + } + + case "Id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TaskTemplateId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "InstanceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InstanceId to be of type string, got %T instead", value) + } + sv.InstanceId = ptr.String(jtv) + } + + case "LastModifiedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TaskTemplateName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "SelfAssignFlowId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ContactFlowId to be of type string, got %T instead", value) + } + sv.SelfAssignFlowId = ptr.String(jtv) + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TaskTemplateStatus to be of type string, got %T instead", value) + } + sv.Status = types.TaskTemplateStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil } -func (*awsRestjson1_deserializeOpUpdateUserProficiencies) ID() string { +type awsRestjson1_deserializeOpUpdateTrafficDistribution struct { +} + +func (*awsRestjson1_deserializeOpUpdateTrafficDistribution) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateUserProficiencies) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateTrafficDistribution) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -38021,22 +39228,661 @@ func (m *awsRestjson1_deserializeOpUpdateUserProficiencies) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateUserProficiencies(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateTrafficDistribution(response, &metadata) } - output := &UpdateUserProficienciesOutput{} + output := &UpdateTrafficDistributionOutput{} 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_deserializeOpErrorUpdateUserProficiencies(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateTrafficDistribution(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("InternalServiceException", errorCode): + return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpUpdateUserHierarchy struct { +} + +func (*awsRestjson1_deserializeOpUpdateUserHierarchy) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateUserHierarchy) HandleDeserialize(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_deserializeOpErrorUpdateUserHierarchy(response, &metadata) + } + output := &UpdateUserHierarchyOutput{} + 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_deserializeOpErrorUpdateUserHierarchy(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("InternalServiceException", errorCode): + return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpUpdateUserHierarchyGroupName struct { +} + +func (*awsRestjson1_deserializeOpUpdateUserHierarchyGroupName) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateUserHierarchyGroupName) HandleDeserialize(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_deserializeOpErrorUpdateUserHierarchyGroupName(response, &metadata) + } + output := &UpdateUserHierarchyGroupNameOutput{} + 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_deserializeOpErrorUpdateUserHierarchyGroupName(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("DuplicateResourceException", errorCode): + return awsRestjson1_deserializeErrorDuplicateResourceException(response, errorBody) + + case strings.EqualFold("InternalServiceException", errorCode): + return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpUpdateUserHierarchyStructure struct { +} + +func (*awsRestjson1_deserializeOpUpdateUserHierarchyStructure) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateUserHierarchyStructure) HandleDeserialize(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_deserializeOpErrorUpdateUserHierarchyStructure(response, &metadata) + } + output := &UpdateUserHierarchyStructureOutput{} + 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_deserializeOpErrorUpdateUserHierarchyStructure(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("InternalServiceException", errorCode): + return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceInUseException", errorCode): + return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpUpdateUserIdentityInfo struct { +} + +func (*awsRestjson1_deserializeOpUpdateUserIdentityInfo) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateUserIdentityInfo) HandleDeserialize(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_deserializeOpErrorUpdateUserIdentityInfo(response, &metadata) + } + output := &UpdateUserIdentityInfoOutput{} + 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_deserializeOpErrorUpdateUserIdentityInfo(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("InternalServiceException", errorCode): + return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpUpdateUserPhoneConfig struct { +} + +func (*awsRestjson1_deserializeOpUpdateUserPhoneConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateUserPhoneConfig) HandleDeserialize(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_deserializeOpErrorUpdateUserPhoneConfig(response, &metadata) + } + output := &UpdateUserPhoneConfigOutput{} + 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_deserializeOpErrorUpdateUserPhoneConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("InternalServiceException", errorCode): + return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpUpdateUserProficiencies struct { +} + +func (*awsRestjson1_deserializeOpUpdateUserProficiencies) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateUserProficiencies) HandleDeserialize(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_deserializeOpErrorUpdateUserProficiencies(response, &metadata) + } + output := &UpdateUserProficienciesOutput{} + 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_deserializeOpErrorUpdateUserProficiencies(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -38301,8 +40147,287 @@ func awsRestjson1_deserializeOpErrorUpdateUserSecurityProfiles(response *smithyh case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): - return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpUpdateViewContent struct { +} + +func (*awsRestjson1_deserializeOpUpdateViewContent) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateViewContent) HandleDeserialize(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_deserializeOpErrorUpdateViewContent(response, &metadata) + } + output := &UpdateViewContentOutput{} + 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_deserializeOpDocumentUpdateViewContentOutput(&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_deserializeOpErrorUpdateViewContent(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("InternalServiceException", errorCode): + return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceInUseException", errorCode): + return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateViewContentOutput(v **UpdateViewContentOutput, 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 *UpdateViewContentOutput + if *v == nil { + sv = &UpdateViewContentOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "View": + if err := awsRestjson1_deserializeDocumentView(&sv.View, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateViewMetadata struct { +} + +func (*awsRestjson1_deserializeOpUpdateViewMetadata) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateViewMetadata) HandleDeserialize(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_deserializeOpErrorUpdateViewMetadata(response, &metadata) + } + output := &UpdateViewMetadataOutput{} + out.Result = output + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateViewMetadata(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("DuplicateResourceException", errorCode): + return awsRestjson1_deserializeErrorDuplicateResourceException(response, errorBody) + + case strings.EqualFold("InternalServiceException", errorCode): + return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceInUseException", errorCode): + return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -38314,91 +40439,16 @@ func awsRestjson1_deserializeOpErrorUpdateUserSecurityProfiles(response *smithyh } } -type awsRestjson1_deserializeOpUpdateViewContent struct { -} - -func (*awsRestjson1_deserializeOpUpdateViewContent) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpUpdateViewContent) HandleDeserialize(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_deserializeOpErrorUpdateViewContent(response, &metadata) - } - output := &UpdateViewContentOutput{} - out.Result = output - +func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.AccessDeniedException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - + body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentUpdateViewContentOutput(&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_deserializeOpErrorUpdateViewContent(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.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{ @@ -38408,138 +40458,8 @@ func awsRestjson1_deserializeOpErrorUpdateViewContent(response *smithyhttp.Respo 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("InternalServiceException", errorCode): - return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) - - case strings.EqualFold("InvalidParameterException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - - case strings.EqualFold("InvalidRequestException", errorCode): - return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - - case strings.EqualFold("ResourceInUseException", errorCode): - return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("TooManyRequestsException", errorCode): - return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentUpdateViewContentOutput(v **UpdateViewContentOutput, 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 *UpdateViewContentOutput - if *v == nil { - sv = &UpdateViewContentOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "View": - if err := awsRestjson1_deserializeDocumentView(&sv.View, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpUpdateViewMetadata struct { -} - -func (*awsRestjson1_deserializeOpUpdateViewMetadata) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpUpdateViewMetadata) HandleDeserialize(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_deserializeOpErrorUpdateViewMetadata(response, &metadata) - } - output := &UpdateViewMetadataOutput{} - out.Result = output - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorUpdateViewMetadata(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.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[:]) + err := awsRestjson1_deserializeDocumentAccessDeniedException(&output, shape) - 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) @@ -38551,50 +40471,12 @@ func awsRestjson1_deserializeOpErrorUpdateViewMetadata(response *smithyhttp.Resp } 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("DuplicateResourceException", errorCode): - return awsRestjson1_deserializeErrorDuplicateResourceException(response, errorBody) - - case strings.EqualFold("InternalServiceException", errorCode): - return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) - - case strings.EqualFold("InvalidParameterException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - - case strings.EqualFold("InvalidRequestException", errorCode): - return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - - case strings.EqualFold("ResourceInUseException", errorCode): - return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("TooManyRequestsException", errorCode): - return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } + return output } -func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.AccessDeniedException{} +func awsRestjson1_deserializeErrorConditionalOperationFailedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ConditionalOperationFailedException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -38612,7 +40494,7 @@ func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Res return err } - err := awsRestjson1_deserializeDocumentAccessDeniedException(&output, shape) + err := awsRestjson1_deserializeDocumentConditionalOperationFailedException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -39607,6 +41489,47 @@ func awsRestjson1_deserializeDocumentActionSummary(v **types.ActionSummary, valu return nil } +func awsRestjson1_deserializeDocumentAdditionalEmailRecipients(v **types.AdditionalEmailRecipients, 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.AdditionalEmailRecipients + if *v == nil { + sv = &types.AdditionalEmailRecipients{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CcList": + if err := awsRestjson1_deserializeDocumentEmailRecipientsList(&sv.CcList, value); err != nil { + return err + } + + case "ToList": + if err := awsRestjson1_deserializeDocumentEmailRecipientsList(&sv.ToList, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentAgentConfig(v **types.AgentConfig, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -40649,6 +42572,166 @@ func awsRestjson1_deserializeDocumentAssignContactCategoryActionDefinition(v **t return nil } +func awsRestjson1_deserializeDocumentAssociatedContactSummary(v **types.AssociatedContactSummary, 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.AssociatedContactSummary + if *v == nil { + sv = &types.AssociatedContactSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Channel": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Channel to be of type string, got %T instead", value) + } + sv.Channel = types.Channel(jtv) + } + + case "ContactArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.ContactArn = ptr.String(jtv) + } + + case "ContactId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ContactId to be of type string, got %T instead", value) + } + sv.ContactId = ptr.String(jtv) + } + + case "DisconnectTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.DisconnectTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "InitialContactId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ContactId to be of type string, got %T instead", value) + } + sv.InitialContactId = ptr.String(jtv) + } + + case "InitiationMethod": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ContactInitiationMethod to be of type string, got %T instead", value) + } + sv.InitiationMethod = types.ContactInitiationMethod(jtv) + } + + case "InitiationTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.InitiationTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "PreviousContactId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ContactId to be of type string, got %T instead", value) + } + sv.PreviousContactId = ptr.String(jtv) + } + + case "RelatedContactId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ContactId to be of type string, got %T instead", value) + } + sv.RelatedContactId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAssociatedContactSummaryList(v *[]types.AssociatedContactSummary, 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.AssociatedContactSummary + if *v == nil { + cv = []types.AssociatedContactSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AssociatedContactSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentAssociatedContactSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentAssociatedQueueIdList(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -40950,6 +43033,15 @@ func awsRestjson1_deserializeDocumentAttachmentReference(v **types.AttachmentRef for key, value := range shape { switch key { + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReferenceArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + case "Name": if value != nil { jtv, ok := value.(string) @@ -41934,6 +44026,46 @@ func awsRestjson1_deserializeDocumentClaimedPhoneNumberSummary(v **types.Claimed return nil } +func awsRestjson1_deserializeDocumentConditionalOperationFailedException(v **types.ConditionalOperationFailedException, 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.ConditionalOperationFailedException + if *v == nil { + sv = &types.ConditionalOperationFailedException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "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 awsRestjson1_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -42037,6 +44169,11 @@ func awsRestjson1_deserializeDocumentContact(v **types.Contact, value interface{ for key, value := range shape { switch key { + case "AdditionalEmailRecipients": + if err := awsRestjson1_deserializeDocumentAdditionalEmailRecipients(&sv.AdditionalEmailRecipients, value); err != nil { + return err + } + case "AgentInfo": if err := awsRestjson1_deserializeDocumentAgentInfo(&sv.AgentInfo, value); err != nil { return err @@ -42090,11 +44227,25 @@ func awsRestjson1_deserializeDocumentContact(v **types.Contact, value interface{ } } + case "ContactAssociationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ContactId to be of type string, got %T instead", value) + } + sv.ContactAssociationId = ptr.String(jtv) + } + case "Customer": if err := awsRestjson1_deserializeDocumentCustomer(&sv.Customer, value); err != nil { return err } + case "CustomerEndpoint": + if err := awsRestjson1_deserializeDocumentEndpointInfo(&sv.CustomerEndpoint, value); err != nil { + return err + } + case "CustomerVoiceActivity": if err := awsRestjson1_deserializeDocumentCustomerVoiceActivity(&sv.CustomerVoiceActivity, value); err != nil { return err @@ -42310,6 +44461,11 @@ func awsRestjson1_deserializeDocumentContact(v **types.Contact, value interface{ return err } + case "SystemEndpoint": + if err := awsRestjson1_deserializeDocumentEndpointInfo(&sv.SystemEndpoint, value); err != nil { + return err + } + case "Tags": if err := awsRestjson1_deserializeDocumentContactTagMap(&sv.Tags, value); err != nil { return err @@ -43294,6 +45450,11 @@ func awsRestjson1_deserializeDocumentContactSearchSummary(v **types.ContactSearc } } + case "SegmentAttributes": + if err := awsRestjson1_deserializeDocumentContactSearchSummarySegmentAttributes(&sv.SegmentAttributes, value); err != nil { + return err + } + default: _, _ = key, value @@ -43415,6 +45576,81 @@ func awsRestjson1_deserializeDocumentContactSearchSummaryQueueInfo(v **types.Con return nil } +func awsRestjson1_deserializeDocumentContactSearchSummarySegmentAttributes(v *map[string]types.ContactSearchSummarySegmentAttributeValue, 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]types.ContactSearchSummarySegmentAttributeValue + if *v == nil { + mv = map[string]types.ContactSearchSummarySegmentAttributeValue{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal types.ContactSearchSummarySegmentAttributeValue + mapVar := parsedVal + destAddr := &mapVar + if err := awsRestjson1_deserializeDocumentContactSearchSummarySegmentAttributeValue(&destAddr, value); err != nil { + return err + } + parsedVal = *destAddr + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentContactSearchSummarySegmentAttributeValue(v **types.ContactSearchSummarySegmentAttributeValue, 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.ContactSearchSummarySegmentAttributeValue + if *v == nil { + sv = &types.ContactSearchSummarySegmentAttributeValue{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ValueString": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SegmentAttributeValueString to be of type string, got %T instead", value) + } + sv.ValueString = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentContactTagMap(v *map[string]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -44634,6 +46870,248 @@ func awsRestjson1_deserializeDocumentDuplicateResourceException(v **types.Duplic return nil } +func awsRestjson1_deserializeDocumentEmailAddressList(v *[]types.EmailAddressMetadata, 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.EmailAddressMetadata + if *v == nil { + cv = []types.EmailAddressMetadata{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.EmailAddressMetadata + destAddr := &col + if err := awsRestjson1_deserializeDocumentEmailAddressMetadata(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentEmailAddressMetadata(v **types.EmailAddressMetadata, 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.EmailAddressMetadata + if *v == nil { + sv = &types.EmailAddressMetadata{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Description to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "DisplayName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EmailAddressDisplayName to be of type string, got %T instead", value) + } + sv.DisplayName = ptr.String(jtv) + } + + case "EmailAddress": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EmailAddress to be of type string, got %T instead", value) + } + sv.EmailAddress = ptr.String(jtv) + } + + case "EmailAddressArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EmailAddressArn to be of type string, got %T instead", value) + } + sv.EmailAddressArn = ptr.String(jtv) + } + + case "EmailAddressId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EmailAddressId to be of type string, got %T instead", value) + } + sv.EmailAddressId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEmailMessageReference(v **types.EmailMessageReference, 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.EmailMessageReference + if *v == nil { + sv = &types.EmailMessageReference{} + } 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 ReferenceArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReferenceKey to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEmailRecipient(v **types.EmailRecipient, 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.EmailRecipient + if *v == nil { + sv = &types.EmailRecipient{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Address": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EndpointAddress to be of type string, got %T instead", value) + } + sv.Address = ptr.String(jtv) + } + + case "DisplayName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EndpointDisplayName to be of type string, got %T instead", value) + } + sv.DisplayName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEmailRecipientsList(v *[]types.EmailRecipient, 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.EmailRecipient + if *v == nil { + cv = []types.EmailRecipient{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.EmailRecipient + destAddr := &col + if err := awsRestjson1_deserializeDocumentEmailRecipient(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentEmailReference(v **types.EmailReference, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -44794,6 +47272,64 @@ func awsRestjson1_deserializeDocumentEndAssociatedTasksActionDefinition(v **type return nil } +func awsRestjson1_deserializeDocumentEndpointInfo(v **types.EndpointInfo, 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.EndpointInfo + if *v == nil { + sv = &types.EndpointInfo{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Address": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EndpointAddress to be of type string, got %T instead", value) + } + sv.Address = ptr.String(jtv) + } + + case "DisplayName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EndpointDisplayName to be of type string, got %T instead", value) + } + sv.DisplayName = ptr.String(jtv) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EndpointType to be of type string, got %T instead", value) + } + sv.Type = types.EndpointType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentErrorResult(v **types.ErrorResult, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -51409,6 +53945,46 @@ func awsRestjson1_deserializeDocumentOutboundContactNotPermittedException(v **ty return nil } +func awsRestjson1_deserializeDocumentOutboundEmailConfig(v **types.OutboundEmailConfig, 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.OutboundEmailConfig + if *v == nil { + sv = &types.OutboundEmailConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "OutboundEmailAddressId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EmailAddressId to be of type string, got %T instead", value) + } + sv.OutboundEmailAddressId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentOutputTypeNotFoundException(v **types.OutputTypeNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -52687,6 +55263,11 @@ func awsRestjson1_deserializeDocumentQueue(v **types.Queue, value interface{}) e return err } + case "OutboundEmailConfig": + if err := awsRestjson1_deserializeDocumentOutboundEmailConfig(&sv.OutboundEmailConfig, value); err != nil { + return err + } + case "QueueArn": if value != nil { jtv, ok := value.(string) @@ -54617,6 +57198,33 @@ func awsRestjson1_deserializeDocumentReference(v **types.Reference, value interf for key, value := range shape { switch key { + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReferenceArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReferenceStatus to be of type string, got %T instead", value) + } + sv.Status = types.ReferenceStatus(jtv) + } + + case "StatusReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReferenceStatusReason to be of type string, got %T instead", value) + } + sv.StatusReason = ptr.String(jtv) + } + case "Type": if value != nil { jtv, ok := value.(string) @@ -54694,6 +57302,16 @@ loop: uv = &types.ReferenceSummaryMemberEmail{Value: mv} break loop + case "EmailMessage": + var mv types.EmailMessageReference + destAddr := &mv + if err := awsRestjson1_deserializeDocumentEmailMessageReference(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.ReferenceSummaryMemberEmailMessage{Value: mv} + break loop + case "Number": var mv types.NumberReference destAddr := &mv @@ -56892,6 +59510,11 @@ func awsRestjson1_deserializeDocumentServiceQuotaExceededException(v **types.Ser sv.Message = ptr.String(jtv) } + case "Reason": + if err := awsRestjson1_deserializeDocumentServiceQuotaExceededExceptionReason(&sv.Reason, value); err != nil { + return err + } + default: _, _ = key, value @@ -56901,6 +59524,48 @@ func awsRestjson1_deserializeDocumentServiceQuotaExceededException(v **types.Ser return nil } +func awsRestjson1_deserializeDocumentServiceQuotaExceededExceptionReason(v *types.ServiceQuotaExceededExceptionReason, 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.ServiceQuotaExceededExceptionReason +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "AttachedFileServiceQuotaExceededExceptionReason": + var mv types.AttachedFileServiceQuotaExceededExceptionReason + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AttachedFileServiceQuotaExceededExceptionReason to be of type string, got %T instead", value) + } + mv = types.AttachedFileServiceQuotaExceededExceptionReason(jtv) + } + uv = &types.ServiceQuotaExceededExceptionReasonMemberAttachedFileServiceQuotaExceededExceptionReason{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + return nil +} + func awsRestjson1_deserializeDocumentSignInConfig(v **types.SignInConfig, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/connect/generated.json b/service/connect/generated.json index 3f99662b1c3..7b1acded4a9 100644 --- a/service/connect/generated.json +++ b/service/connect/generated.json @@ -31,9 +31,11 @@ "api_op_ClaimPhoneNumber.go", "api_op_CompleteAttachedFileUpload.go", "api_op_CreateAgentStatus.go", + "api_op_CreateContact.go", "api_op_CreateContactFlow.go", "api_op_CreateContactFlowModule.go", "api_op_CreateContactFlowVersion.go", + "api_op_CreateEmailAddress.go", "api_op_CreateEvaluationForm.go", "api_op_CreateHoursOfOperation.go", "api_op_CreateInstance.go", @@ -60,6 +62,7 @@ "api_op_DeleteContactEvaluation.go", "api_op_DeleteContactFlow.go", "api_op_DeleteContactFlowModule.go", + "api_op_DeleteEmailAddress.go", "api_op_DeleteEvaluationForm.go", "api_op_DeleteHoursOfOperation.go", "api_op_DeleteInstance.go", @@ -85,6 +88,7 @@ "api_op_DescribeContactEvaluation.go", "api_op_DescribeContactFlow.go", "api_op_DescribeContactFlowModule.go", + "api_op_DescribeEmailAddress.go", "api_op_DescribeEvaluationForm.go", "api_op_DescribeHoursOfOperation.go", "api_op_DescribeInstance.go", @@ -133,6 +137,7 @@ "api_op_ListAgentStatuses.go", "api_op_ListAnalyticsDataAssociations.go", "api_op_ListApprovedOrigins.go", + "api_op_ListAssociatedContacts.go", "api_op_ListAuthenticationProfiles.go", "api_op_ListBots.go", "api_op_ListContactEvaluations.go", @@ -188,6 +193,7 @@ "api_op_SearchContactFlowModules.go", "api_op_SearchContactFlows.go", "api_op_SearchContacts.go", + "api_op_SearchEmailAddresses.go", "api_op_SearchHoursOfOperations.go", "api_op_SearchPredefinedAttributes.go", "api_op_SearchPrompts.go", @@ -200,12 +206,15 @@ "api_op_SearchUsers.go", "api_op_SearchVocabularies.go", "api_op_SendChatIntegrationEvent.go", + "api_op_SendOutboundEmail.go", "api_op_StartAttachedFileUpload.go", "api_op_StartChatContact.go", "api_op_StartContactEvaluation.go", "api_op_StartContactRecording.go", "api_op_StartContactStreaming.go", + "api_op_StartEmailContact.go", "api_op_StartOutboundChatContact.go", + "api_op_StartOutboundEmailContact.go", "api_op_StartOutboundVoiceContact.go", "api_op_StartScreenSharing.go", "api_op_StartTaskContact.go", @@ -232,6 +241,7 @@ "api_op_UpdateContactFlowName.go", "api_op_UpdateContactRoutingData.go", "api_op_UpdateContactSchedule.go", + "api_op_UpdateEmailAddressMetadata.go", "api_op_UpdateEvaluationForm.go", "api_op_UpdateHoursOfOperation.go", "api_op_UpdateInstanceAttribute.go", @@ -245,6 +255,7 @@ "api_op_UpdateQueueMaxContacts.go", "api_op_UpdateQueueName.go", "api_op_UpdateQueueOutboundCallerConfig.go", + "api_op_UpdateQueueOutboundEmailConfig.go", "api_op_UpdateQueueStatus.go", "api_op_UpdateQuickConnectConfig.go", "api_op_UpdateQuickConnectName.go", diff --git a/service/connect/serializers.go b/service/connect/serializers.go index 599a4bf58bf..33ec4aed548 100644 --- a/service/connect/serializers.go +++ b/service/connect/serializers.go @@ -2333,6 +2333,155 @@ func awsRestjson1_serializeOpDocumentCreateAgentStatusInput(v *CreateAgentStatus return nil } +type awsRestjson1_serializeOpCreateContact struct { +} + +func (*awsRestjson1_serializeOpCreateContact) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateContact) 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.(*CreateContactInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/contact/create-contact") + 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} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateContactInput(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_serializeOpHttpBindingsCreateContactInput(v *CreateContactInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateContactInput(v *CreateContactInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Attributes != nil { + ok := object.Key("Attributes") + if err := awsRestjson1_serializeDocumentAttributes(v.Attributes, ok); err != nil { + return err + } + } + + if len(v.Channel) > 0 { + ok := object.Key("Channel") + ok.String(string(v.Channel)) + } + + 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.ExpiryDurationInMinutes != nil { + ok := object.Key("ExpiryDurationInMinutes") + ok.Integer(*v.ExpiryDurationInMinutes) + } + + if len(v.InitiateAs) > 0 { + ok := object.Key("InitiateAs") + ok.String(string(v.InitiateAs)) + } + + if len(v.InitiationMethod) > 0 { + ok := object.Key("InitiationMethod") + ok.String(string(v.InitiationMethod)) + } + + if v.InstanceId != nil { + ok := object.Key("InstanceId") + ok.String(*v.InstanceId) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.References != nil { + ok := object.Key("References") + if err := awsRestjson1_serializeDocumentContactReferences(v.References, ok); err != nil { + return err + } + } + + if v.RelatedContactId != nil { + ok := object.Key("RelatedContactId") + ok.String(*v.RelatedContactId) + } + + if v.SegmentAttributes != nil { + ok := object.Key("SegmentAttributes") + if err := awsRestjson1_serializeDocumentSegmentAttributes(v.SegmentAttributes, ok); err != nil { + return err + } + } + + if v.UserInfo != nil { + ok := object.Key("UserInfo") + if err := awsRestjson1_serializeDocumentUserInfo(v.UserInfo, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpCreateContactFlow struct { } @@ -2688,6 +2837,122 @@ func awsRestjson1_serializeOpDocumentCreateContactFlowVersionInput(v *CreateCont return nil } +type awsRestjson1_serializeOpCreateEmailAddress struct { +} + +func (*awsRestjson1_serializeOpCreateEmailAddress) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateEmailAddress) 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.(*CreateEmailAddressInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/email-addresses/{InstanceId}") + 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_serializeOpHttpBindingsCreateEmailAddressInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateEmailAddressInput(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_serializeOpHttpBindingsCreateEmailAddressInput(v *CreateEmailAddressInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.InstanceId == nil || len(*v.InstanceId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member InstanceId must not be empty")} + } + if v.InstanceId != nil { + if err := encoder.SetURI("InstanceId").String(*v.InstanceId); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateEmailAddressInput(v *CreateEmailAddressInput, 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.EmailAddress != nil { + ok := object.Key("EmailAddress") + ok.String(*v.EmailAddress) + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpCreateEvaluationForm struct { } @@ -3694,6 +3959,13 @@ func awsRestjson1_serializeOpDocumentCreateQueueInput(v *CreateQueueInput, value } } + if v.OutboundEmailConfig != nil { + ok := object.Key("OutboundEmailConfig") + if err := awsRestjson1_serializeDocumentOutboundEmailConfig(v.OutboundEmailConfig, ok); err != nil { + return err + } + } + if v.QuickConnectIds != nil { ok := object.Key("QuickConnectIds") if err := awsRestjson1_serializeDocumentQuickConnectsList(v.QuickConnectIds, ok); err != nil { @@ -4350,6 +4622,11 @@ func awsRestjson1_serializeOpDocumentCreateTaskTemplateInput(v *CreateTaskTempla ok.String(*v.Name) } + if v.SelfAssignFlowId != nil { + ok := object.Key("SelfAssignFlowId") + ok.String(*v.SelfAssignFlowId) + } + if len(v.Status) > 0 { ok := object.Key("Status") ok.String(string(v.Status)) @@ -5593,14 +5870,14 @@ func awsRestjson1_serializeOpHttpBindingsDeleteContactFlowModuleInput(v *DeleteC return nil } -type awsRestjson1_serializeOpDeleteEvaluationForm struct { +type awsRestjson1_serializeOpDeleteEmailAddress struct { } -func (*awsRestjson1_serializeOpDeleteEvaluationForm) ID() string { +func (*awsRestjson1_serializeOpDeleteEmailAddress) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeleteEvaluationForm) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDeleteEmailAddress) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -5612,13 +5889,13 @@ func (m *awsRestjson1_serializeOpDeleteEvaluationForm) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteEvaluationFormInput) + input, ok := in.Parameters.(*DeleteEmailAddressInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/evaluation-forms/{InstanceId}/{EvaluationFormId}") + opPath, opQuery := httpbinding.SplitURI("/email-addresses/{InstanceId}/{EmailAddressId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" @@ -5634,7 +5911,7 @@ func (m *awsRestjson1_serializeOpDeleteEvaluationForm) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDeleteEvaluationFormInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDeleteEmailAddressInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -5647,24 +5924,20 @@ func (m *awsRestjson1_serializeOpDeleteEvaluationForm) HandleSerialize(ctx conte span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeleteEvaluationFormInput(v *DeleteEvaluationFormInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDeleteEmailAddressInput(v *DeleteEmailAddressInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.EvaluationFormId == nil || len(*v.EvaluationFormId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member EvaluationFormId must not be empty")} + if v.EmailAddressId == nil || len(*v.EmailAddressId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member EmailAddressId must not be empty")} } - if v.EvaluationFormId != nil { - if err := encoder.SetURI("EvaluationFormId").String(*v.EvaluationFormId); err != nil { + if v.EmailAddressId != nil { + if err := encoder.SetURI("EmailAddressId").String(*v.EmailAddressId); err != nil { return err } } - if v.EvaluationFormVersion != nil { - encoder.SetQuery("version").Integer(*v.EvaluationFormVersion) - } - if v.InstanceId == nil || len(*v.InstanceId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member InstanceId must not be empty")} } @@ -5677,7 +5950,91 @@ func awsRestjson1_serializeOpHttpBindingsDeleteEvaluationFormInput(v *DeleteEval return nil } -type awsRestjson1_serializeOpDeleteHoursOfOperation struct { +type awsRestjson1_serializeOpDeleteEvaluationForm struct { +} + +func (*awsRestjson1_serializeOpDeleteEvaluationForm) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteEvaluationForm) 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.(*DeleteEvaluationFormInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/evaluation-forms/{InstanceId}/{EvaluationFormId}") + 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_serializeOpHttpBindingsDeleteEvaluationFormInput(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_serializeOpHttpBindingsDeleteEvaluationFormInput(v *DeleteEvaluationFormInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.EvaluationFormId == nil || len(*v.EvaluationFormId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member EvaluationFormId must not be empty")} + } + if v.EvaluationFormId != nil { + if err := encoder.SetURI("EvaluationFormId").String(*v.EvaluationFormId); err != nil { + return err + } + } + + if v.EvaluationFormVersion != nil { + encoder.SetQuery("version").Integer(*v.EvaluationFormVersion) + } + + if v.InstanceId == nil || len(*v.InstanceId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member InstanceId must not be empty")} + } + if v.InstanceId != nil { + if err := encoder.SetURI("InstanceId").String(*v.InstanceId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteHoursOfOperation struct { } func (*awsRestjson1_serializeOpDeleteHoursOfOperation) ID() string { @@ -7597,6 +7954,86 @@ func awsRestjson1_serializeOpHttpBindingsDescribeContactFlowModuleInput(v *Descr return nil } +type awsRestjson1_serializeOpDescribeEmailAddress struct { +} + +func (*awsRestjson1_serializeOpDescribeEmailAddress) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeEmailAddress) 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.(*DescribeEmailAddressInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/email-addresses/{InstanceId}/{EmailAddressId}") + 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_serializeOpHttpBindingsDescribeEmailAddressInput(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_serializeOpHttpBindingsDescribeEmailAddressInput(v *DescribeEmailAddressInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.EmailAddressId == nil || len(*v.EmailAddressId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member EmailAddressId must not be empty")} + } + if v.EmailAddressId != nil { + if err := encoder.SetURI("EmailAddressId").String(*v.EmailAddressId); err != nil { + return err + } + } + + if v.InstanceId == nil || len(*v.InstanceId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member InstanceId must not be empty")} + } + if v.InstanceId != nil { + if err := encoder.SetURI("InstanceId").String(*v.InstanceId); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpDescribeEvaluationForm struct { } @@ -11750,6 +12187,89 @@ func awsRestjson1_serializeOpHttpBindingsListApprovedOriginsInput(v *ListApprove return nil } +type awsRestjson1_serializeOpListAssociatedContacts struct { +} + +func (*awsRestjson1_serializeOpListAssociatedContacts) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListAssociatedContacts) 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.(*ListAssociatedContactsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/contact/associated/{InstanceId}") + 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_serializeOpHttpBindingsListAssociatedContactsInput(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_serializeOpHttpBindingsListAssociatedContactsInput(v *ListAssociatedContactsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ContactId != nil { + encoder.SetQuery("contactId").String(*v.ContactId) + } + + if v.InstanceId == nil || len(*v.InstanceId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member InstanceId must not be empty")} + } + if v.InstanceId != nil { + if err := encoder.SetURI("InstanceId").String(*v.InstanceId); err != nil { + return err + } + } + + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + return nil +} + type awsRestjson1_serializeOpListAuthenticationProfiles struct { } @@ -16589,14 +17109,14 @@ func awsRestjson1_serializeOpDocumentSearchContactsInput(v *SearchContactsInput, return nil } -type awsRestjson1_serializeOpSearchHoursOfOperations struct { +type awsRestjson1_serializeOpSearchEmailAddresses struct { } -func (*awsRestjson1_serializeOpSearchHoursOfOperations) ID() string { +func (*awsRestjson1_serializeOpSearchEmailAddresses) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpSearchHoursOfOperations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpSearchEmailAddresses) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -16608,13 +17128,13 @@ func (m *awsRestjson1_serializeOpSearchHoursOfOperations) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*SearchHoursOfOperationsInput) + input, ok := in.Parameters.(*SearchEmailAddressesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/search-hours-of-operations") + opPath, opQuery := httpbinding.SplitURI("/search-email-addresses") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -16633,7 +17153,7 @@ func (m *awsRestjson1_serializeOpSearchHoursOfOperations) HandleSerialize(ctx co restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentSearchHoursOfOperationsInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentSearchEmailAddressesInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -16650,7 +17170,7 @@ func (m *awsRestjson1_serializeOpSearchHoursOfOperations) HandleSerialize(ctx co span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsSearchHoursOfOperationsInput(v *SearchHoursOfOperationsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsSearchEmailAddressesInput(v *SearchEmailAddressesInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -16658,7 +17178,7 @@ func awsRestjson1_serializeOpHttpBindingsSearchHoursOfOperationsInput(v *SearchH return nil } -func awsRestjson1_serializeOpDocumentSearchHoursOfOperationsInput(v *SearchHoursOfOperationsInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentSearchEmailAddressesInput(v *SearchEmailAddressesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -16679,14 +17199,14 @@ func awsRestjson1_serializeOpDocumentSearchHoursOfOperationsInput(v *SearchHours if v.SearchCriteria != nil { ok := object.Key("SearchCriteria") - if err := awsRestjson1_serializeDocumentHoursOfOperationSearchCriteria(v.SearchCriteria, ok); err != nil { + if err := awsRestjson1_serializeDocumentEmailAddressSearchCriteria(v.SearchCriteria, ok); err != nil { return err } } if v.SearchFilter != nil { ok := object.Key("SearchFilter") - if err := awsRestjson1_serializeDocumentHoursOfOperationSearchFilter(v.SearchFilter, ok); err != nil { + if err := awsRestjson1_serializeDocumentEmailAddressSearchFilter(v.SearchFilter, ok); err != nil { return err } } @@ -16694,14 +17214,14 @@ func awsRestjson1_serializeOpDocumentSearchHoursOfOperationsInput(v *SearchHours return nil } -type awsRestjson1_serializeOpSearchPredefinedAttributes struct { +type awsRestjson1_serializeOpSearchHoursOfOperations struct { } -func (*awsRestjson1_serializeOpSearchPredefinedAttributes) ID() string { +func (*awsRestjson1_serializeOpSearchHoursOfOperations) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpSearchPredefinedAttributes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpSearchHoursOfOperations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -16713,13 +17233,13 @@ func (m *awsRestjson1_serializeOpSearchPredefinedAttributes) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*SearchPredefinedAttributesInput) + input, ok := in.Parameters.(*SearchHoursOfOperationsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/search-predefined-attributes") + opPath, opQuery := httpbinding.SplitURI("/search-hours-of-operations") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -16738,7 +17258,7 @@ func (m *awsRestjson1_serializeOpSearchPredefinedAttributes) HandleSerialize(ctx restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentSearchPredefinedAttributesInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentSearchHoursOfOperationsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -16755,7 +17275,7 @@ func (m *awsRestjson1_serializeOpSearchPredefinedAttributes) HandleSerialize(ctx span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsSearchPredefinedAttributesInput(v *SearchPredefinedAttributesInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsSearchHoursOfOperationsInput(v *SearchHoursOfOperationsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -16763,7 +17283,7 @@ func awsRestjson1_serializeOpHttpBindingsSearchPredefinedAttributesInput(v *Sear return nil } -func awsRestjson1_serializeOpDocumentSearchPredefinedAttributesInput(v *SearchPredefinedAttributesInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentSearchHoursOfOperationsInput(v *SearchHoursOfOperationsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -16784,7 +17304,112 @@ func awsRestjson1_serializeOpDocumentSearchPredefinedAttributesInput(v *SearchPr if v.SearchCriteria != nil { ok := object.Key("SearchCriteria") - if err := awsRestjson1_serializeDocumentPredefinedAttributeSearchCriteria(v.SearchCriteria, ok); err != nil { + if err := awsRestjson1_serializeDocumentHoursOfOperationSearchCriteria(v.SearchCriteria, ok); err != nil { + return err + } + } + + if v.SearchFilter != nil { + ok := object.Key("SearchFilter") + if err := awsRestjson1_serializeDocumentHoursOfOperationSearchFilter(v.SearchFilter, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpSearchPredefinedAttributes struct { +} + +func (*awsRestjson1_serializeOpSearchPredefinedAttributes) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpSearchPredefinedAttributes) 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.(*SearchPredefinedAttributesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/search-predefined-attributes") + 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_serializeOpDocumentSearchPredefinedAttributesInput(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_serializeOpHttpBindingsSearchPredefinedAttributesInput(v *SearchPredefinedAttributesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentSearchPredefinedAttributesInput(v *SearchPredefinedAttributesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.InstanceId != nil { + ok := object.Key("InstanceId") + ok.String(*v.InstanceId) + } + + 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.SearchCriteria != nil { + ok := object.Key("SearchCriteria") + if err := awsRestjson1_serializeDocumentPredefinedAttributeSearchCriteria(v.SearchCriteria, ok); err != nil { return err } } @@ -17851,6 +18476,140 @@ func awsRestjson1_serializeOpDocumentSendChatIntegrationEventInput(v *SendChatIn return nil } +type awsRestjson1_serializeOpSendOutboundEmail struct { +} + +func (*awsRestjson1_serializeOpSendOutboundEmail) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpSendOutboundEmail) 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.(*SendOutboundEmailInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/instance/{InstanceId}/outbound-email") + 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_serializeOpHttpBindingsSendOutboundEmailInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentSendOutboundEmailInput(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_serializeOpHttpBindingsSendOutboundEmailInput(v *SendOutboundEmailInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.InstanceId == nil || len(*v.InstanceId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member InstanceId must not be empty")} + } + if v.InstanceId != nil { + if err := encoder.SetURI("InstanceId").String(*v.InstanceId); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentSendOutboundEmailInput(v *SendOutboundEmailInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AdditionalRecipients != nil { + ok := object.Key("AdditionalRecipients") + if err := awsRestjson1_serializeDocumentOutboundAdditionalRecipients(v.AdditionalRecipients, ok); err != nil { + return err + } + } + + if v.ClientToken != nil { + ok := object.Key("ClientToken") + ok.String(*v.ClientToken) + } + + if v.DestinationEmailAddress != nil { + ok := object.Key("DestinationEmailAddress") + if err := awsRestjson1_serializeDocumentEmailAddressInfo(v.DestinationEmailAddress, ok); err != nil { + return err + } + } + + if v.EmailMessage != nil { + ok := object.Key("EmailMessage") + if err := awsRestjson1_serializeDocumentOutboundEmailContent(v.EmailMessage, ok); err != nil { + return err + } + } + + if v.FromEmailAddress != nil { + ok := object.Key("FromEmailAddress") + if err := awsRestjson1_serializeDocumentEmailAddressInfo(v.FromEmailAddress, ok); err != nil { + return err + } + } + + if v.SourceCampaign != nil { + ok := object.Key("SourceCampaign") + if err := awsRestjson1_serializeDocumentSourceCampaign(v.SourceCampaign, ok); err != nil { + return err + } + } + + if len(v.TrafficType) > 0 { + ok := object.Key("TrafficType") + ok.String(string(v.TrafficType)) + } + + return nil +} + type awsRestjson1_serializeOpStartAttachedFileUpload struct { } @@ -18328,14 +19087,272 @@ func awsRestjson1_serializeOpDocumentStartContactRecordingInput(v *StartContactR return nil } -type awsRestjson1_serializeOpStartContactStreaming struct { +type awsRestjson1_serializeOpStartContactStreaming struct { +} + +func (*awsRestjson1_serializeOpStartContactStreaming) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpStartContactStreaming) 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.(*StartContactStreamingInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/contact/start-streaming") + 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_serializeOpDocumentStartContactStreamingInput(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_serializeOpHttpBindingsStartContactStreamingInput(v *StartContactStreamingInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentStartContactStreamingInput(v *StartContactStreamingInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ChatStreamingConfiguration != nil { + ok := object.Key("ChatStreamingConfiguration") + if err := awsRestjson1_serializeDocumentChatStreamingConfiguration(v.ChatStreamingConfiguration, ok); err != nil { + return err + } + } + + if v.ClientToken != nil { + ok := object.Key("ClientToken") + ok.String(*v.ClientToken) + } + + if v.ContactId != nil { + ok := object.Key("ContactId") + ok.String(*v.ContactId) + } + + if v.InstanceId != nil { + ok := object.Key("InstanceId") + ok.String(*v.InstanceId) + } + + return nil +} + +type awsRestjson1_serializeOpStartEmailContact struct { +} + +func (*awsRestjson1_serializeOpStartEmailContact) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpStartEmailContact) 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.(*StartEmailContactInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/contact/email") + 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} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentStartEmailContactInput(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_serializeOpHttpBindingsStartEmailContactInput(v *StartEmailContactInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentStartEmailContactInput(v *StartEmailContactInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AdditionalRecipients != nil { + ok := object.Key("AdditionalRecipients") + if err := awsRestjson1_serializeDocumentInboundAdditionalRecipients(v.AdditionalRecipients, ok); err != nil { + return err + } + } + + if v.Attachments != nil { + ok := object.Key("Attachments") + if err := awsRestjson1_serializeDocumentEmailAttachments(v.Attachments, ok); err != nil { + return err + } + } + + if v.Attributes != nil { + ok := object.Key("Attributes") + if err := awsRestjson1_serializeDocumentAttributes(v.Attributes, ok); err != nil { + return err + } + } + + if v.ClientToken != nil { + ok := object.Key("ClientToken") + ok.String(*v.ClientToken) + } + + if v.ContactFlowId != nil { + ok := object.Key("ContactFlowId") + ok.String(*v.ContactFlowId) + } + + if v.Description != nil { + ok := object.Key("Description") + ok.String(*v.Description) + } + + if v.DestinationEmailAddress != nil { + ok := object.Key("DestinationEmailAddress") + ok.String(*v.DestinationEmailAddress) + } + + if v.EmailMessage != nil { + ok := object.Key("EmailMessage") + if err := awsRestjson1_serializeDocumentInboundEmailContent(v.EmailMessage, ok); err != nil { + return err + } + } + + if v.FromEmailAddress != nil { + ok := object.Key("FromEmailAddress") + if err := awsRestjson1_serializeDocumentEmailAddressInfo(v.FromEmailAddress, ok); err != nil { + return err + } + } + + if v.InstanceId != nil { + ok := object.Key("InstanceId") + ok.String(*v.InstanceId) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.References != nil { + ok := object.Key("References") + if err := awsRestjson1_serializeDocumentContactReferences(v.References, ok); err != nil { + return err + } + } + + if v.RelatedContactId != nil { + ok := object.Key("RelatedContactId") + ok.String(*v.RelatedContactId) + } + + if v.SegmentAttributes != nil { + ok := object.Key("SegmentAttributes") + if err := awsRestjson1_serializeDocumentSegmentAttributes(v.SegmentAttributes, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpStartOutboundChatContact struct { } -func (*awsRestjson1_serializeOpStartContactStreaming) ID() string { +func (*awsRestjson1_serializeOpStartOutboundChatContact) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpStartContactStreaming) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpStartOutboundChatContact) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -18347,16 +19364,16 @@ func (m *awsRestjson1_serializeOpStartContactStreaming) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*StartContactStreamingInput) + input, ok := in.Parameters.(*StartOutboundChatContactInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/contact/start-streaming") + opPath, opQuery := httpbinding.SplitURI("/contact/outbound-chat") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" + request.Method = "PUT" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -18372,7 +19389,7 @@ func (m *awsRestjson1_serializeOpStartContactStreaming) HandleSerialize(ctx cont restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentStartContactStreamingInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentStartOutboundChatContactInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -18389,7 +19406,7 @@ func (m *awsRestjson1_serializeOpStartContactStreaming) HandleSerialize(ctx cont span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsStartContactStreamingInput(v *StartContactStreamingInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsStartOutboundChatContactInput(v *StartOutboundChatContactInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -18397,25 +19414,44 @@ func awsRestjson1_serializeOpHttpBindingsStartContactStreamingInput(v *StartCont return nil } -func awsRestjson1_serializeOpDocumentStartContactStreamingInput(v *StartContactStreamingInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentStartOutboundChatContactInput(v *StartOutboundChatContactInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.ChatStreamingConfiguration != nil { - ok := object.Key("ChatStreamingConfiguration") - if err := awsRestjson1_serializeDocumentChatStreamingConfiguration(v.ChatStreamingConfiguration, ok); err != nil { + if v.Attributes != nil { + ok := object.Key("Attributes") + if err := awsRestjson1_serializeDocumentAttributes(v.Attributes, ok); err != nil { return err } } + if v.ChatDurationInMinutes != nil { + ok := object.Key("ChatDurationInMinutes") + ok.Integer(*v.ChatDurationInMinutes) + } + if v.ClientToken != nil { ok := object.Key("ClientToken") ok.String(*v.ClientToken) } - if v.ContactId != nil { - ok := object.Key("ContactId") - ok.String(*v.ContactId) + if v.ContactFlowId != nil { + ok := object.Key("ContactFlowId") + ok.String(*v.ContactFlowId) + } + + if v.DestinationEndpoint != nil { + ok := object.Key("DestinationEndpoint") + if err := awsRestjson1_serializeDocumentEndpoint(v.DestinationEndpoint, ok); err != nil { + return err + } + } + + if v.InitialSystemMessage != nil { + ok := object.Key("InitialSystemMessage") + if err := awsRestjson1_serializeDocumentChatMessage(v.InitialSystemMessage, ok); err != nil { + return err + } } if v.InstanceId != nil { @@ -18423,17 +19459,50 @@ func awsRestjson1_serializeOpDocumentStartContactStreamingInput(v *StartContactS ok.String(*v.InstanceId) } + if v.ParticipantDetails != nil { + ok := object.Key("ParticipantDetails") + if err := awsRestjson1_serializeDocumentParticipantDetails(v.ParticipantDetails, ok); err != nil { + return err + } + } + + if v.RelatedContactId != nil { + ok := object.Key("RelatedContactId") + ok.String(*v.RelatedContactId) + } + + if v.SegmentAttributes != nil { + ok := object.Key("SegmentAttributes") + if err := awsRestjson1_serializeDocumentSegmentAttributes(v.SegmentAttributes, ok); err != nil { + return err + } + } + + if v.SourceEndpoint != nil { + ok := object.Key("SourceEndpoint") + if err := awsRestjson1_serializeDocumentEndpoint(v.SourceEndpoint, ok); err != nil { + return err + } + } + + if v.SupportedMessagingContentTypes != nil { + ok := object.Key("SupportedMessagingContentTypes") + if err := awsRestjson1_serializeDocumentSupportedMessagingContentTypes(v.SupportedMessagingContentTypes, ok); err != nil { + return err + } + } + return nil } -type awsRestjson1_serializeOpStartOutboundChatContact struct { +type awsRestjson1_serializeOpStartOutboundEmailContact struct { } -func (*awsRestjson1_serializeOpStartOutboundChatContact) ID() string { +func (*awsRestjson1_serializeOpStartOutboundEmailContact) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpStartOutboundChatContact) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpStartOutboundEmailContact) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -18445,13 +19514,13 @@ func (m *awsRestjson1_serializeOpStartOutboundChatContact) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*StartOutboundChatContactInput) + input, ok := in.Parameters.(*StartOutboundEmailContactInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/contact/outbound-chat") + opPath, opQuery := httpbinding.SplitURI("/contact/outbound-email") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "PUT" @@ -18470,7 +19539,7 @@ func (m *awsRestjson1_serializeOpStartOutboundChatContact) HandleSerialize(ctx c restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentStartOutboundChatContactInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentStartOutboundEmailContactInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -18487,7 +19556,7 @@ func (m *awsRestjson1_serializeOpStartOutboundChatContact) HandleSerialize(ctx c span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsStartOutboundChatContactInput(v *StartOutboundChatContactInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsStartOutboundEmailContactInput(v *StartOutboundEmailContactInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -18495,82 +19564,51 @@ func awsRestjson1_serializeOpHttpBindingsStartOutboundChatContactInput(v *StartO return nil } -func awsRestjson1_serializeOpDocumentStartOutboundChatContactInput(v *StartOutboundChatContactInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentStartOutboundEmailContactInput(v *StartOutboundEmailContactInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.Attributes != nil { - ok := object.Key("Attributes") - if err := awsRestjson1_serializeDocumentAttributes(v.Attributes, ok); err != nil { + if v.AdditionalRecipients != nil { + ok := object.Key("AdditionalRecipients") + if err := awsRestjson1_serializeDocumentOutboundAdditionalRecipients(v.AdditionalRecipients, ok); err != nil { return err } } - if v.ChatDurationInMinutes != nil { - ok := object.Key("ChatDurationInMinutes") - ok.Integer(*v.ChatDurationInMinutes) - } - if v.ClientToken != nil { ok := object.Key("ClientToken") ok.String(*v.ClientToken) } - if v.ContactFlowId != nil { - ok := object.Key("ContactFlowId") - ok.String(*v.ContactFlowId) - } - - if v.DestinationEndpoint != nil { - ok := object.Key("DestinationEndpoint") - if err := awsRestjson1_serializeDocumentEndpoint(v.DestinationEndpoint, ok); err != nil { - return err - } - } - - if v.InitialSystemMessage != nil { - ok := object.Key("InitialSystemMessage") - if err := awsRestjson1_serializeDocumentChatMessage(v.InitialSystemMessage, ok); err != nil { - return err - } - } - - if v.InstanceId != nil { - ok := object.Key("InstanceId") - ok.String(*v.InstanceId) + if v.ContactId != nil { + ok := object.Key("ContactId") + ok.String(*v.ContactId) } - if v.ParticipantDetails != nil { - ok := object.Key("ParticipantDetails") - if err := awsRestjson1_serializeDocumentParticipantDetails(v.ParticipantDetails, ok); err != nil { + if v.DestinationEmailAddress != nil { + ok := object.Key("DestinationEmailAddress") + if err := awsRestjson1_serializeDocumentEmailAddressInfo(v.DestinationEmailAddress, ok); err != nil { return err } } - if v.RelatedContactId != nil { - ok := object.Key("RelatedContactId") - ok.String(*v.RelatedContactId) - } - - if v.SegmentAttributes != nil { - ok := object.Key("SegmentAttributes") - if err := awsRestjson1_serializeDocumentSegmentAttributes(v.SegmentAttributes, ok); err != nil { + if v.EmailMessage != nil { + ok := object.Key("EmailMessage") + if err := awsRestjson1_serializeDocumentOutboundEmailContent(v.EmailMessage, ok); err != nil { return err } } - if v.SourceEndpoint != nil { - ok := object.Key("SourceEndpoint") - if err := awsRestjson1_serializeDocumentEndpoint(v.SourceEndpoint, ok); err != nil { + if v.FromEmailAddress != nil { + ok := object.Key("FromEmailAddress") + if err := awsRestjson1_serializeDocumentEmailAddressInfo(v.FromEmailAddress, ok); err != nil { return err } } - if v.SupportedMessagingContentTypes != nil { - ok := object.Key("SupportedMessagingContentTypes") - if err := awsRestjson1_serializeDocumentSupportedMessagingContentTypes(v.SupportedMessagingContentTypes, ok); err != nil { - return err - } + if v.InstanceId != nil { + ok := object.Key("InstanceId") + ok.String(*v.InstanceId) } return nil @@ -18951,6 +19989,13 @@ func awsRestjson1_serializeOpDocumentStartTaskContactInput(v *StartTaskContactIn ok.Double(smithytime.FormatEpochSeconds(*v.ScheduledTime)) } + if v.SegmentAttributes != nil { + ok := object.Key("SegmentAttributes") + if err := awsRestjson1_serializeDocumentSegmentAttributes(v.SegmentAttributes, ok); err != nil { + return err + } + } + if v.TaskTemplateId != nil { ok := object.Key("TaskTemplateId") ok.String(*v.TaskTemplateId) @@ -20386,6 +21431,13 @@ func awsRestjson1_serializeOpDocumentUpdateContactInput(v *UpdateContactInput, v } } + if v.SegmentAttributes != nil { + ok := object.Key("SegmentAttributes") + if err := awsRestjson1_serializeDocumentSegmentAttributes(v.SegmentAttributes, ok); err != nil { + return err + } + } + return nil } @@ -21225,38 +22277,129 @@ func awsRestjson1_serializeOpHttpBindingsUpdateContactRoutingDataInput(v *Update return nil } -func awsRestjson1_serializeOpDocumentUpdateContactRoutingDataInput(v *UpdateContactRoutingDataInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentUpdateContactRoutingDataInput(v *UpdateContactRoutingDataInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.QueuePriority != nil { + ok := object.Key("QueuePriority") + ok.Long(*v.QueuePriority) + } + + if v.QueueTimeAdjustmentSeconds != nil { + ok := object.Key("QueueTimeAdjustmentSeconds") + ok.Integer(*v.QueueTimeAdjustmentSeconds) + } + + if v.RoutingCriteria != nil { + ok := object.Key("RoutingCriteria") + if err := awsRestjson1_serializeDocumentRoutingCriteriaInput(v.RoutingCriteria, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpUpdateContactSchedule struct { +} + +func (*awsRestjson1_serializeOpUpdateContactSchedule) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateContactSchedule) 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.(*UpdateContactScheduleInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/contact/schedule") + 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_serializeOpDocumentUpdateContactScheduleInput(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_serializeOpHttpBindingsUpdateContactScheduleInput(v *UpdateContactScheduleInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateContactScheduleInput(v *UpdateContactScheduleInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.QueuePriority != nil { - ok := object.Key("QueuePriority") - ok.Long(*v.QueuePriority) + if v.ContactId != nil { + ok := object.Key("ContactId") + ok.String(*v.ContactId) } - if v.QueueTimeAdjustmentSeconds != nil { - ok := object.Key("QueueTimeAdjustmentSeconds") - ok.Integer(*v.QueueTimeAdjustmentSeconds) + if v.InstanceId != nil { + ok := object.Key("InstanceId") + ok.String(*v.InstanceId) } - if v.RoutingCriteria != nil { - ok := object.Key("RoutingCriteria") - if err := awsRestjson1_serializeDocumentRoutingCriteriaInput(v.RoutingCriteria, ok); err != nil { - return err - } + if v.ScheduledTime != nil { + ok := object.Key("ScheduledTime") + ok.Double(smithytime.FormatEpochSeconds(*v.ScheduledTime)) } return nil } -type awsRestjson1_serializeOpUpdateContactSchedule struct { +type awsRestjson1_serializeOpUpdateEmailAddressMetadata struct { } -func (*awsRestjson1_serializeOpUpdateContactSchedule) ID() string { +func (*awsRestjson1_serializeOpUpdateEmailAddressMetadata) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpUpdateContactSchedule) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpUpdateEmailAddressMetadata) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -21268,13 +22411,13 @@ func (m *awsRestjson1_serializeOpUpdateContactSchedule) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*UpdateContactScheduleInput) + input, ok := in.Parameters.(*UpdateEmailAddressMetadataInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/contact/schedule") + opPath, opQuery := httpbinding.SplitURI("/email-addresses/{InstanceId}/{EmailAddressId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -21290,10 +22433,14 @@ func (m *awsRestjson1_serializeOpUpdateContactSchedule) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: err} } + if err := awsRestjson1_serializeOpHttpBindingsUpdateEmailAddressMetadataInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentUpdateContactScheduleInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentUpdateEmailAddressMetadataInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -21310,31 +22457,49 @@ func (m *awsRestjson1_serializeOpUpdateContactSchedule) HandleSerialize(ctx cont span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsUpdateContactScheduleInput(v *UpdateContactScheduleInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsUpdateEmailAddressMetadataInput(v *UpdateEmailAddressMetadataInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } + if v.EmailAddressId == nil || len(*v.EmailAddressId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member EmailAddressId must not be empty")} + } + if v.EmailAddressId != nil { + if err := encoder.SetURI("EmailAddressId").String(*v.EmailAddressId); err != nil { + return err + } + } + + if v.InstanceId == nil || len(*v.InstanceId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member InstanceId must not be empty")} + } + if v.InstanceId != nil { + if err := encoder.SetURI("InstanceId").String(*v.InstanceId); err != nil { + return err + } + } + return nil } -func awsRestjson1_serializeOpDocumentUpdateContactScheduleInput(v *UpdateContactScheduleInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentUpdateEmailAddressMetadataInput(v *UpdateEmailAddressMetadataInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.ContactId != nil { - ok := object.Key("ContactId") - ok.String(*v.ContactId) + if v.ClientToken != nil { + ok := object.Key("ClientToken") + ok.String(*v.ClientToken) } - if v.InstanceId != nil { - ok := object.Key("InstanceId") - ok.String(*v.InstanceId) + if v.Description != nil { + ok := object.Key("Description") + ok.String(*v.Description) } - if v.ScheduledTime != nil { - ok := object.Key("ScheduledTime") - ok.Double(smithytime.FormatEpochSeconds(*v.ScheduledTime)) + if v.DisplayName != nil { + ok := object.Key("DisplayName") + ok.String(*v.DisplayName) } return nil @@ -22754,6 +23919,111 @@ func awsRestjson1_serializeOpDocumentUpdateQueueOutboundCallerConfigInput(v *Upd return nil } +type awsRestjson1_serializeOpUpdateQueueOutboundEmailConfig struct { +} + +func (*awsRestjson1_serializeOpUpdateQueueOutboundEmailConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateQueueOutboundEmailConfig) 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.(*UpdateQueueOutboundEmailConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/queues/{InstanceId}/{QueueId}/outbound-email-config") + 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_serializeOpHttpBindingsUpdateQueueOutboundEmailConfigInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateQueueOutboundEmailConfigInput(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_serializeOpHttpBindingsUpdateQueueOutboundEmailConfigInput(v *UpdateQueueOutboundEmailConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.InstanceId == nil || len(*v.InstanceId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member InstanceId must not be empty")} + } + if v.InstanceId != nil { + if err := encoder.SetURI("InstanceId").String(*v.InstanceId); err != nil { + return err + } + } + + if v.QueueId == nil || len(*v.QueueId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member QueueId must not be empty")} + } + if v.QueueId != nil { + if err := encoder.SetURI("QueueId").String(*v.QueueId); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateQueueOutboundEmailConfigInput(v *UpdateQueueOutboundEmailConfigInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.OutboundEmailConfig != nil { + ok := object.Key("OutboundEmailConfig") + if err := awsRestjson1_serializeDocumentOutboundEmailConfig(v.OutboundEmailConfig, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpUpdateQueueStatus struct { } @@ -23988,6 +25258,11 @@ func awsRestjson1_serializeOpDocumentUpdateTaskTemplateInput(v *UpdateTaskTempla ok.String(*v.Name) } + if v.SelfAssignFlowId != nil { + ok := object.Key("SelfAssignFlowId") + ok.String(*v.SelfAssignFlowId) + } + if len(v.Status) > 0 { ok := object.Key("Status") ok.String(string(v.Status)) @@ -26129,48 +27404,174 @@ func awsRestjson1_serializeDocumentDataSetIds(v []string, value smithyjson.Value return nil } -func awsRestjson1_serializeDocumentDisconnectReason(v *types.DisconnectReason, value smithyjson.Value) error { +func awsRestjson1_serializeDocumentDisconnectReason(v *types.DisconnectReason, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Code != nil { + ok := object.Key("Code") + ok.String(*v.Code) + } + + return nil +} + +func awsRestjson1_serializeDocumentDistribution(v *types.Distribution, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + { + ok := object.Key("Percentage") + ok.Integer(v.Percentage) + } + + if v.Region != nil { + ok := object.Key("Region") + ok.String(*v.Region) + } + + return nil +} + +func awsRestjson1_serializeDocumentDistributionList(v []types.Distribution, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentDistribution(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentEmailAddressInfo(v *types.EmailAddressInfo, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DisplayName != nil { + ok := object.Key("DisplayName") + ok.String(*v.DisplayName) + } + + if v.EmailAddress != nil { + ok := object.Key("EmailAddress") + ok.String(*v.EmailAddress) + } + + return nil +} + +func awsRestjson1_serializeDocumentEmailAddressRecipientList(v []types.EmailAddressInfo, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentEmailAddressInfo(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentEmailAddressSearchConditionList(v []types.EmailAddressSearchCriteria, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentEmailAddressSearchCriteria(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentEmailAddressSearchCriteria(v *types.EmailAddressSearchCriteria, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AndConditions != nil { + ok := object.Key("AndConditions") + if err := awsRestjson1_serializeDocumentEmailAddressSearchConditionList(v.AndConditions, ok); err != nil { + return err + } + } + + if v.OrConditions != nil { + ok := object.Key("OrConditions") + if err := awsRestjson1_serializeDocumentEmailAddressSearchConditionList(v.OrConditions, ok); err != nil { + return err + } + } + + if v.StringCondition != nil { + ok := object.Key("StringCondition") + if err := awsRestjson1_serializeDocumentStringCondition(v.StringCondition, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentEmailAddressSearchFilter(v *types.EmailAddressSearchFilter, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.Code != nil { - ok := object.Key("Code") - ok.String(*v.Code) + if v.TagFilter != nil { + ok := object.Key("TagFilter") + if err := awsRestjson1_serializeDocumentControlPlaneTagFilter(v.TagFilter, ok); err != nil { + return err + } } return nil } -func awsRestjson1_serializeDocumentDistribution(v *types.Distribution, value smithyjson.Value) error { +func awsRestjson1_serializeDocumentEmailAttachment(v *types.EmailAttachment, value smithyjson.Value) error { object := value.Object() defer object.Close() - { - ok := object.Key("Percentage") - ok.Integer(v.Percentage) + if v.FileName != nil { + ok := object.Key("FileName") + ok.String(*v.FileName) } - if v.Region != nil { - ok := object.Key("Region") - ok.String(*v.Region) + if v.S3Url != nil { + ok := object.Key("S3Url") + ok.String(*v.S3Url) } return nil } -func awsRestjson1_serializeDocumentDistributionList(v []types.Distribution, value smithyjson.Value) error { +func awsRestjson1_serializeDocumentEmailAttachments(v []types.EmailAttachment, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() - if err := awsRestjson1_serializeDocumentDistribution(&v[i], av); err != nil { + if err := awsRestjson1_serializeDocumentEmailAttachment(&v[i], av); err != nil { return err } } return nil } +func awsRestjson1_serializeDocumentEmailHeaders(v map[string]string, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + om.String(v[key]) + } + return nil +} + func awsRestjson1_serializeDocumentEmptyFieldValue(v *types.EmptyFieldValue, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -27187,6 +28588,75 @@ func awsRestjson1_serializeDocumentHoursOfOperationTimeSlice(v *types.HoursOfOpe return nil } +func awsRestjson1_serializeDocumentInboundAdditionalRecipients(v *types.InboundAdditionalRecipients, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CcAddresses != nil { + ok := object.Key("CcAddresses") + if err := awsRestjson1_serializeDocumentEmailAddressRecipientList(v.CcAddresses, ok); err != nil { + return err + } + } + + if v.ToAddresses != nil { + ok := object.Key("ToAddresses") + if err := awsRestjson1_serializeDocumentEmailAddressRecipientList(v.ToAddresses, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentInboundEmailContent(v *types.InboundEmailContent, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.MessageSourceType) > 0 { + ok := object.Key("MessageSourceType") + ok.String(string(v.MessageSourceType)) + } + + if v.RawMessage != nil { + ok := object.Key("RawMessage") + if err := awsRestjson1_serializeDocumentInboundRawMessage(v.RawMessage, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentInboundRawMessage(v *types.InboundRawMessage, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Body != nil { + ok := object.Key("Body") + ok.String(*v.Body) + } + + if v.ContentType != nil { + ok := object.Key("ContentType") + ok.String(*v.ContentType) + } + + if v.Headers != nil { + ok := object.Key("Headers") + if err := awsRestjson1_serializeDocumentEmailHeaders(v.Headers, ok); err != nil { + return err + } + } + + if v.Subject != nil { + ok := object.Key("Subject") + ok.String(*v.Subject) + } + + return nil +} + func awsRestjson1_serializeDocumentInitiationMethodList(v []types.ContactInitiationMethod, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -27627,6 +29097,20 @@ func awsRestjson1_serializeDocumentNumericQuestionPropertyValueAutomation(v *typ return nil } +func awsRestjson1_serializeDocumentOutboundAdditionalRecipients(v *types.OutboundAdditionalRecipients, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CcEmailAddresses != nil { + ok := object.Key("CcEmailAddresses") + if err := awsRestjson1_serializeDocumentEmailAddressRecipientList(v.CcEmailAddresses, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentOutboundCallerConfig(v *types.OutboundCallerConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -27649,6 +29133,66 @@ func awsRestjson1_serializeDocumentOutboundCallerConfig(v *types.OutboundCallerC return nil } +func awsRestjson1_serializeDocumentOutboundEmailConfig(v *types.OutboundEmailConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.OutboundEmailAddressId != nil { + ok := object.Key("OutboundEmailAddressId") + ok.String(*v.OutboundEmailAddressId) + } + + return nil +} + +func awsRestjson1_serializeDocumentOutboundEmailContent(v *types.OutboundEmailContent, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.MessageSourceType) > 0 { + ok := object.Key("MessageSourceType") + ok.String(string(v.MessageSourceType)) + } + + if v.RawMessage != nil { + ok := object.Key("RawMessage") + if err := awsRestjson1_serializeDocumentOutboundRawMessage(v.RawMessage, ok); err != nil { + return err + } + } + + if v.TemplatedMessageConfig != nil { + ok := object.Key("TemplatedMessageConfig") + if err := awsRestjson1_serializeDocumentTemplatedMessageConfig(v.TemplatedMessageConfig, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentOutboundRawMessage(v *types.OutboundRawMessage, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Body != nil { + ok := object.Key("Body") + ok.String(*v.Body) + } + + if v.ContentType != nil { + ok := object.Key("ContentType") + ok.String(*v.ContentType) + } + + if v.Subject != nil { + ok := object.Key("Subject") + ok.String(*v.Subject) + } + + return nil +} + func awsRestjson1_serializeDocumentParticipantCapabilities(v *types.ParticipantCapabilities, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -28179,6 +29723,21 @@ func awsRestjson1_serializeDocumentReference(v *types.Reference, value smithyjso object := value.Object() defer object.Close() + if v.Arn != nil { + ok := object.Key("Arn") + ok.String(*v.Arn) + } + + if len(v.Status) > 0 { + ok := object.Key("Status") + ok.String(string(v.Status)) + } + + if v.StatusReason != nil { + ok := object.Key("StatusReason") + ok.String(*v.StatusReason) + } + if len(v.Type) > 0 { ok := object.Key("Type") ok.String(string(v.Type)) @@ -28643,6 +30202,68 @@ func awsRestjson1_serializeDocumentSearchableContactAttributeValueList(v []strin return nil } +func awsRestjson1_serializeDocumentSearchableSegmentAttributes(v *types.SearchableSegmentAttributes, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Criteria != nil { + ok := object.Key("Criteria") + if err := awsRestjson1_serializeDocumentSearchableSegmentAttributesCriteriaList(v.Criteria, ok); err != nil { + return err + } + } + + if len(v.MatchType) > 0 { + ok := object.Key("MatchType") + ok.String(string(v.MatchType)) + } + + return nil +} + +func awsRestjson1_serializeDocumentSearchableSegmentAttributesCriteria(v *types.SearchableSegmentAttributesCriteria, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Key != nil { + ok := object.Key("Key") + ok.String(*v.Key) + } + + if v.Values != nil { + ok := object.Key("Values") + if err := awsRestjson1_serializeDocumentSearchableSegmentAttributeValueList(v.Values, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentSearchableSegmentAttributesCriteriaList(v []types.SearchableSegmentAttributesCriteria, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentSearchableSegmentAttributesCriteria(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentSearchableSegmentAttributeValueList(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_serializeDocumentSearchContactsTimeRange(v *types.SearchContactsTimeRange, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -28718,6 +30339,13 @@ func awsRestjson1_serializeDocumentSearchCriteria(v *types.SearchCriteria, value } } + if v.SearchableSegmentAttributes != nil { + ok := object.Key("SearchableSegmentAttributes") + if err := awsRestjson1_serializeDocumentSearchableSegmentAttributes(v.SearchableSegmentAttributes, ok); err != nil { + return err + } + } + return nil } @@ -28952,6 +30580,23 @@ func awsRestjson1_serializeDocumentSort(v *types.Sort, value smithyjson.Value) e return nil } +func awsRestjson1_serializeDocumentSourceCampaign(v *types.SourceCampaign, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CampaignId != nil { + ok := object.Key("CampaignId") + ok.String(*v.CampaignId) + } + + if v.OutboundRequestId != nil { + ok := object.Key("OutboundRequestId") + ok.String(*v.OutboundRequestId) + } + + return nil +} + func awsRestjson1_serializeDocumentStringCondition(v *types.StringCondition, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -29265,6 +30910,49 @@ func awsRestjson1_serializeDocumentTelephonyConfig(v *types.TelephonyConfig, val return nil } +func awsRestjson1_serializeDocumentTemplateAttributes(v *types.TemplateAttributes, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CustomAttributes != nil { + ok := object.Key("CustomAttributes") + if err := awsRestjson1_serializeDocumentAttributes(v.CustomAttributes, ok); err != nil { + return err + } + } + + if v.CustomerProfileAttributes != nil { + ok := object.Key("CustomerProfileAttributes") + ok.String(*v.CustomerProfileAttributes) + } + + return nil +} + +func awsRestjson1_serializeDocumentTemplatedMessageConfig(v *types.TemplatedMessageConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.KnowledgeBaseId != nil { + ok := object.Key("KnowledgeBaseId") + ok.String(*v.KnowledgeBaseId) + } + + if v.MessageTemplateId != nil { + ok := object.Key("MessageTemplateId") + ok.String(*v.MessageTemplateId) + } + + if v.TemplateAttributes != nil { + ok := object.Key("TemplateAttributes") + if err := awsRestjson1_serializeDocumentTemplateAttributes(v.TemplateAttributes, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentThreshold(v *types.Threshold, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -29577,6 +31265,18 @@ func awsRestjson1_serializeDocumentUserIdList(v []string, value smithyjson.Value return nil } +func awsRestjson1_serializeDocumentUserInfo(v *types.UserInfo, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.UserId != nil { + ok := object.Key("UserId") + ok.String(*v.UserId) + } + + return nil +} + func awsRestjson1_serializeDocumentUserPhoneConfig(v *types.UserPhoneConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/connect/snapshot/api_op_CreateContact.go.snap b/service/connect/snapshot/api_op_CreateContact.go.snap new file mode 100644 index 00000000000..d379ca43567 --- /dev/null +++ b/service/connect/snapshot/api_op_CreateContact.go.snap @@ -0,0 +1,42 @@ +CreateContact + 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/connect/snapshot/api_op_CreateEmailAddress.go.snap b/service/connect/snapshot/api_op_CreateEmailAddress.go.snap new file mode 100644 index 00000000000..d3d0802863f --- /dev/null +++ b/service/connect/snapshot/api_op_CreateEmailAddress.go.snap @@ -0,0 +1,41 @@ +CreateEmailAddress + 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/connect/snapshot/api_op_DeleteEmailAddress.go.snap b/service/connect/snapshot/api_op_DeleteEmailAddress.go.snap new file mode 100644 index 00000000000..39161d10dcf --- /dev/null +++ b/service/connect/snapshot/api_op_DeleteEmailAddress.go.snap @@ -0,0 +1,41 @@ +DeleteEmailAddress + 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/connect/snapshot/api_op_DescribeEmailAddress.go.snap b/service/connect/snapshot/api_op_DescribeEmailAddress.go.snap new file mode 100644 index 00000000000..8ebe88126ff --- /dev/null +++ b/service/connect/snapshot/api_op_DescribeEmailAddress.go.snap @@ -0,0 +1,41 @@ +DescribeEmailAddress + 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/connect/snapshot/api_op_ListAssociatedContacts.go.snap b/service/connect/snapshot/api_op_ListAssociatedContacts.go.snap new file mode 100644 index 00000000000..37f63466e95 --- /dev/null +++ b/service/connect/snapshot/api_op_ListAssociatedContacts.go.snap @@ -0,0 +1,41 @@ +ListAssociatedContacts + 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/connect/snapshot/api_op_SearchEmailAddresses.go.snap b/service/connect/snapshot/api_op_SearchEmailAddresses.go.snap new file mode 100644 index 00000000000..464d7746b2a --- /dev/null +++ b/service/connect/snapshot/api_op_SearchEmailAddresses.go.snap @@ -0,0 +1,41 @@ +SearchEmailAddresses + 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/connect/snapshot/api_op_SendOutboundEmail.go.snap b/service/connect/snapshot/api_op_SendOutboundEmail.go.snap new file mode 100644 index 00000000000..e8b2c8057d4 --- /dev/null +++ b/service/connect/snapshot/api_op_SendOutboundEmail.go.snap @@ -0,0 +1,42 @@ +SendOutboundEmail + 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/connect/snapshot/api_op_StartEmailContact.go.snap b/service/connect/snapshot/api_op_StartEmailContact.go.snap new file mode 100644 index 00000000000..9d4591cb1c8 --- /dev/null +++ b/service/connect/snapshot/api_op_StartEmailContact.go.snap @@ -0,0 +1,42 @@ +StartEmailContact + 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/connect/snapshot/api_op_StartOutboundEmailContact.go.snap b/service/connect/snapshot/api_op_StartOutboundEmailContact.go.snap new file mode 100644 index 00000000000..67a6b628358 --- /dev/null +++ b/service/connect/snapshot/api_op_StartOutboundEmailContact.go.snap @@ -0,0 +1,42 @@ +StartOutboundEmailContact + 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/connect/snapshot/api_op_UpdateEmailAddressMetadata.go.snap b/service/connect/snapshot/api_op_UpdateEmailAddressMetadata.go.snap new file mode 100644 index 00000000000..59b97520b61 --- /dev/null +++ b/service/connect/snapshot/api_op_UpdateEmailAddressMetadata.go.snap @@ -0,0 +1,41 @@ +UpdateEmailAddressMetadata + 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/connect/snapshot/api_op_UpdateQueueOutboundEmailConfig.go.snap b/service/connect/snapshot/api_op_UpdateQueueOutboundEmailConfig.go.snap new file mode 100644 index 00000000000..803863cb233 --- /dev/null +++ b/service/connect/snapshot/api_op_UpdateQueueOutboundEmailConfig.go.snap @@ -0,0 +1,41 @@ +UpdateQueueOutboundEmailConfig + 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/connect/snapshot_test.go b/service/connect/snapshot_test.go index 9384e24ec21..f94fc1c135a 100644 --- a/service/connect/snapshot_test.go +++ b/service/connect/snapshot_test.go @@ -338,6 +338,18 @@ func TestCheckSnapshot_CreateAgentStatus(t *testing.T) { } } +func TestCheckSnapshot_CreateContact(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateContact(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CreateContact") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_CreateContactFlow(t *testing.T) { svc := New(Options{}) _, err := svc.CreateContactFlow(context.Background(), nil, func(o *Options) { @@ -374,6 +386,18 @@ func TestCheckSnapshot_CreateContactFlowVersion(t *testing.T) { } } +func TestCheckSnapshot_CreateEmailAddress(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateEmailAddress(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CreateEmailAddress") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_CreateEvaluationForm(t *testing.T) { svc := New(Options{}) _, err := svc.CreateEvaluationForm(context.Background(), nil, func(o *Options) { @@ -686,6 +710,18 @@ func TestCheckSnapshot_DeleteContactFlowModule(t *testing.T) { } } +func TestCheckSnapshot_DeleteEmailAddress(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteEmailAddress(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeleteEmailAddress") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DeleteEvaluationForm(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteEvaluationForm(context.Background(), nil, func(o *Options) { @@ -986,6 +1022,18 @@ func TestCheckSnapshot_DescribeContactFlowModule(t *testing.T) { } } +func TestCheckSnapshot_DescribeEmailAddress(t *testing.T) { + svc := New(Options{}) + _, err := svc.DescribeEmailAddress(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DescribeEmailAddress") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DescribeEvaluationForm(t *testing.T) { svc := New(Options{}) _, err := svc.DescribeEvaluationForm(context.Background(), nil, func(o *Options) { @@ -1562,6 +1610,18 @@ func TestCheckSnapshot_ListApprovedOrigins(t *testing.T) { } } +func TestCheckSnapshot_ListAssociatedContacts(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListAssociatedContacts(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListAssociatedContacts") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListAuthenticationProfiles(t *testing.T) { svc := New(Options{}) _, err := svc.ListAuthenticationProfiles(context.Background(), nil, func(o *Options) { @@ -2222,6 +2282,18 @@ func TestCheckSnapshot_SearchContacts(t *testing.T) { } } +func TestCheckSnapshot_SearchEmailAddresses(t *testing.T) { + svc := New(Options{}) + _, err := svc.SearchEmailAddresses(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "SearchEmailAddresses") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_SearchHoursOfOperations(t *testing.T) { svc := New(Options{}) _, err := svc.SearchHoursOfOperations(context.Background(), nil, func(o *Options) { @@ -2366,6 +2438,18 @@ func TestCheckSnapshot_SendChatIntegrationEvent(t *testing.T) { } } +func TestCheckSnapshot_SendOutboundEmail(t *testing.T) { + svc := New(Options{}) + _, err := svc.SendOutboundEmail(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "SendOutboundEmail") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_StartAttachedFileUpload(t *testing.T) { svc := New(Options{}) _, err := svc.StartAttachedFileUpload(context.Background(), nil, func(o *Options) { @@ -2426,6 +2510,18 @@ func TestCheckSnapshot_StartContactStreaming(t *testing.T) { } } +func TestCheckSnapshot_StartEmailContact(t *testing.T) { + svc := New(Options{}) + _, err := svc.StartEmailContact(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "StartEmailContact") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_StartOutboundChatContact(t *testing.T) { svc := New(Options{}) _, err := svc.StartOutboundChatContact(context.Background(), nil, func(o *Options) { @@ -2438,6 +2534,18 @@ func TestCheckSnapshot_StartOutboundChatContact(t *testing.T) { } } +func TestCheckSnapshot_StartOutboundEmailContact(t *testing.T) { + svc := New(Options{}) + _, err := svc.StartOutboundEmailContact(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "StartOutboundEmailContact") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_StartOutboundVoiceContact(t *testing.T) { svc := New(Options{}) _, err := svc.StartOutboundVoiceContact(context.Background(), nil, func(o *Options) { @@ -2750,6 +2858,18 @@ func TestCheckSnapshot_UpdateContactSchedule(t *testing.T) { } } +func TestCheckSnapshot_UpdateEmailAddressMetadata(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateEmailAddressMetadata(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "UpdateEmailAddressMetadata") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_UpdateEvaluationForm(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateEvaluationForm(context.Background(), nil, func(o *Options) { @@ -2906,6 +3026,18 @@ func TestCheckSnapshot_UpdateQueueOutboundCallerConfig(t *testing.T) { } } +func TestCheckSnapshot_UpdateQueueOutboundEmailConfig(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateQueueOutboundEmailConfig(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "UpdateQueueOutboundEmailConfig") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_UpdateQueueStatus(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateQueueStatus(context.Background(), nil, func(o *Options) { @@ -3445,6 +3577,18 @@ func TestUpdateSnapshot_CreateAgentStatus(t *testing.T) { } } +func TestUpdateSnapshot_CreateContact(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateContact(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CreateContact") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_CreateContactFlow(t *testing.T) { svc := New(Options{}) _, err := svc.CreateContactFlow(context.Background(), nil, func(o *Options) { @@ -3481,6 +3625,18 @@ func TestUpdateSnapshot_CreateContactFlowVersion(t *testing.T) { } } +func TestUpdateSnapshot_CreateEmailAddress(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateEmailAddress(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CreateEmailAddress") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_CreateEvaluationForm(t *testing.T) { svc := New(Options{}) _, err := svc.CreateEvaluationForm(context.Background(), nil, func(o *Options) { @@ -3793,6 +3949,18 @@ func TestUpdateSnapshot_DeleteContactFlowModule(t *testing.T) { } } +func TestUpdateSnapshot_DeleteEmailAddress(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteEmailAddress(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeleteEmailAddress") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DeleteEvaluationForm(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteEvaluationForm(context.Background(), nil, func(o *Options) { @@ -4093,6 +4261,18 @@ func TestUpdateSnapshot_DescribeContactFlowModule(t *testing.T) { } } +func TestUpdateSnapshot_DescribeEmailAddress(t *testing.T) { + svc := New(Options{}) + _, err := svc.DescribeEmailAddress(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DescribeEmailAddress") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DescribeEvaluationForm(t *testing.T) { svc := New(Options{}) _, err := svc.DescribeEvaluationForm(context.Background(), nil, func(o *Options) { @@ -4669,6 +4849,18 @@ func TestUpdateSnapshot_ListApprovedOrigins(t *testing.T) { } } +func TestUpdateSnapshot_ListAssociatedContacts(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListAssociatedContacts(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListAssociatedContacts") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListAuthenticationProfiles(t *testing.T) { svc := New(Options{}) _, err := svc.ListAuthenticationProfiles(context.Background(), nil, func(o *Options) { @@ -5329,6 +5521,18 @@ func TestUpdateSnapshot_SearchContacts(t *testing.T) { } } +func TestUpdateSnapshot_SearchEmailAddresses(t *testing.T) { + svc := New(Options{}) + _, err := svc.SearchEmailAddresses(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "SearchEmailAddresses") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_SearchHoursOfOperations(t *testing.T) { svc := New(Options{}) _, err := svc.SearchHoursOfOperations(context.Background(), nil, func(o *Options) { @@ -5473,6 +5677,18 @@ func TestUpdateSnapshot_SendChatIntegrationEvent(t *testing.T) { } } +func TestUpdateSnapshot_SendOutboundEmail(t *testing.T) { + svc := New(Options{}) + _, err := svc.SendOutboundEmail(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "SendOutboundEmail") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_StartAttachedFileUpload(t *testing.T) { svc := New(Options{}) _, err := svc.StartAttachedFileUpload(context.Background(), nil, func(o *Options) { @@ -5533,6 +5749,18 @@ func TestUpdateSnapshot_StartContactStreaming(t *testing.T) { } } +func TestUpdateSnapshot_StartEmailContact(t *testing.T) { + svc := New(Options{}) + _, err := svc.StartEmailContact(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "StartEmailContact") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_StartOutboundChatContact(t *testing.T) { svc := New(Options{}) _, err := svc.StartOutboundChatContact(context.Background(), nil, func(o *Options) { @@ -5545,6 +5773,18 @@ func TestUpdateSnapshot_StartOutboundChatContact(t *testing.T) { } } +func TestUpdateSnapshot_StartOutboundEmailContact(t *testing.T) { + svc := New(Options{}) + _, err := svc.StartOutboundEmailContact(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "StartOutboundEmailContact") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_StartOutboundVoiceContact(t *testing.T) { svc := New(Options{}) _, err := svc.StartOutboundVoiceContact(context.Background(), nil, func(o *Options) { @@ -5857,6 +6097,18 @@ func TestUpdateSnapshot_UpdateContactSchedule(t *testing.T) { } } +func TestUpdateSnapshot_UpdateEmailAddressMetadata(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateEmailAddressMetadata(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "UpdateEmailAddressMetadata") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_UpdateEvaluationForm(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateEvaluationForm(context.Background(), nil, func(o *Options) { @@ -6013,6 +6265,18 @@ func TestUpdateSnapshot_UpdateQueueOutboundCallerConfig(t *testing.T) { } } +func TestUpdateSnapshot_UpdateQueueOutboundEmailConfig(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateQueueOutboundEmailConfig(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "UpdateQueueOutboundEmailConfig") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_UpdateQueueStatus(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateQueueStatus(context.Background(), nil, func(o *Options) { diff --git a/service/connect/types/enums.go b/service/connect/types/enums.go index 5d076f38c6f..7d4984b0ae3 100644 --- a/service/connect/types/enums.go +++ b/service/connect/types/enums.go @@ -179,6 +179,26 @@ func (AttachedFileInvalidRequestExceptionReason) Values() []AttachedFileInvalidR } } +type AttachedFileServiceQuotaExceededExceptionReason string + +// Enum values for AttachedFileServiceQuotaExceededExceptionReason +const ( + AttachedFileServiceQuotaExceededExceptionReasonTotalFileSizeExceeded AttachedFileServiceQuotaExceededExceptionReason = "TOTAL_FILE_SIZE_EXCEEDED" + AttachedFileServiceQuotaExceededExceptionReasonTotalFileCountExceeded AttachedFileServiceQuotaExceededExceptionReason = "TOTAL_FILE_COUNT_EXCEEDED" +) + +// Values returns all known values for +// AttachedFileServiceQuotaExceededExceptionReason. 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 (AttachedFileServiceQuotaExceededExceptionReason) Values() []AttachedFileServiceQuotaExceededExceptionReason { + return []AttachedFileServiceQuotaExceededExceptionReason{ + "TOTAL_FILE_SIZE_EXCEEDED", + "TOTAL_FILE_COUNT_EXCEEDED", + } +} + type BehaviorType string // Enum values for BehaviorType @@ -205,6 +225,7 @@ const ( ChannelVoice Channel = "VOICE" ChannelChat Channel = "CHAT" ChannelTask Channel = "TASK" + ChannelEmail Channel = "EMAIL" ) // Values returns all known values for Channel. Note that this can be expanded in @@ -216,6 +237,7 @@ func (Channel) Values() []Channel { "VOICE", "CHAT", "TASK", + "EMAIL", } } @@ -379,6 +401,9 @@ const ( ContactInitiationMethodDisconnect ContactInitiationMethod = "DISCONNECT" ContactInitiationMethodMonitor ContactInitiationMethod = "MONITOR" ContactInitiationMethodExternalOutbound ContactInitiationMethod = "EXTERNAL_OUTBOUND" + ContactInitiationMethodWebrtcApi ContactInitiationMethod = "WEBRTC_API" + ContactInitiationMethodAgentReply ContactInitiationMethod = "AGENT_REPLY" + ContactInitiationMethodFlow ContactInitiationMethod = "FLOW" ) // Values returns all known values for ContactInitiationMethod. Note that this can @@ -396,6 +421,9 @@ func (ContactInitiationMethod) Values() []ContactInitiationMethod { "DISCONNECT", "MONITOR", "EXTERNAL_OUTBOUND", + "WEBRTC_API", + "AGENT_REPLY", + "FLOW", } } @@ -494,6 +522,31 @@ func (DirectoryType) Values() []DirectoryType { } } +type EmailHeaderType string + +// Enum values for EmailHeaderType +const ( + EmailHeaderTypeReferences EmailHeaderType = "REFERENCES" + EmailHeaderTypeMessageId EmailHeaderType = "MESSAGE_ID" + EmailHeaderTypeInReplyTo EmailHeaderType = "IN_REPLY_TO" + EmailHeaderTypeXSesSpamVerdict EmailHeaderType = "X_SES_SPAM_VERDICT" + EmailHeaderTypeXSesVirusVerdict EmailHeaderType = "X_SES_VIRUS_VERDICT" +) + +// Values returns all known values for EmailHeaderType. 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 (EmailHeaderType) Values() []EmailHeaderType { + return []EmailHeaderType{ + "REFERENCES", + "MESSAGE_ID", + "IN_REPLY_TO", + "X_SES_SPAM_VERDICT", + "X_SES_VIRUS_VERDICT", + } +} + type EncryptionType string // Enum values for EncryptionType @@ -519,6 +572,7 @@ const ( EndpointTypeVoip EndpointType = "VOIP" EndpointTypeContactFlow EndpointType = "CONTACT_FLOW" EndpointTypeConnectPhonenumberArn EndpointType = "CONNECT_PHONENUMBER_ARN" + EndpointTypeEmailAddress EndpointType = "EMAIL_ADDRESS" ) // Values returns all known values for EndpointType. Note that this can be @@ -531,6 +585,7 @@ func (EndpointType) Values() []EndpointType { "VOIP", "CONTACT_FLOW", "CONNECT_PHONENUMBER_ARN", + "EMAIL_ADDRESS", } } @@ -750,7 +805,8 @@ type FileUseCaseType string // Enum values for FileUseCaseType const ( - FileUseCaseTypeAttachment FileUseCaseType = "ATTACHMENT" + FileUseCaseTypeEmailMessage FileUseCaseType = "EMAIL_MESSAGE" + FileUseCaseTypeAttachment FileUseCaseType = "ATTACHMENT" ) // Values returns all known values for FileUseCaseType. Note that this can be @@ -759,6 +815,7 @@ const ( // The ordering of this slice is not guaranteed to be stable across updates. func (FileUseCaseType) Values() []FileUseCaseType { return []FileUseCaseType{ + "EMAIL_MESSAGE", "ATTACHMENT", } } @@ -768,6 +825,8 @@ type FlowAssociationResourceType string // Enum values for FlowAssociationResourceType const ( FlowAssociationResourceTypeSmsPhoneNumber FlowAssociationResourceType = "SMS_PHONE_NUMBER" + FlowAssociationResourceTypeInboundEmail FlowAssociationResourceType = "INBOUND_EMAIL" + FlowAssociationResourceTypeOutboundEmail FlowAssociationResourceType = "OUTBOUND_EMAIL" ) // Values returns all known values for FlowAssociationResourceType. Note that this @@ -777,6 +836,8 @@ const ( func (FlowAssociationResourceType) Values() []FlowAssociationResourceType { return []FlowAssociationResourceType{ "SMS_PHONE_NUMBER", + "INBOUND_EMAIL", + "OUTBOUND_EMAIL", } } @@ -916,6 +977,40 @@ func (HoursOfOperationDays) Values() []HoursOfOperationDays { } } +type InboundMessageSourceType string + +// Enum values for InboundMessageSourceType +const ( + InboundMessageSourceTypeRaw InboundMessageSourceType = "RAW" +) + +// Values returns all known values for InboundMessageSourceType. 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 (InboundMessageSourceType) Values() []InboundMessageSourceType { + return []InboundMessageSourceType{ + "RAW", + } +} + +type InitiateAs string + +// Enum values for InitiateAs +const ( + InitiateAsConnectedToUser InitiateAs = "CONNECTED_TO_USER" +) + +// Values returns all known values for InitiateAs. 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 (InitiateAs) Values() []InitiateAs { + return []InitiateAs{ + "CONNECTED_TO_USER", + } +} + type InstanceAttributeType string // Enum values for InstanceAttributeType @@ -1017,6 +1112,7 @@ const ( InstanceStorageResourceTypeScreenRecordings InstanceStorageResourceType = "SCREEN_RECORDINGS" InstanceStorageResourceTypeRealTimeContactAnalysisChatSegments InstanceStorageResourceType = "REAL_TIME_CONTACT_ANALYSIS_CHAT_SEGMENTS" InstanceStorageResourceTypeRealTimeContactAnalysisVoiceSegments InstanceStorageResourceType = "REAL_TIME_CONTACT_ANALYSIS_VOICE_SEGMENTS" + InstanceStorageResourceTypeEmailMessages InstanceStorageResourceType = "EMAIL_MESSAGES" ) // Values returns all known values for InstanceStorageResourceType. Note that this @@ -1037,6 +1133,7 @@ func (InstanceStorageResourceType) Values() []InstanceStorageResourceType { "SCREEN_RECORDINGS", "REAL_TIME_CONTACT_ANALYSIS_CHAT_SEGMENTS", "REAL_TIME_CONTACT_ANALYSIS_VOICE_SEGMENTS", + "EMAIL_MESSAGES", } } @@ -1054,6 +1151,7 @@ const ( IntegrationTypeCasesDomain IntegrationType = "CASES_DOMAIN" IntegrationTypeApplication IntegrationType = "APPLICATION" IntegrationTypeFileScanner IntegrationType = "FILE_SCANNER" + IntegrationTypeSesIdentity IntegrationType = "SES_IDENTITY" ) // Values returns all known values for IntegrationType. Note that this can be @@ -1072,6 +1170,7 @@ func (IntegrationType) Values() []IntegrationType { "CASES_DOMAIN", "APPLICATION", "FILE_SCANNER", + "SES_IDENTITY", } } @@ -1126,6 +1225,8 @@ type ListFlowAssociationResourceType string // Enum values for ListFlowAssociationResourceType const ( ListFlowAssociationResourceTypeVoicePhoneNumber ListFlowAssociationResourceType = "VOICE_PHONE_NUMBER" + ListFlowAssociationResourceTypeInboundEmail ListFlowAssociationResourceType = "INBOUND_EMAIL" + ListFlowAssociationResourceTypeOutboundEmail ListFlowAssociationResourceType = "OUTBOUND_EMAIL" ) // Values returns all known values for ListFlowAssociationResourceType. Note that @@ -1136,6 +1237,8 @@ const ( func (ListFlowAssociationResourceType) Values() []ListFlowAssociationResourceType { return []ListFlowAssociationResourceType{ "VOICE_PHONE_NUMBER", + "INBOUND_EMAIL", + "OUTBOUND_EMAIL", } } @@ -1272,6 +1375,25 @@ func (NumericQuestionPropertyAutomationLabel) Values() []NumericQuestionProperty } } +type OutboundMessageSourceType string + +// Enum values for OutboundMessageSourceType +const ( + OutboundMessageSourceTypeTemplate OutboundMessageSourceType = "TEMPLATE" + OutboundMessageSourceTypeRaw OutboundMessageSourceType = "RAW" +) + +// Values returns all known values for OutboundMessageSourceType. 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 (OutboundMessageSourceType) Values() []OutboundMessageSourceType { + return []OutboundMessageSourceType{ + "TEMPLATE", + "RAW", + } +} + type ParticipantRole string // Enum values for ParticipantRole @@ -2140,8 +2262,12 @@ type ReferenceStatus string // Enum values for ReferenceStatus const ( - ReferenceStatusApproved ReferenceStatus = "APPROVED" - ReferenceStatusRejected ReferenceStatus = "REJECTED" + ReferenceStatusAvailable ReferenceStatus = "AVAILABLE" + ReferenceStatusDeleted ReferenceStatus = "DELETED" + ReferenceStatusApproved ReferenceStatus = "APPROVED" + ReferenceStatusRejected ReferenceStatus = "REJECTED" + ReferenceStatusProcessing ReferenceStatus = "PROCESSING" + ReferenceStatusFailed ReferenceStatus = "FAILED" ) // Values returns all known values for ReferenceStatus. Note that this can be @@ -2150,8 +2276,12 @@ const ( // The ordering of this slice is not guaranteed to be stable across updates. func (ReferenceStatus) Values() []ReferenceStatus { return []ReferenceStatus{ + "AVAILABLE", + "DELETED", "APPROVED", "REJECTED", + "PROCESSING", + "FAILED", } } @@ -2159,12 +2289,14 @@ type ReferenceType string // Enum values for ReferenceType const ( - ReferenceTypeUrl ReferenceType = "URL" - ReferenceTypeAttachment ReferenceType = "ATTACHMENT" - ReferenceTypeNumber ReferenceType = "NUMBER" - ReferenceTypeString ReferenceType = "STRING" - ReferenceTypeDate ReferenceType = "DATE" - ReferenceTypeEmail ReferenceType = "EMAIL" + ReferenceTypeUrl ReferenceType = "URL" + ReferenceTypeAttachment ReferenceType = "ATTACHMENT" + ReferenceTypeContactAnalysis ReferenceType = "CONTACT_ANALYSIS" + ReferenceTypeNumber ReferenceType = "NUMBER" + ReferenceTypeString ReferenceType = "STRING" + ReferenceTypeDate ReferenceType = "DATE" + ReferenceTypeEmail ReferenceType = "EMAIL" + ReferenceTypeEmailMessage ReferenceType = "EMAIL_MESSAGE" ) // Values returns all known values for ReferenceType. Note that this can be @@ -2175,10 +2307,12 @@ func (ReferenceType) Values() []ReferenceType { return []ReferenceType{ "URL", "ATTACHMENT", + "CONTACT_ANALYSIS", "NUMBER", "STRING", "DATE", "EMAIL", + "EMAIL_MESSAGE", } } @@ -2523,18 +2657,20 @@ type TaskTemplateFieldType string // Enum values for TaskTemplateFieldType const ( - TaskTemplateFieldTypeName TaskTemplateFieldType = "NAME" - TaskTemplateFieldTypeDescription TaskTemplateFieldType = "DESCRIPTION" - TaskTemplateFieldTypeScheduledTime TaskTemplateFieldType = "SCHEDULED_TIME" - TaskTemplateFieldTypeQuickConnect TaskTemplateFieldType = "QUICK_CONNECT" - TaskTemplateFieldTypeUrl TaskTemplateFieldType = "URL" - TaskTemplateFieldTypeNumber TaskTemplateFieldType = "NUMBER" - TaskTemplateFieldTypeText TaskTemplateFieldType = "TEXT" - TaskTemplateFieldTypeTextArea TaskTemplateFieldType = "TEXT_AREA" - TaskTemplateFieldTypeDateTime TaskTemplateFieldType = "DATE_TIME" - TaskTemplateFieldTypeBoolean TaskTemplateFieldType = "BOOLEAN" - TaskTemplateFieldTypeSingleSelect TaskTemplateFieldType = "SINGLE_SELECT" - TaskTemplateFieldTypeEmail TaskTemplateFieldType = "EMAIL" + TaskTemplateFieldTypeName TaskTemplateFieldType = "NAME" + TaskTemplateFieldTypeDescription TaskTemplateFieldType = "DESCRIPTION" + TaskTemplateFieldTypeScheduledTime TaskTemplateFieldType = "SCHEDULED_TIME" + TaskTemplateFieldTypeQuickConnect TaskTemplateFieldType = "QUICK_CONNECT" + TaskTemplateFieldTypeUrl TaskTemplateFieldType = "URL" + TaskTemplateFieldTypeNumber TaskTemplateFieldType = "NUMBER" + TaskTemplateFieldTypeText TaskTemplateFieldType = "TEXT" + TaskTemplateFieldTypeTextArea TaskTemplateFieldType = "TEXT_AREA" + TaskTemplateFieldTypeDateTime TaskTemplateFieldType = "DATE_TIME" + TaskTemplateFieldTypeBoolean TaskTemplateFieldType = "BOOLEAN" + TaskTemplateFieldTypeSingleSelect TaskTemplateFieldType = "SINGLE_SELECT" + TaskTemplateFieldTypeEmail TaskTemplateFieldType = "EMAIL" + TaskTemplateFieldTypeSelfAssign TaskTemplateFieldType = "SELF_ASSIGN" + TaskTemplateFieldTypeExpiryDuration TaskTemplateFieldType = "EXPIRY_DURATION" ) // Values returns all known values for TaskTemplateFieldType. Note that this can @@ -2555,6 +2691,8 @@ func (TaskTemplateFieldType) Values() []TaskTemplateFieldType { "BOOLEAN", "SINGLE_SELECT", "EMAIL", + "SELF_ASSIGN", + "EXPIRY_DURATION", } } diff --git a/service/connect/types/errors.go b/service/connect/types/errors.go index e50fcad1b08..3386351956e 100644 --- a/service/connect/types/errors.go +++ b/service/connect/types/errors.go @@ -33,6 +33,33 @@ func (e *AccessDeniedException) ErrorCode() string { } func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +type ConditionalOperationFailedException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ConditionalOperationFailedException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ConditionalOperationFailedException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ConditionalOperationFailedException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ConditionalOperationFailedException" + } + return *e.ErrorCodeOverride +} +func (e *ConditionalOperationFailedException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + // Operation cannot be performed at this time as there is a conflict with another // operation or contact state. type ConflictException struct { @@ -577,6 +604,8 @@ type ServiceQuotaExceededException struct { ErrorCodeOverride *string + Reason ServiceQuotaExceededExceptionReason + noSmithyDocumentSerde } diff --git a/service/connect/types/types.go b/service/connect/types/types.go index e9ffebec636..5a93bc74c39 100644 --- a/service/connect/types/types.go +++ b/service/connect/types/types.go @@ -18,6 +18,17 @@ type ActionSummary struct { noSmithyDocumentSerde } +type AdditionalEmailRecipients struct { + + // + CcList []EmailRecipient + + // + ToList []EmailRecipient + + noSmithyDocumentSerde +} + // The distribution of agents between the instance and its replica(s). type AgentConfig struct { @@ -330,6 +341,38 @@ type AssignContactCategoryActionDefinition struct { noSmithyDocumentSerde } +type AssociatedContactSummary struct { + + // + Channel Channel + + // + ContactArn *string + + // + ContactId *string + + // + DisconnectTimestamp *time.Time + + // + InitialContactId *string + + // + InitiationMethod ContactInitiationMethod + + // + InitiationTimestamp *time.Time + + // + PreviousContactId *string + + // + RelatedContactId *string + + noSmithyDocumentSerde +} + // Information about the attached file. type AttachedFile struct { @@ -406,6 +449,9 @@ type AttachedFileError struct { // null. type AttachmentReference struct { + // + Arn *string + // Identifier of the attachment reference. Name *string @@ -830,6 +876,9 @@ type ConnectionData struct { // Contains information about a contact. type Contact struct { + // + AdditionalEmailRecipients *AdditionalEmailRecipients + // Information about the agent who accepted the contact. AgentInfo *AgentInfo @@ -851,9 +900,15 @@ type Contact struct { // The timestamp when customer endpoint connected to Amazon Connect. ConnectedToSystemTimestamp *time.Time + // + ContactAssociationId *string + // Information about the Customer on the contact. Customer *Customer + // + CustomerEndpoint *EndpointInfo + // Information about customer’s voice activity. CustomerVoiceActivity *CustomerVoiceActivity @@ -938,6 +993,9 @@ type Contact struct { // connect:Guide or connect:SMS . SegmentAttributes map[string]SegmentAttributeValue + // + SystemEndpoint *EndpointInfo + // Tags associated with the contact. This contains both Amazon Web Services // generated and user-defined tags. Tags map[string]string @@ -1270,6 +1328,9 @@ type ContactSearchSummary struct { // flow. ScheduledTimestamp *time.Time + // + SegmentAttributes map[string]ContactSearchSummarySegmentAttributeValue + noSmithyDocumentSerde } @@ -1297,6 +1358,14 @@ type ContactSearchSummaryQueueInfo struct { noSmithyDocumentSerde } +type ContactSearchSummarySegmentAttributeValue struct { + + // + ValueString *string + + noSmithyDocumentSerde +} + // An object that can be used to specify Tag conditions inside the SearchFilter . // This accepts an OR or AND (List of List) input where: // @@ -1669,6 +1738,103 @@ type DownloadUrlMetadata struct { noSmithyDocumentSerde } +type EmailAddressInfo struct { + + // + // + // This member is required. + EmailAddress *string + + // + DisplayName *string + + noSmithyDocumentSerde +} + +type EmailAddressMetadata struct { + + // + Description *string + + // + DisplayName *string + + // + EmailAddress *string + + // + EmailAddressArn *string + + // + EmailAddressId *string + + noSmithyDocumentSerde +} + +type EmailAddressSearchCriteria struct { + + // + AndConditions []EmailAddressSearchCriteria + + // + OrConditions []EmailAddressSearchCriteria + + // A leaf node condition which can be used to specify a string condition. + StringCondition *StringCondition + + noSmithyDocumentSerde +} + +type EmailAddressSearchFilter struct { + + // An object that can be used to specify Tag conditions inside the SearchFilter . + // This accepts an OR of AND (List of List) input where: + // + // - Top level list specifies conditions that need to be applied with OR operator + // + // - Inner list specifies conditions that need to be applied with AND operator. + TagFilter *ControlPlaneTagFilter + + noSmithyDocumentSerde +} + +type EmailAttachment struct { + + // + // + // This member is required. + FileName *string + + // + // + // This member is required. + S3Url *string + + noSmithyDocumentSerde +} + +type EmailMessageReference struct { + + // + Arn *string + + // + Name *string + + noSmithyDocumentSerde +} + +type EmailRecipient struct { + + // + Address *string + + // + DisplayName *string + + noSmithyDocumentSerde +} + // Information about a reference when the referenceType is EMAIL . Otherwise, null. type EmailReference struct { @@ -1726,6 +1892,20 @@ type Endpoint struct { noSmithyDocumentSerde } +type EndpointInfo struct { + + // + Address *string + + // + DisplayName *string + + // + Type EndpointType + + noSmithyDocumentSerde +} + // This API is in preview release for Amazon Connect and is subject to change. // // List of errors for dataset association failures. @@ -2979,6 +3159,53 @@ type HoursOfOperationTimeSlice struct { noSmithyDocumentSerde } +type InboundAdditionalRecipients struct { + + // + CcAddresses []EmailAddressInfo + + // + ToAddresses []EmailAddressInfo + + noSmithyDocumentSerde +} + +type InboundEmailContent struct { + + // + // + // This member is required. + MessageSourceType InboundMessageSourceType + + // + RawMessage *InboundRawMessage + + noSmithyDocumentSerde +} + +type InboundRawMessage struct { + + // + // + // This member is required. + Body *string + + // + // + // This member is required. + ContentType *string + + // + // + // This member is required. + Subject *string + + // + Headers map[string]string + + noSmithyDocumentSerde +} + // The Amazon Connect instance. type Instance struct { @@ -3633,6 +3860,14 @@ type NumericQuestionPropertyValueAutomation struct { noSmithyDocumentSerde } +type OutboundAdditionalRecipients struct { + + // + CcEmailAddresses []EmailAddressInfo + + noSmithyDocumentSerde +} + // The outbound caller ID name, number, and outbound whisper flow. type OutboundCallerConfig struct { @@ -3648,6 +3883,50 @@ type OutboundCallerConfig struct { noSmithyDocumentSerde } +type OutboundEmailConfig struct { + + // + OutboundEmailAddressId *string + + noSmithyDocumentSerde +} + +type OutboundEmailContent struct { + + // + // + // This member is required. + MessageSourceType OutboundMessageSourceType + + // + RawMessage *OutboundRawMessage + + // + TemplatedMessageConfig *TemplatedMessageConfig + + noSmithyDocumentSerde +} + +type OutboundRawMessage struct { + + // + // + // This member is required. + Body *string + + // + // + // This member is required. + ContentType *string + + // + // + // This member is required. + Subject *string + + noSmithyDocumentSerde +} + // The configuration for the allowed video and screen sharing capabilities for // participants present over the call. For more information, see [Set up in-app, web, video calling, and screen sharing capabilities]in the Amazon // Connect Administrator Guide. @@ -4075,6 +4354,9 @@ type Queue struct { // The outbound caller ID name, number, and outbound whisper flow. OutboundCallerConfig *OutboundCallerConfig + // + OutboundEmailConfig *OutboundEmailConfig + // The Amazon Resource Name (ARN) for the queue. QueueArn *string @@ -4706,10 +4988,17 @@ type Reference struct { // This member is required. Type ReferenceType + // + Arn *string + + // + Status ReferenceStatus + + // + StatusReason *string + // A valid value for the reference. For example, for a URL reference, a formatted // URL that is displayed to an agent in the Contact Control Panel (CCP). - // - // This member is required. Value *string noSmithyDocumentSerde @@ -4723,6 +5012,7 @@ type Reference struct { // ReferenceSummaryMemberAttachment // ReferenceSummaryMemberDate // ReferenceSummaryMemberEmail +// ReferenceSummaryMemberEmailMessage // ReferenceSummaryMemberNumber // ReferenceSummaryMemberString // ReferenceSummaryMemberUrl @@ -4758,6 +5048,14 @@ type ReferenceSummaryMemberEmail struct { func (*ReferenceSummaryMemberEmail) isReferenceSummary() {} +type ReferenceSummaryMemberEmailMessage struct { + Value EmailMessageReference + + noSmithyDocumentSerde +} + +func (*ReferenceSummaryMemberEmailMessage) isReferenceSummary() {} + // Information about a reference when the referenceType is NUMBER . Otherwise, null. type ReferenceSummaryMemberNumber struct { Value NumberReference @@ -5363,6 +5661,34 @@ type SearchableContactAttributesCriteria struct { noSmithyDocumentSerde } +type SearchableSegmentAttributes struct { + + // + // + // This member is required. + Criteria []SearchableSegmentAttributesCriteria + + // + MatchType SearchContactsMatchType + + noSmithyDocumentSerde +} + +type SearchableSegmentAttributesCriteria struct { + + // + // + // This member is required. + Key *string + + // + // + // This member is required. + Values []string + + noSmithyDocumentSerde +} + // A structure of time range that you want to search results. type SearchContactsTimeRange struct { @@ -5417,6 +5743,9 @@ type SearchCriteria struct { // [Search by custom contact attributes]: https://docs.aws.amazon.com/connect/latest/adminguide/search-custom-attributes.html SearchableContactAttributes *SearchableContactAttributes + // + SearchableSegmentAttributes *SearchableSegmentAttributes + noSmithyDocumentSerde } @@ -5607,6 +5936,22 @@ type SendNotificationActionDefinition struct { noSmithyDocumentSerde } +// The following types satisfy this interface: +// +// ServiceQuotaExceededExceptionReasonMemberAttachedFileServiceQuotaExceededExceptionReason +type ServiceQuotaExceededExceptionReason interface { + isServiceQuotaExceededExceptionReason() +} + +type ServiceQuotaExceededExceptionReasonMemberAttachedFileServiceQuotaExceededExceptionReason struct { + Value AttachedFileServiceQuotaExceededExceptionReason + + noSmithyDocumentSerde +} + +func (*ServiceQuotaExceededExceptionReasonMemberAttachedFileServiceQuotaExceededExceptionReason) isServiceQuotaExceededExceptionReason() { +} + // The distribution that determines which Amazon Web Services Regions should be // used to sign in agents in to both the instance and its replica(s). type SignInConfig struct { @@ -5676,6 +6021,17 @@ type Sort struct { noSmithyDocumentSerde } +type SourceCampaign struct { + + // + CampaignId *string + + // + OutboundRequestId *string + + noSmithyDocumentSerde +} + // Step signifies the criteria to be used for routing to an agent type Step struct { @@ -5921,6 +6277,37 @@ type TelephonyConfig struct { noSmithyDocumentSerde } +type TemplateAttributes struct { + + // + CustomAttributes map[string]string + + // + CustomerProfileAttributes *string + + noSmithyDocumentSerde +} + +type TemplatedMessageConfig struct { + + // + // + // This member is required. + KnowledgeBaseId *string + + // + // + // This member is required. + MessageTemplateId *string + + // + // + // This member is required. + TemplateAttributes *TemplateAttributes + + noSmithyDocumentSerde +} + // Contains information about the threshold for service level metrics. type Threshold struct { @@ -6367,6 +6754,14 @@ type UserIdentityInfoLite struct { noSmithyDocumentSerde } +type UserInfo struct { + + // + UserId *string + + noSmithyDocumentSerde +} + // Contains information about the phone configuration settings for a user. type UserPhoneConfig struct { @@ -6847,4 +7242,5 @@ func (*UnknownUnionMember) isPredefinedAttributeValues() func (*UnknownUnionMember) isRealtimeContactAnalysisSegment() {} func (*UnknownUnionMember) isRealTimeContactAnalysisTimeData() {} func (*UnknownUnionMember) isReferenceSummary() {} +func (*UnknownUnionMember) isServiceQuotaExceededExceptionReason() {} func (*UnknownUnionMember) isUpdateParticipantRoleConfigChannelInfo() {} diff --git a/service/connect/types/types_exported_test.go b/service/connect/types/types_exported_test.go index 50dbc6fdc30..62150d670fb 100644 --- a/service/connect/types/types_exported_test.go +++ b/service/connect/types/types_exported_test.go @@ -262,6 +262,9 @@ func ExampleReferenceSummary_outputUsage() { case *types.ReferenceSummaryMemberEmail: _ = v.Value // Value is types.EmailReference + case *types.ReferenceSummaryMemberEmailMessage: + _ = v.Value // Value is types.EmailMessageReference + case *types.ReferenceSummaryMemberNumber: _ = v.Value // Value is types.NumberReference @@ -282,11 +285,30 @@ func ExampleReferenceSummary_outputUsage() { var _ *types.AttachmentReference var _ *types.UrlReference +var _ *types.EmailMessageReference var _ *types.NumberReference var _ *types.StringReference var _ *types.DateReference var _ *types.EmailReference +func ExampleServiceQuotaExceededExceptionReason_outputUsage() { + var union types.ServiceQuotaExceededExceptionReason + // type switches can be used to check the union value + switch v := union.(type) { + case *types.ServiceQuotaExceededExceptionReasonMemberAttachedFileServiceQuotaExceededExceptionReason: + _ = v.Value // Value is types.AttachedFileServiceQuotaExceededExceptionReason + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ types.AttachedFileServiceQuotaExceededExceptionReason + func ExampleUpdateParticipantRoleConfigChannelInfo_outputUsage() { var union types.UpdateParticipantRoleConfigChannelInfo // type switches can be used to check the union value diff --git a/service/connect/validators.go b/service/connect/validators.go index e5911926920..1b8e3f692ae 100644 --- a/service/connect/validators.go +++ b/service/connect/validators.go @@ -530,6 +530,46 @@ func (m *validateOpCreateContactFlowVersion) HandleInitialize(ctx context.Contex return next.HandleInitialize(ctx, in) } +type validateOpCreateContact struct { +} + +func (*validateOpCreateContact) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateContact) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateContactInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateContactInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateEmailAddress struct { +} + +func (*validateOpCreateEmailAddress) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateEmailAddress) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateEmailAddressInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateEmailAddressInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateEvaluationForm struct { } @@ -1050,6 +1090,26 @@ func (m *validateOpDeleteContactFlowModule) HandleInitialize(ctx context.Context return next.HandleInitialize(ctx, in) } +type validateOpDeleteEmailAddress struct { +} + +func (*validateOpDeleteEmailAddress) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteEmailAddress) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteEmailAddressInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteEmailAddressInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteEvaluationForm struct { } @@ -1550,6 +1610,26 @@ func (m *validateOpDescribeContact) HandleInitialize(ctx context.Context, in mid return next.HandleInitialize(ctx, in) } +type validateOpDescribeEmailAddress struct { +} + +func (*validateOpDescribeEmailAddress) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeEmailAddress) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeEmailAddressInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeEmailAddressInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDescribeEvaluationForm struct { } @@ -2510,6 +2590,26 @@ func (m *validateOpListApprovedOrigins) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpListAssociatedContacts struct { +} + +func (*validateOpListAssociatedContacts) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListAssociatedContacts) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListAssociatedContactsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListAssociatedContactsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListAuthenticationProfiles struct { } @@ -3550,6 +3650,26 @@ func (m *validateOpSearchContacts) HandleInitialize(ctx context.Context, in midd return next.HandleInitialize(ctx, in) } +type validateOpSearchEmailAddresses struct { +} + +func (*validateOpSearchEmailAddresses) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpSearchEmailAddresses) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*SearchEmailAddressesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpSearchEmailAddressesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpSearchHoursOfOperations struct { } @@ -3790,6 +3910,26 @@ func (m *validateOpSendChatIntegrationEvent) HandleInitialize(ctx context.Contex return next.HandleInitialize(ctx, in) } +type validateOpSendOutboundEmail struct { +} + +func (*validateOpSendOutboundEmail) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpSendOutboundEmail) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*SendOutboundEmailInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpSendOutboundEmailInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpStartAttachedFileUpload struct { } @@ -3890,6 +4030,26 @@ func (m *validateOpStartContactStreaming) HandleInitialize(ctx context.Context, return next.HandleInitialize(ctx, in) } +type validateOpStartEmailContact struct { +} + +func (*validateOpStartEmailContact) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStartEmailContact) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StartEmailContactInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStartEmailContactInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpStartOutboundChatContact struct { } @@ -3910,6 +4070,26 @@ func (m *validateOpStartOutboundChatContact) HandleInitialize(ctx context.Contex return next.HandleInitialize(ctx, in) } +type validateOpStartOutboundEmailContact struct { +} + +func (*validateOpStartOutboundEmailContact) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStartOutboundEmailContact) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StartOutboundEmailContactInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStartOutboundEmailContactInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpStartOutboundVoiceContact struct { } @@ -4430,6 +4610,26 @@ func (m *validateOpUpdateContactSchedule) HandleInitialize(ctx context.Context, return next.HandleInitialize(ctx, in) } +type validateOpUpdateEmailAddressMetadata struct { +} + +func (*validateOpUpdateEmailAddressMetadata) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateEmailAddressMetadata) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateEmailAddressMetadataInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateEmailAddressMetadataInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateEvaluationForm struct { } @@ -4690,6 +4890,26 @@ func (m *validateOpUpdateQueueOutboundCallerConfig) HandleInitialize(ctx context return next.HandleInitialize(ctx, in) } +type validateOpUpdateQueueOutboundEmailConfig struct { +} + +func (*validateOpUpdateQueueOutboundEmailConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateQueueOutboundEmailConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateQueueOutboundEmailConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateQueueOutboundEmailConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateQueueStatus struct { } @@ -5234,6 +5454,14 @@ func addOpCreateContactFlowVersionValidationMiddleware(stack *middleware.Stack) return stack.Initialize.Add(&validateOpCreateContactFlowVersion{}, middleware.After) } +func addOpCreateContactValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateContact{}, middleware.After) +} + +func addOpCreateEmailAddressValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateEmailAddress{}, middleware.After) +} + func addOpCreateEvaluationFormValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateEvaluationForm{}, middleware.After) } @@ -5338,6 +5566,10 @@ func addOpDeleteContactFlowModuleValidationMiddleware(stack *middleware.Stack) e return stack.Initialize.Add(&validateOpDeleteContactFlowModule{}, middleware.After) } +func addOpDeleteEmailAddressValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteEmailAddress{}, middleware.After) +} + func addOpDeleteEvaluationFormValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteEvaluationForm{}, middleware.After) } @@ -5438,6 +5670,10 @@ func addOpDescribeContactValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeContact{}, middleware.After) } +func addOpDescribeEmailAddressValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeEmailAddress{}, middleware.After) +} + func addOpDescribeEvaluationFormValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeEvaluationForm{}, middleware.After) } @@ -5630,6 +5866,10 @@ func addOpListApprovedOriginsValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpListApprovedOrigins{}, middleware.After) } +func addOpListAssociatedContactsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListAssociatedContacts{}, middleware.After) +} + func addOpListAuthenticationProfilesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListAuthenticationProfiles{}, middleware.After) } @@ -5838,6 +6078,10 @@ func addOpSearchContactsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpSearchContacts{}, middleware.After) } +func addOpSearchEmailAddressesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpSearchEmailAddresses{}, middleware.After) +} + func addOpSearchHoursOfOperationsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpSearchHoursOfOperations{}, middleware.After) } @@ -5886,6 +6130,10 @@ func addOpSendChatIntegrationEventValidationMiddleware(stack *middleware.Stack) return stack.Initialize.Add(&validateOpSendChatIntegrationEvent{}, middleware.After) } +func addOpSendOutboundEmailValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpSendOutboundEmail{}, middleware.After) +} + func addOpStartAttachedFileUploadValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpStartAttachedFileUpload{}, middleware.After) } @@ -5906,10 +6154,18 @@ func addOpStartContactStreamingValidationMiddleware(stack *middleware.Stack) err return stack.Initialize.Add(&validateOpStartContactStreaming{}, middleware.After) } +func addOpStartEmailContactValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStartEmailContact{}, middleware.After) +} + func addOpStartOutboundChatContactValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpStartOutboundChatContact{}, middleware.After) } +func addOpStartOutboundEmailContactValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStartOutboundEmailContact{}, middleware.After) +} + func addOpStartOutboundVoiceContactValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpStartOutboundVoiceContact{}, middleware.After) } @@ -6014,6 +6270,10 @@ func addOpUpdateContactScheduleValidationMiddleware(stack *middleware.Stack) err return stack.Initialize.Add(&validateOpUpdateContactSchedule{}, middleware.After) } +func addOpUpdateEmailAddressMetadataValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateEmailAddressMetadata{}, middleware.After) +} + func addOpUpdateEvaluationFormValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateEvaluationForm{}, middleware.After) } @@ -6066,6 +6326,10 @@ func addOpUpdateQueueOutboundCallerConfigValidationMiddleware(stack *middleware. return stack.Initialize.Add(&validateOpUpdateQueueOutboundCallerConfig{}, middleware.After) } +func addOpUpdateQueueOutboundEmailConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateQueueOutboundEmailConfig{}, middleware.After) +} + func addOpUpdateQueueStatusValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateQueueStatus{}, middleware.After) } @@ -6344,6 +6608,73 @@ func validateDistributionList(v []types.Distribution) error { } } +func validateEmailAddressInfo(v *types.EmailAddressInfo) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "EmailAddressInfo"} + if v.EmailAddress == nil { + invalidParams.Add(smithy.NewErrParamRequired("EmailAddress")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateEmailAddressRecipientList(v []types.EmailAddressInfo) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "EmailAddressRecipientList"} + for i := range v { + if err := validateEmailAddressInfo(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateEmailAttachment(v *types.EmailAttachment) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "EmailAttachment"} + if v.FileName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FileName")) + } + if v.S3Url == nil { + invalidParams.Add(smithy.NewErrParamRequired("S3Url")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateEmailAttachments(v []types.EmailAttachment) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "EmailAttachments"} + for i := range v { + if err := validateEmailAttachment(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateEncryptionConfig(v *types.EncryptionConfig) error { if v == nil { return nil @@ -6846,27 +7177,90 @@ func validateHoursOfOperationTimeSlice(v *types.HoursOfOperationTimeSlice) error } } -func validateInstanceStorageConfig(v *types.InstanceStorageConfig) error { +func validateInboundAdditionalRecipients(v *types.InboundAdditionalRecipients) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "InstanceStorageConfig"} - if len(v.StorageType) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("StorageType")) - } - if v.S3Config != nil { - if err := validateS3Config(v.S3Config); err != nil { - invalidParams.AddNested("S3Config", err.(smithy.InvalidParamsError)) - } - } - if v.KinesisVideoStreamConfig != nil { - if err := validateKinesisVideoStreamConfig(v.KinesisVideoStreamConfig); err != nil { - invalidParams.AddNested("KinesisVideoStreamConfig", err.(smithy.InvalidParamsError)) + invalidParams := smithy.InvalidParamsError{Context: "InboundAdditionalRecipients"} + if v.ToAddresses != nil { + if err := validateEmailAddressRecipientList(v.ToAddresses); err != nil { + invalidParams.AddNested("ToAddresses", err.(smithy.InvalidParamsError)) } } - if v.KinesisStreamConfig != nil { - if err := validateKinesisStreamConfig(v.KinesisStreamConfig); err != nil { - invalidParams.AddNested("KinesisStreamConfig", err.(smithy.InvalidParamsError)) + if v.CcAddresses != nil { + if err := validateEmailAddressRecipientList(v.CcAddresses); err != nil { + invalidParams.AddNested("CcAddresses", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateInboundEmailContent(v *types.InboundEmailContent) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "InboundEmailContent"} + if len(v.MessageSourceType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("MessageSourceType")) + } + if v.RawMessage != nil { + if err := validateInboundRawMessage(v.RawMessage); err != nil { + invalidParams.AddNested("RawMessage", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateInboundRawMessage(v *types.InboundRawMessage) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "InboundRawMessage"} + if v.Subject == nil { + invalidParams.Add(smithy.NewErrParamRequired("Subject")) + } + if v.Body == nil { + invalidParams.Add(smithy.NewErrParamRequired("Body")) + } + if v.ContentType == nil { + invalidParams.Add(smithy.NewErrParamRequired("ContentType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateInstanceStorageConfig(v *types.InstanceStorageConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "InstanceStorageConfig"} + if len(v.StorageType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("StorageType")) + } + if v.S3Config != nil { + if err := validateS3Config(v.S3Config); err != nil { + invalidParams.AddNested("S3Config", err.(smithy.InvalidParamsError)) + } + } + if v.KinesisVideoStreamConfig != nil { + if err := validateKinesisVideoStreamConfig(v.KinesisVideoStreamConfig); err != nil { + invalidParams.AddNested("KinesisVideoStreamConfig", err.(smithy.InvalidParamsError)) + } + } + if v.KinesisStreamConfig != nil { + if err := validateKinesisStreamConfig(v.KinesisStreamConfig); err != nil { + invalidParams.AddNested("KinesisStreamConfig", err.(smithy.InvalidParamsError)) } } if v.KinesisFirehoseConfig != nil { @@ -7028,6 +7422,69 @@ func validateNumericQuestionPropertyValueAutomation(v *types.NumericQuestionProp } } +func validateOutboundAdditionalRecipients(v *types.OutboundAdditionalRecipients) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OutboundAdditionalRecipients"} + if v.CcEmailAddresses != nil { + if err := validateEmailAddressRecipientList(v.CcEmailAddresses); err != nil { + invalidParams.AddNested("CcEmailAddresses", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOutboundEmailContent(v *types.OutboundEmailContent) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OutboundEmailContent"} + if len(v.MessageSourceType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("MessageSourceType")) + } + if v.TemplatedMessageConfig != nil { + if err := validateTemplatedMessageConfig(v.TemplatedMessageConfig); err != nil { + invalidParams.AddNested("TemplatedMessageConfig", err.(smithy.InvalidParamsError)) + } + } + if v.RawMessage != nil { + if err := validateOutboundRawMessage(v.RawMessage); err != nil { + invalidParams.AddNested("RawMessage", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOutboundRawMessage(v *types.OutboundRawMessage) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OutboundRawMessage"} + if v.Subject == nil { + invalidParams.Add(smithy.NewErrParamRequired("Subject")) + } + if v.Body == nil { + invalidParams.Add(smithy.NewErrParamRequired("Body")) + } + if v.ContentType == nil { + invalidParams.Add(smithy.NewErrParamRequired("ContentType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateParticipantDetails(v *types.ParticipantDetails) error { if v == nil { return nil @@ -7149,9 +7606,6 @@ func validateReference(v *types.Reference) error { return nil } invalidParams := smithy.InvalidParamsError{Context: "Reference"} - if v.Value == nil { - invalidParams.Add(smithy.NewErrParamRequired("Value")) - } if len(v.Type) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Type")) } @@ -7393,6 +7847,60 @@ func validateSearchableContactAttributesCriteriaList(v []types.SearchableContact } } +func validateSearchableSegmentAttributes(v *types.SearchableSegmentAttributes) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SearchableSegmentAttributes"} + if v.Criteria == nil { + invalidParams.Add(smithy.NewErrParamRequired("Criteria")) + } else if v.Criteria != nil { + if err := validateSearchableSegmentAttributesCriteriaList(v.Criteria); err != nil { + invalidParams.AddNested("Criteria", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateSearchableSegmentAttributesCriteria(v *types.SearchableSegmentAttributesCriteria) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SearchableSegmentAttributesCriteria"} + if v.Key == nil { + invalidParams.Add(smithy.NewErrParamRequired("Key")) + } + if v.Values == nil { + invalidParams.Add(smithy.NewErrParamRequired("Values")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateSearchableSegmentAttributesCriteriaList(v []types.SearchableSegmentAttributesCriteria) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SearchableSegmentAttributesCriteriaList"} + for i := range v { + if err := validateSearchableSegmentAttributesCriteria(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateSearchContactsTimeRange(v *types.SearchContactsTimeRange) error { if v == nil { return nil @@ -7429,6 +7937,11 @@ func validateSearchCriteria(v *types.SearchCriteria) error { invalidParams.AddNested("SearchableContactAttributes", err.(smithy.InvalidParamsError)) } } + if v.SearchableSegmentAttributes != nil { + if err := validateSearchableSegmentAttributes(v.SearchableSegmentAttributes); err != nil { + invalidParams.AddNested("SearchableSegmentAttributes", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -7639,6 +8152,27 @@ func validateTelephonyConfig(v *types.TelephonyConfig) error { } } +func validateTemplatedMessageConfig(v *types.TemplatedMessageConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TemplatedMessageConfig"} + if v.KnowledgeBaseId == nil { + invalidParams.Add(smithy.NewErrParamRequired("KnowledgeBaseId")) + } + if v.MessageTemplateId == nil { + invalidParams.Add(smithy.NewErrParamRequired("MessageTemplateId")) + } + if v.TemplateAttributes == nil { + invalidParams.Add(smithy.NewErrParamRequired("TemplateAttributes")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateTranscript(v *types.Transcript) error { if v == nil { return nil @@ -8365,6 +8899,50 @@ func validateOpCreateContactFlowVersionInput(v *CreateContactFlowVersionInput) e } } +func validateOpCreateContactInput(v *CreateContactInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateContactInput"} + if v.InstanceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) + } + if v.References != nil { + if err := validateContactReferences(v.References); err != nil { + invalidParams.AddNested("References", err.(smithy.InvalidParamsError)) + } + } + if len(v.Channel) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Channel")) + } + if len(v.InitiationMethod) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("InitiationMethod")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateEmailAddressInput(v *CreateEmailAddressInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateEmailAddressInput"} + if v.InstanceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) + } + if v.EmailAddress == nil { + invalidParams.Add(smithy.NewErrParamRequired("EmailAddress")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateEvaluationFormInput(v *CreateEvaluationFormInput) error { if v == nil { return nil @@ -8962,6 +9540,24 @@ func validateOpDeleteContactFlowModuleInput(v *DeleteContactFlowModuleInput) err } } +func validateOpDeleteEmailAddressInput(v *DeleteEmailAddressInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteEmailAddressInput"} + if v.InstanceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) + } + if v.EmailAddressId == nil { + invalidParams.Add(smithy.NewErrParamRequired("EmailAddressId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteEvaluationFormInput(v *DeleteEvaluationFormInput) error { if v == nil { return nil @@ -9412,6 +10008,24 @@ func validateOpDescribeContactInput(v *DescribeContactInput) error { } } +func validateOpDescribeEmailAddressInput(v *DescribeEmailAddressInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeEmailAddressInput"} + if v.InstanceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) + } + if v.EmailAddressId == nil { + invalidParams.Add(smithy.NewErrParamRequired("EmailAddressId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDescribeEvaluationFormInput(v *DescribeEvaluationFormInput) error { if v == nil { return nil @@ -10313,6 +10927,24 @@ func validateOpListApprovedOriginsInput(v *ListApprovedOriginsInput) error { } } +func validateOpListAssociatedContactsInput(v *ListAssociatedContactsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListAssociatedContactsInput"} + if v.InstanceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) + } + if v.ContactId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ContactId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListAuthenticationProfilesInput(v *ListAuthenticationProfilesInput) error { if v == nil { return nil @@ -11194,6 +11826,21 @@ func validateOpSearchContactsInput(v *SearchContactsInput) error { } } +func validateOpSearchEmailAddressesInput(v *SearchEmailAddressesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SearchEmailAddressesInput"} + if v.InstanceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpSearchHoursOfOperationsInput(v *SearchHoursOfOperationsInput) error { if v == nil { return nil @@ -11389,6 +12036,50 @@ func validateOpSendChatIntegrationEventInput(v *SendChatIntegrationEventInput) e } } +func validateOpSendOutboundEmailInput(v *SendOutboundEmailInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SendOutboundEmailInput"} + if v.InstanceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) + } + if v.FromEmailAddress == nil { + invalidParams.Add(smithy.NewErrParamRequired("FromEmailAddress")) + } else if v.FromEmailAddress != nil { + if err := validateEmailAddressInfo(v.FromEmailAddress); err != nil { + invalidParams.AddNested("FromEmailAddress", err.(smithy.InvalidParamsError)) + } + } + if v.DestinationEmailAddress == nil { + invalidParams.Add(smithy.NewErrParamRequired("DestinationEmailAddress")) + } else if v.DestinationEmailAddress != nil { + if err := validateEmailAddressInfo(v.DestinationEmailAddress); err != nil { + invalidParams.AddNested("DestinationEmailAddress", err.(smithy.InvalidParamsError)) + } + } + if v.AdditionalRecipients != nil { + if err := validateOutboundAdditionalRecipients(v.AdditionalRecipients); err != nil { + invalidParams.AddNested("AdditionalRecipients", err.(smithy.InvalidParamsError)) + } + } + if v.EmailMessage == nil { + invalidParams.Add(smithy.NewErrParamRequired("EmailMessage")) + } else if v.EmailMessage != nil { + if err := validateOutboundEmailContent(v.EmailMessage); err != nil { + invalidParams.AddNested("EmailMessage", err.(smithy.InvalidParamsError)) + } + } + if len(v.TrafficType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("TrafficType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpStartAttachedFileUploadInput(v *StartAttachedFileUploadInput) error { if v == nil { return nil @@ -11519,6 +12210,53 @@ func validateOpStartContactStreamingInput(v *StartContactStreamingInput) error { } } +func validateOpStartEmailContactInput(v *StartEmailContactInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StartEmailContactInput"} + if v.InstanceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) + } + if v.FromEmailAddress == nil { + invalidParams.Add(smithy.NewErrParamRequired("FromEmailAddress")) + } else if v.FromEmailAddress != nil { + if err := validateEmailAddressInfo(v.FromEmailAddress); err != nil { + invalidParams.AddNested("FromEmailAddress", err.(smithy.InvalidParamsError)) + } + } + if v.DestinationEmailAddress == nil { + invalidParams.Add(smithy.NewErrParamRequired("DestinationEmailAddress")) + } + if v.References != nil { + if err := validateContactReferences(v.References); err != nil { + invalidParams.AddNested("References", err.(smithy.InvalidParamsError)) + } + } + if v.EmailMessage == nil { + invalidParams.Add(smithy.NewErrParamRequired("EmailMessage")) + } else if v.EmailMessage != nil { + if err := validateInboundEmailContent(v.EmailMessage); err != nil { + invalidParams.AddNested("EmailMessage", err.(smithy.InvalidParamsError)) + } + } + if v.AdditionalRecipients != nil { + if err := validateInboundAdditionalRecipients(v.AdditionalRecipients); err != nil { + invalidParams.AddNested("AdditionalRecipients", err.(smithy.InvalidParamsError)) + } + } + if v.Attachments != nil { + if err := validateEmailAttachments(v.Attachments); err != nil { + invalidParams.AddNested("Attachments", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpStartOutboundChatContactInput(v *StartOutboundChatContactInput) error { if v == nil { return nil @@ -11556,6 +12294,48 @@ func validateOpStartOutboundChatContactInput(v *StartOutboundChatContactInput) e } } +func validateOpStartOutboundEmailContactInput(v *StartOutboundEmailContactInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StartOutboundEmailContactInput"} + if v.InstanceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) + } + if v.ContactId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ContactId")) + } + if v.FromEmailAddress != nil { + if err := validateEmailAddressInfo(v.FromEmailAddress); err != nil { + invalidParams.AddNested("FromEmailAddress", err.(smithy.InvalidParamsError)) + } + } + if v.DestinationEmailAddress == nil { + invalidParams.Add(smithy.NewErrParamRequired("DestinationEmailAddress")) + } else if v.DestinationEmailAddress != nil { + if err := validateEmailAddressInfo(v.DestinationEmailAddress); err != nil { + invalidParams.AddNested("DestinationEmailAddress", err.(smithy.InvalidParamsError)) + } + } + if v.AdditionalRecipients != nil { + if err := validateOutboundAdditionalRecipients(v.AdditionalRecipients); err != nil { + invalidParams.AddNested("AdditionalRecipients", err.(smithy.InvalidParamsError)) + } + } + if v.EmailMessage == nil { + invalidParams.Add(smithy.NewErrParamRequired("EmailMessage")) + } else if v.EmailMessage != nil { + if err := validateOutboundEmailContent(v.EmailMessage); err != nil { + invalidParams.AddNested("EmailMessage", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpStartOutboundVoiceContactInput(v *StartOutboundVoiceContactInput) error { if v == nil { return nil @@ -12084,6 +12864,24 @@ func validateOpUpdateContactScheduleInput(v *UpdateContactScheduleInput) error { } } +func validateOpUpdateEmailAddressMetadataInput(v *UpdateEmailAddressMetadataInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateEmailAddressMetadataInput"} + if v.InstanceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) + } + if v.EmailAddressId == nil { + invalidParams.Add(smithy.NewErrParamRequired("EmailAddressId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateEvaluationFormInput(v *UpdateEvaluationFormInput) error { if v == nil { return nil @@ -12358,6 +13156,27 @@ func validateOpUpdateQueueOutboundCallerConfigInput(v *UpdateQueueOutboundCaller } } +func validateOpUpdateQueueOutboundEmailConfigInput(v *UpdateQueueOutboundEmailConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateQueueOutboundEmailConfigInput"} + if v.InstanceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) + } + if v.QueueId == nil { + invalidParams.Add(smithy.NewErrParamRequired("QueueId")) + } + if v.OutboundEmailConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("OutboundEmailConfig")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateQueueStatusInput(v *UpdateQueueStatusInput) error { if v == nil { return nil diff --git a/service/costexplorer/api_op_ListCommitmentPurchaseAnalyses.go b/service/costexplorer/api_op_ListCommitmentPurchaseAnalyses.go index 336a120cbdd..584357b273e 100644 --- a/service/costexplorer/api_op_ListCommitmentPurchaseAnalyses.go +++ b/service/costexplorer/api_op_ListCommitmentPurchaseAnalyses.go @@ -11,8 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Lists the commitment purchase analyses for your account based on the last 30 -// days. +// Lists the commitment purchase analyses for your account. func (c *Client) ListCommitmentPurchaseAnalyses(ctx context.Context, params *ListCommitmentPurchaseAnalysesInput, optFns ...func(*Options)) (*ListCommitmentPurchaseAnalysesOutput, error) { if params == nil { params = &ListCommitmentPurchaseAnalysesInput{} diff --git a/service/costexplorer/api_op_StartCommitmentPurchaseAnalysis.go b/service/costexplorer/api_op_StartCommitmentPurchaseAnalysis.go index 0d531e5ba74..81d123155c7 100644 --- a/service/costexplorer/api_op_StartCommitmentPurchaseAnalysis.go +++ b/service/costexplorer/api_op_StartCommitmentPurchaseAnalysis.go @@ -13,8 +13,7 @@ import ( // Specifies the parameters of a planned commitment purchase and starts the // generation of the analysis. This enables you to estimate the cost, coverage, and -// utilization impact of your planned commitment purchases. You can request up to -// 20 analysis runs per day. +// utilization impact of your planned commitment purchases. func (c *Client) StartCommitmentPurchaseAnalysis(ctx context.Context, params *StartCommitmentPurchaseAnalysisInput, optFns ...func(*Options)) (*StartCommitmentPurchaseAnalysisOutput, error) { if params == nil { params = &StartCommitmentPurchaseAnalysisInput{} diff --git a/service/costexplorer/deserializers.go b/service/costexplorer/deserializers.go index af49fc37e95..315e79dfe94 100644 --- a/service/costexplorer/deserializers.go +++ b/service/costexplorer/deserializers.go @@ -12301,6 +12301,11 @@ func awsAwsjson11_deserializeDocumentRootCause(v **types.RootCause, value interf for key, value := range shape { switch key { + case "Impact": + if err := awsAwsjson11_deserializeDocumentRootCauseImpact(&sv.Impact, value); err != nil { + return err + } + case "LinkedAccount": if value != nil { jtv, ok := value.(string) @@ -12355,6 +12360,71 @@ func awsAwsjson11_deserializeDocumentRootCause(v **types.RootCause, value interf return nil } +func awsAwsjson11_deserializeDocumentRootCauseImpact(v **types.RootCauseImpact, 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.RootCauseImpact + if *v == nil { + sv = &types.RootCauseImpact{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Contribution": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Contribution = 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.Contribution = f64 + + default: + return fmt.Errorf("expected GenericDouble to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentRootCauses(v *[]types.RootCause, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/costexplorer/types/errors.go b/service/costexplorer/types/errors.go index 61cbf95405e..1a44289e47d 100644 --- a/service/costexplorer/types/errors.go +++ b/service/costexplorer/types/errors.go @@ -113,7 +113,7 @@ func (e *DataUnavailableException) ErrorCode() string { } func (e *DataUnavailableException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// A request to generate a recommendation is already in progress. +// A request to generate a recommendation or analysis is already in progress. type GenerationExistsException struct { Message *string diff --git a/service/costexplorer/types/types.go b/service/costexplorer/types/types.go index 298c016d1b2..4e39c969a62 100644 --- a/service/costexplorer/types/types.go +++ b/service/costexplorer/types/types.go @@ -21,7 +21,7 @@ type AnalysisSummary struct { // The completion time of the analysis. AnalysisCompletionTime *string - // The analysis ID that's associated with the commitment purchase. + // The analysis ID that's associated with the commitment purchase analysis. AnalysisId *string // The start time of the analysis. @@ -30,7 +30,7 @@ type AnalysisSummary struct { // The status of the analysis. AnalysisStatus AnalysisStatus - // The analysis configuration for the commitment purchase analysis. + // The configuration for the commitment purchase analysis. CommitmentPurchaseAnalysisConfiguration *CommitmentPurchaseAnalysisConfiguration // The error code used for the analysis. @@ -545,8 +545,7 @@ type CostCategoryRule struct { // An [Expression] object used to categorize costs. This supports dimensions, tags, and nested // expressions. Currently the only dimensions supported are LINKED_ACCOUNT , // - // SERVICE_CODE , RECORD_TYPE , LINKED_ACCOUNT_NAME , REGION , USAGE_TYPE , and - // BILLING_ENTITY . + // SERVICE_CODE , RECORD_TYPE , LINKED_ACCOUNT_NAME , REGION , and USAGE_TYPE . // // RECORD_TYPE is a dimension used for Cost Explorer APIs, and is also supported // for Cost Category expressions. This dimension uses different terms, depending on @@ -1654,8 +1653,11 @@ type ReservationPurchaseRecommendationDetail struct { AverageNormalizedUnitsUsedPerHour *string // The average number of provisioned capacity units that you used in an hour - // during the historical period. Amazon Web Services uses this to calculate your - // recommended reservation purchases. + // during the + // + // historical period. Amazon Web Services uses this to calculate your recommended + // + // reservation purchases. AverageNumberOfCapacityUnitsUsedPerHour *string // The average number of instances that you used in an hour during the historical @@ -1663,16 +1665,16 @@ type ReservationPurchaseRecommendationDetail struct { // purchases. AverageNumberOfInstancesUsedPerHour *string - // The average utilization of your recommendations. Amazon Web Services uses this - // to calculate your recommended reservation purchases. + // The average utilization of your instances. Amazon Web Services uses this to + // calculate your recommended reservation purchases. AverageUtilization *string // The currency code that Amazon Web Services used to calculate the costs for this - // recommendation. + // instance. CurrencyCode *string - // How long Amazon Web Services estimates that it takes for this recommendation to - // start saving you money, in months. + // How long Amazon Web Services estimates that it takes for this instance to start + // saving you money, in months. EstimatedBreakEvenInMonths *string // How much Amazon Web Services estimates that you spend on On-Demand Instances in @@ -1701,8 +1703,11 @@ type ReservationPurchaseRecommendationDetail struct { MaximumNormalizedUnitsUsedPerHour *string // The maximum number of provisioned capacity units that you used in an hour - // during the historical period. Amazon Web Services uses this to calculate your - // recommended reservation purchases. + // during the + // + // historical period. Amazon Web Services uses this to calculate your recommended + // + // reservation purchases. MaximumNumberOfCapacityUnitsUsedPerHour *string // The maximum number of instances that you used in an hour during the historical @@ -1716,8 +1721,11 @@ type ReservationPurchaseRecommendationDetail struct { MinimumNormalizedUnitsUsedPerHour *string // The minimum number of provisioned capacity units that you used in an hour - // during the historical period. Amazon Web Services uses this to calculate your - // recommended reservation purchases. + // during the + // + // historical period. Amazon Web Services uses this to calculate your recommended + // + // reservation purchases. MinimumNumberOfCapacityUnitsUsedPerHour *string // The minimum number of instances that you used in an hour during the historical @@ -1730,20 +1738,23 @@ type ReservationPurchaseRecommendationDetail struct { RecommendedNormalizedUnitsToPurchase *string // The number of reserved capacity units that Amazon Web Services recommends that - // you purchase. + // you + // + // purchase. RecommendedNumberOfCapacityUnitsToPurchase *string // The number of instances that Amazon Web Services recommends that you purchase. RecommendedNumberOfInstancesToPurchase *string - // How much purchasing this recommendation costs you on a monthly basis. + // How much purchasing this instance costs you on a monthly basis. RecurringStandardMonthlyCost *string // Details about the reservations that Amazon Web Services recommends that you + // // purchase. ReservedCapacityDetails *ReservedCapacityDetails - // How much purchasing this recommendation costs you upfront. + // How much purchasing this instance costs you upfront. UpfrontCost *string noSmithyDocumentSerde @@ -1803,6 +1814,7 @@ type ReservationUtilizationGroup struct { } // Details about the reservations that Amazon Web Services recommends that you +// // purchase. type ReservedCapacityDetails struct { @@ -1960,10 +1972,14 @@ type RightsizingRecommendationSummary struct { } // The combination of Amazon Web Services service, linked account, linked account -// name, Region, and usage type where a cost anomaly is observed. The linked -// account name will only be available when the account name can be identified. +// name, Region, and usage type where a cost anomaly is observed, along with the +// dollar and percentage amount of the anomaly impact. The linked account name will +// only be available when the account name can be identified. type RootCause struct { + // The dollar impact for the root cause. + Impact *RootCauseImpact + // The member account value that's associated with the cost anomaly. LinkedAccount *string @@ -1982,13 +1998,25 @@ type RootCause struct { noSmithyDocumentSerde } +// The dollar value of the root cause. +type RootCauseImpact struct { + + // The dollar amount that this root cause contributed to the anomaly's TotalImpact. + // + // This member is required. + Contribution float64 + + noSmithyDocumentSerde +} + // The Savings Plans commitment details. type SavingsPlans struct { // The instance family of the Savings Plans commitment. InstanceFamily *string - // The unique ID that's used to distinguish commitments from one another. + // The unique ID that's used to distinguish Savings Plans commitments from one + // another. OfferingId *string // The payment option for the Savings Plans commitment. @@ -2141,28 +2169,27 @@ type SavingsPlansPurchaseAnalysisDetails struct { // The estimated utilization of the Savings Plan. EstimatedAverageUtilization *string - // The estimated cost of the purchase commitment over the length of the lookback - // period. + // The estimated cost of the Savings Plan over the length of the lookback period. EstimatedCommitmentCost *string // The estimated monthly savings amount based on the Savings Plan. EstimatedMonthlySavingsAmount *string - // The remaining On-Demand cost estimated to not be covered by the commitment, + // The remaining On-Demand cost estimated to not be covered by the Savings Plan // over the length of the lookback period. EstimatedOnDemandCost *string - // The estimated On-Demand cost you expect with no additional commitment, based on + // The estimated On-Demand cost you expect with no additional commitment based on // your usage of the selected time period and the Savings Plan you own. EstimatedOnDemandCostWithCurrentCommitment *string - // The estimated return on investment that's based on the purchase commitment and + // The estimated return on investment that's based on the Savings Plan and // estimated savings. This is calculated as // estimatedSavingsAmount/estimatedSPCost*100. EstimatedROI *string - // The estimated savings amount that's based on the purchase commitment over the - // length of the lookback period. + // The estimated savings amount that's based on the Savings Plan over the length + // of the lookback period. EstimatedSavingsAmount *string // The estimated savings percentage relative to the total cost over the cost @@ -2185,7 +2212,7 @@ type SavingsPlansPurchaseAnalysisDetails struct { // period. MetricsOverLookbackPeriod []RecommendationDetailHourlyMetrics - // The upfront cost of the Savings Plan, based on the selected payment option. + // The upfront cost of the Savings Plan based on the selected payment option. UpfrontCost *string noSmithyDocumentSerde diff --git a/service/elasticloadbalancingv2/deserializers.go b/service/elasticloadbalancingv2/deserializers.go index dc5898d84a9..ccbcd224ac0 100644 --- a/service/elasticloadbalancingv2/deserializers.go +++ b/service/elasticloadbalancingv2/deserializers.go @@ -13073,6 +13073,19 @@ func awsAwsquery_deserializeDocumentMutualAuthenticationAttributes(v **types.Mut originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { + case strings.EqualFold("AdvertiseTrustStoreCaNames", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.AdvertiseTrustStoreCaNames = types.AdvertiseTrustStoreCaNamesEnum(xtv) + } + case strings.EqualFold("IgnoreClientCertificateExpiry", t.Name.Local): val, err := decoder.Value() if err != nil { diff --git a/service/elasticloadbalancingv2/serializers.go b/service/elasticloadbalancingv2/serializers.go index 69dc4fbf0df..8d691a53547 100644 --- a/service/elasticloadbalancingv2/serializers.go +++ b/service/elasticloadbalancingv2/serializers.go @@ -4011,6 +4011,11 @@ func awsAwsquery_serializeDocumentMutualAuthenticationAttributes(v *types.Mutual object := value.Object() _ = object + if len(v.AdvertiseTrustStoreCaNames) > 0 { + objectKey := object.Key("AdvertiseTrustStoreCaNames") + objectKey.String(string(v.AdvertiseTrustStoreCaNames)) + } + if v.IgnoreClientCertificateExpiry != nil { objectKey := object.Key("IgnoreClientCertificateExpiry") objectKey.Boolean(*v.IgnoreClientCertificateExpiry) diff --git a/service/elasticloadbalancingv2/types/enums.go b/service/elasticloadbalancingv2/types/enums.go index a95adb8a09c..d88736f743f 100644 --- a/service/elasticloadbalancingv2/types/enums.go +++ b/service/elasticloadbalancingv2/types/enums.go @@ -27,6 +27,26 @@ func (ActionTypeEnum) Values() []ActionTypeEnum { } } +type AdvertiseTrustStoreCaNamesEnum string + +// Enum values for AdvertiseTrustStoreCaNamesEnum +const ( + AdvertiseTrustStoreCaNamesEnumOn AdvertiseTrustStoreCaNamesEnum = "on" + AdvertiseTrustStoreCaNamesEnumOff AdvertiseTrustStoreCaNamesEnum = "off" +) + +// Values returns all known values for AdvertiseTrustStoreCaNamesEnum. 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 (AdvertiseTrustStoreCaNamesEnum) Values() []AdvertiseTrustStoreCaNamesEnum { + return []AdvertiseTrustStoreCaNamesEnum{ + "on", + "off", + } +} + type AnomalyResultEnum string // Enum values for AnomalyResultEnum diff --git a/service/elasticloadbalancingv2/types/types.go b/service/elasticloadbalancingv2/types/types.go index 0b9e1e2da8f..99c5e8f6d5e 100644 --- a/service/elasticloadbalancingv2/types/types.go +++ b/service/elasticloadbalancingv2/types/types.go @@ -840,6 +840,9 @@ type MinimumLoadBalancerCapacity struct { // Information about the mutual authentication attributes of a listener. type MutualAuthenticationAttributes struct { + // Indicates whether trust store CA certificate names are advertised. + AdvertiseTrustStoreCaNames AdvertiseTrustStoreCaNamesEnum + // Indicates whether expired client certificates are ignored. IgnoreClientCertificateExpiry *bool diff --git a/service/emr/deserializers.go b/service/emr/deserializers.go index 75c02379ab4..074d7be2fe0 100644 --- a/service/emr/deserializers.go +++ b/service/emr/deserializers.go @@ -10994,6 +10994,28 @@ func awsAwsjson11_deserializeDocumentManagedScalingPolicy(v **types.ManagedScali return err } + case "ScalingStrategy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScalingStrategy to be of type string, got %T instead", value) + } + sv.ScalingStrategy = types.ScalingStrategy(jtv) + } + + case "UtilizationPerformanceIndex": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected UtilizationPerformanceIndexInteger to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.UtilizationPerformanceIndex = ptr.Int32(int32(i64)) + } + default: _, _ = key, value diff --git a/service/emr/serializers.go b/service/emr/serializers.go index b379ac44f69..cd94bf58709 100644 --- a/service/emr/serializers.go +++ b/service/emr/serializers.go @@ -4483,6 +4483,16 @@ func awsAwsjson11_serializeDocumentManagedScalingPolicy(v *types.ManagedScalingP } } + if len(v.ScalingStrategy) > 0 { + ok := object.Key("ScalingStrategy") + ok.String(string(v.ScalingStrategy)) + } + + if v.UtilizationPerformanceIndex != nil { + ok := object.Key("UtilizationPerformanceIndex") + ok.Integer(*v.UtilizationPerformanceIndex) + } + return nil } diff --git a/service/emr/types/enums.go b/service/emr/types/enums.go index 3bb449d27a1..58954f5be57 100644 --- a/service/emr/types/enums.go +++ b/service/emr/types/enums.go @@ -780,6 +780,25 @@ func (ScaleDownBehavior) Values() []ScaleDownBehavior { } } +type ScalingStrategy string + +// Enum values for ScalingStrategy +const ( + ScalingStrategyDefault ScalingStrategy = "DEFAULT" + ScalingStrategyAdvanced ScalingStrategy = "ADVANCED" +) + +// Values returns all known values for ScalingStrategy. 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 (ScalingStrategy) Values() []ScalingStrategy { + return []ScalingStrategy{ + "DEFAULT", + "ADVANCED", + } +} + type SpotProvisioningAllocationStrategy string // Enum values for SpotProvisioningAllocationStrategy diff --git a/service/emr/types/types.go b/service/emr/types/types.go index 7c4be64376c..9b0ac4227d0 100644 --- a/service/emr/types/types.go +++ b/service/emr/types/types.go @@ -1974,6 +1974,16 @@ type ManagedScalingPolicy struct { // after initial configuration. ComputeLimits *ComputeLimits + // Determines whether a custom scaling utilization performance index can be set. + // Possible values include ADVANCED or DEFAULT. + ScalingStrategy ScalingStrategy + + // An integer value that represents an advanced scaling strategy. Setting a higher + // value optimizes for performance. Setting a lower value optimizes for resource + // conservation. Setting the value to 50 balances performance and resource + // conservation. Possible values are 1, 25, 50, 75, and 100. + UtilizationPerformanceIndex *int32 + noSmithyDocumentSerde } diff --git a/service/inspector2/api_op_AssociateMember.go b/service/inspector2/api_op_AssociateMember.go index 2306d783a63..40f6e08d09c 100644 --- a/service/inspector2/api_op_AssociateMember.go +++ b/service/inspector2/api_op_AssociateMember.go @@ -10,12 +10,16 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Associates an Amazon Web Services account with an Amazon Inspector delegated -// administrator. An HTTP 200 response indicates the association was successfully -// started, but doesn’t indicate whether it was completed. You can check if the -// association completed by using [ListMembers]for multiple accounts or [GetMembers] for a single account. +// Associates an Amazon Web Services account with an Amazon Inspector delegated +// +// administrator. An HTTP 200 response indicates the association was started but +// doesn’t indicate whether it completed. You can check if the association +// completed using [ListMembers]for multiple accounts or [GetMembers] for a single account. An HTTP 402 +// response indicates the association failed because the organization size exceeded +// its limit. For information on limits, see [Amazon Inspector quotas]. // // [ListMembers]: https://docs.aws.amazon.com/inspector/v2/APIReference/API_ListMembers.html +// [Amazon Inspector quotas]: https://docs.aws.amazon.com/inspector/latest/user/quotas.html // [GetMembers]: https://docs.aws.amazon.com/inspector/v2/APIReference/API_GetMember.html func (c *Client) AssociateMember(ctx context.Context, params *AssociateMemberInput, optFns ...func(*Options)) (*AssociateMemberOutput, error) { if params == nil { diff --git a/service/inspector2/deserializers.go b/service/inspector2/deserializers.go index 8cc90ca1ece..a75f1648aaf 100644 --- a/service/inspector2/deserializers.go +++ b/service/inspector2/deserializers.go @@ -140,6 +140,9 @@ func awsRestjson1_deserializeOpErrorAssociateMember(response *smithyhttp.Respons case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) diff --git a/service/lambda/api_op_CreateEventSourceMapping.go b/service/lambda/api_op_CreateEventSourceMapping.go index 38a6f88674c..4cb27810bda 100644 --- a/service/lambda/api_op_CreateEventSourceMapping.go +++ b/service/lambda/api_op_CreateEventSourceMapping.go @@ -229,6 +229,12 @@ type CreateEventSourceMappingInput struct { // shard concurrently. ParallelizationFactor *int32 + // (Amazon MSK and self-managed Apache Kafka only) The Provisioned Mode + // configuration for the event source. For more information, see [Provisioned Mode]. + // + // [Provisioned Mode]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#invocation-eventsourcemapping-provisioned-mode + ProvisionedPollerConfig *types.ProvisionedPollerConfig + // (MQ) The name of the Amazon MQ broker destination queue to consume. Queues []string @@ -385,6 +391,12 @@ type CreateEventSourceMappingOutput struct { // concurrently from each shard. The default value is 1. ParallelizationFactor *int32 + // (Amazon MSK and self-managed Apache Kafka only) The Provisioned Mode + // configuration for the event source. For more information, see [Provisioned Mode]. + // + // [Provisioned Mode]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#invocation-eventsourcemapping-provisioned-mode + ProvisionedPollerConfig *types.ProvisionedPollerConfig + // (Amazon MQ) The name of the Amazon MQ broker destination queue to consume. Queues []string diff --git a/service/lambda/api_op_DeleteEventSourceMapping.go b/service/lambda/api_op_DeleteEventSourceMapping.go index 12c8cac8572..8b17d74e833 100644 --- a/service/lambda/api_op_DeleteEventSourceMapping.go +++ b/service/lambda/api_op_DeleteEventSourceMapping.go @@ -156,6 +156,12 @@ type DeleteEventSourceMappingOutput struct { // concurrently from each shard. The default value is 1. ParallelizationFactor *int32 + // (Amazon MSK and self-managed Apache Kafka only) The Provisioned Mode + // configuration for the event source. For more information, see [Provisioned Mode]. + // + // [Provisioned Mode]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#invocation-eventsourcemapping-provisioned-mode + ProvisionedPollerConfig *types.ProvisionedPollerConfig + // (Amazon MQ) The name of the Amazon MQ broker destination queue to consume. Queues []string diff --git a/service/lambda/api_op_GetEventSourceMapping.go b/service/lambda/api_op_GetEventSourceMapping.go index ab6517b7f8c..44f926a15d1 100644 --- a/service/lambda/api_op_GetEventSourceMapping.go +++ b/service/lambda/api_op_GetEventSourceMapping.go @@ -152,6 +152,12 @@ type GetEventSourceMappingOutput struct { // concurrently from each shard. The default value is 1. ParallelizationFactor *int32 + // (Amazon MSK and self-managed Apache Kafka only) The Provisioned Mode + // configuration for the event source. For more information, see [Provisioned Mode]. + // + // [Provisioned Mode]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#invocation-eventsourcemapping-provisioned-mode + ProvisionedPollerConfig *types.ProvisionedPollerConfig + // (Amazon MQ) The name of the Amazon MQ broker destination queue to consume. Queues []string diff --git a/service/lambda/api_op_UpdateEventSourceMapping.go b/service/lambda/api_op_UpdateEventSourceMapping.go index a1fc62aab9f..6283b0ab59e 100644 --- a/service/lambda/api_op_UpdateEventSourceMapping.go +++ b/service/lambda/api_op_UpdateEventSourceMapping.go @@ -210,6 +210,12 @@ type UpdateEventSourceMappingInput struct { // shard concurrently. ParallelizationFactor *int32 + // (Amazon MSK and self-managed Apache Kafka only) The Provisioned Mode + // configuration for the event source. For more information, see [Provisioned Mode]. + // + // [Provisioned Mode]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#invocation-eventsourcemapping-provisioned-mode + ProvisionedPollerConfig *types.ProvisionedPollerConfig + // (Amazon SQS only) The scaling configuration for the event source. For more // information, see [Configuring maximum concurrency for Amazon SQS event sources]. // @@ -341,6 +347,12 @@ type UpdateEventSourceMappingOutput struct { // concurrently from each shard. The default value is 1. ParallelizationFactor *int32 + // (Amazon MSK and self-managed Apache Kafka only) The Provisioned Mode + // configuration for the event source. For more information, see [Provisioned Mode]. + // + // [Provisioned Mode]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#invocation-eventsourcemapping-provisioned-mode + ProvisionedPollerConfig *types.ProvisionedPollerConfig + // (Amazon MQ) The name of the Amazon MQ broker destination queue to consume. Queues []string diff --git a/service/lambda/deserializers.go b/service/lambda/deserializers.go index 503334ec207..c04976e25dc 100644 --- a/service/lambda/deserializers.go +++ b/service/lambda/deserializers.go @@ -1074,6 +1074,11 @@ func awsRestjson1_deserializeOpDocumentCreateEventSourceMappingOutput(v **Create sv.ParallelizationFactor = ptr.Int32(int32(i64)) } + case "ProvisionedPollerConfig": + if err := awsRestjson1_deserializeDocumentProvisionedPollerConfig(&sv.ProvisionedPollerConfig, value); err != nil { + return err + } + case "Queues": if err := awsRestjson1_deserializeDocumentQueues(&sv.Queues, value); err != nil { return err @@ -2369,6 +2374,11 @@ func awsRestjson1_deserializeOpDocumentDeleteEventSourceMappingOutput(v **Delete sv.ParallelizationFactor = ptr.Int32(int32(i64)) } + case "ProvisionedPollerConfig": + if err := awsRestjson1_deserializeDocumentProvisionedPollerConfig(&sv.ProvisionedPollerConfig, value); err != nil { + return err + } + case "Queues": if err := awsRestjson1_deserializeDocumentQueues(&sv.Queues, value); err != nil { return err @@ -4047,6 +4057,11 @@ func awsRestjson1_deserializeOpDocumentGetEventSourceMappingOutput(v **GetEventS sv.ParallelizationFactor = ptr.Int32(int32(i64)) } + case "ProvisionedPollerConfig": + if err := awsRestjson1_deserializeDocumentProvisionedPollerConfig(&sv.ProvisionedPollerConfig, value); err != nil { + return err + } + case "Queues": if err := awsRestjson1_deserializeDocumentQueues(&sv.Queues, value); err != nil { return err @@ -12435,6 +12450,11 @@ func awsRestjson1_deserializeOpDocumentUpdateEventSourceMappingOutput(v **Update sv.ParallelizationFactor = ptr.Int32(int32(i64)) } + case "ProvisionedPollerConfig": + if err := awsRestjson1_deserializeDocumentProvisionedPollerConfig(&sv.ProvisionedPollerConfig, value); err != nil { + return err + } + case "Queues": if err := awsRestjson1_deserializeDocumentQueues(&sv.Queues, value); err != nil { return err @@ -17471,6 +17491,11 @@ func awsRestjson1_deserializeDocumentEventSourceMappingConfiguration(v **types.E sv.ParallelizationFactor = ptr.Int32(int32(i64)) } + case "ProvisionedPollerConfig": + if err := awsRestjson1_deserializeDocumentProvisionedPollerConfig(&sv.ProvisionedPollerConfig, value); err != nil { + return err + } + case "Queues": if err := awsRestjson1_deserializeDocumentQueues(&sv.Queues, value); err != nil { return err @@ -20215,6 +20240,63 @@ func awsRestjson1_deserializeDocumentProvisionedConcurrencyConfigNotFoundExcepti return nil } +func awsRestjson1_deserializeDocumentProvisionedPollerConfig(v **types.ProvisionedPollerConfig, 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.ProvisionedPollerConfig + if *v == nil { + sv = &types.ProvisionedPollerConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "MaximumPollers": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MaximumNumberOfPollers to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaximumPollers = ptr.Int32(int32(i64)) + } + + case "MinimumPollers": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MinimumNumberOfPollers to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MinimumPollers = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentQueues(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/lambda/serializers.go b/service/lambda/serializers.go index b8bbf15030e..cfab3c8999d 100644 --- a/service/lambda/serializers.go +++ b/service/lambda/serializers.go @@ -655,6 +655,13 @@ func awsRestjson1_serializeOpDocumentCreateEventSourceMappingInput(v *CreateEven ok.Integer(*v.ParallelizationFactor) } + if v.ProvisionedPollerConfig != nil { + ok := object.Key("ProvisionedPollerConfig") + if err := awsRestjson1_serializeDocumentProvisionedPollerConfig(v.ProvisionedPollerConfig, ok); err != nil { + return err + } + } + if v.Queues != nil { ok := object.Key("Queues") if err := awsRestjson1_serializeDocumentQueues(v.Queues, ok); err != nil { @@ -5834,6 +5841,13 @@ func awsRestjson1_serializeOpDocumentUpdateEventSourceMappingInput(v *UpdateEven ok.Integer(*v.ParallelizationFactor) } + if v.ProvisionedPollerConfig != nil { + ok := object.Key("ProvisionedPollerConfig") + if err := awsRestjson1_serializeDocumentProvisionedPollerConfig(v.ProvisionedPollerConfig, ok); err != nil { + return err + } + } + if v.ScalingConfig != nil { ok := object.Key("ScalingConfig") if err := awsRestjson1_serializeDocumentScalingConfig(v.ScalingConfig, ok); err != nil { @@ -6979,6 +6993,23 @@ func awsRestjson1_serializeDocumentOnSuccess(v *types.OnSuccess, value smithyjso return nil } +func awsRestjson1_serializeDocumentProvisionedPollerConfig(v *types.ProvisionedPollerConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaximumPollers != nil { + ok := object.Key("MaximumPollers") + ok.Integer(*v.MaximumPollers) + } + + if v.MinimumPollers != nil { + ok := object.Key("MinimumPollers") + ok.Integer(*v.MinimumPollers) + } + + return nil +} + func awsRestjson1_serializeDocumentQueues(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() diff --git a/service/lambda/types/types.go b/service/lambda/types/types.go index 752753fc48a..42d31fe8fa9 100644 --- a/service/lambda/types/types.go +++ b/service/lambda/types/types.go @@ -427,6 +427,12 @@ type EventSourceMappingConfiguration struct { // concurrently from each shard. The default value is 1. ParallelizationFactor *int32 + // (Amazon MSK and self-managed Apache Kafka only) The Provisioned Mode + // configuration for the event source. For more information, see [Provisioned Mode]. + // + // [Provisioned Mode]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#invocation-eventsourcemapping-provisioned-mode + ProvisionedPollerConfig *ProvisionedPollerConfig + // (Amazon MQ) The name of the Amazon MQ broker destination queue to consume. Queues []string @@ -1187,6 +1193,22 @@ type ProvisionedConcurrencyConfigListItem struct { noSmithyDocumentSerde } +// The [Provisioned Mode] configuration for the event source. Use Provisioned Mode to customize the +// minimum and maximum number of event pollers for your event source. An event +// poller is a compute unit that provides approximately 5 MBps of throughput. +// +// [Provisioned Mode]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#invocation-eventsourcemapping-provisioned-mode +type ProvisionedPollerConfig struct { + + // The maximum number of event pollers this event source can scale up to. + MaximumPollers *int32 + + // The minimum number of event pollers this event source can scale down to. + MinimumPollers *int32 + + noSmithyDocumentSerde +} + // The ARN of the runtime and any errors that occured. type RuntimeVersionConfig struct { diff --git a/service/licensemanagerlinuxsubscriptions/internal/endpoints/endpoints.go b/service/licensemanagerlinuxsubscriptions/internal/endpoints/endpoints.go index 32a9b40223e..d1f6dc15662 100644 --- a/service/licensemanagerlinuxsubscriptions/internal/endpoints/endpoints.go +++ b/service/licensemanagerlinuxsubscriptions/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/mailmanager/deserializers.go b/service/mailmanager/deserializers.go index 6b8903dc09a..d97776ef693 100644 --- a/service/mailmanager/deserializers.go +++ b/service/mailmanager/deserializers.go @@ -6686,6 +6686,73 @@ func awsAwsjson10_deserializeDocumentDeliverToMailboxAction(v **types.DeliverToM return nil } +func awsAwsjson10_deserializeDocumentDeliverToQBusinessAction(v **types.DeliverToQBusinessAction, 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.DeliverToQBusinessAction + if *v == nil { + sv = &types.DeliverToQBusinessAction{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ActionFailurePolicy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ActionFailurePolicy to be of type string, got %T instead", value) + } + sv.ActionFailurePolicy = types.ActionFailurePolicy(jtv) + } + + case "ApplicationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected QBusinessApplicationId to be of type string, got %T instead", value) + } + sv.ApplicationId = ptr.String(jtv) + } + + case "IndexId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected QBusinessIndexId to be of type string, got %T instead", value) + } + sv.IndexId = ptr.String(jtv) + } + + case "RoleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IamRoleArn to be of type string, got %T instead", value) + } + sv.RoleArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeDocumentDropAction(v **types.DropAction, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -8709,6 +8776,16 @@ loop: uv = &types.RuleActionMemberDeliverToMailbox{Value: mv} break loop + case "DeliverToQBusiness": + var mv types.DeliverToQBusinessAction + destAddr := &mv + if err := awsAwsjson10_deserializeDocumentDeliverToQBusinessAction(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.RuleActionMemberDeliverToQBusiness{Value: mv} + break loop + case "Drop": var mv types.DropAction destAddr := &mv diff --git a/service/mailmanager/serializers.go b/service/mailmanager/serializers.go index ed913aa4999..4b9d191100a 100644 --- a/service/mailmanager/serializers.go +++ b/service/mailmanager/serializers.go @@ -3111,6 +3111,33 @@ func awsAwsjson10_serializeDocumentDeliverToMailboxAction(v *types.DeliverToMail return nil } +func awsAwsjson10_serializeDocumentDeliverToQBusinessAction(v *types.DeliverToQBusinessAction, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.ActionFailurePolicy) > 0 { + ok := object.Key("ActionFailurePolicy") + ok.String(string(v.ActionFailurePolicy)) + } + + if v.ApplicationId != nil { + ok := object.Key("ApplicationId") + ok.String(*v.ApplicationId) + } + + if v.IndexId != nil { + ok := object.Key("IndexId") + ok.String(*v.IndexId) + } + + if v.RoleArn != nil { + ok := object.Key("RoleArn") + ok.String(*v.RoleArn) + } + + return nil +} + func awsAwsjson10_serializeDocumentDropAction(v *types.DropAction, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3561,6 +3588,12 @@ func awsAwsjson10_serializeDocumentRuleAction(v types.RuleAction, value smithyjs return err } + case *types.RuleActionMemberDeliverToQBusiness: + av := object.Key("DeliverToQBusiness") + if err := awsAwsjson10_serializeDocumentDeliverToQBusinessAction(&uv.Value, av); err != nil { + return err + } + case *types.RuleActionMemberDrop: av := object.Key("Drop") if err := awsAwsjson10_serializeDocumentDropAction(&uv.Value, av); err != nil { diff --git a/service/mailmanager/types/types.go b/service/mailmanager/types/types.go index 0e525ec76bd..4cfd549fbc2 100644 --- a/service/mailmanager/types/types.go +++ b/service/mailmanager/types/types.go @@ -282,6 +282,38 @@ type DeliverToMailboxAction struct { noSmithyDocumentSerde } +// The action to deliver incoming emails to an Amazon Q Business application for +// indexing. +type DeliverToQBusinessAction struct { + + // The unique identifier of the Amazon Q Business application instance where the + // email content will be delivered. + // + // This member is required. + ApplicationId *string + + // The identifier of the knowledge base index within the Amazon Q Business + // application where the email content will be stored and indexed. + // + // This member is required. + IndexId *string + + // The Amazon Resource Name (ARN) of the IAM Role to use while delivering to + // Amazon Q Business. This role must have access to the qbusiness:BatchPutDocument + // API for the given application and index. + // + // This member is required. + RoleArn *string + + // A policy that states what to do in the case of failure. The action will fail if + // there are configuration errors. For example, the specified application has been + // deleted or the role lacks necessary permissions to call the + // qbusiness:BatchPutDocument API. + ActionFailurePolicy ActionFailurePolicy + + noSmithyDocumentSerde +} + // This action causes processing to stop and the email to be dropped. If the // action applies only to certain recipients, only those recipients are dropped, // and processing continues for other recipients. @@ -917,6 +949,7 @@ type Rule struct { // RuleActionMemberAddHeader // RuleActionMemberArchive // RuleActionMemberDeliverToMailbox +// RuleActionMemberDeliverToQBusiness // RuleActionMemberDrop // RuleActionMemberRelay // RuleActionMemberReplaceRecipient @@ -954,6 +987,16 @@ type RuleActionMemberDeliverToMailbox struct { func (*RuleActionMemberDeliverToMailbox) isRuleAction() {} +// This action delivers an email to an Amazon Q Business application for ingestion +// into its knowledge base. +type RuleActionMemberDeliverToQBusiness struct { + Value DeliverToQBusinessAction + + noSmithyDocumentSerde +} + +func (*RuleActionMemberDeliverToQBusiness) isRuleAction() {} + // This action terminates the evaluation of rules in the rule set. type RuleActionMemberDrop struct { Value DropAction diff --git a/service/mailmanager/types/types_exported_test.go b/service/mailmanager/types/types_exported_test.go index e32d0808020..97c4f5855be 100644 --- a/service/mailmanager/types/types_exported_test.go +++ b/service/mailmanager/types/types_exported_test.go @@ -260,6 +260,9 @@ func ExampleRuleAction_outputUsage() { case *types.RuleActionMemberDeliverToMailbox: _ = v.Value // Value is types.DeliverToMailboxAction + case *types.RuleActionMemberDeliverToQBusiness: + _ = v.Value // Value is types.DeliverToQBusinessAction + case *types.RuleActionMemberDrop: _ = v.Value // Value is types.DropAction @@ -290,6 +293,7 @@ var _ *types.ArchiveAction var _ *types.DeliverToMailboxAction var _ *types.DropAction var _ *types.RelayAction +var _ *types.DeliverToQBusinessAction var _ *types.ReplaceRecipientAction var _ *types.S3Action diff --git a/service/mailmanager/validators.go b/service/mailmanager/validators.go index 7d06c74631f..a33e9da6aae 100644 --- a/service/mailmanager/validators.go +++ b/service/mailmanager/validators.go @@ -1141,6 +1141,27 @@ func validateDeliverToMailboxAction(v *types.DeliverToMailboxAction) error { } } +func validateDeliverToQBusinessAction(v *types.DeliverToQBusinessAction) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeliverToQBusinessAction"} + if v.ApplicationId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ApplicationId")) + } + if v.IndexId == nil { + invalidParams.Add(smithy.NewErrParamRequired("IndexId")) + } + if v.RoleArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoleArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateIngressAnalysis(v *types.IngressAnalysis) error { if v == nil { return nil @@ -1418,6 +1439,11 @@ func validateRuleAction(v types.RuleAction) error { invalidParams.AddNested("[DeliverToMailbox]", err.(smithy.InvalidParamsError)) } + case *types.RuleActionMemberDeliverToQBusiness: + if err := validateDeliverToQBusinessAction(&uv.Value); err != nil { + invalidParams.AddNested("[DeliverToQBusiness]", err.(smithy.InvalidParamsError)) + } + case *types.RuleActionMemberRelay: if err := validateRelayAction(&uv.Value); err != nil { invalidParams.AddNested("[Relay]", err.(smithy.InvalidParamsError)) diff --git a/service/neptunegraph/api_op_CancelExportTask.go b/service/neptunegraph/api_op_CancelExportTask.go new file mode 100644 index 00000000000..95c728015f9 --- /dev/null +++ b/service/neptunegraph/api_op_CancelExportTask.go @@ -0,0 +1,203 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package neptunegraph + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/neptunegraph/types" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Cancel the specified export task. +func (c *Client) CancelExportTask(ctx context.Context, params *CancelExportTaskInput, optFns ...func(*Options)) (*CancelExportTaskOutput, error) { + if params == nil { + params = &CancelExportTaskInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CancelExportTask", params, optFns, c.addOperationCancelExportTaskMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CancelExportTaskOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CancelExportTaskInput struct { + + // The unique identifier of the export task. + // + // This member is required. + TaskIdentifier *string + + noSmithyDocumentSerde +} + +func (in *CancelExportTaskInput) bindEndpointParams(p *EndpointParameters) { + + p.ApiType = ptr.String("ControlPlane") +} + +type CancelExportTaskOutput struct { + + // The Amazon S3 URI of the cancelled export task where data will be exported to. + // + // This member is required. + Destination *string + + // The format of the cancelled export task. + // + // This member is required. + Format types.ExportFormat + + // The source graph identifier of the cancelled export task. + // + // This member is required. + GraphId *string + + // The KMS key identifier of the cancelled export task. + // + // This member is required. + KmsKeyIdentifier *string + + // The ARN of the IAM role that will allow the exporting of data to the + // destination. + // + // This member is required. + RoleArn *string + + // The current status of the export task. The status is CANCELLING when the export + // task is cancelled. + // + // This member is required. + Status types.ExportTaskStatus + + // The unique identifier of the export task. + // + // This member is required. + TaskId *string + + // The parquet type of the cancelled export task. + ParquetType types.ParquetType + + // The reason that the export task has this status value. + StatusReason *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCancelExportTaskMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpCancelExportTask{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCancelExportTask{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CancelExportTask"); 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 = addOpCancelExportTaskValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCancelExportTask(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_opCancelExportTask(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CancelExportTask", + } +} diff --git a/service/neptunegraph/api_op_CancelImportTask.go b/service/neptunegraph/api_op_CancelImportTask.go index 6826fdd925f..fbde7f30db4 100644 --- a/service/neptunegraph/api_op_CancelImportTask.go +++ b/service/neptunegraph/api_op_CancelImportTask.go @@ -78,6 +78,9 @@ type CancelImportTaskOutput struct { // The unique identifier of the Neptune Analytics graph. GraphId *string + // The parquet type of the cancelled import task. + ParquetType types.ParquetType + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/neptunegraph/api_op_CreateGraphUsingImportTask.go b/service/neptunegraph/api_op_CreateGraphUsingImportTask.go index 7fdccc44350..fa07fd69cfd 100644 --- a/service/neptunegraph/api_op_CreateGraphUsingImportTask.go +++ b/service/neptunegraph/api_op_CreateGraphUsingImportTask.go @@ -103,6 +103,9 @@ type CreateGraphUsingImportTaskInput struct { // for the graph. Default: 128 MinProvisionedMemory *int32 + // The parquet type of the import task. + ParquetType types.ParquetType + // Specifies whether or not the graph can be reachable over the internet. All // access to graphs is IAM authenticated. ( true to enable, or false to disable). PublicConnectivity *bool @@ -172,6 +175,9 @@ type CreateGraphUsingImportTaskOutput struct { // operation halts immediately when an error is encountered. ImportOptions types.ImportOptions + // The parquet type of the import task. + ParquetType types.ParquetType + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/neptunegraph/api_op_GetExportTask.go b/service/neptunegraph/api_op_GetExportTask.go new file mode 100644 index 00000000000..3613691f376 --- /dev/null +++ b/service/neptunegraph/api_op_GetExportTask.go @@ -0,0 +1,653 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package neptunegraph + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/neptunegraph/types" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" + smithytime "github.com/aws/smithy-go/time" + smithyhttp "github.com/aws/smithy-go/transport/http" + smithywaiter "github.com/aws/smithy-go/waiter" + jmespath "github.com/jmespath/go-jmespath" + "strconv" + "time" +) + +// Retrieves a specified export task. +func (c *Client) GetExportTask(ctx context.Context, params *GetExportTaskInput, optFns ...func(*Options)) (*GetExportTaskOutput, error) { + if params == nil { + params = &GetExportTaskInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetExportTask", params, optFns, c.addOperationGetExportTaskMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetExportTaskOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetExportTaskInput struct { + + // The unique identifier of the export task. + // + // This member is required. + TaskIdentifier *string + + noSmithyDocumentSerde +} + +func (in *GetExportTaskInput) bindEndpointParams(p *EndpointParameters) { + + p.ApiType = ptr.String("ControlPlane") +} + +type GetExportTaskOutput struct { + + // The Amazon S3 URI of the export task where data will be exported. + // + // This member is required. + Destination *string + + // The format of the export task. + // + // This member is required. + Format types.ExportFormat + + // The source graph identifier of the export task. + // + // This member is required. + GraphId *string + + // The KMS key identifier of the export task. + // + // This member is required. + KmsKeyIdentifier *string + + // The ARN of the IAM role that will allow data to be exported to the destination. + // + // This member is required. + RoleArn *string + + // The current status of the export task. + // + // This member is required. + Status types.ExportTaskStatus + + // The unique identifier of the export task. + // + // This member is required. + TaskId *string + + // The export filter of the export task. + ExportFilter *types.ExportFilter + + // The details of the export task. + ExportTaskDetails *types.ExportTaskDetails + + // The parquet type of the export task. + ParquetType types.ParquetType + + // The reason that the export task has this status value. + StatusReason *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetExportTaskMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetExportTask{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetExportTask{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetExportTask"); 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 = addOpGetExportTaskValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetExportTask(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 +} + +// ExportTaskSuccessfulWaiterOptions are waiter options for +// ExportTaskSuccessfulWaiter +type ExportTaskSuccessfulWaiterOptions struct { + + // Set of options to modify how an operation is invoked. These apply to all + // operations invoked for this client. Use functional options on operation call to + // modify this list for per operation behavior. + // + // Passing options here is functionally equivalent to passing values to this + // config's ClientOptions field that extend the inner client's APIOptions directly. + APIOptions []func(*middleware.Stack) error + + // Functional options to be passed to all operations invoked by this client. + // + // Function values that modify the inner APIOptions are applied after the waiter + // config's own APIOptions modifiers. + ClientOptions []func(*Options) + + // MinDelay is the minimum amount of time to delay between retries. If unset, + // ExportTaskSuccessfulWaiter will use default minimum delay of 60 seconds. Note + // that MinDelay must resolve to a value lesser than or equal to the MaxDelay. + MinDelay time.Duration + + // MaxDelay is the maximum amount of time to delay between retries. If unset or + // set to zero, ExportTaskSuccessfulWaiter will use default max delay of 28800 + // seconds. Note that MaxDelay must resolve to value greater than or equal to the + // MinDelay. + MaxDelay time.Duration + + // LogWaitAttempts is used to enable logging for waiter retry attempts + LogWaitAttempts bool + + // Retryable is function that can be used to override the service defined + // waiter-behavior based on operation output, or returned error. This function is + // used by the waiter to decide if a state is retryable or a terminal state. + // + // By default service-modeled logic will populate this option. This option can + // thus be used to define a custom waiter state with fall-back to service-modeled + // waiter state mutators.The function returns an error in case of a failure state. + // In case of retry state, this function returns a bool value of true and nil + // error, while in case of success it returns a bool value of false and nil error. + Retryable func(context.Context, *GetExportTaskInput, *GetExportTaskOutput, error) (bool, error) +} + +// ExportTaskSuccessfulWaiter defines the waiters for ExportTaskSuccessful +type ExportTaskSuccessfulWaiter struct { + client GetExportTaskAPIClient + + options ExportTaskSuccessfulWaiterOptions +} + +// NewExportTaskSuccessfulWaiter constructs a ExportTaskSuccessfulWaiter. +func NewExportTaskSuccessfulWaiter(client GetExportTaskAPIClient, optFns ...func(*ExportTaskSuccessfulWaiterOptions)) *ExportTaskSuccessfulWaiter { + options := ExportTaskSuccessfulWaiterOptions{} + options.MinDelay = 60 * time.Second + options.MaxDelay = 28800 * time.Second + options.Retryable = exportTaskSuccessfulStateRetryable + + for _, fn := range optFns { + fn(&options) + } + return &ExportTaskSuccessfulWaiter{ + client: client, + options: options, + } +} + +// Wait calls the waiter function for ExportTaskSuccessful waiter. The maxWaitDur +// is the maximum wait duration the waiter will wait. The maxWaitDur is required +// and must be greater than zero. +func (w *ExportTaskSuccessfulWaiter) Wait(ctx context.Context, params *GetExportTaskInput, maxWaitDur time.Duration, optFns ...func(*ExportTaskSuccessfulWaiterOptions)) error { + _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) + return err +} + +// WaitForOutput calls the waiter function for ExportTaskSuccessful waiter and +// returns the output of the successful operation. The maxWaitDur is the maximum +// wait duration the waiter will wait. The maxWaitDur is required and must be +// greater than zero. +func (w *ExportTaskSuccessfulWaiter) WaitForOutput(ctx context.Context, params *GetExportTaskInput, maxWaitDur time.Duration, optFns ...func(*ExportTaskSuccessfulWaiterOptions)) (*GetExportTaskOutput, error) { + if maxWaitDur <= 0 { + return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") + } + + options := w.options + for _, fn := range optFns { + fn(&options) + } + + if options.MaxDelay <= 0 { + options.MaxDelay = 28800 * time.Second + } + + if options.MinDelay > options.MaxDelay { + return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) + } + + ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) + defer cancelFn() + + logger := smithywaiter.Logger{} + remainingTime := maxWaitDur + + var attempt int64 + for { + + attempt++ + apiOptions := options.APIOptions + start := time.Now() + + if options.LogWaitAttempts { + logger.Attempt = attempt + apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) + apiOptions = append(apiOptions, logger.AddLogger) + } + + out, err := w.client.GetExportTask(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } + o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } + for _, opt := range options.ClientOptions { + opt(o) + } + }) + + retryable, err := options.Retryable(ctx, params, out, err) + if err != nil { + return nil, err + } + if !retryable { + return out, nil + } + + remainingTime -= time.Since(start) + if remainingTime < options.MinDelay || remainingTime <= 0 { + break + } + + // compute exponential backoff between waiter retries + delay, err := smithywaiter.ComputeDelay( + attempt, options.MinDelay, options.MaxDelay, remainingTime, + ) + if err != nil { + return nil, fmt.Errorf("error computing waiter delay, %w", err) + } + + remainingTime -= delay + // sleep for the delay amount before invoking a request + if err := smithytime.SleepWithContext(ctx, delay); err != nil { + return nil, fmt.Errorf("request cancelled while waiting, %w", err) + } + } + return nil, fmt.Errorf("exceeded max wait time for ExportTaskSuccessful waiter") +} + +func exportTaskSuccessfulStateRetryable(ctx context.Context, input *GetExportTaskInput, output *GetExportTaskOutput, err error) (bool, error) { + + if err == nil { + pathValue, err := jmespath.Search("status", output) + if err != nil { + return false, fmt.Errorf("error evaluating waiter state: %w", err) + } + + expectedValue := "CANCELLING" + value, ok := pathValue.(types.ExportTaskStatus) + if !ok { + return false, fmt.Errorf("waiter comparator expected types.ExportTaskStatus value, got %T", pathValue) + } + + if string(value) == expectedValue { + return false, fmt.Errorf("waiter state transitioned to Failure") + } + } + + if err == nil { + pathValue, err := jmespath.Search("status", output) + if err != nil { + return false, fmt.Errorf("error evaluating waiter state: %w", err) + } + + expectedValue := "CANCELLED" + value, ok := pathValue.(types.ExportTaskStatus) + if !ok { + return false, fmt.Errorf("waiter comparator expected types.ExportTaskStatus value, got %T", pathValue) + } + + if string(value) == expectedValue { + return false, fmt.Errorf("waiter state transitioned to Failure") + } + } + + if err == nil { + pathValue, err := jmespath.Search("status", output) + if err != nil { + return false, fmt.Errorf("error evaluating waiter state: %w", err) + } + + expectedValue := "FAILED" + value, ok := pathValue.(types.ExportTaskStatus) + if !ok { + return false, fmt.Errorf("waiter comparator expected types.ExportTaskStatus value, got %T", pathValue) + } + + if string(value) == expectedValue { + return false, fmt.Errorf("waiter state transitioned to Failure") + } + } + + if err == nil { + pathValue, err := jmespath.Search("status", output) + if err != nil { + return false, fmt.Errorf("error evaluating waiter state: %w", err) + } + + expectedValue := "SUCCEEDED" + value, ok := pathValue.(types.ExportTaskStatus) + if !ok { + return false, fmt.Errorf("waiter comparator expected types.ExportTaskStatus value, got %T", pathValue) + } + + if string(value) == expectedValue { + return false, nil + } + } + + return true, nil +} + +// ExportTaskCancelledWaiterOptions are waiter options for +// ExportTaskCancelledWaiter +type ExportTaskCancelledWaiterOptions struct { + + // Set of options to modify how an operation is invoked. These apply to all + // operations invoked for this client. Use functional options on operation call to + // modify this list for per operation behavior. + // + // Passing options here is functionally equivalent to passing values to this + // config's ClientOptions field that extend the inner client's APIOptions directly. + APIOptions []func(*middleware.Stack) error + + // Functional options to be passed to all operations invoked by this client. + // + // Function values that modify the inner APIOptions are applied after the waiter + // config's own APIOptions modifiers. + ClientOptions []func(*Options) + + // MinDelay is the minimum amount of time to delay between retries. If unset, + // ExportTaskCancelledWaiter will use default minimum delay of 60 seconds. Note + // that MinDelay must resolve to a value lesser than or equal to the MaxDelay. + MinDelay time.Duration + + // MaxDelay is the maximum amount of time to delay between retries. If unset or + // set to zero, ExportTaskCancelledWaiter will use default max delay of 3600 + // seconds. Note that MaxDelay must resolve to value greater than or equal to the + // MinDelay. + MaxDelay time.Duration + + // LogWaitAttempts is used to enable logging for waiter retry attempts + LogWaitAttempts bool + + // Retryable is function that can be used to override the service defined + // waiter-behavior based on operation output, or returned error. This function is + // used by the waiter to decide if a state is retryable or a terminal state. + // + // By default service-modeled logic will populate this option. This option can + // thus be used to define a custom waiter state with fall-back to service-modeled + // waiter state mutators.The function returns an error in case of a failure state. + // In case of retry state, this function returns a bool value of true and nil + // error, while in case of success it returns a bool value of false and nil error. + Retryable func(context.Context, *GetExportTaskInput, *GetExportTaskOutput, error) (bool, error) +} + +// ExportTaskCancelledWaiter defines the waiters for ExportTaskCancelled +type ExportTaskCancelledWaiter struct { + client GetExportTaskAPIClient + + options ExportTaskCancelledWaiterOptions +} + +// NewExportTaskCancelledWaiter constructs a ExportTaskCancelledWaiter. +func NewExportTaskCancelledWaiter(client GetExportTaskAPIClient, optFns ...func(*ExportTaskCancelledWaiterOptions)) *ExportTaskCancelledWaiter { + options := ExportTaskCancelledWaiterOptions{} + options.MinDelay = 60 * time.Second + options.MaxDelay = 3600 * time.Second + options.Retryable = exportTaskCancelledStateRetryable + + for _, fn := range optFns { + fn(&options) + } + return &ExportTaskCancelledWaiter{ + client: client, + options: options, + } +} + +// Wait calls the waiter function for ExportTaskCancelled waiter. The maxWaitDur +// is the maximum wait duration the waiter will wait. The maxWaitDur is required +// and must be greater than zero. +func (w *ExportTaskCancelledWaiter) Wait(ctx context.Context, params *GetExportTaskInput, maxWaitDur time.Duration, optFns ...func(*ExportTaskCancelledWaiterOptions)) error { + _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) + return err +} + +// WaitForOutput calls the waiter function for ExportTaskCancelled waiter and +// returns the output of the successful operation. The maxWaitDur is the maximum +// wait duration the waiter will wait. The maxWaitDur is required and must be +// greater than zero. +func (w *ExportTaskCancelledWaiter) WaitForOutput(ctx context.Context, params *GetExportTaskInput, maxWaitDur time.Duration, optFns ...func(*ExportTaskCancelledWaiterOptions)) (*GetExportTaskOutput, error) { + if maxWaitDur <= 0 { + return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") + } + + options := w.options + for _, fn := range optFns { + fn(&options) + } + + if options.MaxDelay <= 0 { + options.MaxDelay = 3600 * time.Second + } + + if options.MinDelay > options.MaxDelay { + return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) + } + + ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) + defer cancelFn() + + logger := smithywaiter.Logger{} + remainingTime := maxWaitDur + + var attempt int64 + for { + + attempt++ + apiOptions := options.APIOptions + start := time.Now() + + if options.LogWaitAttempts { + logger.Attempt = attempt + apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) + apiOptions = append(apiOptions, logger.AddLogger) + } + + out, err := w.client.GetExportTask(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } + o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } + for _, opt := range options.ClientOptions { + opt(o) + } + }) + + retryable, err := options.Retryable(ctx, params, out, err) + if err != nil { + return nil, err + } + if !retryable { + return out, nil + } + + remainingTime -= time.Since(start) + if remainingTime < options.MinDelay || remainingTime <= 0 { + break + } + + // compute exponential backoff between waiter retries + delay, err := smithywaiter.ComputeDelay( + attempt, options.MinDelay, options.MaxDelay, remainingTime, + ) + if err != nil { + return nil, fmt.Errorf("error computing waiter delay, %w", err) + } + + remainingTime -= delay + // sleep for the delay amount before invoking a request + if err := smithytime.SleepWithContext(ctx, delay); err != nil { + return nil, fmt.Errorf("request cancelled while waiting, %w", err) + } + } + return nil, fmt.Errorf("exceeded max wait time for ExportTaskCancelled waiter") +} + +func exportTaskCancelledStateRetryable(ctx context.Context, input *GetExportTaskInput, output *GetExportTaskOutput, err error) (bool, error) { + + if err == nil { + pathValue, err := jmespath.Search("status != 'CANCELLING' && status != 'CANCELLED'", output) + if err != nil { + return false, fmt.Errorf("error evaluating waiter state: %w", err) + } + + expectedValue := "true" + bv, err := strconv.ParseBool(expectedValue) + if err != nil { + return false, fmt.Errorf("error parsing boolean from string %w", err) + } + value, ok := pathValue.(bool) + if !ok { + return false, fmt.Errorf("waiter comparator expected bool value got %T", pathValue) + } + + if value == bv { + return false, fmt.Errorf("waiter state transitioned to Failure") + } + } + + if err == nil { + pathValue, err := jmespath.Search("status", output) + if err != nil { + return false, fmt.Errorf("error evaluating waiter state: %w", err) + } + + expectedValue := "CANCELLED" + value, ok := pathValue.(types.ExportTaskStatus) + if !ok { + return false, fmt.Errorf("waiter comparator expected types.ExportTaskStatus value, got %T", pathValue) + } + + if string(value) == expectedValue { + return false, nil + } + } + + return true, nil +} + +// GetExportTaskAPIClient is a client that implements the GetExportTask operation. +type GetExportTaskAPIClient interface { + GetExportTask(context.Context, *GetExportTaskInput, ...func(*Options)) (*GetExportTaskOutput, error) +} + +var _ GetExportTaskAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opGetExportTask(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetExportTask", + } +} diff --git a/service/neptunegraph/api_op_GetImportTask.go b/service/neptunegraph/api_op_GetImportTask.go index 69525563f89..7026216c596 100644 --- a/service/neptunegraph/api_op_GetImportTask.go +++ b/service/neptunegraph/api_op_GetImportTask.go @@ -99,7 +99,7 @@ type GetImportTaskOutput struct { // This member is required. TaskId *string - // The number of the current attempt to execute the import task. + // The number of the current attempts to execute the import task. AttemptNumber *int32 // Specifies the format of S3 data to be imported. Valid values are CSV , which @@ -121,6 +121,9 @@ type GetImportTaskOutput struct { // Contains details about the specified import task. ImportTaskDetails *types.ImportTaskDetails + // The parquet type of the import task. + ParquetType types.ParquetType + // The reason that the import task has this status value. StatusReason *string diff --git a/service/neptunegraph/api_op_ListExportTasks.go b/service/neptunegraph/api_op_ListExportTasks.go new file mode 100644 index 00000000000..0c24c6d5578 --- /dev/null +++ b/service/neptunegraph/api_op_ListExportTasks.go @@ -0,0 +1,259 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package neptunegraph + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/neptunegraph/types" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves a list of export tasks. +func (c *Client) ListExportTasks(ctx context.Context, params *ListExportTasksInput, optFns ...func(*Options)) (*ListExportTasksOutput, error) { + if params == nil { + params = &ListExportTasksInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListExportTasks", params, optFns, c.addOperationListExportTasksMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListExportTasksOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListExportTasksInput struct { + + // The maximum number of export tasks to return. + MaxResults *int32 + + // Pagination token used to paginate input. + NextToken *string + + noSmithyDocumentSerde +} + +func (in *ListExportTasksInput) bindEndpointParams(p *EndpointParameters) { + + p.ApiType = ptr.String("ControlPlane") +} + +type ListExportTasksOutput struct { + + // The requested list of export tasks. + // + // This member is required. + Tasks []types.ExportTaskSummary + + // Pagination token used to paginate output. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListExportTasksMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListExportTasks{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListExportTasks{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListExportTasks"); 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_opListExportTasks(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 +} + +// ListExportTasksPaginatorOptions is the paginator options for ListExportTasks +type ListExportTasksPaginatorOptions struct { + // The maximum number of export tasks 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 +} + +// ListExportTasksPaginator is a paginator for ListExportTasks +type ListExportTasksPaginator struct { + options ListExportTasksPaginatorOptions + client ListExportTasksAPIClient + params *ListExportTasksInput + nextToken *string + firstPage bool +} + +// NewListExportTasksPaginator returns a new ListExportTasksPaginator +func NewListExportTasksPaginator(client ListExportTasksAPIClient, params *ListExportTasksInput, optFns ...func(*ListExportTasksPaginatorOptions)) *ListExportTasksPaginator { + if params == nil { + params = &ListExportTasksInput{} + } + + options := ListExportTasksPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListExportTasksPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListExportTasksPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListExportTasks page. +func (p *ListExportTasksPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListExportTasksOutput, 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.ListExportTasks(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 +} + +// ListExportTasksAPIClient is a client that implements the ListExportTasks +// operation. +type ListExportTasksAPIClient interface { + ListExportTasks(context.Context, *ListExportTasksInput, ...func(*Options)) (*ListExportTasksOutput, error) +} + +var _ ListExportTasksAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListExportTasks(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListExportTasks", + } +} diff --git a/service/neptunegraph/api_op_StartExportTask.go b/service/neptunegraph/api_op_StartExportTask.go new file mode 100644 index 00000000000..d40e93a563a --- /dev/null +++ b/service/neptunegraph/api_op_StartExportTask.go @@ -0,0 +1,234 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package neptunegraph + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/neptunegraph/types" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Export data from an existing Neptune Analytics graph to Amazon S3. The graph +// state should be AVAILABLE . +func (c *Client) StartExportTask(ctx context.Context, params *StartExportTaskInput, optFns ...func(*Options)) (*StartExportTaskOutput, error) { + if params == nil { + params = &StartExportTaskInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StartExportTask", params, optFns, c.addOperationStartExportTaskMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StartExportTaskOutput) + out.ResultMetadata = metadata + return out, nil +} + +type StartExportTaskInput struct { + + // The Amazon S3 URI where data will be exported to. + // + // This member is required. + Destination *string + + // The format of the export task. + // + // This member is required. + Format types.ExportFormat + + // The source graph identifier of the export task. + // + // This member is required. + GraphIdentifier *string + + // The KMS key identifier of the export task. + // + // This member is required. + KmsKeyIdentifier *string + + // The ARN of the IAM role that will allow data to be exported to the destination. + // + // This member is required. + RoleArn *string + + // The export filter of the export task. + ExportFilter *types.ExportFilter + + // The parquet type of the export task. + ParquetType types.ParquetType + + // Tags to be applied to the export task. + Tags map[string]string + + noSmithyDocumentSerde +} + +func (in *StartExportTaskInput) bindEndpointParams(p *EndpointParameters) { + + p.ApiType = ptr.String("ControlPlane") +} + +type StartExportTaskOutput struct { + + // The Amazon S3 URI of the export task where data will be exported to. + // + // This member is required. + Destination *string + + // The format of the export task. + // + // This member is required. + Format types.ExportFormat + + // The source graph identifier of the export task. + // + // This member is required. + GraphId *string + + // The KMS key identifier of the export task. + // + // This member is required. + KmsKeyIdentifier *string + + // The ARN of the IAM role that will allow data to be exported to the destination. + // + // This member is required. + RoleArn *string + + // The current status of the export task. + // + // This member is required. + Status types.ExportTaskStatus + + // The unique identifier of the export task. + // + // This member is required. + TaskId *string + + // The export filter of the export task. + ExportFilter *types.ExportFilter + + // The parquet type of the export task. + ParquetType types.ParquetType + + // The reason that the export task has this status value. + StatusReason *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationStartExportTaskMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpStartExportTask{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpStartExportTask{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "StartExportTask"); 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 = addOpStartExportTaskValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartExportTask(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_opStartExportTask(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "StartExportTask", + } +} diff --git a/service/neptunegraph/api_op_StartImportTask.go b/service/neptunegraph/api_op_StartImportTask.go index 795d7b7424e..a6718e66abb 100644 --- a/service/neptunegraph/api_op_StartImportTask.go +++ b/service/neptunegraph/api_op_StartImportTask.go @@ -67,6 +67,9 @@ type StartImportTaskInput struct { // Options for how to perform an import. ImportOptions types.ImportOptions + // The parquet type of the import task. + ParquetType types.ParquetType + noSmithyDocumentSerde } @@ -110,6 +113,9 @@ type StartImportTaskOutput struct { // Options for how to perform an import. ImportOptions types.ImportOptions + // The parquet type of the import task. + ParquetType types.ParquetType + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/neptunegraph/deserializers.go b/service/neptunegraph/deserializers.go index 91d977a896c..f462e9a3ed0 100644 --- a/service/neptunegraph/deserializers.go +++ b/service/neptunegraph/deserializers.go @@ -30,6 +30,246 @@ func deserializeS3Expires(v string) (*time.Time, error) { return &t, nil } +type awsRestjson1_deserializeOpCancelExportTask struct { +} + +func (*awsRestjson1_deserializeOpCancelExportTask) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCancelExportTask) HandleDeserialize(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_deserializeOpErrorCancelExportTask(response, &metadata) + } + output := &CancelExportTaskOutput{} + 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_deserializeOpDocumentCancelExportTaskOutput(&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_deserializeOpErrorCancelExportTask(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("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_deserializeOpDocumentCancelExportTaskOutput(v **CancelExportTaskOutput, 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 *CancelExportTaskOutput + if *v == nil { + sv = &CancelExportTaskOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "destination": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Destination = ptr.String(jtv) + } + + case "format": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExportFormat to be of type string, got %T instead", value) + } + sv.Format = types.ExportFormat(jtv) + } + + case "graphId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GraphId to be of type string, got %T instead", value) + } + sv.GraphId = ptr.String(jtv) + } + + case "kmsKeyIdentifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected KmsKeyArn to be of type string, got %T instead", value) + } + sv.KmsKeyIdentifier = ptr.String(jtv) + } + + case "parquetType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ParquetType to be of type string, got %T instead", value) + } + sv.ParquetType = types.ParquetType(jtv) + } + + case "roleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value) + } + sv.RoleArn = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExportTaskStatus to be of type string, got %T instead", value) + } + sv.Status = types.ExportTaskStatus(jtv) + } + + case "statusReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.StatusReason = ptr.String(jtv) + } + + case "taskId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExportTaskId to be of type string, got %T instead", value) + } + sv.TaskId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpCancelImportTask struct { } @@ -198,6 +438,15 @@ func awsRestjson1_deserializeOpDocumentCancelImportTaskOutput(v **CancelImportTa sv.GraphId = ptr.String(jtv) } + case "parquetType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ParquetType to be of type string, got %T instead", value) + } + sv.ParquetType = types.ParquetType(jtv) + } + case "roleArn": if value != nil { jtv, ok := value.(string) @@ -1059,6 +1308,15 @@ func awsRestjson1_deserializeOpDocumentCreateGraphUsingImportTaskOutput(v **Crea return err } + case "parquetType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ParquetType to be of type string, got %T instead", value) + } + sv.ParquetType = types.ParquetType(jtv) + } + case "roleArn": if value != nil { jtv, ok := value.(string) @@ -2140,14 +2398,14 @@ func awsRestjson1_deserializeOpDocumentExecuteQueryOutput(v *ExecuteQueryOutput, return nil } -type awsRestjson1_deserializeOpGetGraph struct { +type awsRestjson1_deserializeOpGetExportTask struct { } -func (*awsRestjson1_deserializeOpGetGraph) ID() string { +func (*awsRestjson1_deserializeOpGetExportTask) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetGraph) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetExportTask) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2165,9 +2423,9 @@ func (m *awsRestjson1_deserializeOpGetGraph) HandleDeserialize(ctx context.Conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetGraph(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetExportTask(response, &metadata) } - output := &GetGraphOutput{} + output := &GetExportTaskOutput{} out.Result = output var buff [1024]byte @@ -2188,7 +2446,7 @@ func (m *awsRestjson1_deserializeOpGetGraph) HandleDeserialize(ctx context.Conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetGraphOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetExportTaskOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2202,7 +2460,7 @@ func (m *awsRestjson1_deserializeOpGetGraph) HandleDeserialize(ctx context.Conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetGraph(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetExportTask(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2265,7 +2523,7 @@ func awsRestjson1_deserializeOpErrorGetGraph(response *smithyhttp.Response, meta } } -func awsRestjson1_deserializeOpDocumentGetGraphOutput(v **GetGraphOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetExportTaskOutput(v **GetExportTaskOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2278,34 +2536,281 @@ func awsRestjson1_deserializeOpDocumentGetGraphOutput(v **GetGraphOutput, value return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetGraphOutput + var sv *GetExportTaskOutput if *v == nil { - sv = &GetGraphOutput{} + sv = &GetExportTaskOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "arn": + case "destination": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Arn = ptr.String(jtv) + sv.Destination = ptr.String(jtv) } - case "buildNumber": + case "exportFilter": + if err := awsRestjson1_deserializeDocumentExportFilter(&sv.ExportFilter, value); err != nil { + return err + } + + case "exportTaskDetails": + if err := awsRestjson1_deserializeDocumentExportTaskDetails(&sv.ExportTaskDetails, value); err != nil { + return err + } + + case "format": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ExportFormat to be of type string, got %T instead", value) } - sv.BuildNumber = ptr.String(jtv) + sv.Format = types.ExportFormat(jtv) } - case "createTime": + case "graphId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GraphId to be of type string, got %T instead", value) + } + sv.GraphId = ptr.String(jtv) + } + + case "kmsKeyIdentifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected KmsKeyArn to be of type string, got %T instead", value) + } + sv.KmsKeyIdentifier = ptr.String(jtv) + } + + case "parquetType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ParquetType to be of type string, got %T instead", value) + } + sv.ParquetType = types.ParquetType(jtv) + } + + case "roleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value) + } + sv.RoleArn = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExportTaskStatus to be of type string, got %T instead", value) + } + sv.Status = types.ExportTaskStatus(jtv) + } + + case "statusReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.StatusReason = ptr.String(jtv) + } + + case "taskId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExportTaskId to be of type string, got %T instead", value) + } + sv.TaskId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetGraph struct { +} + +func (*awsRestjson1_deserializeOpGetGraph) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetGraph) HandleDeserialize(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_deserializeOpErrorGetGraph(response, &metadata) + } + output := &GetGraphOutput{} + 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_deserializeOpDocumentGetGraphOutput(&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_deserializeOpErrorGetGraph(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("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_deserializeOpDocumentGetGraphOutput(v **GetGraphOutput, 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 *GetGraphOutput + if *v == nil { + sv = &GetGraphOutput{} + } 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 String to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "buildNumber": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.BuildNumber = ptr.String(jtv) + } + + case "createTime": if value != nil { switch jtv := value.(type) { case json.Number: @@ -3042,6 +3547,15 @@ func awsRestjson1_deserializeOpDocumentGetImportTaskOutput(v **GetImportTaskOutp return err } + case "parquetType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ParquetType to be of type string, got %T instead", value) + } + sv.ParquetType = types.ParquetType(jtv) + } + case "roleArn": if value != nil { jtv, ok := value.(string) @@ -3496,14 +4010,14 @@ func awsRestjson1_deserializeOpDocumentGetQueryOutput(v **GetQueryOutput, value return nil } -type awsRestjson1_deserializeOpListGraphs struct { +type awsRestjson1_deserializeOpListExportTasks struct { } -func (*awsRestjson1_deserializeOpListGraphs) ID() string { +func (*awsRestjson1_deserializeOpListExportTasks) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListGraphs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListExportTasks) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3521,9 +4035,9 @@ func (m *awsRestjson1_deserializeOpListGraphs) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListGraphs(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListExportTasks(response, &metadata) } - output := &ListGraphsOutput{} + output := &ListExportTasksOutput{} out.Result = output var buff [1024]byte @@ -3544,7 +4058,7 @@ func (m *awsRestjson1_deserializeOpListGraphs) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListGraphsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListExportTasksOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3558,7 +4072,7 @@ func (m *awsRestjson1_deserializeOpListGraphs) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsRestjson1_deserializeOpErrorListGraphs(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListExportTasks(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3608,6 +4122,9 @@ func awsRestjson1_deserializeOpErrorListGraphs(response *smithyhttp.Response, me 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, @@ -3618,7 +4135,7 @@ func awsRestjson1_deserializeOpErrorListGraphs(response *smithyhttp.Response, me } } -func awsRestjson1_deserializeOpDocumentListGraphsOutput(v **ListGraphsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListExportTasksOutput(v **ListExportTasksOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3631,20 +4148,15 @@ func awsRestjson1_deserializeOpDocumentListGraphsOutput(v **ListGraphsOutput, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListGraphsOutput + var sv *ListExportTasksOutput if *v == nil { - sv = &ListGraphsOutput{} + sv = &ListExportTasksOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "graphs": - if err := awsRestjson1_deserializeDocumentGraphSummaryList(&sv.Graphs, value); err != nil { - return err - } - case "nextToken": if value != nil { jtv, ok := value.(string) @@ -3654,7 +4166,179 @@ func awsRestjson1_deserializeOpDocumentListGraphsOutput(v **ListGraphsOutput, va sv.NextToken = ptr.String(jtv) } - default: + case "tasks": + if err := awsRestjson1_deserializeDocumentExportTaskSummaryList(&sv.Tasks, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListGraphs struct { +} + +func (*awsRestjson1_deserializeOpListGraphs) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListGraphs) HandleDeserialize(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_deserializeOpErrorListGraphs(response, &metadata) + } + output := &ListGraphsOutput{} + 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_deserializeOpDocumentListGraphsOutput(&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_deserializeOpErrorListGraphs(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListGraphsOutput(v **ListGraphsOutput, 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 *ListGraphsOutput + if *v == nil { + sv = &ListGraphsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "graphs": + if err := awsRestjson1_deserializeDocumentGraphSummaryList(&sv.Graphs, 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 } @@ -5108,14 +5792,14 @@ func awsRestjson1_deserializeOpDocumentRestoreGraphFromSnapshotOutput(v **Restor return nil } -type awsRestjson1_deserializeOpStartImportTask struct { +type awsRestjson1_deserializeOpStartExportTask struct { } -func (*awsRestjson1_deserializeOpStartImportTask) ID() string { +func (*awsRestjson1_deserializeOpStartExportTask) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpStartImportTask) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpStartExportTask) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5133,9 +5817,9 @@ func (m *awsRestjson1_deserializeOpStartImportTask) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorStartImportTask(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorStartExportTask(response, &metadata) } - output := &StartImportTaskOutput{} + output := &StartExportTaskOutput{} out.Result = output var buff [1024]byte @@ -5156,7 +5840,7 @@ func (m *awsRestjson1_deserializeOpStartImportTask) HandleDeserialize(ctx contex return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentStartImportTaskOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentStartExportTaskOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5170,7 +5854,7 @@ func (m *awsRestjson1_deserializeOpStartImportTask) HandleDeserialize(ctx contex return out, metadata, err } -func awsRestjson1_deserializeOpErrorStartImportTask(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorStartExportTask(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5236,7 +5920,7 @@ func awsRestjson1_deserializeOpErrorStartImportTask(response *smithyhttp.Respons } } -func awsRestjson1_deserializeOpDocumentStartImportTaskOutput(v **StartImportTaskOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentStartExportTaskOutput(v **StartExportTaskOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5249,22 +5933,36 @@ func awsRestjson1_deserializeOpDocumentStartImportTaskOutput(v **StartImportTask return fmt.Errorf("unexpected JSON type %v", value) } - var sv *StartImportTaskOutput + var sv *StartExportTaskOutput if *v == nil { - sv = &StartImportTaskOutput{} + sv = &StartExportTaskOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "destination": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Destination = ptr.String(jtv) + } + + case "exportFilter": + if err := awsRestjson1_deserializeDocumentExportFilter(&sv.ExportFilter, value); err != nil { + return err + } + case "format": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Format to be of type string, got %T instead", value) + return fmt.Errorf("expected ExportFormat to be of type string, got %T instead", value) } - sv.Format = types.Format(jtv) + sv.Format = types.ExportFormat(jtv) } case "graphId": @@ -5276,9 +5974,22 @@ func awsRestjson1_deserializeOpDocumentStartImportTaskOutput(v **StartImportTask sv.GraphId = ptr.String(jtv) } - case "importOptions": - if err := awsRestjson1_deserializeDocumentImportOptions(&sv.ImportOptions, value); err != nil { - return err + case "kmsKeyIdentifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected KmsKeyArn to be of type string, got %T instead", value) + } + sv.KmsKeyIdentifier = ptr.String(jtv) + } + + case "parquetType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ParquetType to be of type string, got %T instead", value) + } + sv.ParquetType = types.ParquetType(jtv) } case "roleArn": @@ -5290,29 +6001,29 @@ func awsRestjson1_deserializeOpDocumentStartImportTaskOutput(v **StartImportTask sv.RoleArn = ptr.String(jtv) } - case "source": + case "status": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ExportTaskStatus to be of type string, got %T instead", value) } - sv.Source = ptr.String(jtv) + sv.Status = types.ExportTaskStatus(jtv) } - case "status": + case "statusReason": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ImportTaskStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Status = types.ImportTaskStatus(jtv) + sv.StatusReason = ptr.String(jtv) } case "taskId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected TaskId to be of type string, got %T instead", value) + return fmt.Errorf("expected ExportTaskId to be of type string, got %T instead", value) } sv.TaskId = ptr.String(jtv) } @@ -5326,14 +6037,14 @@ func awsRestjson1_deserializeOpDocumentStartImportTaskOutput(v **StartImportTask return nil } -type awsRestjson1_deserializeOpTagResource struct { +type awsRestjson1_deserializeOpStartImportTask struct { } -func (*awsRestjson1_deserializeOpTagResource) ID() string { +func (*awsRestjson1_deserializeOpStartImportTask) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpStartImportTask) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5351,39 +6062,266 @@ func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorTagResource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorStartImportTask(response, &metadata) } - output := &TagResourceOutput{} + output := &StartImportTaskOutput{} out.Result = output - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer + 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_deserializeOpDocumentStartImportTaskOutput(&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_deserializeOpErrorStartImportTask(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("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_deserializeOpDocumentStartImportTaskOutput(v **StartImportTaskOutput, 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 *StartImportTaskOutput + if *v == nil { + sv = &StartImportTaskOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "format": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Format to be of type string, got %T instead", value) + } + sv.Format = types.Format(jtv) + } + + case "graphId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GraphId to be of type string, got %T instead", value) + } + sv.GraphId = ptr.String(jtv) + } + + case "importOptions": + if err := awsRestjson1_deserializeDocumentImportOptions(&sv.ImportOptions, value); err != nil { + return err + } + + case "parquetType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ParquetType to be of type string, got %T instead", value) + } + sv.ParquetType = types.ParquetType(jtv) + } + + case "roleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value) + } + sv.RoleArn = ptr.String(jtv) + } + + case "source": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Source = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ImportTaskStatus to be of type string, got %T instead", value) + } + sv.Status = types.ImportTaskStatus(jtv) + } + + case "taskId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TaskId to be of type string, got %T instead", value) + } + sv.TaskId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpTagResource struct { +} + +func (*awsRestjson1_deserializeOpTagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, 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_deserializeOpErrorTagResource(response, &metadata) + } + output := &TagResourceOutput{} + out.Result = output + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), @@ -6357,7 +7295,7 @@ func awsRestjson1_deserializeDocumentEdgeStructures(v *[]types.EdgeStructure, va return nil } -func awsRestjson1_deserializeDocumentGraphDataSummary(v **types.GraphDataSummary, value interface{}) error { +func awsRestjson1_deserializeDocumentExportFilter(v **types.ExportFilter, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6370,29 +7308,479 @@ func awsRestjson1_deserializeDocumentGraphDataSummary(v **types.GraphDataSummary return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.GraphDataSummary + var sv *types.ExportFilter if *v == nil { - sv = &types.GraphDataSummary{} + sv = &types.ExportFilter{} } else { sv = *v } for key, value := range shape { switch key { - case "edgeLabels": - if err := awsRestjson1_deserializeDocumentEdgeLabels(&sv.EdgeLabels, value); err != nil { + case "edgeFilter": + if err := awsRestjson1_deserializeDocumentExportFilterPerLabelMap(&sv.EdgeFilter, value); err != nil { return err } - case "edgeProperties": - if err := awsRestjson1_deserializeDocumentLongValuedMapList(&sv.EdgeProperties, value); err != nil { + case "vertexFilter": + if err := awsRestjson1_deserializeDocumentExportFilterPerLabelMap(&sv.VertexFilter, value); err != nil { return err } - case "edgeStructures": - if err := awsRestjson1_deserializeDocumentEdgeStructures(&sv.EdgeStructures, value); err != nil { - return err - } + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentExportFilterElement(v **types.ExportFilterElement, 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.ExportFilterElement + if *v == nil { + sv = &types.ExportFilterElement{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "properties": + if err := awsRestjson1_deserializeDocumentExportFilterPropertyMap(&sv.Properties, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentExportFilterPerLabelMap(v *map[string]types.ExportFilterElement, 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]types.ExportFilterElement + if *v == nil { + mv = map[string]types.ExportFilterElement{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal types.ExportFilterElement + mapVar := parsedVal + destAddr := &mapVar + if err := awsRestjson1_deserializeDocumentExportFilterElement(&destAddr, value); err != nil { + return err + } + parsedVal = *destAddr + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentExportFilterPropertyAttributes(v **types.ExportFilterPropertyAttributes, 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.ExportFilterPropertyAttributes + if *v == nil { + sv = &types.ExportFilterPropertyAttributes{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "multiValueHandling": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MultiValueHandlingType to be of type string, got %T instead", value) + } + sv.MultiValueHandling = types.MultiValueHandlingType(jtv) + } + + case "outputType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExportFilterOutputDataType to be of type string, got %T instead", value) + } + sv.OutputType = ptr.String(jtv) + } + + case "sourcePropertyName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExportFilterSourcePropertyName to be of type string, got %T instead", value) + } + sv.SourcePropertyName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentExportFilterPropertyMap(v *map[string]types.ExportFilterPropertyAttributes, 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]types.ExportFilterPropertyAttributes + if *v == nil { + mv = map[string]types.ExportFilterPropertyAttributes{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal types.ExportFilterPropertyAttributes + mapVar := parsedVal + destAddr := &mapVar + if err := awsRestjson1_deserializeDocumentExportFilterPropertyAttributes(&destAddr, value); err != nil { + return err + } + parsedVal = *destAddr + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentExportTaskDetails(v **types.ExportTaskDetails, 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.ExportTaskDetails + if *v == nil { + sv = &types.ExportTaskDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "numEdgesWritten": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.NumEdgesWritten = ptr.Int64(i64) + } + + case "numVerticesWritten": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.NumVerticesWritten = ptr.Int64(i64) + } + + case "progressPercentage": + 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.ProgressPercentage = ptr.Int32(int32(i64)) + } + + case "startTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "timeElapsedSeconds": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TimeElapsedSeconds = ptr.Int64(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentExportTaskSummary(v **types.ExportTaskSummary, 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.ExportTaskSummary + if *v == nil { + sv = &types.ExportTaskSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "destination": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Destination = ptr.String(jtv) + } + + case "format": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExportFormat to be of type string, got %T instead", value) + } + sv.Format = types.ExportFormat(jtv) + } + + case "graphId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GraphId to be of type string, got %T instead", value) + } + sv.GraphId = ptr.String(jtv) + } + + case "kmsKeyIdentifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected KmsKeyArn to be of type string, got %T instead", value) + } + sv.KmsKeyIdentifier = ptr.String(jtv) + } + + case "parquetType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ParquetType to be of type string, got %T instead", value) + } + sv.ParquetType = types.ParquetType(jtv) + } + + case "roleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value) + } + sv.RoleArn = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExportTaskStatus to be of type string, got %T instead", value) + } + sv.Status = types.ExportTaskStatus(jtv) + } + + case "statusReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.StatusReason = ptr.String(jtv) + } + + case "taskId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExportTaskId to be of type string, got %T instead", value) + } + sv.TaskId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentExportTaskSummaryList(v *[]types.ExportTaskSummary, 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.ExportTaskSummary + if *v == nil { + cv = []types.ExportTaskSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ExportTaskSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentExportTaskSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentGraphDataSummary(v **types.GraphDataSummary, 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.GraphDataSummary + if *v == nil { + sv = &types.GraphDataSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "edgeLabels": + if err := awsRestjson1_deserializeDocumentEdgeLabels(&sv.EdgeLabels, value); err != nil { + return err + } + + case "edgeProperties": + if err := awsRestjson1_deserializeDocumentLongValuedMapList(&sv.EdgeProperties, value); err != nil { + return err + } + + case "edgeStructures": + if err := awsRestjson1_deserializeDocumentEdgeStructures(&sv.EdgeStructures, value); err != nil { + return err + } case "nodeLabels": if err := awsRestjson1_deserializeDocumentNodeLabels(&sv.NodeLabels, value); err != nil { @@ -7030,6 +8418,15 @@ func awsRestjson1_deserializeDocumentImportTaskSummary(v **types.ImportTaskSumma sv.GraphId = ptr.String(jtv) } + case "parquetType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ParquetType to be of type string, got %T instead", value) + } + sv.ParquetType = types.ParquetType(jtv) + } + case "roleArn": if value != nil { jtv, ok := value.(string) diff --git a/service/neptunegraph/generated.json b/service/neptunegraph/generated.json index 46c2ca2a836..a01dd7bed0b 100644 --- a/service/neptunegraph/generated.json +++ b/service/neptunegraph/generated.json @@ -9,6 +9,7 @@ "files": [ "api_client.go", "api_client_test.go", + "api_op_CancelExportTask.go", "api_op_CancelImportTask.go", "api_op_CancelQuery.go", "api_op_CreateGraph.go", @@ -19,12 +20,14 @@ "api_op_DeleteGraphSnapshot.go", "api_op_DeletePrivateGraphEndpoint.go", "api_op_ExecuteQuery.go", + "api_op_GetExportTask.go", "api_op_GetGraph.go", "api_op_GetGraphSnapshot.go", "api_op_GetGraphSummary.go", "api_op_GetImportTask.go", "api_op_GetPrivateGraphEndpoint.go", "api_op_GetQuery.go", + "api_op_ListExportTasks.go", "api_op_ListGraphSnapshots.go", "api_op_ListGraphs.go", "api_op_ListImportTasks.go", @@ -33,6 +36,7 @@ "api_op_ListTagsForResource.go", "api_op_ResetGraph.go", "api_op_RestoreGraphFromSnapshot.go", + "api_op_StartExportTask.go", "api_op_StartImportTask.go", "api_op_TagResource.go", "api_op_UntagResource.go", diff --git a/service/neptunegraph/serializers.go b/service/neptunegraph/serializers.go index f3857348b29..4411996a33c 100644 --- a/service/neptunegraph/serializers.go +++ b/service/neptunegraph/serializers.go @@ -17,6 +17,77 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) +type awsRestjson1_serializeOpCancelExportTask struct { +} + +func (*awsRestjson1_serializeOpCancelExportTask) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCancelExportTask) 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.(*CancelExportTaskInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/exporttasks/{taskIdentifier}") + 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_serializeOpHttpBindingsCancelExportTaskInput(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_serializeOpHttpBindingsCancelExportTaskInput(v *CancelExportTaskInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.TaskIdentifier == nil || len(*v.TaskIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member taskIdentifier must not be empty")} + } + if v.TaskIdentifier != nil { + if err := encoder.SetURI("taskIdentifier").String(*v.TaskIdentifier); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpCancelImportTask struct { } @@ -497,6 +568,11 @@ func awsRestjson1_serializeOpDocumentCreateGraphUsingImportTaskInput(v *CreateGr ok.Integer(*v.MinProvisionedMemory) } + if len(v.ParquetType) > 0 { + ok := object.Key("parquetType") + ok.String(string(v.ParquetType)) + } + if v.PublicConnectivity != nil { ok := object.Key("publicConnectivity") ok.Boolean(*v.PublicConnectivity) @@ -985,6 +1061,77 @@ func awsRestjson1_serializeOpDocumentExecuteQueryInput(v *ExecuteQueryInput, val return nil } +type awsRestjson1_serializeOpGetExportTask struct { +} + +func (*awsRestjson1_serializeOpGetExportTask) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetExportTask) 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.(*GetExportTaskInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/exporttasks/{taskIdentifier}") + 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_serializeOpHttpBindingsGetExportTaskInput(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_serializeOpHttpBindingsGetExportTaskInput(v *GetExportTaskInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.TaskIdentifier == nil || len(*v.TaskIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member taskIdentifier must not be empty")} + } + if v.TaskIdentifier != nil { + if err := encoder.SetURI("taskIdentifier").String(*v.TaskIdentifier); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpGetGraph struct { } @@ -1425,6 +1572,76 @@ func awsRestjson1_serializeOpHttpBindingsGetQueryInput(v *GetQueryInput, encoder return nil } +type awsRestjson1_serializeOpListExportTasks struct { +} + +func (*awsRestjson1_serializeOpListExportTasks) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListExportTasks) 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.(*ListExportTasksInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/exporttasks") + 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_serializeOpHttpBindingsListExportTasksInput(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_serializeOpHttpBindingsListExportTasksInput(v *ListExportTasksInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + return nil +} + type awsRestjson1_serializeOpListGraphs struct { } @@ -2079,6 +2296,126 @@ func awsRestjson1_serializeOpDocumentRestoreGraphFromSnapshotInput(v *RestoreGra return nil } +type awsRestjson1_serializeOpStartExportTask struct { +} + +func (*awsRestjson1_serializeOpStartExportTask) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpStartExportTask) 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.(*StartExportTaskInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/exporttasks") + 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_serializeOpDocumentStartExportTaskInput(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_serializeOpHttpBindingsStartExportTaskInput(v *StartExportTaskInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentStartExportTaskInput(v *StartExportTaskInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Destination != nil { + ok := object.Key("destination") + ok.String(*v.Destination) + } + + if v.ExportFilter != nil { + ok := object.Key("exportFilter") + if err := awsRestjson1_serializeDocumentExportFilter(v.ExportFilter, ok); err != nil { + return err + } + } + + if len(v.Format) > 0 { + ok := object.Key("format") + ok.String(string(v.Format)) + } + + if v.GraphIdentifier != nil { + ok := object.Key("graphIdentifier") + ok.String(*v.GraphIdentifier) + } + + if v.KmsKeyIdentifier != nil { + ok := object.Key("kmsKeyIdentifier") + ok.String(*v.KmsKeyIdentifier) + } + + if len(v.ParquetType) > 0 { + ok := object.Key("parquetType") + ok.String(string(v.ParquetType)) + } + + if v.RoleArn != nil { + ok := object.Key("roleArn") + ok.String(*v.RoleArn) + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpStartImportTask struct { } @@ -2187,6 +2524,11 @@ func awsRestjson1_serializeOpDocumentStartImportTaskInput(v *StartImportTaskInpu } } + if len(v.ParquetType) > 0 { + ok := object.Key("parquetType") + ok.String(string(v.ParquetType)) + } + if v.RoleArn != nil { ok := object.Key("roleArn") ok.String(*v.RoleArn) @@ -2493,6 +2835,91 @@ func awsRestjson1_serializeDocumentDocumentValuedMap(v map[string]document.Inter return nil } +func awsRestjson1_serializeDocumentExportFilter(v *types.ExportFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.EdgeFilter != nil { + ok := object.Key("edgeFilter") + if err := awsRestjson1_serializeDocumentExportFilterPerLabelMap(v.EdgeFilter, ok); err != nil { + return err + } + } + + if v.VertexFilter != nil { + ok := object.Key("vertexFilter") + if err := awsRestjson1_serializeDocumentExportFilterPerLabelMap(v.VertexFilter, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentExportFilterElement(v *types.ExportFilterElement, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Properties != nil { + ok := object.Key("properties") + if err := awsRestjson1_serializeDocumentExportFilterPropertyMap(v.Properties, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentExportFilterPerLabelMap(v map[string]types.ExportFilterElement, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + mapVar := v[key] + if err := awsRestjson1_serializeDocumentExportFilterElement(&mapVar, om); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentExportFilterPropertyAttributes(v *types.ExportFilterPropertyAttributes, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.MultiValueHandling) > 0 { + ok := object.Key("multiValueHandling") + ok.String(string(v.MultiValueHandling)) + } + + if v.OutputType != nil { + ok := object.Key("outputType") + ok.String(*v.OutputType) + } + + if v.SourcePropertyName != nil { + ok := object.Key("sourcePropertyName") + ok.String(*v.SourcePropertyName) + } + + return nil +} + +func awsRestjson1_serializeDocumentExportFilterPropertyMap(v map[string]types.ExportFilterPropertyAttributes, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + mapVar := v[key] + if err := awsRestjson1_serializeDocumentExportFilterPropertyAttributes(&mapVar, om); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocumentImportOptions(v types.ImportOptions, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/neptunegraph/snapshot/api_op_CancelExportTask.go.snap b/service/neptunegraph/snapshot/api_op_CancelExportTask.go.snap new file mode 100644 index 00000000000..764e5edcee9 --- /dev/null +++ b/service/neptunegraph/snapshot/api_op_CancelExportTask.go.snap @@ -0,0 +1,41 @@ +CancelExportTask + 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/neptunegraph/snapshot/api_op_GetExportTask.go.snap b/service/neptunegraph/snapshot/api_op_GetExportTask.go.snap new file mode 100644 index 00000000000..be089526c85 --- /dev/null +++ b/service/neptunegraph/snapshot/api_op_GetExportTask.go.snap @@ -0,0 +1,41 @@ +GetExportTask + 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/neptunegraph/snapshot/api_op_ListExportTasks.go.snap b/service/neptunegraph/snapshot/api_op_ListExportTasks.go.snap new file mode 100644 index 00000000000..ca7b19acc47 --- /dev/null +++ b/service/neptunegraph/snapshot/api_op_ListExportTasks.go.snap @@ -0,0 +1,40 @@ +ListExportTasks + 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/neptunegraph/snapshot/api_op_StartExportTask.go.snap b/service/neptunegraph/snapshot/api_op_StartExportTask.go.snap new file mode 100644 index 00000000000..0945f5d5006 --- /dev/null +++ b/service/neptunegraph/snapshot/api_op_StartExportTask.go.snap @@ -0,0 +1,41 @@ +StartExportTask + 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/neptunegraph/snapshot_test.go b/service/neptunegraph/snapshot_test.go index 109da77ae99..abf58d05468 100644 --- a/service/neptunegraph/snapshot_test.go +++ b/service/neptunegraph/snapshot_test.go @@ -62,6 +62,18 @@ func testSnapshot(stack *middleware.Stack, operation string) error { } return snapshotOK{} } +func TestCheckSnapshot_CancelExportTask(t *testing.T) { + svc := New(Options{}) + _, err := svc.CancelExportTask(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CancelExportTask") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_CancelImportTask(t *testing.T) { svc := New(Options{}) _, err := svc.CancelImportTask(context.Background(), nil, func(o *Options) { @@ -182,6 +194,18 @@ func TestCheckSnapshot_ExecuteQuery(t *testing.T) { } } +func TestCheckSnapshot_GetExportTask(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetExportTask(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetExportTask") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_GetGraph(t *testing.T) { svc := New(Options{}) _, err := svc.GetGraph(context.Background(), nil, func(o *Options) { @@ -254,6 +278,18 @@ func TestCheckSnapshot_GetQuery(t *testing.T) { } } +func TestCheckSnapshot_ListExportTasks(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListExportTasks(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListExportTasks") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListGraphs(t *testing.T) { svc := New(Options{}) _, err := svc.ListGraphs(context.Background(), nil, func(o *Options) { @@ -350,6 +386,18 @@ func TestCheckSnapshot_RestoreGraphFromSnapshot(t *testing.T) { } } +func TestCheckSnapshot_StartExportTask(t *testing.T) { + svc := New(Options{}) + _, err := svc.StartExportTask(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "StartExportTask") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_StartImportTask(t *testing.T) { svc := New(Options{}) _, err := svc.StartImportTask(context.Background(), nil, func(o *Options) { @@ -397,6 +445,18 @@ func TestCheckSnapshot_UpdateGraph(t *testing.T) { t.Fatal(err) } } +func TestUpdateSnapshot_CancelExportTask(t *testing.T) { + svc := New(Options{}) + _, err := svc.CancelExportTask(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CancelExportTask") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_CancelImportTask(t *testing.T) { svc := New(Options{}) _, err := svc.CancelImportTask(context.Background(), nil, func(o *Options) { @@ -517,6 +577,18 @@ func TestUpdateSnapshot_ExecuteQuery(t *testing.T) { } } +func TestUpdateSnapshot_GetExportTask(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetExportTask(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetExportTask") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_GetGraph(t *testing.T) { svc := New(Options{}) _, err := svc.GetGraph(context.Background(), nil, func(o *Options) { @@ -589,6 +661,18 @@ func TestUpdateSnapshot_GetQuery(t *testing.T) { } } +func TestUpdateSnapshot_ListExportTasks(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListExportTasks(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListExportTasks") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListGraphs(t *testing.T) { svc := New(Options{}) _, err := svc.ListGraphs(context.Background(), nil, func(o *Options) { @@ -685,6 +769,18 @@ func TestUpdateSnapshot_RestoreGraphFromSnapshot(t *testing.T) { } } +func TestUpdateSnapshot_StartExportTask(t *testing.T) { + svc := New(Options{}) + _, err := svc.StartExportTask(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "StartExportTask") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_StartImportTask(t *testing.T) { svc := New(Options{}) _, err := svc.StartImportTask(context.Background(), nil, func(o *Options) { diff --git a/service/neptunegraph/types/enums.go b/service/neptunegraph/types/enums.go index 2d101933581..3e5cbd3e7e3 100644 --- a/service/neptunegraph/types/enums.go +++ b/service/neptunegraph/types/enums.go @@ -55,12 +55,61 @@ func (ExplainMode) Values() []ExplainMode { } } +type ExportFormat string + +// Enum values for ExportFormat +const ( + ExportFormatParquet ExportFormat = "PARQUET" + ExportFormatCsv ExportFormat = "CSV" +) + +// Values returns all known values for ExportFormat. 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 (ExportFormat) Values() []ExportFormat { + return []ExportFormat{ + "PARQUET", + "CSV", + } +} + +type ExportTaskStatus string + +// Enum values for ExportTaskStatus +const ( + ExportTaskStatusInitializing ExportTaskStatus = "INITIALIZING" + ExportTaskStatusExporting ExportTaskStatus = "EXPORTING" + ExportTaskStatusSucceeded ExportTaskStatus = "SUCCEEDED" + ExportTaskStatusFailed ExportTaskStatus = "FAILED" + ExportTaskStatusCancelling ExportTaskStatus = "CANCELLING" + ExportTaskStatusCancelled ExportTaskStatus = "CANCELLED" + ExportTaskStatusDeleted ExportTaskStatus = "DELETED" +) + +// Values returns all known values for ExportTaskStatus. 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 (ExportTaskStatus) Values() []ExportTaskStatus { + return []ExportTaskStatus{ + "INITIALIZING", + "EXPORTING", + "SUCCEEDED", + "FAILED", + "CANCELLING", + "CANCELLED", + "DELETED", + } +} + type Format string // Enum values for Format const ( FormatCsv Format = "CSV" FormatOpenCypher Format = "OPEN_CYPHER" + FormatParquet Format = "PARQUET" FormatNtriples Format = "NTRIPLES" ) @@ -72,6 +121,7 @@ func (Format) Values() []Format { return []Format{ "CSV", "OPEN_CYPHER", + "PARQUET", "NTRIPLES", } } @@ -140,6 +190,7 @@ const ( ImportTaskStatusFailed ImportTaskStatus = "FAILED" ImportTaskStatusCancelling ImportTaskStatus = "CANCELLING" ImportTaskStatusCancelled ImportTaskStatus = "CANCELLED" + ImportTaskStatusDeleted ImportTaskStatus = "DELETED" ) // Values returns all known values for ImportTaskStatus. Note that this can be @@ -158,6 +209,43 @@ func (ImportTaskStatus) Values() []ImportTaskStatus { "FAILED", "CANCELLING", "CANCELLED", + "DELETED", + } +} + +type MultiValueHandlingType string + +// Enum values for MultiValueHandlingType +const ( + MultiValueHandlingTypeToList MultiValueHandlingType = "TO_LIST" + MultiValueHandlingTypePickFirst MultiValueHandlingType = "PICK_FIRST" +) + +// Values returns all known values for MultiValueHandlingType. 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 (MultiValueHandlingType) Values() []MultiValueHandlingType { + return []MultiValueHandlingType{ + "TO_LIST", + "PICK_FIRST", + } +} + +type ParquetType string + +// Enum values for ParquetType +const ( + ParquetTypeColumnar ParquetType = "COLUMNAR" +) + +// Values returns all known values for ParquetType. 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 (ParquetType) Values() []ParquetType { + return []ParquetType{ + "COLUMNAR", } } diff --git a/service/neptunegraph/types/types.go b/service/neptunegraph/types/types.go index cd7f1213807..44932c2cc56 100644 --- a/service/neptunegraph/types/types.go +++ b/service/neptunegraph/types/types.go @@ -19,6 +19,132 @@ type EdgeStructure struct { noSmithyDocumentSerde } +// This is the top-level field for specifying vertex or edge filters. If the +// ExportFilter is not provided, then all properties for all labels will be +// exported. If the ExportFilter is provided but is an empty object, then no data +// will be exported. +type ExportFilter struct { + + // Used to specify filters on a per-label basis for edges. This allows you to + // control which edge labels and properties are included in the export. + EdgeFilter map[string]ExportFilterElement + + // Used to specify filters on a per-label basis for vertices. This allows you to + // control which vertex labels and properties are included in the export. + VertexFilter map[string]ExportFilterElement + + noSmithyDocumentSerde +} + +// Specifies whihc properties of that label should be included in the export. +type ExportFilterElement struct { + + // Each property is defined by a key-value pair, where the key is the desired + // output property name (e.g. "name"), and the value is an object. + Properties map[string]ExportFilterPropertyAttributes + + noSmithyDocumentSerde +} + +// A structure representing a property's attributes. It is a map object of +// outputType, sourcePropertyName and multiValueHandling. +type ExportFilterPropertyAttributes struct { + + // Specifies how to handle properties that have multiple values. Can be either + // TO_LIST to export all values as a list, or PICK_FIRST to export the first value + // encountered. If not specified, the default value is PICK_FIRST . + MultiValueHandling MultiValueHandlingType + + // Specifies the data type to use for the property in the exported data (e.g. + // "String", "Int", "Float"). If a type is not provided, the export process will + // determine the type. If a given property is present as multiple types (e.g. one + // vertex has "height" stored as a double, and another edge has it stored as a + // string), the type will be of Any type, otherwise, it will be the type of the + // property as present in vertices. + OutputType *string + + // The name of the property as it exists in the original graph data. If not + // provided, it is assumed that the key matches the desired sourcePropertyName. + SourcePropertyName *string + + noSmithyDocumentSerde +} + +// Contains details about the specified export task. +type ExportTaskDetails struct { + + // The number of progress percentage of the export task. + // + // This member is required. + ProgressPercentage *int32 + + // The start time of the export task. + // + // This member is required. + StartTime *time.Time + + // The time elapsed, in seconds, since the start time of the export task. + // + // This member is required. + TimeElapsedSeconds *int64 + + // The number of exported edges. + NumEdgesWritten *int64 + + // The number of exported vertices. + NumVerticesWritten *int64 + + noSmithyDocumentSerde +} + +// Provides details about an export task. +type ExportTaskSummary struct { + + // The Amazon S3 URI of the export task where data will be exported to. + // + // This member is required. + Destination *string + + // The format of the export task. + // + // This member is required. + Format ExportFormat + + // The source graph identifier of the export task. + // + // This member is required. + GraphId *string + + // The KMS key identifier of the export task. + // + // This member is required. + KmsKeyIdentifier *string + + // The ARN of the IAM role that will allow the data to be exported to the + // destination. + // + // This member is required. + RoleArn *string + + // The current status of the export task. + // + // This member is required. + Status ExportTaskStatus + + // The unique identifier of the export task. + // + // This member is required. + TaskId *string + + // The parquet type of the export task. + ParquetType ParquetType + + // The reason that the export task has this status value. + StatusReason *string + + noSmithyDocumentSerde +} + // Summary information about the graph. type GraphDataSummary struct { @@ -248,6 +374,9 @@ type ImportTaskSummary struct { // The unique identifier of the Neptune Analytics graph. GraphId *string + // The parquet type of the import task. + ParquetType ParquetType + noSmithyDocumentSerde } diff --git a/service/neptunegraph/validators.go b/service/neptunegraph/validators.go index 9862a115765..6b5f383a099 100644 --- a/service/neptunegraph/validators.go +++ b/service/neptunegraph/validators.go @@ -10,6 +10,26 @@ import ( "github.com/aws/smithy-go/middleware" ) +type validateOpCancelExportTask struct { +} + +func (*validateOpCancelExportTask) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCancelExportTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CancelExportTaskInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCancelExportTaskInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCancelImportTask struct { } @@ -210,6 +230,26 @@ func (m *validateOpExecuteQuery) HandleInitialize(ctx context.Context, in middle return next.HandleInitialize(ctx, in) } +type validateOpGetExportTask struct { +} + +func (*validateOpGetExportTask) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetExportTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetExportTaskInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetExportTaskInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetGraph struct { } @@ -430,6 +470,26 @@ func (m *validateOpRestoreGraphFromSnapshot) HandleInitialize(ctx context.Contex return next.HandleInitialize(ctx, in) } +type validateOpStartExportTask struct { +} + +func (*validateOpStartExportTask) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStartExportTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StartExportTaskInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStartExportTaskInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpStartImportTask struct { } @@ -510,6 +570,10 @@ func (m *validateOpUpdateGraph) HandleInitialize(ctx context.Context, in middlew return next.HandleInitialize(ctx, in) } +func addOpCancelExportTaskValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCancelExportTask{}, middleware.After) +} + func addOpCancelImportTaskValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCancelImportTask{}, middleware.After) } @@ -550,6 +614,10 @@ func addOpExecuteQueryValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpExecuteQuery{}, middleware.After) } +func addOpGetExportTaskValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetExportTask{}, middleware.After) +} + func addOpGetGraphValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetGraph{}, middleware.After) } @@ -594,6 +662,10 @@ func addOpRestoreGraphFromSnapshotValidationMiddleware(stack *middleware.Stack) return stack.Initialize.Add(&validateOpRestoreGraphFromSnapshot{}, middleware.After) } +func addOpStartExportTaskValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStartExportTask{}, middleware.After) +} + func addOpStartImportTaskValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpStartImportTask{}, middleware.After) } @@ -662,6 +734,21 @@ func validateVectorSearchConfiguration(v *types.VectorSearchConfiguration) error } } +func validateOpCancelExportTaskInput(v *CancelExportTaskInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CancelExportTaskInput"} + if v.TaskIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("TaskIdentifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCancelImportTaskInput(v *CancelImportTaskInput) error { if v == nil { return nil @@ -854,6 +941,21 @@ func validateOpExecuteQueryInput(v *ExecuteQueryInput) error { } } +func validateOpGetExportTaskInput(v *GetExportTaskInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetExportTaskInput"} + if v.TaskIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("TaskIdentifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetGraphInput(v *GetGraphInput) error { if v == nil { return nil @@ -1034,6 +1136,33 @@ func validateOpRestoreGraphFromSnapshotInput(v *RestoreGraphFromSnapshotInput) e } } +func validateOpStartExportTaskInput(v *StartExportTaskInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StartExportTaskInput"} + if v.GraphIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("GraphIdentifier")) + } + if v.RoleArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoleArn")) + } + if len(v.Format) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Format")) + } + if v.Destination == nil { + invalidParams.Add(smithy.NewErrParamRequired("Destination")) + } + if v.KmsKeyIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("KmsKeyIdentifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpStartImportTaskInput(v *StartImportTaskInput) error { if v == nil { return nil diff --git a/service/omics/api_op_CreateSequenceStore.go b/service/omics/api_op_CreateSequenceStore.go index 7eb83b300fc..2345dea5836 100644 --- a/service/omics/api_op_CreateSequenceStore.go +++ b/service/omics/api_op_CreateSequenceStore.go @@ -48,6 +48,13 @@ type CreateSequenceStoreInput struct { // An S3 location that is used to store files that have failed a direct upload. FallbackLocation *string + // The tags keys to propagate to the S3 objects associated with read sets in the + // sequence store. + PropagatedSetLevelTags []string + + // S3 access configuration parameters + S3AccessConfig *types.S3AccessConfig + // Server-side encryption (SSE) settings for the store. SseConfig *types.SseConfig @@ -86,9 +93,22 @@ type CreateSequenceStoreOutput struct { // The store's name. Name *string + // The tags keys to propagate to the S3 objects associated with read sets in the + // sequence store. + PropagatedSetLevelTags []string + + // The S3 access metadata of the sequence store. + S3Access *types.SequenceStoreS3Access + // The store's SSE settings. SseConfig *types.SseConfig + // The status of the sequence store. + Status types.SequenceStoreStatus + + // The status message of the sequence store. + StatusMessage *string + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata @@ -162,6 +182,9 @@ func (c *Client) addOperationCreateSequenceStoreMiddlewares(stack *middleware.St if err = addEndpointPrefix_opCreateSequenceStoreMiddleware(stack); err != nil { return err } + if err = addIdempotencyToken_opCreateSequenceStoreMiddleware(stack, options); err != nil { + return err + } if err = addOpCreateSequenceStoreValidationMiddleware(stack); err != nil { return err } @@ -225,6 +248,39 @@ func addEndpointPrefix_opCreateSequenceStoreMiddleware(stack *middleware.Stack) return stack.Finalize.Insert(&endpointPrefix_opCreateSequenceStoreMiddleware{}, "ResolveEndpointV2", middleware.After) } +type idempotencyToken_initializeOpCreateSequenceStore struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateSequenceStore) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateSequenceStore) 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.(*CreateSequenceStoreInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateSequenceStoreInput ") + } + + 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_opCreateSequenceStoreMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateSequenceStore{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + func newServiceMetadataMiddleware_opCreateSequenceStore(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/omics/api_op_DeleteS3AccessPolicy.go b/service/omics/api_op_DeleteS3AccessPolicy.go new file mode 100644 index 00000000000..7ab86920590 --- /dev/null +++ b/service/omics/api_op_DeleteS3AccessPolicy.go @@ -0,0 +1,182 @@ +// 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" +) + +// Deletes an access policy for the specified store. +func (c *Client) DeleteS3AccessPolicy(ctx context.Context, params *DeleteS3AccessPolicyInput, optFns ...func(*Options)) (*DeleteS3AccessPolicyOutput, error) { + if params == nil { + params = &DeleteS3AccessPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteS3AccessPolicy", params, optFns, c.addOperationDeleteS3AccessPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteS3AccessPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteS3AccessPolicyInput struct { + + // The S3 access point ARN that has the access policy. + // + // This member is required. + S3AccessPointArn *string + + noSmithyDocumentSerde +} + +type DeleteS3AccessPolicyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteS3AccessPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteS3AccessPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteS3AccessPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteS3AccessPolicy"); 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_opDeleteS3AccessPolicyMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteS3AccessPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteS3AccessPolicy(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_opDeleteS3AccessPolicyMiddleware struct { +} + +func (*endpointPrefix_opDeleteS3AccessPolicyMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opDeleteS3AccessPolicyMiddleware) 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 = "control-storage-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opDeleteS3AccessPolicyMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opDeleteS3AccessPolicyMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +func newServiceMetadataMiddleware_opDeleteS3AccessPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteS3AccessPolicy", + } +} diff --git a/service/omics/api_op_GetS3AccessPolicy.go b/service/omics/api_op_GetS3AccessPolicy.go new file mode 100644 index 00000000000..ec3b41de982 --- /dev/null +++ b/service/omics/api_op_GetS3AccessPolicy.go @@ -0,0 +1,204 @@ +// 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" +) + +// Retrieves details about an access policy on a given store. +func (c *Client) GetS3AccessPolicy(ctx context.Context, params *GetS3AccessPolicyInput, optFns ...func(*Options)) (*GetS3AccessPolicyOutput, error) { + if params == nil { + params = &GetS3AccessPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetS3AccessPolicy", params, optFns, c.addOperationGetS3AccessPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetS3AccessPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetS3AccessPolicyInput struct { + + // The S3 access point ARN that has the access policy. + // + // This member is required. + S3AccessPointArn *string + + noSmithyDocumentSerde +} + +type GetS3AccessPolicyOutput struct { + + // The current resource policy that controls S3 access on the store. + // + // This value conforms to the media type: application/json + // + // This member is required. + S3AccessPolicy *string + + // The S3 access point ARN that has the access policy. + S3AccessPointArn *string + + // The AWS-generated Sequence Store or Reference Store ID. + StoreId *string + + // The type of store associated with the access point. + StoreType types.StoreType + + // The time when the policy was last updated. + UpdateTime *time.Time + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetS3AccessPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetS3AccessPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetS3AccessPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetS3AccessPolicy"); 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_opGetS3AccessPolicyMiddleware(stack); err != nil { + return err + } + if err = addOpGetS3AccessPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetS3AccessPolicy(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_opGetS3AccessPolicyMiddleware struct { +} + +func (*endpointPrefix_opGetS3AccessPolicyMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opGetS3AccessPolicyMiddleware) 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 = "control-storage-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opGetS3AccessPolicyMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opGetS3AccessPolicyMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +func newServiceMetadataMiddleware_opGetS3AccessPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetS3AccessPolicy", + } +} diff --git a/service/omics/api_op_GetSequenceStore.go b/service/omics/api_op_GetSequenceStore.go index 8e989f179f0..1876b487775 100644 --- a/service/omics/api_op_GetSequenceStore.go +++ b/service/omics/api_op_GetSequenceStore.go @@ -67,6 +67,10 @@ type GetSequenceStoreOutput struct { // The store's name. Name *string + // The tags keys to propagate to the S3 objects associated with read sets in the + // sequence store. + PropagatedSetLevelTags []string + // The S3 metadata of a sequence store, including the ARN and S3 URI of the S3 // bucket. S3Access *types.SequenceStoreS3Access @@ -74,6 +78,15 @@ type GetSequenceStoreOutput struct { // The store's server-side encryption (SSE) settings. SseConfig *types.SseConfig + // The status of the sequence store. + Status types.SequenceStoreStatus + + // The status message of the sequence store. + StatusMessage *string + + // The last-updated time of the sequence store. + UpdateTime *time.Time + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/omics/api_op_PutS3AccessPolicy.go b/service/omics/api_op_PutS3AccessPolicy.go new file mode 100644 index 00000000000..bb4ffe82d15 --- /dev/null +++ b/service/omics/api_op_PutS3AccessPolicy.go @@ -0,0 +1,200 @@ +// 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" +) + +// Adds an access policy to the specified store. +func (c *Client) PutS3AccessPolicy(ctx context.Context, params *PutS3AccessPolicyInput, optFns ...func(*Options)) (*PutS3AccessPolicyOutput, error) { + if params == nil { + params = &PutS3AccessPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutS3AccessPolicy", params, optFns, c.addOperationPutS3AccessPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutS3AccessPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutS3AccessPolicyInput struct { + + // The S3 access point ARN where you want to put the access policy. + // + // This member is required. + S3AccessPointArn *string + + // The resource policy that controls S3 access to the store. + // + // This value conforms to the media type: application/json + // + // This member is required. + S3AccessPolicy *string + + noSmithyDocumentSerde +} + +type PutS3AccessPolicyOutput struct { + + // The S3 access point ARN that now has the access policy. + S3AccessPointArn *string + + // The AWS-generated Sequence Store or Reference Store ID. + StoreId *string + + // The type of store associated with the access point. + StoreType types.StoreType + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutS3AccessPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpPutS3AccessPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutS3AccessPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "PutS3AccessPolicy"); 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_opPutS3AccessPolicyMiddleware(stack); err != nil { + return err + } + if err = addOpPutS3AccessPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutS3AccessPolicy(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_opPutS3AccessPolicyMiddleware struct { +} + +func (*endpointPrefix_opPutS3AccessPolicyMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opPutS3AccessPolicyMiddleware) 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 = "control-storage-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opPutS3AccessPolicyMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opPutS3AccessPolicyMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +func newServiceMetadataMiddleware_opPutS3AccessPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "PutS3AccessPolicy", + } +} diff --git a/service/omics/api_op_UpdateSequenceStore.go b/service/omics/api_op_UpdateSequenceStore.go new file mode 100644 index 00000000000..89236458d93 --- /dev/null +++ b/service/omics/api_op_UpdateSequenceStore.go @@ -0,0 +1,287 @@ +// 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" +) + +// Update one or more parameters for the sequence store. +func (c *Client) UpdateSequenceStore(ctx context.Context, params *UpdateSequenceStoreInput, optFns ...func(*Options)) (*UpdateSequenceStoreOutput, error) { + if params == nil { + params = &UpdateSequenceStoreInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateSequenceStore", params, optFns, c.addOperationUpdateSequenceStoreMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateSequenceStoreOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateSequenceStoreInput struct { + + // The ID of the sequence store. + // + // This member is required. + Id *string + + // To ensure that requests don't run multiple times, specify a unique token for + // each request. + ClientToken *string + + // A description for the sequence store. + Description *string + + // The S3 URI of a bucket and folder to store Read Sets that fail to upload. + FallbackLocation *string + + // A name for the sequence store. + Name *string + + // The tags keys to propagate to the S3 objects associated with read sets in the + // sequence store. + PropagatedSetLevelTags []string + + // S3 access configuration parameters. + S3AccessConfig *types.S3AccessConfig + + noSmithyDocumentSerde +} + +type UpdateSequenceStoreOutput struct { + + // The ARN of the sequence store. + // + // This member is required. + Arn *string + + // The time when the store was created. + // + // This member is required. + CreationTime *time.Time + + // The ID of the sequence store. + // + // This member is required. + Id *string + + // Description of the sequence store. + Description *string + + // The ETag algorithm family to use on ingested read sets. + ETagAlgorithmFamily types.ETagAlgorithmFamily + + // The S3 URI of a bucket and folder to store Read Sets that fail to upload. + FallbackLocation *string + + // The name of the sequence store. + Name *string + + // The tags keys to propagate to the S3 objects associated with read sets in the + // sequence store. + PropagatedSetLevelTags []string + + // The S3 access metadata of the sequence store. + S3Access *types.SequenceStoreS3Access + + // Server-side encryption (SSE) settings for a store. + SseConfig *types.SseConfig + + // The status of the sequence store. + Status types.SequenceStoreStatus + + // The status message of the sequence store. + StatusMessage *string + + // The last-updated time of the Sequence Store. + UpdateTime *time.Time + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateSequenceStoreMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateSequenceStore{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateSequenceStore{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateSequenceStore"); 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_opUpdateSequenceStoreMiddleware(stack); err != nil { + return err + } + if err = addIdempotencyToken_opUpdateSequenceStoreMiddleware(stack, options); err != nil { + return err + } + if err = addOpUpdateSequenceStoreValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateSequenceStore(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_opUpdateSequenceStoreMiddleware struct { +} + +func (*endpointPrefix_opUpdateSequenceStoreMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opUpdateSequenceStoreMiddleware) 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 = "control-storage-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opUpdateSequenceStoreMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opUpdateSequenceStoreMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +type idempotencyToken_initializeOpUpdateSequenceStore struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpUpdateSequenceStore) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpUpdateSequenceStore) 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.(*UpdateSequenceStoreInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *UpdateSequenceStoreInput ") + } + + 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_opUpdateSequenceStoreMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpUpdateSequenceStore{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opUpdateSequenceStore(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateSequenceStore", + } +} diff --git a/service/omics/deserializers.go b/service/omics/deserializers.go index 9a4e43e9f63..f222387a94e 100644 --- a/service/omics/deserializers.go +++ b/service/omics/deserializers.go @@ -2529,11 +2529,39 @@ func awsRestjson1_deserializeOpDocumentCreateSequenceStoreOutput(v **CreateSeque sv.Name = ptr.String(jtv) } + case "propagatedSetLevelTags": + if err := awsRestjson1_deserializeDocumentPropagatedSetLevelTags(&sv.PropagatedSetLevelTags, value); err != nil { + return err + } + + case "s3Access": + if err := awsRestjson1_deserializeDocumentSequenceStoreS3Access(&sv.S3Access, value); err != nil { + return err + } + case "sseConfig": if err := awsRestjson1_deserializeDocumentSseConfig(&sv.SseConfig, value); err != nil { return err } + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SequenceStoreStatus to be of type string, got %T instead", value) + } + sv.Status = types.SequenceStoreStatus(jtv) + } + + case "statusMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SequenceStoreStatusMessage to be of type string, got %T instead", value) + } + sv.StatusMessage = ptr.String(jtv) + } + default: _, _ = key, value @@ -4040,6 +4068,112 @@ func awsRestjson1_deserializeOpErrorDeleteRunGroup(response *smithyhttp.Response } } +type awsRestjson1_deserializeOpDeleteS3AccessPolicy struct { +} + +func (*awsRestjson1_deserializeOpDeleteS3AccessPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteS3AccessPolicy) HandleDeserialize(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_deserializeOpErrorDeleteS3AccessPolicy(response, &metadata) + } + output := &DeleteS3AccessPolicyOutput{} + out.Result = output + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteS3AccessPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("NotSupportedOperationException", errorCode): + return awsRestjson1_deserializeErrorNotSupportedOperationException(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_deserializeOpDeleteSequenceStore struct { } @@ -8767,14 +8901,14 @@ func awsRestjson1_deserializeOpDocumentGetRunTaskOutput(v **GetRunTaskOutput, va return nil } -type awsRestjson1_deserializeOpGetSequenceStore struct { +type awsRestjson1_deserializeOpGetS3AccessPolicy struct { } -func (*awsRestjson1_deserializeOpGetSequenceStore) ID() string { +func (*awsRestjson1_deserializeOpGetS3AccessPolicy) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetSequenceStore) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetS3AccessPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8792,9 +8926,9 @@ func (m *awsRestjson1_deserializeOpGetSequenceStore) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetSequenceStore(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetS3AccessPolicy(response, &metadata) } - output := &GetSequenceStoreOutput{} + output := &GetS3AccessPolicyOutput{} out.Result = output var buff [1024]byte @@ -8815,7 +8949,7 @@ func (m *awsRestjson1_deserializeOpGetSequenceStore) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetSequenceStoreOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetS3AccessPolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8829,7 +8963,7 @@ func (m *awsRestjson1_deserializeOpGetSequenceStore) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetSequenceStore(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetS3AccessPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8876,12 +9010,18 @@ func awsRestjson1_deserializeOpErrorGetSequenceStore(response *smithyhttp.Respon case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("NotSupportedOperationException", errorCode): + return awsRestjson1_deserializeErrorNotSupportedOperationException(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) @@ -8898,7 +9038,7 @@ func awsRestjson1_deserializeOpErrorGetSequenceStore(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentGetSequenceStoreOutput(v **GetSequenceStoreOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetS3AccessPolicyOutput(v **GetS3AccessPolicyOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8911,90 +9051,62 @@ func awsRestjson1_deserializeOpDocumentGetSequenceStoreOutput(v **GetSequenceSto return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetSequenceStoreOutput + var sv *GetS3AccessPolicyOutput if *v == nil { - sv = &GetSequenceStoreOutput{} + sv = &GetS3AccessPolicyOutput{} } 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 SequenceStoreArn to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - - case "creationTime": + case "s3AccessPointArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err + return fmt.Errorf("expected S3AccessPointArn to be of type string, got %T instead", value) } - sv.CreationTime = ptr.Time(t) + sv.S3AccessPointArn = ptr.String(jtv) } - case "description": + case "s3AccessPolicy": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SequenceStoreDescription to be of type string, got %T instead", value) + return fmt.Errorf("expected S3AccessPolicy to be of type string, got %T instead", value) } - sv.Description = ptr.String(jtv) + sv.S3AccessPolicy = ptr.String(jtv) } - case "eTagAlgorithmFamily": + case "storeId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ETagAlgorithmFamily to be of type string, got %T instead", value) + return fmt.Errorf("expected StoreId to be of type string, got %T instead", value) } - sv.ETagAlgorithmFamily = types.ETagAlgorithmFamily(jtv) + sv.StoreId = ptr.String(jtv) } - case "fallbackLocation": + case "storeType": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected S3Destination to be of type string, got %T instead", value) + return fmt.Errorf("expected StoreType to be of type string, got %T instead", value) } - sv.FallbackLocation = ptr.String(jtv) + sv.StoreType = types.StoreType(jtv) } - case "id": + case "updateTime": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SequenceStoreId to be of type string, got %T instead", value) + return fmt.Errorf("expected Timestamp 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 SequenceStoreName to be of type string, got %T instead", value) + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err } - sv.Name = ptr.String(jtv) - } - - case "s3Access": - if err := awsRestjson1_deserializeDocumentSequenceStoreS3Access(&sv.S3Access, value); err != nil { - return err - } - - case "sseConfig": - if err := awsRestjson1_deserializeDocumentSseConfig(&sv.SseConfig, value); err != nil { - return err + sv.UpdateTime = ptr.Time(t) } default: @@ -9006,14 +9118,14 @@ func awsRestjson1_deserializeOpDocumentGetSequenceStoreOutput(v **GetSequenceSto return nil } -type awsRestjson1_deserializeOpGetShare struct { +type awsRestjson1_deserializeOpGetSequenceStore struct { } -func (*awsRestjson1_deserializeOpGetShare) ID() string { +func (*awsRestjson1_deserializeOpGetSequenceStore) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetShare) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetSequenceStore) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -9031,9 +9143,9 @@ func (m *awsRestjson1_deserializeOpGetShare) HandleDeserialize(ctx context.Conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetShare(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetSequenceStore(response, &metadata) } - output := &GetShareOutput{} + output := &GetSequenceStoreOutput{} out.Result = output var buff [1024]byte @@ -9054,7 +9166,7 @@ func (m *awsRestjson1_deserializeOpGetShare) HandleDeserialize(ctx context.Conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetShareOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetSequenceStoreOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9068,7 +9180,7 @@ func (m *awsRestjson1_deserializeOpGetShare) HandleDeserialize(ctx context.Conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetShare(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetSequenceStore(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -9112,18 +9224,15 @@ func awsRestjson1_deserializeOpErrorGetShare(response *smithyhttp.Response, meta 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) @@ -9140,7 +9249,7 @@ func awsRestjson1_deserializeOpErrorGetShare(response *smithyhttp.Response, meta } } -func awsRestjson1_deserializeOpDocumentGetShareOutput(v **GetShareOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetSequenceStoreOutput(v **GetSequenceStoreOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9153,30 +9262,308 @@ func awsRestjson1_deserializeOpDocumentGetShareOutput(v **GetShareOutput, value return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetShareOutput + var sv *GetSequenceStoreOutput if *v == nil { - sv = &GetShareOutput{} + sv = &GetSequenceStoreOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "share": - if err := awsRestjson1_deserializeDocumentShareDetails(&sv.Share, value); err != nil { - return err + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SequenceStoreArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) } - default: - _, _ = key, value - - } - } - *v = sv - return nil -} + case "creationTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreationTime = ptr.Time(t) + } -type awsRestjson1_deserializeOpGetVariantImportJob struct { + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SequenceStoreDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "eTagAlgorithmFamily": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ETagAlgorithmFamily to be of type string, got %T instead", value) + } + sv.ETagAlgorithmFamily = types.ETagAlgorithmFamily(jtv) + } + + case "fallbackLocation": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3Destination to be of type string, got %T instead", value) + } + sv.FallbackLocation = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SequenceStoreId 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 SequenceStoreName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "propagatedSetLevelTags": + if err := awsRestjson1_deserializeDocumentPropagatedSetLevelTags(&sv.PropagatedSetLevelTags, value); err != nil { + return err + } + + case "s3Access": + if err := awsRestjson1_deserializeDocumentSequenceStoreS3Access(&sv.S3Access, value); err != nil { + return err + } + + case "sseConfig": + if err := awsRestjson1_deserializeDocumentSseConfig(&sv.SseConfig, value); err != nil { + return err + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SequenceStoreStatus to be of type string, got %T instead", value) + } + sv.Status = types.SequenceStoreStatus(jtv) + } + + case "statusMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SequenceStoreStatusMessage to be of type string, got %T instead", value) + } + sv.StatusMessage = ptr.String(jtv) + } + + case "updateTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.UpdateTime = ptr.Time(t) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetShare struct { +} + +func (*awsRestjson1_deserializeOpGetShare) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetShare) HandleDeserialize(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_deserializeOpErrorGetShare(response, &metadata) + } + output := &GetShareOutput{} + 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_deserializeOpDocumentGetShareOutput(&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_deserializeOpErrorGetShare(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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_deserializeOpDocumentGetShareOutput(v **GetShareOutput, 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 *GetShareOutput + if *v == nil { + sv = &GetShareOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "share": + if err := awsRestjson1_deserializeDocumentShareDetails(&sv.Share, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetVariantImportJob struct { } func (*awsRestjson1_deserializeOpGetVariantImportJob) ID() string { @@ -13214,14 +13601,187 @@ func awsRestjson1_deserializeOpDocumentListSharesOutput(v **ListSharesOutput, va return nil } -type awsRestjson1_deserializeOpListTagsForResource struct { +type awsRestjson1_deserializeOpListTagsForResource struct { +} + +func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, 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_deserializeOpErrorListTagsForResource(response, &metadata) + } + output := &ListTagsForResourceOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("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_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListTagsForResourceOutput + if *v == nil { + sv = &ListTagsForResourceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListVariantImportJobs struct { } -func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { +func (*awsRestjson1_deserializeOpListVariantImportJobs) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListVariantImportJobs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -13239,9 +13799,9 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListTagsForResource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListVariantImportJobs(response, &metadata) } - output := &ListTagsForResourceOutput{} + output := &ListVariantImportJobsOutput{} out.Result = output var buff [1024]byte @@ -13262,7 +13822,7 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListVariantImportJobsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -13276,7 +13836,7 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListVariantImportJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -13320,21 +13880,12 @@ func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Res case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - 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) @@ -13351,7 +13902,7 @@ func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListVariantImportJobsOutput(v **ListVariantImportJobsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -13364,17 +13915,26 @@ func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsFor return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListTagsForResourceOutput + var sv *ListVariantImportJobsOutput if *v == nil { - sv = &ListTagsForResourceOutput{} + sv = &ListVariantImportJobsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "tags": - if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "variantImportJobs": + if err := awsRestjson1_deserializeDocumentVariantImportJobItems(&sv.VariantImportJobs, value); err != nil { return err } @@ -13387,14 +13947,14 @@ func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsFor return nil } -type awsRestjson1_deserializeOpListVariantImportJobs struct { +type awsRestjson1_deserializeOpListVariantStores struct { } -func (*awsRestjson1_deserializeOpListVariantImportJobs) ID() string { +func (*awsRestjson1_deserializeOpListVariantStores) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListVariantImportJobs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListVariantStores) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -13412,9 +13972,9 @@ func (m *awsRestjson1_deserializeOpListVariantImportJobs) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListVariantImportJobs(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListVariantStores(response, &metadata) } - output := &ListVariantImportJobsOutput{} + output := &ListVariantStoresOutput{} out.Result = output var buff [1024]byte @@ -13435,7 +13995,7 @@ func (m *awsRestjson1_deserializeOpListVariantImportJobs) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListVariantImportJobsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListVariantStoresOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -13449,7 +14009,7 @@ func (m *awsRestjson1_deserializeOpListVariantImportJobs) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorListVariantImportJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListVariantStores(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -13515,7 +14075,7 @@ func awsRestjson1_deserializeOpErrorListVariantImportJobs(response *smithyhttp.R } } -func awsRestjson1_deserializeOpDocumentListVariantImportJobsOutput(v **ListVariantImportJobsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListVariantStoresOutput(v **ListVariantStoresOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -13528,9 +14088,9 @@ func awsRestjson1_deserializeOpDocumentListVariantImportJobsOutput(v **ListVaria return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListVariantImportJobsOutput + var sv *ListVariantStoresOutput if *v == nil { - sv = &ListVariantImportJobsOutput{} + sv = &ListVariantStoresOutput{} } else { sv = *v } @@ -13546,8 +14106,8 @@ func awsRestjson1_deserializeOpDocumentListVariantImportJobsOutput(v **ListVaria sv.NextToken = ptr.String(jtv) } - case "variantImportJobs": - if err := awsRestjson1_deserializeDocumentVariantImportJobItems(&sv.VariantImportJobs, value); err != nil { + case "variantStores": + if err := awsRestjson1_deserializeDocumentVariantStoreItems(&sv.VariantStores, value); err != nil { return err } @@ -13560,14 +14120,14 @@ func awsRestjson1_deserializeOpDocumentListVariantImportJobsOutput(v **ListVaria return nil } -type awsRestjson1_deserializeOpListVariantStores struct { +type awsRestjson1_deserializeOpListWorkflows struct { } -func (*awsRestjson1_deserializeOpListVariantStores) ID() string { +func (*awsRestjson1_deserializeOpListWorkflows) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListVariantStores) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListWorkflows) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -13585,9 +14145,9 @@ func (m *awsRestjson1_deserializeOpListVariantStores) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListVariantStores(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListWorkflows(response, &metadata) } - output := &ListVariantStoresOutput{} + output := &ListWorkflowsOutput{} out.Result = output var buff [1024]byte @@ -13608,7 +14168,7 @@ func (m *awsRestjson1_deserializeOpListVariantStores) HandleDeserialize(ctx cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListVariantStoresOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListWorkflowsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -13622,7 +14182,7 @@ func (m *awsRestjson1_deserializeOpListVariantStores) HandleDeserialize(ctx cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorListVariantStores(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListWorkflows(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -13666,12 +14226,21 @@ func awsRestjson1_deserializeOpErrorListVariantStores(response *smithyhttp.Respo case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("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) @@ -13688,7 +14257,7 @@ func awsRestjson1_deserializeOpErrorListVariantStores(response *smithyhttp.Respo } } -func awsRestjson1_deserializeOpDocumentListVariantStoresOutput(v **ListVariantStoresOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListWorkflowsOutput(v **ListWorkflowsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -13701,29 +14270,29 @@ func awsRestjson1_deserializeOpDocumentListVariantStoresOutput(v **ListVariantSt return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListVariantStoresOutput + var sv *ListWorkflowsOutput if *v == nil { - sv = &ListVariantStoresOutput{} + sv = &ListWorkflowsOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "items": + if err := awsRestjson1_deserializeDocumentWorkflowList(&sv.Items, value); err != nil { + return err + } + case "nextToken": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected WorkflowListToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } - case "variantStores": - if err := awsRestjson1_deserializeDocumentVariantStoreItems(&sv.VariantStores, value); err != nil { - return err - } - default: _, _ = key, value @@ -13733,14 +14302,14 @@ func awsRestjson1_deserializeOpDocumentListVariantStoresOutput(v **ListVariantSt return nil } -type awsRestjson1_deserializeOpListWorkflows struct { +type awsRestjson1_deserializeOpPutS3AccessPolicy struct { } -func (*awsRestjson1_deserializeOpListWorkflows) ID() string { +func (*awsRestjson1_deserializeOpPutS3AccessPolicy) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListWorkflows) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpPutS3AccessPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -13758,9 +14327,9 @@ func (m *awsRestjson1_deserializeOpListWorkflows) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListWorkflows(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorPutS3AccessPolicy(response, &metadata) } - output := &ListWorkflowsOutput{} + output := &PutS3AccessPolicyOutput{} out.Result = output var buff [1024]byte @@ -13781,7 +14350,7 @@ func (m *awsRestjson1_deserializeOpListWorkflows) HandleDeserialize(ctx context. return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListWorkflowsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentPutS3AccessPolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -13795,7 +14364,7 @@ func (m *awsRestjson1_deserializeOpListWorkflows) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorListWorkflows(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorPutS3AccessPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -13839,21 +14408,18 @@ func awsRestjson1_deserializeOpErrorListWorkflows(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("NotSupportedOperationException", errorCode): + return awsRestjson1_deserializeErrorNotSupportedOperationException(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) @@ -13870,7 +14436,7 @@ func awsRestjson1_deserializeOpErrorListWorkflows(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentListWorkflowsOutput(v **ListWorkflowsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentPutS3AccessPolicyOutput(v **PutS3AccessPolicyOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -13883,27 +14449,40 @@ func awsRestjson1_deserializeOpDocumentListWorkflowsOutput(v **ListWorkflowsOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListWorkflowsOutput + var sv *PutS3AccessPolicyOutput if *v == nil { - sv = &ListWorkflowsOutput{} + sv = &PutS3AccessPolicyOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "items": - if err := awsRestjson1_deserializeDocumentWorkflowList(&sv.Items, value); err != nil { - return err + case "s3AccessPointArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3AccessPointArn to be of type string, got %T instead", value) + } + sv.S3AccessPointArn = ptr.String(jtv) } - case "nextToken": + case "storeId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected WorkflowListToken to be of type string, got %T instead", value) + return fmt.Errorf("expected StoreId to be of type string, got %T instead", value) } - sv.NextToken = ptr.String(jtv) + sv.StoreId = ptr.String(jtv) + } + + case "storeType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StoreType to be of type string, got %T instead", value) + } + sv.StoreType = types.StoreType(jtv) } default: @@ -16015,18 +16594,133 @@ func awsRestjson1_deserializeOpDocumentUpdateAnnotationStoreVersionOutput(v **Up } } - *v = sv - return nil + *v = sv + 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_deserializeOpUpdateRunCache struct { +type awsRestjson1_deserializeOpUpdateRunGroup struct { } -func (*awsRestjson1_deserializeOpUpdateRunCache) ID() string { +func (*awsRestjson1_deserializeOpUpdateRunGroup) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateRunCache) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateRunGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -16044,9 +16738,9 @@ func (m *awsRestjson1_deserializeOpUpdateRunCache) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateRunCache(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateRunGroup(response, &metadata) } - output := &UpdateRunCacheOutput{} + output := &UpdateRunGroupOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -16059,7 +16753,7 @@ func (m *awsRestjson1_deserializeOpUpdateRunCache) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateRunCache(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateRunGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -16134,14 +16828,14 @@ func awsRestjson1_deserializeOpErrorUpdateRunCache(response *smithyhttp.Response } } -type awsRestjson1_deserializeOpUpdateRunGroup struct { +type awsRestjson1_deserializeOpUpdateSequenceStore struct { } -func (*awsRestjson1_deserializeOpUpdateRunGroup) ID() string { +func (*awsRestjson1_deserializeOpUpdateSequenceStore) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateRunGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateSequenceStore) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -16159,14 +16853,36 @@ func (m *awsRestjson1_deserializeOpUpdateRunGroup) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateRunGroup(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateSequenceStore(response, &metadata) } - output := &UpdateRunGroupOutput{} + output := &UpdateSequenceStoreOutput{} 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) + + 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_deserializeOpDocumentUpdateSequenceStoreOutput(&output, shape) + 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 with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), } } @@ -16174,7 +16890,7 @@ func (m *awsRestjson1_deserializeOpUpdateRunGroup) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateRunGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateSequenceStore(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.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,9 +16946,6 @@ func awsRestjson1_deserializeOpErrorUpdateRunGroup(response *smithyhttp.Response 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) @@ -16249,6 +16962,150 @@ func awsRestjson1_deserializeOpErrorUpdateRunGroup(response *smithyhttp.Response } } +func awsRestjson1_deserializeOpDocumentUpdateSequenceStoreOutput(v **UpdateSequenceStoreOutput, 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 *UpdateSequenceStoreOutput + if *v == nil { + sv = &UpdateSequenceStoreOutput{} + } 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 SequenceStoreArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "creationTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreationTime = ptr.Time(t) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SequenceStoreDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "eTagAlgorithmFamily": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ETagAlgorithmFamily to be of type string, got %T instead", value) + } + sv.ETagAlgorithmFamily = types.ETagAlgorithmFamily(jtv) + } + + case "fallbackLocation": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3Destination to be of type string, got %T instead", value) + } + sv.FallbackLocation = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SequenceStoreId 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 SequenceStoreName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "propagatedSetLevelTags": + if err := awsRestjson1_deserializeDocumentPropagatedSetLevelTags(&sv.PropagatedSetLevelTags, value); err != nil { + return err + } + + case "s3Access": + if err := awsRestjson1_deserializeDocumentSequenceStoreS3Access(&sv.S3Access, value); err != nil { + return err + } + + case "sseConfig": + if err := awsRestjson1_deserializeDocumentSseConfig(&sv.SseConfig, value); err != nil { + return err + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SequenceStoreStatus to be of type string, got %T instead", value) + } + sv.Status = types.SequenceStoreStatus(jtv) + } + + case "statusMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SequenceStoreStatusMessage to be of type string, got %T instead", value) + } + sv.StatusMessage = ptr.String(jtv) + } + + case "updateTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.UpdateTime = ptr.Time(t) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpUpdateVariantStore struct { } @@ -19277,6 +20134,42 @@ func awsRestjson1_deserializeDocumentNotSupportedOperationException(v **types.No return nil } +func awsRestjson1_deserializeDocumentPropagatedSetLevelTags(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 TagKey to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentRangeNotSatisfiableException(v **types.RangeNotSatisfiableException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -21177,6 +22070,37 @@ func awsRestjson1_deserializeDocumentSequenceStoreDetail(v **types.SequenceStore return err } + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SequenceStoreStatus to be of type string, got %T instead", value) + } + sv.Status = types.SequenceStoreStatus(jtv) + } + + case "statusMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SequenceStoreStatusMessage to be of type string, got %T instead", value) + } + sv.StatusMessage = ptr.String(jtv) + } + + case "updateTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.UpdateTime = ptr.Time(t) + } + default: _, _ = key, value @@ -21242,6 +22166,15 @@ func awsRestjson1_deserializeDocumentSequenceStoreS3Access(v **types.SequenceSto for key, value := range shape { switch key { + case "accessLogLocation": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccessLogLocation to be of type string, got %T instead", value) + } + sv.AccessLogLocation = ptr.String(jtv) + } + case "s3AccessPointArn": if value != nil { jtv, ok := value.(string) diff --git a/service/omics/generated.json b/service/omics/generated.json index 753e9819457..ea21a559ee6 100644 --- a/service/omics/generated.json +++ b/service/omics/generated.json @@ -33,6 +33,7 @@ "api_op_DeleteRun.go", "api_op_DeleteRunCache.go", "api_op_DeleteRunGroup.go", + "api_op_DeleteS3AccessPolicy.go", "api_op_DeleteSequenceStore.go", "api_op_DeleteShare.go", "api_op_DeleteVariantStore.go", @@ -53,6 +54,7 @@ "api_op_GetRunCache.go", "api_op_GetRunGroup.go", "api_op_GetRunTask.go", + "api_op_GetS3AccessPolicy.go", "api_op_GetSequenceStore.go", "api_op_GetShare.go", "api_op_GetVariantImportJob.go", @@ -80,6 +82,7 @@ "api_op_ListVariantImportJobs.go", "api_op_ListVariantStores.go", "api_op_ListWorkflows.go", + "api_op_PutS3AccessPolicy.go", "api_op_StartAnnotationImportJob.go", "api_op_StartReadSetActivationJob.go", "api_op_StartReadSetExportJob.go", @@ -93,6 +96,7 @@ "api_op_UpdateAnnotationStoreVersion.go", "api_op_UpdateRunCache.go", "api_op_UpdateRunGroup.go", + "api_op_UpdateSequenceStore.go", "api_op_UpdateVariantStore.go", "api_op_UpdateWorkflow.go", "api_op_UploadReadSetPart.go", diff --git a/service/omics/serializers.go b/service/omics/serializers.go index 0ea899d1d18..6061f36219d 100644 --- a/service/omics/serializers.go +++ b/service/omics/serializers.go @@ -1385,6 +1385,20 @@ func awsRestjson1_serializeOpDocumentCreateSequenceStoreInput(v *CreateSequenceS ok.String(*v.Name) } + if v.PropagatedSetLevelTags != nil { + ok := object.Key("propagatedSetLevelTags") + if err := awsRestjson1_serializeDocumentPropagatedSetLevelTags(v.PropagatedSetLevelTags, ok); err != nil { + return err + } + } + + if v.S3AccessConfig != nil { + ok := object.Key("s3AccessConfig") + if err := awsRestjson1_serializeDocumentS3AccessConfig(v.S3AccessConfig, ok); err != nil { + return err + } + } + if v.SseConfig != nil { ok := object.Key("sseConfig") if err := awsRestjson1_serializeDocumentSseConfig(v.SseConfig, ok); err != nil { @@ -2274,6 +2288,77 @@ func awsRestjson1_serializeOpHttpBindingsDeleteRunGroupInput(v *DeleteRunGroupIn return nil } +type awsRestjson1_serializeOpDeleteS3AccessPolicy struct { +} + +func (*awsRestjson1_serializeOpDeleteS3AccessPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteS3AccessPolicy) 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.(*DeleteS3AccessPolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/s3accesspolicy/{s3AccessPointArn}") + 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_serializeOpHttpBindingsDeleteS3AccessPolicyInput(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_serializeOpHttpBindingsDeleteS3AccessPolicyInput(v *DeleteS3AccessPolicyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.S3AccessPointArn == nil || len(*v.S3AccessPointArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member s3AccessPointArn must not be empty")} + } + if v.S3AccessPointArn != nil { + if err := encoder.SetURI("s3AccessPointArn").String(*v.S3AccessPointArn); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpDeleteSequenceStore struct { } @@ -3815,6 +3900,77 @@ func awsRestjson1_serializeOpHttpBindingsGetRunTaskInput(v *GetRunTaskInput, enc return nil } +type awsRestjson1_serializeOpGetS3AccessPolicy struct { +} + +func (*awsRestjson1_serializeOpGetS3AccessPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetS3AccessPolicy) 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.(*GetS3AccessPolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/s3accesspolicy/{s3AccessPointArn}") + 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_serializeOpHttpBindingsGetS3AccessPolicyInput(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_serializeOpHttpBindingsGetS3AccessPolicyInput(v *GetS3AccessPolicyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.S3AccessPointArn == nil || len(*v.S3AccessPointArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member s3AccessPointArn must not be empty")} + } + if v.S3AccessPointArn != nil { + if err := encoder.SetURI("s3AccessPointArn").String(*v.S3AccessPointArn); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpGetSequenceStore struct { } @@ -6265,6 +6421,100 @@ func awsRestjson1_serializeOpHttpBindingsListWorkflowsInput(v *ListWorkflowsInpu return nil } +type awsRestjson1_serializeOpPutS3AccessPolicy struct { +} + +func (*awsRestjson1_serializeOpPutS3AccessPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpPutS3AccessPolicy) 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.(*PutS3AccessPolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/s3accesspolicy/{s3AccessPointArn}") + 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_serializeOpHttpBindingsPutS3AccessPolicyInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentPutS3AccessPolicyInput(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_serializeOpHttpBindingsPutS3AccessPolicyInput(v *PutS3AccessPolicyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.S3AccessPointArn == nil || len(*v.S3AccessPointArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member s3AccessPointArn must not be empty")} + } + if v.S3AccessPointArn != nil { + if err := encoder.SetURI("s3AccessPointArn").String(*v.S3AccessPointArn); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentPutS3AccessPolicyInput(v *PutS3AccessPolicyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.S3AccessPolicy != nil { + ok := object.Key("s3AccessPolicy") + ok.String(*v.S3AccessPolicy) + } + + return nil +} + type awsRestjson1_serializeOpStartAnnotationImportJob struct { } @@ -7669,6 +7919,129 @@ func awsRestjson1_serializeOpDocumentUpdateRunGroupInput(v *UpdateRunGroupInput, return nil } +type awsRestjson1_serializeOpUpdateSequenceStore struct { +} + +func (*awsRestjson1_serializeOpUpdateSequenceStore) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateSequenceStore) 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.(*UpdateSequenceStoreInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/sequencestore/{id}") + 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_serializeOpHttpBindingsUpdateSequenceStoreInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateSequenceStoreInput(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_serializeOpHttpBindingsUpdateSequenceStoreInput(v *UpdateSequenceStoreInput, 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_serializeOpDocumentUpdateSequenceStoreInput(v *UpdateSequenceStoreInput, 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.FallbackLocation != nil { + ok := object.Key("fallbackLocation") + ok.String(*v.FallbackLocation) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.PropagatedSetLevelTags != nil { + ok := object.Key("propagatedSetLevelTags") + if err := awsRestjson1_serializeDocumentPropagatedSetLevelTags(v.PropagatedSetLevelTags, ok); err != nil { + return err + } + } + + if v.S3AccessConfig != nil { + ok := object.Key("s3AccessConfig") + if err := awsRestjson1_serializeDocumentS3AccessConfig(v.S3AccessConfig, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpUpdateVariantStore struct { } @@ -8301,6 +8674,17 @@ func awsRestjson1_serializeDocumentListVariantStoresFilter(v *types.ListVariantS return nil } +func awsRestjson1_serializeDocumentPropagatedSetLevelTags(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_serializeDocumentReadOptions(v *types.ReadOptions, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -8513,6 +8897,18 @@ func awsRestjson1_serializeDocumentRunParameters(v document.Interface, value smi return nil } +func awsRestjson1_serializeDocumentS3AccessConfig(v *types.S3AccessConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AccessLogLocation != nil { + ok := object.Key("accessLogLocation") + ok.String(*v.AccessLogLocation) + } + + return nil +} + func awsRestjson1_serializeDocumentSchema(v []map[string]types.SchemaValueType, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -8559,6 +8955,21 @@ func awsRestjson1_serializeDocumentSequenceStoreFilter(v *types.SequenceStoreFil ok.String(*v.Name) } + if len(v.Status) > 0 { + ok := object.Key("status") + ok.String(string(v.Status)) + } + + if v.UpdatedAfter != nil { + ok := object.Key("updatedAfter") + ok.String(smithytime.FormatDateTime(*v.UpdatedAfter)) + } + + if v.UpdatedBefore != nil { + ok := object.Key("updatedBefore") + ok.String(smithytime.FormatDateTime(*v.UpdatedBefore)) + } + return nil } diff --git a/service/omics/snapshot/api_op_CreateSequenceStore.go.snap b/service/omics/snapshot/api_op_CreateSequenceStore.go.snap index 610e46829b1..132b99ca01e 100644 --- a/service/omics/snapshot/api_op_CreateSequenceStore.go.snap +++ b/service/omics/snapshot/api_op_CreateSequenceStore.go.snap @@ -2,6 +2,7 @@ CreateSequenceStore Initialize stack step spanInitializeStart RegisterServiceMetadata + OperationIdempotencyTokenAutoFill legacyEndpointContextSetter SetLogger OperationInputValidation diff --git a/service/omics/snapshot/api_op_DeleteS3AccessPolicy.go.snap b/service/omics/snapshot/api_op_DeleteS3AccessPolicy.go.snap new file mode 100644 index 00000000000..0a9d2108179 --- /dev/null +++ b/service/omics/snapshot/api_op_DeleteS3AccessPolicy.go.snap @@ -0,0 +1,42 @@ +DeleteS3AccessPolicy + 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_GetS3AccessPolicy.go.snap b/service/omics/snapshot/api_op_GetS3AccessPolicy.go.snap new file mode 100644 index 00000000000..59c4be992bb --- /dev/null +++ b/service/omics/snapshot/api_op_GetS3AccessPolicy.go.snap @@ -0,0 +1,42 @@ +GetS3AccessPolicy + 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_PutS3AccessPolicy.go.snap b/service/omics/snapshot/api_op_PutS3AccessPolicy.go.snap new file mode 100644 index 00000000000..3226c9994e7 --- /dev/null +++ b/service/omics/snapshot/api_op_PutS3AccessPolicy.go.snap @@ -0,0 +1,42 @@ +PutS3AccessPolicy + 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_UpdateSequenceStore.go.snap b/service/omics/snapshot/api_op_UpdateSequenceStore.go.snap new file mode 100644 index 00000000000..c8b15000582 --- /dev/null +++ b/service/omics/snapshot/api_op_UpdateSequenceStore.go.snap @@ -0,0 +1,43 @@ +UpdateSequenceStore + 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_test.go b/service/omics/snapshot_test.go index b9fd1a54272..2dac4866a7a 100644 --- a/service/omics/snapshot_test.go +++ b/service/omics/snapshot_test.go @@ -350,6 +350,18 @@ func TestCheckSnapshot_DeleteRunGroup(t *testing.T) { } } +func TestCheckSnapshot_DeleteS3AccessPolicy(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteS3AccessPolicy(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeleteS3AccessPolicy") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DeleteSequenceStore(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteSequenceStore(context.Background(), nil, func(o *Options) { @@ -590,6 +602,18 @@ func TestCheckSnapshot_GetRunTask(t *testing.T) { } } +func TestCheckSnapshot_GetS3AccessPolicy(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetS3AccessPolicy(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetS3AccessPolicy") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_GetSequenceStore(t *testing.T) { svc := New(Options{}) _, err := svc.GetSequenceStore(context.Background(), nil, func(o *Options) { @@ -914,6 +938,18 @@ func TestCheckSnapshot_ListWorkflows(t *testing.T) { } } +func TestCheckSnapshot_PutS3AccessPolicy(t *testing.T) { + svc := New(Options{}) + _, err := svc.PutS3AccessPolicy(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "PutS3AccessPolicy") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_StartAnnotationImportJob(t *testing.T) { svc := New(Options{}) _, err := svc.StartAnnotationImportJob(context.Background(), nil, func(o *Options) { @@ -1070,6 +1106,18 @@ func TestCheckSnapshot_UpdateRunGroup(t *testing.T) { } } +func TestCheckSnapshot_UpdateSequenceStore(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateSequenceStore(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "UpdateSequenceStore") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_UpdateVariantStore(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateVariantStore(context.Background(), nil, func(o *Options) { @@ -1393,6 +1441,18 @@ func TestUpdateSnapshot_DeleteRunGroup(t *testing.T) { } } +func TestUpdateSnapshot_DeleteS3AccessPolicy(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteS3AccessPolicy(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeleteS3AccessPolicy") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DeleteSequenceStore(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteSequenceStore(context.Background(), nil, func(o *Options) { @@ -1633,6 +1693,18 @@ func TestUpdateSnapshot_GetRunTask(t *testing.T) { } } +func TestUpdateSnapshot_GetS3AccessPolicy(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetS3AccessPolicy(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetS3AccessPolicy") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_GetSequenceStore(t *testing.T) { svc := New(Options{}) _, err := svc.GetSequenceStore(context.Background(), nil, func(o *Options) { @@ -1957,6 +2029,18 @@ func TestUpdateSnapshot_ListWorkflows(t *testing.T) { } } +func TestUpdateSnapshot_PutS3AccessPolicy(t *testing.T) { + svc := New(Options{}) + _, err := svc.PutS3AccessPolicy(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "PutS3AccessPolicy") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_StartAnnotationImportJob(t *testing.T) { svc := New(Options{}) _, err := svc.StartAnnotationImportJob(context.Background(), nil, func(o *Options) { @@ -2113,6 +2197,18 @@ func TestUpdateSnapshot_UpdateRunGroup(t *testing.T) { } } +func TestUpdateSnapshot_UpdateSequenceStore(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateSequenceStore(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "UpdateSequenceStore") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_UpdateVariantStore(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateVariantStore(context.Background(), nil, func(o *Options) { diff --git a/service/omics/types/enums.go b/service/omics/types/enums.go index 997a13f9fb6..f9ba77591d0 100644 --- a/service/omics/types/enums.go +++ b/service/omics/types/enums.go @@ -751,6 +751,31 @@ func (SchemaValueType) Values() []SchemaValueType { } } +type SequenceStoreStatus string + +// Enum values for SequenceStoreStatus +const ( + SequenceStoreStatusCreating SequenceStoreStatus = "CREATING" + SequenceStoreStatusActive SequenceStoreStatus = "ACTIVE" + SequenceStoreStatusUpdating SequenceStoreStatus = "UPDATING" + SequenceStoreStatusDeleting SequenceStoreStatus = "DELETING" + SequenceStoreStatusFailed SequenceStoreStatus = "FAILED" +) + +// Values returns all known values for SequenceStoreStatus. 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 (SequenceStoreStatus) Values() []SequenceStoreStatus { + return []SequenceStoreStatus{ + "CREATING", + "ACTIVE", + "UPDATING", + "DELETING", + "FAILED", + } +} + type ShareResourceType string // Enum values for ShareResourceType @@ -881,6 +906,25 @@ func (StoreStatus) Values() []StoreStatus { } } +type StoreType string + +// Enum values for StoreType +const ( + StoreTypeSequenceStore StoreType = "SEQUENCE_STORE" + StoreTypeReferenceStore StoreType = "REFERENCE_STORE" +) + +// Values returns all known values for StoreType. 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 (StoreType) Values() []StoreType { + return []StoreType{ + "SEQUENCE_STORE", + "REFERENCE_STORE", + } +} + type TaskStatus string // Enum values for TaskStatus diff --git a/service/omics/types/types.go b/service/omics/types/types.go index 9035a22180e..03cf9aca274 100644 --- a/service/omics/types/types.go +++ b/service/omics/types/types.go @@ -1212,6 +1212,15 @@ type RunLogLocation struct { noSmithyDocumentSerde } +// S3 access configuration parameters. +type S3AccessConfig struct { + + // Location of the access logs. + AccessLogLocation *string + + noSmithyDocumentSerde +} + // Details about a sequence. type SequenceInformation struct { @@ -1263,6 +1272,15 @@ type SequenceStoreDetail struct { // The store's server-side encryption (SSE) settings. SseConfig *SseConfig + // Status of the sequence store. + Status SequenceStoreStatus + + // The status message of the sequence store. + StatusMessage *string + + // The last-updated time of the Sequence Store. + UpdateTime *time.Time + noSmithyDocumentSerde } @@ -1278,12 +1296,24 @@ type SequenceStoreFilter struct { // A name to filter on. Name *string + // Filter results based on status. + Status SequenceStoreStatus + + // Filter results based on stores updated after the specified time. + UpdatedAfter *time.Time + + // Filter results based on stores updated before the specified time. + UpdatedBefore *time.Time + noSmithyDocumentSerde } // The S3 access metadata of the sequence store. type SequenceStoreS3Access struct { + // Location of the access logs. + AccessLogLocation *string + // This is ARN of the access point associated with the S3 bucket storing read sets. S3AccessPointArn *string diff --git a/service/omics/validators.go b/service/omics/validators.go index 9cf6ac0191b..3ce4c2b17aa 100644 --- a/service/omics/validators.go +++ b/service/omics/validators.go @@ -490,6 +490,26 @@ func (m *validateOpDeleteRun) HandleInitialize(ctx context.Context, in middlewar return next.HandleInitialize(ctx, in) } +type validateOpDeleteS3AccessPolicy struct { +} + +func (*validateOpDeleteS3AccessPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteS3AccessPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteS3AccessPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteS3AccessPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteSequenceStore struct { } @@ -890,6 +910,26 @@ func (m *validateOpGetRunTask) HandleInitialize(ctx context.Context, in middlewa return next.HandleInitialize(ctx, in) } +type validateOpGetS3AccessPolicy struct { +} + +func (*validateOpGetS3AccessPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetS3AccessPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetS3AccessPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetS3AccessPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetSequenceStore struct { } @@ -1230,6 +1270,26 @@ func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpPutS3AccessPolicy struct { +} + +func (*validateOpPutS3AccessPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutS3AccessPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutS3AccessPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutS3AccessPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpStartAnnotationImportJob struct { } @@ -1490,6 +1550,26 @@ func (m *validateOpUpdateRunGroup) HandleInitialize(ctx context.Context, in midd return next.HandleInitialize(ctx, in) } +type validateOpUpdateSequenceStore struct { +} + +func (*validateOpUpdateSequenceStore) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateSequenceStore) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateSequenceStoreInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateSequenceStoreInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateVariantStore struct { } @@ -1646,6 +1726,10 @@ func addOpDeleteRunValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteRun{}, middleware.After) } +func addOpDeleteS3AccessPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteS3AccessPolicy{}, middleware.After) +} + func addOpDeleteSequenceStoreValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteSequenceStore{}, middleware.After) } @@ -1726,6 +1810,10 @@ func addOpGetRunTaskValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetRunTask{}, middleware.After) } +func addOpGetS3AccessPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetS3AccessPolicy{}, middleware.After) +} + func addOpGetSequenceStoreValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetSequenceStore{}, middleware.After) } @@ -1794,6 +1882,10 @@ func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) } +func addOpPutS3AccessPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutS3AccessPolicy{}, middleware.After) +} + func addOpStartAnnotationImportJobValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpStartAnnotationImportJob{}, middleware.After) } @@ -1846,6 +1938,10 @@ func addOpUpdateRunGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateRunGroup{}, middleware.After) } +func addOpUpdateSequenceStoreValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateSequenceStore{}, middleware.After) +} + func addOpUpdateVariantStoreValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateVariantStore{}, middleware.After) } @@ -2557,6 +2653,21 @@ func validateOpDeleteRunInput(v *DeleteRunInput) error { } } +func validateOpDeleteS3AccessPolicyInput(v *DeleteS3AccessPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteS3AccessPolicyInput"} + if v.S3AccessPointArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("S3AccessPointArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteSequenceStoreInput(v *DeleteSequenceStoreInput) error { if v == nil { return nil @@ -2893,6 +3004,21 @@ func validateOpGetRunTaskInput(v *GetRunTaskInput) error { } } +func validateOpGetS3AccessPolicyInput(v *GetS3AccessPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetS3AccessPolicyInput"} + if v.S3AccessPointArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("S3AccessPointArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetSequenceStoreInput(v *GetSequenceStoreInput) error { if v == nil { return nil @@ -3154,6 +3280,24 @@ func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { } } +func validateOpPutS3AccessPolicyInput(v *PutS3AccessPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutS3AccessPolicyInput"} + if v.S3AccessPointArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("S3AccessPointArn")) + } + if v.S3AccessPolicy == nil { + invalidParams.Add(smithy.NewErrParamRequired("S3AccessPolicy")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpStartAnnotationImportJobInput(v *StartAnnotationImportJobInput) error { if v == nil { return nil @@ -3421,6 +3565,21 @@ func validateOpUpdateRunGroupInput(v *UpdateRunGroupInput) error { } } +func validateOpUpdateSequenceStoreInput(v *UpdateSequenceStoreInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateSequenceStoreInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateVariantStoreInput(v *UpdateVariantStoreInput) error { if v == nil { return nil diff --git a/service/quicksight/api_op_CreateTopic.go b/service/quicksight/api_op_CreateTopic.go index 8c25262b9f1..530da514481 100644 --- a/service/quicksight/api_op_CreateTopic.go +++ b/service/quicksight/api_op_CreateTopic.go @@ -45,6 +45,9 @@ type CreateTopicInput struct { // This member is required. TopicId *string + // The Folder ARN of the folder that you want the topic to reside in. + FolderArns []string + // Contains a map of the key-value pairs for the resource tag or tags that are // assigned to the dataset. Tags []types.Tag diff --git a/service/quicksight/api_op_DescribeDashboardsQAConfiguration.go b/service/quicksight/api_op_DescribeDashboardsQAConfiguration.go new file mode 100644 index 00000000000..71646c45cc3 --- /dev/null +++ b/service/quicksight/api_op_DescribeDashboardsQAConfiguration.go @@ -0,0 +1,164 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package quicksight + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/quicksight/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Describes an existing dashboard QA configuration. +func (c *Client) DescribeDashboardsQAConfiguration(ctx context.Context, params *DescribeDashboardsQAConfigurationInput, optFns ...func(*Options)) (*DescribeDashboardsQAConfigurationOutput, error) { + if params == nil { + params = &DescribeDashboardsQAConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeDashboardsQAConfiguration", params, optFns, c.addOperationDescribeDashboardsQAConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeDashboardsQAConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeDashboardsQAConfigurationInput struct { + + // The ID of the Amazon Web Services account that contains the dashboard QA + // configuration that you want described. + // + // This member is required. + AwsAccountId *string + + noSmithyDocumentSerde +} + +type DescribeDashboardsQAConfigurationOutput struct { + + // The status of dashboards QA configuration that you want described. + DashboardsQAStatus types.DashboardsQAStatus + + // The Amazon Web Services request ID for this operation. + RequestId *string + + // The HTTP status of the request. + Status int32 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeDashboardsQAConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeDashboardsQAConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeDashboardsQAConfiguration{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeDashboardsQAConfiguration"); 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 = addOpDescribeDashboardsQAConfigurationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDashboardsQAConfiguration(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_opDescribeDashboardsQAConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeDashboardsQAConfiguration", + } +} diff --git a/service/quicksight/api_op_SearchTopics.go b/service/quicksight/api_op_SearchTopics.go new file mode 100644 index 00000000000..896d7c97938 --- /dev/null +++ b/service/quicksight/api_op_SearchTopics.go @@ -0,0 +1,270 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package quicksight + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/quicksight/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Searches for any Q topic that exists in an Amazon QuickSight account. +func (c *Client) SearchTopics(ctx context.Context, params *SearchTopicsInput, optFns ...func(*Options)) (*SearchTopicsOutput, error) { + if params == nil { + params = &SearchTopicsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "SearchTopics", params, optFns, c.addOperationSearchTopicsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*SearchTopicsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type SearchTopicsInput struct { + + // The ID of the Amazon Web Services account that contains the topic that you want + // to find. + // + // This member is required. + AwsAccountId *string + + // The filters that you want to use to search for the topic. + // + // This member is required. + Filters []types.TopicSearchFilter + + // The maximum number of results to be returned per request. + MaxResults *int32 + + // The token for the next set of results, or null if there are no more results. + NextToken *string + + noSmithyDocumentSerde +} + +type SearchTopicsOutput struct { + + // The token for the next set of results, or null if there are no more results. + NextToken *string + + // The Amazon Web Services request ID for this operation. + RequestId *string + + // The HTTP status of the request. + Status int32 + + // A list of topic summaries that is returned by the search topic request. + TopicSummaryList []types.TopicSummary + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationSearchTopicsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpSearchTopics{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpSearchTopics{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "SearchTopics"); 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 = addOpSearchTopicsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSearchTopics(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 +} + +// SearchTopicsPaginatorOptions is the paginator options for SearchTopics +type SearchTopicsPaginatorOptions struct { + // The maximum number of results to be returned per request. + 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 +} + +// SearchTopicsPaginator is a paginator for SearchTopics +type SearchTopicsPaginator struct { + options SearchTopicsPaginatorOptions + client SearchTopicsAPIClient + params *SearchTopicsInput + nextToken *string + firstPage bool +} + +// NewSearchTopicsPaginator returns a new SearchTopicsPaginator +func NewSearchTopicsPaginator(client SearchTopicsAPIClient, params *SearchTopicsInput, optFns ...func(*SearchTopicsPaginatorOptions)) *SearchTopicsPaginator { + if params == nil { + params = &SearchTopicsInput{} + } + + options := SearchTopicsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &SearchTopicsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *SearchTopicsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next SearchTopics page. +func (p *SearchTopicsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*SearchTopicsOutput, 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.SearchTopics(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 +} + +// SearchTopicsAPIClient is a client that implements the SearchTopics operation. +type SearchTopicsAPIClient interface { + SearchTopics(context.Context, *SearchTopicsInput, ...func(*Options)) (*SearchTopicsOutput, error) +} + +var _ SearchTopicsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opSearchTopics(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "SearchTopics", + } +} diff --git a/service/quicksight/api_op_UpdateDashboardsQAConfiguration.go b/service/quicksight/api_op_UpdateDashboardsQAConfiguration.go new file mode 100644 index 00000000000..154cb2f7e5f --- /dev/null +++ b/service/quicksight/api_op_UpdateDashboardsQAConfiguration.go @@ -0,0 +1,169 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package quicksight + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/quicksight/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates a Dashboard QA configuration. +func (c *Client) UpdateDashboardsQAConfiguration(ctx context.Context, params *UpdateDashboardsQAConfigurationInput, optFns ...func(*Options)) (*UpdateDashboardsQAConfigurationOutput, error) { + if params == nil { + params = &UpdateDashboardsQAConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateDashboardsQAConfiguration", params, optFns, c.addOperationUpdateDashboardsQAConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateDashboardsQAConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateDashboardsQAConfigurationInput struct { + + // The ID of the Amazon Web Services account that contains the dashboard QA + // configuration that you want to update. + // + // This member is required. + AwsAccountId *string + + // The status of dashboards QA configuration that you want to update. + // + // This member is required. + DashboardsQAStatus types.DashboardsQAStatus + + noSmithyDocumentSerde +} + +type UpdateDashboardsQAConfigurationOutput struct { + + // A value that indicates whether the dashboard QA configuration is enabled or not. + DashboardsQAStatus types.DashboardsQAStatus + + // The Amazon Web Services request ID for this operation. + RequestId *string + + // The HTTP status of the request. + Status int32 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateDashboardsQAConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateDashboardsQAConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateDashboardsQAConfiguration{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateDashboardsQAConfiguration"); 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 = addOpUpdateDashboardsQAConfigurationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateDashboardsQAConfiguration(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_opUpdateDashboardsQAConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateDashboardsQAConfiguration", + } +} diff --git a/service/quicksight/deserializers.go b/service/quicksight/deserializers.go index dc6a5222289..a5ed115b38c 100644 --- a/service/quicksight/deserializers.go +++ b/service/quicksight/deserializers.go @@ -15360,14 +15360,14 @@ func awsRestjson1_deserializeOpDocumentDescribeDashboardSnapshotJobResultOutput( return nil } -type awsRestjson1_deserializeOpDescribeDataSet struct { +type awsRestjson1_deserializeOpDescribeDashboardsQAConfiguration struct { } -func (*awsRestjson1_deserializeOpDescribeDataSet) ID() string { +func (*awsRestjson1_deserializeOpDescribeDashboardsQAConfiguration) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeDataSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeDashboardsQAConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -15385,12 +15385,12 @@ func (m *awsRestjson1_deserializeOpDescribeDataSet) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeDataSet(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeDashboardsQAConfiguration(response, &metadata) } - output := &DescribeDataSetOutput{} + output := &DescribeDashboardsQAConfigurationOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeDataSetOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeDashboardsQAConfigurationOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -15413,7 +15413,7 @@ func (m *awsRestjson1_deserializeOpDescribeDataSet) HandleDeserialize(ctx contex return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeDataSetOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeDashboardsQAConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -15427,7 +15427,7 @@ func (m *awsRestjson1_deserializeOpDescribeDataSet) HandleDeserialize(ctx contex return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeDataSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeDashboardsQAConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -15471,6 +15471,9 @@ func awsRestjson1_deserializeOpErrorDescribeDataSet(response *smithyhttp.Respons case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -15493,7 +15496,7 @@ func awsRestjson1_deserializeOpErrorDescribeDataSet(response *smithyhttp.Respons } } -func awsRestjson1_deserializeOpHttpBindingsDescribeDataSetOutput(v *DescribeDataSetOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeDashboardsQAConfigurationOutput(v *DescribeDashboardsQAConfigurationOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -15502,7 +15505,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeDataSetOutput(v *DescribeData return nil } -func awsRestjson1_deserializeOpDocumentDescribeDataSetOutput(v **DescribeDataSetOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeDashboardsQAConfigurationOutput(v **DescribeDashboardsQAConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -15515,18 +15518,22 @@ func awsRestjson1_deserializeOpDocumentDescribeDataSetOutput(v **DescribeDataSet return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeDataSetOutput + var sv *DescribeDashboardsQAConfigurationOutput if *v == nil { - sv = &DescribeDataSetOutput{} + sv = &DescribeDashboardsQAConfigurationOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DataSet": - if err := awsRestjson1_deserializeDocumentDataSet(&sv.DataSet, value); err != nil { - return err + case "DashboardsQAStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DashboardsQAStatus to be of type string, got %T instead", value) + } + sv.DashboardsQAStatus = types.DashboardsQAStatus(jtv) } case "RequestId": @@ -15547,14 +15554,14 @@ func awsRestjson1_deserializeOpDocumentDescribeDataSetOutput(v **DescribeDataSet return nil } -type awsRestjson1_deserializeOpDescribeDataSetPermissions struct { +type awsRestjson1_deserializeOpDescribeDataSet struct { } -func (*awsRestjson1_deserializeOpDescribeDataSetPermissions) ID() string { +func (*awsRestjson1_deserializeOpDescribeDataSet) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeDataSetPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeDataSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -15572,12 +15579,12 @@ func (m *awsRestjson1_deserializeOpDescribeDataSetPermissions) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeDataSetPermissions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeDataSet(response, &metadata) } - output := &DescribeDataSetPermissionsOutput{} + output := &DescribeDataSetOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeDataSetPermissionsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeDataSetOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -15600,7 +15607,7 @@ func (m *awsRestjson1_deserializeOpDescribeDataSetPermissions) HandleDeserialize return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeDataSetPermissionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeDataSetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -15614,7 +15621,7 @@ func (m *awsRestjson1_deserializeOpDescribeDataSetPermissions) HandleDeserialize return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeDataSetPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeDataSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -15680,7 +15687,7 @@ func awsRestjson1_deserializeOpErrorDescribeDataSetPermissions(response *smithyh } } -func awsRestjson1_deserializeOpHttpBindingsDescribeDataSetPermissionsOutput(v *DescribeDataSetPermissionsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeDataSetOutput(v *DescribeDataSetOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -15689,7 +15696,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeDataSetPermissionsOutput(v *D return nil } -func awsRestjson1_deserializeOpDocumentDescribeDataSetPermissionsOutput(v **DescribeDataSetPermissionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeDataSetOutput(v **DescribeDataSetOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -15702,35 +15709,17 @@ func awsRestjson1_deserializeOpDocumentDescribeDataSetPermissionsOutput(v **Desc return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeDataSetPermissionsOutput + var sv *DescribeDataSetOutput if *v == nil { - sv = &DescribeDataSetPermissionsOutput{} + sv = &DescribeDataSetOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DataSetArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.DataSetArn = ptr.String(jtv) - } - - case "DataSetId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) - } - sv.DataSetId = ptr.String(jtv) - } - - case "Permissions": - if err := awsRestjson1_deserializeDocumentResourcePermissionList(&sv.Permissions, value); err != nil { + case "DataSet": + if err := awsRestjson1_deserializeDocumentDataSet(&sv.DataSet, value); err != nil { return err } @@ -15752,14 +15741,14 @@ func awsRestjson1_deserializeOpDocumentDescribeDataSetPermissionsOutput(v **Desc return nil } -type awsRestjson1_deserializeOpDescribeDataSetRefreshProperties struct { +type awsRestjson1_deserializeOpDescribeDataSetPermissions struct { } -func (*awsRestjson1_deserializeOpDescribeDataSetRefreshProperties) ID() string { +func (*awsRestjson1_deserializeOpDescribeDataSetPermissions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeDataSetRefreshProperties) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeDataSetPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -15777,12 +15766,12 @@ func (m *awsRestjson1_deserializeOpDescribeDataSetRefreshProperties) HandleDeser } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeDataSetRefreshProperties(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeDataSetPermissions(response, &metadata) } - output := &DescribeDataSetRefreshPropertiesOutput{} + output := &DescribeDataSetPermissionsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeDataSetRefreshPropertiesOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeDataSetPermissionsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -15805,7 +15794,7 @@ func (m *awsRestjson1_deserializeOpDescribeDataSetRefreshProperties) HandleDeser return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeDataSetRefreshPropertiesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeDataSetPermissionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -15819,7 +15808,7 @@ func (m *awsRestjson1_deserializeOpDescribeDataSetRefreshProperties) HandleDeser return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeDataSetRefreshProperties(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeDataSetPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -15869,12 +15858,6 @@ func awsRestjson1_deserializeOpErrorDescribeDataSetRefreshProperties(response *s case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) - - case strings.EqualFold("PreconditionNotMetException", errorCode): - return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -15891,7 +15874,7 @@ func awsRestjson1_deserializeOpErrorDescribeDataSetRefreshProperties(response *s } } -func awsRestjson1_deserializeOpHttpBindingsDescribeDataSetRefreshPropertiesOutput(v *DescribeDataSetRefreshPropertiesOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeDataSetPermissionsOutput(v *DescribeDataSetPermissionsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -15900,7 +15883,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeDataSetRefreshPropertiesOutpu return nil } -func awsRestjson1_deserializeOpDocumentDescribeDataSetRefreshPropertiesOutput(v **DescribeDataSetRefreshPropertiesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeDataSetPermissionsOutput(v **DescribeDataSetPermissionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -15913,17 +15896,35 @@ func awsRestjson1_deserializeOpDocumentDescribeDataSetRefreshPropertiesOutput(v return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeDataSetRefreshPropertiesOutput + var sv *DescribeDataSetPermissionsOutput if *v == nil { - sv = &DescribeDataSetRefreshPropertiesOutput{} + sv = &DescribeDataSetPermissionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DataSetRefreshProperties": - if err := awsRestjson1_deserializeDocumentDataSetRefreshProperties(&sv.DataSetRefreshProperties, value); err != nil { + case "DataSetArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.DataSetArn = ptr.String(jtv) + } + + case "DataSetId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + } + sv.DataSetId = ptr.String(jtv) + } + + case "Permissions": + if err := awsRestjson1_deserializeDocumentResourcePermissionList(&sv.Permissions, value); err != nil { return err } @@ -15945,14 +15946,14 @@ func awsRestjson1_deserializeOpDocumentDescribeDataSetRefreshPropertiesOutput(v return nil } -type awsRestjson1_deserializeOpDescribeDataSource struct { +type awsRestjson1_deserializeOpDescribeDataSetRefreshProperties struct { } -func (*awsRestjson1_deserializeOpDescribeDataSource) ID() string { +func (*awsRestjson1_deserializeOpDescribeDataSetRefreshProperties) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeDataSource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeDataSetRefreshProperties) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -15970,12 +15971,12 @@ func (m *awsRestjson1_deserializeOpDescribeDataSource) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeDataSource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeDataSetRefreshProperties(response, &metadata) } - output := &DescribeDataSourceOutput{} + output := &DescribeDataSetRefreshPropertiesOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeDataSourceOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeDataSetRefreshPropertiesOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -15998,7 +15999,7 @@ func (m *awsRestjson1_deserializeOpDescribeDataSource) HandleDeserialize(ctx con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeDataSourceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeDataSetRefreshPropertiesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -16012,7 +16013,7 @@ func (m *awsRestjson1_deserializeOpDescribeDataSource) HandleDeserialize(ctx con return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeDataSource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeDataSetRefreshProperties(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -16062,6 +16063,12 @@ func awsRestjson1_deserializeOpErrorDescribeDataSource(response *smithyhttp.Resp case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -16078,7 +16085,7 @@ func awsRestjson1_deserializeOpErrorDescribeDataSource(response *smithyhttp.Resp } } -func awsRestjson1_deserializeOpHttpBindingsDescribeDataSourceOutput(v *DescribeDataSourceOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeDataSetRefreshPropertiesOutput(v *DescribeDataSetRefreshPropertiesOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -16087,7 +16094,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeDataSourceOutput(v *DescribeD return nil } -func awsRestjson1_deserializeOpDocumentDescribeDataSourceOutput(v **DescribeDataSourceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeDataSetRefreshPropertiesOutput(v **DescribeDataSetRefreshPropertiesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -16100,17 +16107,17 @@ func awsRestjson1_deserializeOpDocumentDescribeDataSourceOutput(v **DescribeData return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeDataSourceOutput + var sv *DescribeDataSetRefreshPropertiesOutput if *v == nil { - sv = &DescribeDataSourceOutput{} + sv = &DescribeDataSetRefreshPropertiesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DataSource": - if err := awsRestjson1_deserializeDocumentDataSource(&sv.DataSource, value); err != nil { + case "DataSetRefreshProperties": + if err := awsRestjson1_deserializeDocumentDataSetRefreshProperties(&sv.DataSetRefreshProperties, value); err != nil { return err } @@ -16132,14 +16139,14 @@ func awsRestjson1_deserializeOpDocumentDescribeDataSourceOutput(v **DescribeData return nil } -type awsRestjson1_deserializeOpDescribeDataSourcePermissions struct { +type awsRestjson1_deserializeOpDescribeDataSource struct { } -func (*awsRestjson1_deserializeOpDescribeDataSourcePermissions) ID() string { +func (*awsRestjson1_deserializeOpDescribeDataSource) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeDataSourcePermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeDataSource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -16157,12 +16164,12 @@ func (m *awsRestjson1_deserializeOpDescribeDataSourcePermissions) HandleDeserial } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeDataSourcePermissions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeDataSource(response, &metadata) } - output := &DescribeDataSourcePermissionsOutput{} + output := &DescribeDataSourceOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeDataSourcePermissionsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeDataSourceOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -16185,7 +16192,7 @@ func (m *awsRestjson1_deserializeOpDescribeDataSourcePermissions) HandleDeserial return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeDataSourcePermissionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeDataSourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -16199,7 +16206,7 @@ func (m *awsRestjson1_deserializeOpDescribeDataSourcePermissions) HandleDeserial return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeDataSourcePermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeDataSource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -16265,7 +16272,7 @@ func awsRestjson1_deserializeOpErrorDescribeDataSourcePermissions(response *smit } } -func awsRestjson1_deserializeOpHttpBindingsDescribeDataSourcePermissionsOutput(v *DescribeDataSourcePermissionsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeDataSourceOutput(v *DescribeDataSourceOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -16274,7 +16281,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeDataSourcePermissionsOutput(v return nil } -func awsRestjson1_deserializeOpDocumentDescribeDataSourcePermissionsOutput(v **DescribeDataSourcePermissionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeDataSourceOutput(v **DescribeDataSourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -16287,35 +16294,17 @@ func awsRestjson1_deserializeOpDocumentDescribeDataSourcePermissionsOutput(v **D return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeDataSourcePermissionsOutput + var sv *DescribeDataSourceOutput if *v == nil { - sv = &DescribeDataSourcePermissionsOutput{} + sv = &DescribeDataSourceOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DataSourceArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.DataSourceArn = ptr.String(jtv) - } - - case "DataSourceId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) - } - sv.DataSourceId = ptr.String(jtv) - } - - case "Permissions": - if err := awsRestjson1_deserializeDocumentResourcePermissionList(&sv.Permissions, value); err != nil { + case "DataSource": + if err := awsRestjson1_deserializeDocumentDataSource(&sv.DataSource, value); err != nil { return err } @@ -16337,14 +16326,14 @@ func awsRestjson1_deserializeOpDocumentDescribeDataSourcePermissionsOutput(v **D return nil } -type awsRestjson1_deserializeOpDescribeFolder struct { +type awsRestjson1_deserializeOpDescribeDataSourcePermissions struct { } -func (*awsRestjson1_deserializeOpDescribeFolder) ID() string { +func (*awsRestjson1_deserializeOpDescribeDataSourcePermissions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeFolder) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeDataSourcePermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -16362,12 +16351,12 @@ func (m *awsRestjson1_deserializeOpDescribeFolder) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeFolder(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeDataSourcePermissions(response, &metadata) } - output := &DescribeFolderOutput{} + output := &DescribeDataSourcePermissionsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeFolderOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeDataSourcePermissionsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -16390,7 +16379,7 @@ func (m *awsRestjson1_deserializeOpDescribeFolder) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeFolderOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeDataSourcePermissionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -16404,7 +16393,7 @@ func (m *awsRestjson1_deserializeOpDescribeFolder) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeFolder(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeDataSourcePermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -16460,9 +16449,6 @@ func awsRestjson1_deserializeOpErrorDescribeFolder(response *smithyhttp.Response case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -16473,7 +16459,7 @@ func awsRestjson1_deserializeOpErrorDescribeFolder(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpHttpBindingsDescribeFolderOutput(v *DescribeFolderOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeDataSourcePermissionsOutput(v *DescribeDataSourcePermissionsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -16482,7 +16468,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeFolderOutput(v *DescribeFolde return nil } -func awsRestjson1_deserializeOpDocumentDescribeFolderOutput(v **DescribeFolderOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeDataSourcePermissionsOutput(v **DescribeDataSourcePermissionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -16495,17 +16481,35 @@ func awsRestjson1_deserializeOpDocumentDescribeFolderOutput(v **DescribeFolderOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeFolderOutput + var sv *DescribeDataSourcePermissionsOutput if *v == nil { - sv = &DescribeFolderOutput{} + sv = &DescribeDataSourcePermissionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Folder": - if err := awsRestjson1_deserializeDocumentFolder(&sv.Folder, value); err != nil { + case "DataSourceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.DataSourceArn = ptr.String(jtv) + } + + case "DataSourceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + } + sv.DataSourceId = ptr.String(jtv) + } + + case "Permissions": + if err := awsRestjson1_deserializeDocumentResourcePermissionList(&sv.Permissions, value); err != nil { return err } @@ -16527,14 +16531,14 @@ func awsRestjson1_deserializeOpDocumentDescribeFolderOutput(v **DescribeFolderOu return nil } -type awsRestjson1_deserializeOpDescribeFolderPermissions struct { +type awsRestjson1_deserializeOpDescribeFolder struct { } -func (*awsRestjson1_deserializeOpDescribeFolderPermissions) ID() string { +func (*awsRestjson1_deserializeOpDescribeFolder) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeFolderPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeFolder) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -16552,12 +16556,202 @@ func (m *awsRestjson1_deserializeOpDescribeFolderPermissions) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeFolderPermissions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeFolder(response, &metadata) } - output := &DescribeFolderPermissionsOutput{} + output := &DescribeFolderOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeFolderPermissionsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeFolderOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + 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_deserializeOpDocumentDescribeFolderOutput(&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_deserializeOpErrorDescribeFolder(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsDescribeFolderOutput(v *DescribeFolderOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + v.Status = int32(response.StatusCode) + + return nil +} +func awsRestjson1_deserializeOpDocumentDescribeFolderOutput(v **DescribeFolderOutput, 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 *DescribeFolderOutput + if *v == nil { + sv = &DescribeFolderOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Folder": + if err := awsRestjson1_deserializeDocumentFolder(&sv.Folder, value); err != nil { + return err + } + + case "RequestId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RequestId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeFolderPermissions struct { +} + +func (*awsRestjson1_deserializeOpDescribeFolderPermissions) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeFolderPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + 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_deserializeOpErrorDescribeFolderPermissions(response, &metadata) + } + output := &DescribeFolderPermissionsOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsDescribeFolderPermissionsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -30950,14 +31144,14 @@ func awsRestjson1_deserializeOpDocumentSearchGroupsOutput(v **SearchGroupsOutput return nil } -type awsRestjson1_deserializeOpStartAssetBundleExportJob struct { +type awsRestjson1_deserializeOpSearchTopics struct { } -func (*awsRestjson1_deserializeOpStartAssetBundleExportJob) ID() string { +func (*awsRestjson1_deserializeOpSearchTopics) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpStartAssetBundleExportJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpSearchTopics) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -30975,12 +31169,12 @@ func (m *awsRestjson1_deserializeOpStartAssetBundleExportJob) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorStartAssetBundleExportJob(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorSearchTopics(response, &metadata) } - output := &StartAssetBundleExportJobOutput{} + output := &SearchTopicsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsStartAssetBundleExportJobOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsSearchTopicsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -31003,7 +31197,7 @@ func (m *awsRestjson1_deserializeOpStartAssetBundleExportJob) HandleDeserialize( return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentStartAssetBundleExportJobOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentSearchTopicsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -31017,7 +31211,7 @@ func (m *awsRestjson1_deserializeOpStartAssetBundleExportJob) HandleDeserialize( return out, metadata, err } -func awsRestjson1_deserializeOpErrorStartAssetBundleExportJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorSearchTopics(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -31058,18 +31252,15 @@ func awsRestjson1_deserializeOpErrorStartAssetBundleExportJob(response *smithyht } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InvalidNextTokenException", errorCode): + return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -31089,7 +31280,7 @@ func awsRestjson1_deserializeOpErrorStartAssetBundleExportJob(response *smithyht } } -func awsRestjson1_deserializeOpHttpBindingsStartAssetBundleExportJobOutput(v *StartAssetBundleExportJobOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsSearchTopicsOutput(v *SearchTopicsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -31098,7 +31289,7 @@ func awsRestjson1_deserializeOpHttpBindingsStartAssetBundleExportJobOutput(v *St return nil } -func awsRestjson1_deserializeOpDocumentStartAssetBundleExportJobOutput(v **StartAssetBundleExportJobOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentSearchTopicsOutput(v **SearchTopicsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -31111,42 +31302,38 @@ func awsRestjson1_deserializeOpDocumentStartAssetBundleExportJobOutput(v **Start return fmt.Errorf("unexpected JSON type %v", value) } - var sv *StartAssetBundleExportJobOutput + var sv *SearchTopicsOutput if *v == nil { - sv = &StartAssetBundleExportJobOutput{} + sv = &SearchTopicsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - - case "AssetBundleExportJobId": + case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.AssetBundleExportJobId = ptr.String(jtv) + sv.NextToken = ptr.String(jtv) } case "RequestId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.RequestId = ptr.String(jtv) } + case "TopicSummaryList": + if err := awsRestjson1_deserializeDocumentTopicSummaries(&sv.TopicSummaryList, value); err != nil { + return err + } + default: _, _ = key, value @@ -31156,14 +31343,14 @@ func awsRestjson1_deserializeOpDocumentStartAssetBundleExportJobOutput(v **Start return nil } -type awsRestjson1_deserializeOpStartAssetBundleImportJob struct { +type awsRestjson1_deserializeOpStartAssetBundleExportJob struct { } -func (*awsRestjson1_deserializeOpStartAssetBundleImportJob) ID() string { +func (*awsRestjson1_deserializeOpStartAssetBundleExportJob) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpStartAssetBundleImportJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpStartAssetBundleExportJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -31181,12 +31368,12 @@ func (m *awsRestjson1_deserializeOpStartAssetBundleImportJob) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorStartAssetBundleImportJob(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorStartAssetBundleExportJob(response, &metadata) } - output := &StartAssetBundleImportJobOutput{} + output := &StartAssetBundleExportJobOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsStartAssetBundleImportJobOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsStartAssetBundleExportJobOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -31209,7 +31396,7 @@ func (m *awsRestjson1_deserializeOpStartAssetBundleImportJob) HandleDeserialize( return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentStartAssetBundleImportJobOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentStartAssetBundleExportJobOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -31223,7 +31410,7 @@ func (m *awsRestjson1_deserializeOpStartAssetBundleImportJob) HandleDeserialize( return out, metadata, err } -func awsRestjson1_deserializeOpErrorStartAssetBundleImportJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorStartAssetBundleExportJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -31295,7 +31482,7 @@ func awsRestjson1_deserializeOpErrorStartAssetBundleImportJob(response *smithyht } } -func awsRestjson1_deserializeOpHttpBindingsStartAssetBundleImportJobOutput(v *StartAssetBundleImportJobOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsStartAssetBundleExportJobOutput(v *StartAssetBundleExportJobOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -31304,7 +31491,7 @@ func awsRestjson1_deserializeOpHttpBindingsStartAssetBundleImportJobOutput(v *St return nil } -func awsRestjson1_deserializeOpDocumentStartAssetBundleImportJobOutput(v **StartAssetBundleImportJobOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentStartAssetBundleExportJobOutput(v **StartAssetBundleExportJobOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -31317,9 +31504,9 @@ func awsRestjson1_deserializeOpDocumentStartAssetBundleImportJobOutput(v **Start return fmt.Errorf("unexpected JSON type %v", value) } - var sv *StartAssetBundleImportJobOutput + var sv *StartAssetBundleExportJobOutput if *v == nil { - sv = &StartAssetBundleImportJobOutput{} + sv = &StartAssetBundleExportJobOutput{} } else { sv = *v } @@ -31335,13 +31522,13 @@ func awsRestjson1_deserializeOpDocumentStartAssetBundleImportJobOutput(v **Start sv.Arn = ptr.String(jtv) } - case "AssetBundleImportJobId": + case "AssetBundleExportJobId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) } - sv.AssetBundleImportJobId = ptr.String(jtv) + sv.AssetBundleExportJobId = ptr.String(jtv) } case "RequestId": @@ -31362,14 +31549,14 @@ func awsRestjson1_deserializeOpDocumentStartAssetBundleImportJobOutput(v **Start return nil } -type awsRestjson1_deserializeOpStartDashboardSnapshotJob struct { +type awsRestjson1_deserializeOpStartAssetBundleImportJob struct { } -func (*awsRestjson1_deserializeOpStartDashboardSnapshotJob) ID() string { +func (*awsRestjson1_deserializeOpStartAssetBundleImportJob) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpStartDashboardSnapshotJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpStartAssetBundleImportJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -31387,12 +31574,218 @@ func (m *awsRestjson1_deserializeOpStartDashboardSnapshotJob) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorStartDashboardSnapshotJob(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorStartAssetBundleImportJob(response, &metadata) } - output := &StartDashboardSnapshotJobOutput{} + output := &StartAssetBundleImportJobOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsStartDashboardSnapshotJobOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsStartAssetBundleImportJobOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentStartAssetBundleImportJobOutput(&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_deserializeOpErrorStartAssetBundleImportJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsStartAssetBundleImportJobOutput(v *StartAssetBundleImportJobOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + v.Status = int32(response.StatusCode) + + return nil +} +func awsRestjson1_deserializeOpDocumentStartAssetBundleImportJobOutput(v **StartAssetBundleImportJobOutput, 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 *StartAssetBundleImportJobOutput + if *v == nil { + sv = &StartAssetBundleImportJobOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "AssetBundleImportJobId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + } + sv.AssetBundleImportJobId = ptr.String(jtv) + } + + case "RequestId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.RequestId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpStartDashboardSnapshotJob struct { +} + +func (*awsRestjson1_deserializeOpStartDashboardSnapshotJob) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpStartDashboardSnapshotJob) HandleDeserialize(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_deserializeOpErrorStartDashboardSnapshotJob(response, &metadata) + } + output := &StartDashboardSnapshotJobOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsStartDashboardSnapshotJobOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -34544,14 +34937,14 @@ func awsRestjson1_deserializeOpDocumentUpdateDashboardPublishedVersionOutput(v * return nil } -type awsRestjson1_deserializeOpUpdateDataSet struct { +type awsRestjson1_deserializeOpUpdateDashboardsQAConfiguration struct { } -func (*awsRestjson1_deserializeOpUpdateDataSet) ID() string { +func (*awsRestjson1_deserializeOpUpdateDashboardsQAConfiguration) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateDataSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateDashboardsQAConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -34569,12 +34962,12 @@ func (m *awsRestjson1_deserializeOpUpdateDataSet) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateDataSet(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateDashboardsQAConfiguration(response, &metadata) } - output := &UpdateDataSetOutput{} + output := &UpdateDashboardsQAConfigurationOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsUpdateDataSetOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsUpdateDashboardsQAConfigurationOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -34597,7 +34990,7 @@ func (m *awsRestjson1_deserializeOpUpdateDataSet) HandleDeserialize(ctx context. return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateDataSetOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateDashboardsQAConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -34611,7 +35004,7 @@ func (m *awsRestjson1_deserializeOpUpdateDataSet) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateDataSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateDashboardsQAConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -34664,18 +35057,12 @@ func awsRestjson1_deserializeOpErrorUpdateDataSet(response *smithyhttp.Response, case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -34686,7 +35073,7 @@ func awsRestjson1_deserializeOpErrorUpdateDataSet(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpHttpBindingsUpdateDataSetOutput(v *UpdateDataSetOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsUpdateDashboardsQAConfigurationOutput(v *UpdateDashboardsQAConfigurationOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -34695,7 +35082,7 @@ func awsRestjson1_deserializeOpHttpBindingsUpdateDataSetOutput(v *UpdateDataSetO return nil } -func awsRestjson1_deserializeOpDocumentUpdateDataSetOutput(v **UpdateDataSetOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateDashboardsQAConfigurationOutput(v **UpdateDashboardsQAConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -34708,49 +35095,22 @@ func awsRestjson1_deserializeOpDocumentUpdateDataSetOutput(v **UpdateDataSetOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateDataSetOutput + var sv *UpdateDashboardsQAConfigurationOutput if *v == nil { - sv = &UpdateDataSetOutput{} + sv = &UpdateDashboardsQAConfigurationOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - - case "DataSetId": + case "DashboardsQAStatus": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + return fmt.Errorf("expected DashboardsQAStatus to be of type string, got %T instead", value) } - sv.DataSetId = ptr.String(jtv) - } - - case "IngestionArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.IngestionArn = ptr.String(jtv) - } - - case "IngestionId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) - } - sv.IngestionId = ptr.String(jtv) + sv.DashboardsQAStatus = types.DashboardsQAStatus(jtv) } case "RequestId": @@ -34771,14 +35131,14 @@ func awsRestjson1_deserializeOpDocumentUpdateDataSetOutput(v **UpdateDataSetOutp return nil } -type awsRestjson1_deserializeOpUpdateDataSetPermissions struct { +type awsRestjson1_deserializeOpUpdateDataSet struct { } -func (*awsRestjson1_deserializeOpUpdateDataSetPermissions) ID() string { +func (*awsRestjson1_deserializeOpUpdateDataSet) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateDataSetPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateDataSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -34796,12 +35156,239 @@ func (m *awsRestjson1_deserializeOpUpdateDataSetPermissions) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateDataSetPermissions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateDataSet(response, &metadata) } - output := &UpdateDataSetPermissionsOutput{} + output := &UpdateDataSetOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsUpdateDataSetPermissionsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsUpdateDataSetOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + 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_deserializeOpDocumentUpdateDataSetOutput(&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_deserializeOpErrorUpdateDataSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsUpdateDataSetOutput(v *UpdateDataSetOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + v.Status = int32(response.StatusCode) + + return nil +} +func awsRestjson1_deserializeOpDocumentUpdateDataSetOutput(v **UpdateDataSetOutput, value interface{}) error { + 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 *UpdateDataSetOutput + if *v == nil { + sv = &UpdateDataSetOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "DataSetId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + } + sv.DataSetId = ptr.String(jtv) + } + + case "IngestionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.IngestionArn = ptr.String(jtv) + } + + case "IngestionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + } + sv.IngestionId = ptr.String(jtv) + } + + case "RequestId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RequestId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateDataSetPermissions struct { +} + +func (*awsRestjson1_deserializeOpUpdateDataSetPermissions) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateDataSetPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + 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_deserializeOpErrorUpdateDataSetPermissions(response, &metadata) + } + output := &UpdateDataSetPermissionsOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsUpdateDataSetPermissionsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -42139,6 +42726,11 @@ func awsRestjson1_deserializeDocumentAnalysisDefinition(v **types.AnalysisDefini return err } + case "StaticFiles": + if err := awsRestjson1_deserializeDocumentStaticFileList(&sv.StaticFiles, value); err != nil { + return err + } + default: _, _ = key, value @@ -48313,6 +48905,15 @@ func awsRestjson1_deserializeDocumentBarChartVisual(v **types.BarChartVisual, va return err } + case "VisualContentAltText": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LongPlainText to be of type string, got %T instead", value) + } + sv.VisualContentAltText = ptr.String(jtv) + } + case "VisualId": if value != nil { jtv, ok := value.(string) @@ -49389,6 +49990,15 @@ func awsRestjson1_deserializeDocumentBoxPlotVisual(v **types.BoxPlotVisual, valu return err } + case "VisualContentAltText": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LongPlainText to be of type string, got %T instead", value) + } + sv.VisualContentAltText = ptr.String(jtv) + } + case "VisualId": if value != nil { jtv, ok := value.(string) @@ -52556,6 +53166,15 @@ func awsRestjson1_deserializeDocumentComboChartVisual(v **types.ComboChartVisual return err } + case "VisualContentAltText": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LongPlainText to be of type string, got %T instead", value) + } + sv.VisualContentAltText = ptr.String(jtv) + } + case "VisualId": if value != nil { jtv, ok := value.(string) @@ -54093,6 +54712,15 @@ func awsRestjson1_deserializeDocumentCustomContentVisual(v **types.CustomContent return err } + case "VisualContentAltText": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LongPlainText to be of type string, got %T instead", value) + } + sv.VisualContentAltText = ptr.String(jtv) + } + case "VisualId": if value != nil { jtv, ok := value.(string) @@ -55211,6 +55839,11 @@ func awsRestjson1_deserializeDocumentDashboardVersionDefinition(v **types.Dashbo return err } + case "StaticFiles": + if err := awsRestjson1_deserializeDocumentStaticFileList(&sv.StaticFiles, value); err != nil { + return err + } + default: _, _ = key, value @@ -62239,6 +62872,15 @@ func awsRestjson1_deserializeDocumentFilledMapVisual(v **types.FilledMapVisual, return err } + case "VisualContentAltText": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LongPlainText to be of type string, got %T instead", value) + } + sv.VisualContentAltText = ptr.String(jtv) + } + case "VisualId": if value != nil { jtv, ok := value.(string) @@ -64174,6 +64816,15 @@ func awsRestjson1_deserializeDocumentFontConfiguration(v **types.FontConfigurati sv.FontDecoration = types.FontDecoration(jtv) } + case "FontFamily": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.FontFamily = ptr.String(jtv) + } + case "FontSize": if err := awsRestjson1_deserializeDocumentFontSize(&sv.FontSize, value); err != nil { return err @@ -64258,6 +64909,15 @@ func awsRestjson1_deserializeDocumentFontSize(v **types.FontSize, value interfac for key, value := range shape { switch key { + case "Absolute": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PixelLength to be of type string, got %T instead", value) + } + sv.Absolute = ptr.String(jtv) + } + case "Relative": if value != nil { jtv, ok := value.(string) @@ -65464,6 +66124,15 @@ func awsRestjson1_deserializeDocumentFunnelChartVisual(v **types.FunnelChartVisu return err } + case "VisualContentAltText": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LongPlainText to be of type string, got %T instead", value) + } + sv.VisualContentAltText = ptr.String(jtv) + } + case "VisualId": if value != nil { jtv, ok := value.(string) @@ -65933,6 +66602,15 @@ func awsRestjson1_deserializeDocumentGaugeChartVisual(v **types.GaugeChartVisual return err } + case "VisualContentAltText": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LongPlainText to be of type string, got %T instead", value) + } + sv.VisualContentAltText = ptr.String(jtv) + } + case "VisualId": if value != nil { jtv, ok := value.(string) @@ -65951,6 +66629,335 @@ func awsRestjson1_deserializeDocumentGaugeChartVisual(v **types.GaugeChartVisual return nil } +func awsRestjson1_deserializeDocumentGeospatialCategoricalColor(v **types.GeospatialCategoricalColor, 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.GeospatialCategoricalColor + if *v == nil { + sv = &types.GeospatialCategoricalColor{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CategoryDataColors": + if err := awsRestjson1_deserializeDocumentGeospatialCategoricalDataColorList(&sv.CategoryDataColors, value); err != nil { + return err + } + + case "DefaultOpacity": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.DefaultOpacity = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.DefaultOpacity = ptr.Float64(f64) + + default: + return fmt.Errorf("expected Opacity to be a JSON Number, got %T instead", value) + + } + } + + case "NullDataSettings": + if err := awsRestjson1_deserializeDocumentGeospatialNullDataSettings(&sv.NullDataSettings, value); err != nil { + return err + } + + case "NullDataVisibility": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Visibility to be of type string, got %T instead", value) + } + sv.NullDataVisibility = types.Visibility(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentGeospatialCategoricalDataColor(v **types.GeospatialCategoricalDataColor, 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.GeospatialCategoricalDataColor + if *v == nil { + sv = &types.GeospatialCategoricalDataColor{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Color": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected HexColorWithTransparency to be of type string, got %T instead", value) + } + sv.Color = ptr.String(jtv) + } + + case "DataValue": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.DataValue = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentGeospatialCategoricalDataColorList(v *[]types.GeospatialCategoricalDataColor, 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.GeospatialCategoricalDataColor + if *v == nil { + cv = []types.GeospatialCategoricalDataColor{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.GeospatialCategoricalDataColor + destAddr := &col + if err := awsRestjson1_deserializeDocumentGeospatialCategoricalDataColor(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentGeospatialCircleRadius(v **types.GeospatialCircleRadius, 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.GeospatialCircleRadius + if *v == nil { + sv = &types.GeospatialCircleRadius{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Radius": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Radius = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.Radius = ptr.Float64(f64) + + default: + return fmt.Errorf("expected GeospatialRadius to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentGeospatialCircleSymbolStyle(v **types.GeospatialCircleSymbolStyle, 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.GeospatialCircleSymbolStyle + if *v == nil { + sv = &types.GeospatialCircleSymbolStyle{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CircleRadius": + if err := awsRestjson1_deserializeDocumentGeospatialCircleRadius(&sv.CircleRadius, value); err != nil { + return err + } + + case "FillColor": + if err := awsRestjson1_deserializeDocumentGeospatialColor(&sv.FillColor, value); err != nil { + return err + } + + case "StrokeColor": + if err := awsRestjson1_deserializeDocumentGeospatialColor(&sv.StrokeColor, value); err != nil { + return err + } + + case "StrokeWidth": + if err := awsRestjson1_deserializeDocumentGeospatialLineWidth(&sv.StrokeWidth, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentGeospatialColor(v **types.GeospatialColor, 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.GeospatialColor + if *v == nil { + sv = &types.GeospatialColor{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Categorical": + if err := awsRestjson1_deserializeDocumentGeospatialCategoricalColor(&sv.Categorical, value); err != nil { + return err + } + + case "Gradient": + if err := awsRestjson1_deserializeDocumentGeospatialGradientColor(&sv.Gradient, value); err != nil { + return err + } + + case "Solid": + if err := awsRestjson1_deserializeDocumentGeospatialSolidColor(&sv.Solid, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentGeoSpatialColumnGroup(v **types.GeoSpatialColumnGroup, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -66172,6 +67179,234 @@ func awsRestjson1_deserializeDocumentGeospatialCoordinateBounds(v **types.Geospa return nil } +func awsRestjson1_deserializeDocumentGeospatialDataSourceItem(v **types.GeospatialDataSourceItem, 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.GeospatialDataSourceItem + if *v == nil { + sv = &types.GeospatialDataSourceItem{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "StaticFileDataSource": + if err := awsRestjson1_deserializeDocumentGeospatialStaticFileSource(&sv.StaticFileDataSource, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentGeospatialGradientColor(v **types.GeospatialGradientColor, 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.GeospatialGradientColor + if *v == nil { + sv = &types.GeospatialGradientColor{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DefaultOpacity": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.DefaultOpacity = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.DefaultOpacity = ptr.Float64(f64) + + default: + return fmt.Errorf("expected Opacity to be a JSON Number, got %T instead", value) + + } + } + + case "NullDataSettings": + if err := awsRestjson1_deserializeDocumentGeospatialNullDataSettings(&sv.NullDataSettings, value); err != nil { + return err + } + + case "NullDataVisibility": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Visibility to be of type string, got %T instead", value) + } + sv.NullDataVisibility = types.Visibility(jtv) + } + + case "StepColors": + if err := awsRestjson1_deserializeDocumentGeospatialGradientStepColorList(&sv.StepColors, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentGeospatialGradientStepColor(v **types.GeospatialGradientStepColor, 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.GeospatialGradientStepColor + if *v == nil { + sv = &types.GeospatialGradientStepColor{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Color": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected HexColorWithTransparency to be of type string, got %T instead", value) + } + sv.Color = ptr.String(jtv) + } + + case "DataValue": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.DataValue = 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.DataValue = f64 + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentGeospatialGradientStepColorList(v *[]types.GeospatialGradientStepColor, 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.GeospatialGradientStepColor + if *v == nil { + cv = []types.GeospatialGradientStepColor{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.GeospatialGradientStepColor + destAddr := &col + if err := awsRestjson1_deserializeDocumentGeospatialGradientStepColor(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentGeospatialHeatmapColorScale(v **types.GeospatialHeatmapColorScale, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -66318,6 +67553,537 @@ func awsRestjson1_deserializeDocumentGeospatialHeatmapDataColorList(v *[]types.G return nil } +func awsRestjson1_deserializeDocumentGeospatialLayerColorField(v **types.GeospatialLayerColorField, 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.GeospatialLayerColorField + if *v == nil { + sv = &types.GeospatialLayerColorField{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ColorDimensionsFields": + if err := awsRestjson1_deserializeDocumentGeospatialLayerDimensionFieldList(&sv.ColorDimensionsFields, value); err != nil { + return err + } + + case "ColorValuesFields": + if err := awsRestjson1_deserializeDocumentGeospatialLayerMeasureFieldList(&sv.ColorValuesFields, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentGeospatialLayerDefinition(v **types.GeospatialLayerDefinition, 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.GeospatialLayerDefinition + if *v == nil { + sv = &types.GeospatialLayerDefinition{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "LineLayer": + if err := awsRestjson1_deserializeDocumentGeospatialLineLayer(&sv.LineLayer, value); err != nil { + return err + } + + case "PointLayer": + if err := awsRestjson1_deserializeDocumentGeospatialPointLayer(&sv.PointLayer, value); err != nil { + return err + } + + case "PolygonLayer": + if err := awsRestjson1_deserializeDocumentGeospatialPolygonLayer(&sv.PolygonLayer, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentGeospatialLayerDimensionFieldList(v *[]types.DimensionField, 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.DimensionField + if *v == nil { + cv = []types.DimensionField{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.DimensionField + destAddr := &col + if err := awsRestjson1_deserializeDocumentDimensionField(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentGeospatialLayerItem(v **types.GeospatialLayerItem, 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.GeospatialLayerItem + if *v == nil { + sv = &types.GeospatialLayerItem{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Actions": + if err := awsRestjson1_deserializeDocumentLayerCustomActionList(&sv.Actions, value); err != nil { + return err + } + + case "DataSource": + if err := awsRestjson1_deserializeDocumentGeospatialDataSourceItem(&sv.DataSource, value); err != nil { + return err + } + + case "JoinDefinition": + if err := awsRestjson1_deserializeDocumentGeospatialLayerJoinDefinition(&sv.JoinDefinition, value); err != nil { + return err + } + + case "Label": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Label = ptr.String(jtv) + } + + case "LayerDefinition": + if err := awsRestjson1_deserializeDocumentGeospatialLayerDefinition(&sv.LayerDefinition, value); err != nil { + return err + } + + case "LayerId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.LayerId = ptr.String(jtv) + } + + case "LayerType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GeospatialLayerType to be of type string, got %T instead", value) + } + sv.LayerType = types.GeospatialLayerType(jtv) + } + + case "Tooltip": + if err := awsRestjson1_deserializeDocumentTooltipOptions(&sv.Tooltip, value); err != nil { + return err + } + + case "Visibility": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Visibility to be of type string, got %T instead", value) + } + sv.Visibility = types.Visibility(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentGeospatialLayerJoinDefinition(v **types.GeospatialLayerJoinDefinition, 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.GeospatialLayerJoinDefinition + if *v == nil { + sv = &types.GeospatialLayerJoinDefinition{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ColorField": + if err := awsRestjson1_deserializeDocumentGeospatialLayerColorField(&sv.ColorField, value); err != nil { + return err + } + + case "DatasetKeyField": + if err := awsRestjson1_deserializeDocumentUnaggregatedField(&sv.DatasetKeyField, value); err != nil { + return err + } + + case "ShapeKeyField": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ShapeKeyField = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentGeospatialLayerMapConfiguration(v **types.GeospatialLayerMapConfiguration, 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.GeospatialLayerMapConfiguration + if *v == nil { + sv = &types.GeospatialLayerMapConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Interactions": + if err := awsRestjson1_deserializeDocumentVisualInteractionOptions(&sv.Interactions, value); err != nil { + return err + } + + case "Legend": + if err := awsRestjson1_deserializeDocumentLegendOptions(&sv.Legend, value); err != nil { + return err + } + + case "MapLayers": + if err := awsRestjson1_deserializeDocumentGeospatialMapLayerList(&sv.MapLayers, value); err != nil { + return err + } + + case "MapState": + if err := awsRestjson1_deserializeDocumentGeospatialMapState(&sv.MapState, value); err != nil { + return err + } + + case "MapStyle": + if err := awsRestjson1_deserializeDocumentGeospatialMapStyle(&sv.MapStyle, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentGeospatialLayerMeasureFieldList(v *[]types.MeasureField, 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.MeasureField + if *v == nil { + cv = []types.MeasureField{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.MeasureField + destAddr := &col + if err := awsRestjson1_deserializeDocumentMeasureField(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentGeospatialLineLayer(v **types.GeospatialLineLayer, 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.GeospatialLineLayer + if *v == nil { + sv = &types.GeospatialLineLayer{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Style": + if err := awsRestjson1_deserializeDocumentGeospatialLineStyle(&sv.Style, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentGeospatialLineStyle(v **types.GeospatialLineStyle, 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.GeospatialLineStyle + if *v == nil { + sv = &types.GeospatialLineStyle{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "LineSymbolStyle": + if err := awsRestjson1_deserializeDocumentGeospatialLineSymbolStyle(&sv.LineSymbolStyle, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentGeospatialLineSymbolStyle(v **types.GeospatialLineSymbolStyle, 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.GeospatialLineSymbolStyle + if *v == nil { + sv = &types.GeospatialLineSymbolStyle{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "FillColor": + if err := awsRestjson1_deserializeDocumentGeospatialColor(&sv.FillColor, value); err != nil { + return err + } + + case "LineWidth": + if err := awsRestjson1_deserializeDocumentGeospatialLineWidth(&sv.LineWidth, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentGeospatialLineWidth(v **types.GeospatialLineWidth, 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.GeospatialLineWidth + if *v == nil { + sv = &types.GeospatialLineWidth{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "LineWidth": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LineWidth = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.LineWidth = ptr.Float64(f64) + + default: + return fmt.Errorf("expected GeospatialWidth to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentGeospatialMapAggregatedFieldWells(v **types.GeospatialMapAggregatedFieldWells, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -66471,6 +68237,143 @@ func awsRestjson1_deserializeDocumentGeospatialMapFieldWells(v **types.Geospatia return nil } +func awsRestjson1_deserializeDocumentGeospatialMapLayerList(v *[]types.GeospatialLayerItem, 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.GeospatialLayerItem + if *v == nil { + cv = []types.GeospatialLayerItem{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.GeospatialLayerItem + destAddr := &col + if err := awsRestjson1_deserializeDocumentGeospatialLayerItem(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentGeospatialMapState(v **types.GeospatialMapState, 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.GeospatialMapState + if *v == nil { + sv = &types.GeospatialMapState{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Bounds": + if err := awsRestjson1_deserializeDocumentGeospatialCoordinateBounds(&sv.Bounds, value); err != nil { + return err + } + + case "MapNavigation": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GeospatialMapNavigation to be of type string, got %T instead", value) + } + sv.MapNavigation = types.GeospatialMapNavigation(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentGeospatialMapStyle(v **types.GeospatialMapStyle, 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.GeospatialMapStyle + if *v == nil { + sv = &types.GeospatialMapStyle{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BackgroundColor": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected HexColorWithTransparency to be of type string, got %T instead", value) + } + sv.BackgroundColor = ptr.String(jtv) + } + + case "BaseMapStyle": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BaseMapStyleType to be of type string, got %T instead", value) + } + sv.BaseMapStyle = types.BaseMapStyleType(jtv) + } + + case "BaseMapVisibility": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Visibility to be of type string, got %T instead", value) + } + sv.BaseMapVisibility = types.Visibility(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentGeospatialMapStyleOptions(v **types.GeospatialMapStyleOptions, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -66558,6 +68461,15 @@ func awsRestjson1_deserializeDocumentGeospatialMapVisual(v **types.GeospatialMap return err } + case "VisualContentAltText": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LongPlainText to be of type string, got %T instead", value) + } + sv.VisualContentAltText = ptr.String(jtv) + } + case "VisualId": if value != nil { jtv, ok := value.(string) @@ -66576,6 +68488,197 @@ func awsRestjson1_deserializeDocumentGeospatialMapVisual(v **types.GeospatialMap return nil } +func awsRestjson1_deserializeDocumentGeospatialNullDataSettings(v **types.GeospatialNullDataSettings, 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.GeospatialNullDataSettings + if *v == nil { + sv = &types.GeospatialNullDataSettings{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "SymbolStyle": + if err := awsRestjson1_deserializeDocumentGeospatialNullSymbolStyle(&sv.SymbolStyle, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentGeospatialNullSymbolStyle(v **types.GeospatialNullSymbolStyle, 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.GeospatialNullSymbolStyle + if *v == nil { + sv = &types.GeospatialNullSymbolStyle{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "FillColor": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected HexColorWithTransparency to be of type string, got %T instead", value) + } + sv.FillColor = ptr.String(jtv) + } + + case "StrokeColor": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected HexColorWithTransparency to be of type string, got %T instead", value) + } + sv.StrokeColor = ptr.String(jtv) + } + + case "StrokeWidth": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StrokeWidth = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.StrokeWidth = ptr.Float64(f64) + + default: + return fmt.Errorf("expected GeospatialWidth to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentGeospatialPointLayer(v **types.GeospatialPointLayer, 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.GeospatialPointLayer + if *v == nil { + sv = &types.GeospatialPointLayer{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Style": + if err := awsRestjson1_deserializeDocumentGeospatialPointStyle(&sv.Style, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentGeospatialPointStyle(v **types.GeospatialPointStyle, 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.GeospatialPointStyle + if *v == nil { + sv = &types.GeospatialPointStyle{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CircleSymbolStyle": + if err := awsRestjson1_deserializeDocumentGeospatialCircleSymbolStyle(&sv.CircleSymbolStyle, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentGeospatialPointStyleOptions(v **types.GeospatialPointStyleOptions, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -66626,6 +68729,213 @@ func awsRestjson1_deserializeDocumentGeospatialPointStyleOptions(v **types.Geosp return nil } +func awsRestjson1_deserializeDocumentGeospatialPolygonLayer(v **types.GeospatialPolygonLayer, 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.GeospatialPolygonLayer + if *v == nil { + sv = &types.GeospatialPolygonLayer{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Style": + if err := awsRestjson1_deserializeDocumentGeospatialPolygonStyle(&sv.Style, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentGeospatialPolygonStyle(v **types.GeospatialPolygonStyle, 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.GeospatialPolygonStyle + if *v == nil { + sv = &types.GeospatialPolygonStyle{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "PolygonSymbolStyle": + if err := awsRestjson1_deserializeDocumentGeospatialPolygonSymbolStyle(&sv.PolygonSymbolStyle, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentGeospatialPolygonSymbolStyle(v **types.GeospatialPolygonSymbolStyle, 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.GeospatialPolygonSymbolStyle + if *v == nil { + sv = &types.GeospatialPolygonSymbolStyle{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "FillColor": + if err := awsRestjson1_deserializeDocumentGeospatialColor(&sv.FillColor, value); err != nil { + return err + } + + case "StrokeColor": + if err := awsRestjson1_deserializeDocumentGeospatialColor(&sv.StrokeColor, value); err != nil { + return err + } + + case "StrokeWidth": + if err := awsRestjson1_deserializeDocumentGeospatialLineWidth(&sv.StrokeWidth, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentGeospatialSolidColor(v **types.GeospatialSolidColor, 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.GeospatialSolidColor + if *v == nil { + sv = &types.GeospatialSolidColor{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Color": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected HexColorWithTransparency to be of type string, got %T instead", value) + } + sv.Color = ptr.String(jtv) + } + + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GeospatialColorState to be of type string, got %T instead", value) + } + sv.State = types.GeospatialColorState(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentGeospatialStaticFileSource(v **types.GeospatialStaticFileSource, 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.GeospatialStaticFileSource + if *v == nil { + sv = &types.GeospatialStaticFileSource{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "StaticFileId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + } + sv.StaticFileId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentGeospatialWindowOptions(v **types.GeospatialWindowOptions, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -67891,6 +70201,15 @@ func awsRestjson1_deserializeDocumentHeatMapVisual(v **types.HeatMapVisual, valu return err } + case "VisualContentAltText": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LongPlainText to be of type string, got %T instead", value) + } + sv.VisualContentAltText = ptr.String(jtv) + } + case "VisualId": if value != nil { jtv, ok := value.(string) @@ -68217,6 +70536,15 @@ func awsRestjson1_deserializeDocumentHistogramVisual(v **types.HistogramVisual, return err } + case "VisualContentAltText": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LongPlainText to be of type string, got %T instead", value) + } + sv.VisualContentAltText = ptr.String(jtv) + } + case "VisualId": if value != nil { jtv, ok := value.(string) @@ -68679,6 +71007,268 @@ func awsRestjson1_deserializeDocumentImageConfiguration(v **types.ImageConfigura return nil } +func awsRestjson1_deserializeDocumentImageCustomAction(v **types.ImageCustomAction, 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.ImageCustomAction + if *v == nil { + sv = &types.ImageCustomAction{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ActionOperations": + if err := awsRestjson1_deserializeDocumentImageCustomActionOperationList(&sv.ActionOperations, value); err != nil { + return err + } + + case "CustomActionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + } + sv.CustomActionId = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ImageCustomActionName 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 WidgetStatus to be of type string, got %T instead", value) + } + sv.Status = types.WidgetStatus(jtv) + } + + case "Trigger": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ImageCustomActionTrigger to be of type string, got %T instead", value) + } + sv.Trigger = types.ImageCustomActionTrigger(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentImageCustomActionList(v *[]types.ImageCustomAction, 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.ImageCustomAction + if *v == nil { + cv = []types.ImageCustomAction{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ImageCustomAction + destAddr := &col + if err := awsRestjson1_deserializeDocumentImageCustomAction(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentImageCustomActionOperation(v **types.ImageCustomActionOperation, 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.ImageCustomActionOperation + if *v == nil { + sv = &types.ImageCustomActionOperation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NavigationOperation": + if err := awsRestjson1_deserializeDocumentCustomActionNavigationOperation(&sv.NavigationOperation, value); err != nil { + return err + } + + case "SetParametersOperation": + if err := awsRestjson1_deserializeDocumentCustomActionSetParametersOperation(&sv.SetParametersOperation, value); err != nil { + return err + } + + case "URLOperation": + if err := awsRestjson1_deserializeDocumentCustomActionURLOperation(&sv.URLOperation, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentImageCustomActionOperationList(v *[]types.ImageCustomActionOperation, 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.ImageCustomActionOperation + if *v == nil { + cv = []types.ImageCustomActionOperation{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ImageCustomActionOperation + destAddr := &col + if err := awsRestjson1_deserializeDocumentImageCustomActionOperation(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentImageInteractionOptions(v **types.ImageInteractionOptions, 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.ImageInteractionOptions + if *v == nil { + sv = &types.ImageInteractionOptions{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ImageMenuOption": + if err := awsRestjson1_deserializeDocumentImageMenuOption(&sv.ImageMenuOption, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentImageMenuOption(v **types.ImageMenuOption, 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.ImageMenuOption + if *v == nil { + sv = &types.ImageMenuOption{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AvailabilityStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DashboardBehavior to be of type string, got %T instead", value) + } + sv.AvailabilityStatus = types.DashboardBehavior(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentImageSet(v **types.ImageSet, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -68815,6 +71405,51 @@ loop: return nil } +func awsRestjson1_deserializeDocumentImageStaticFile(v **types.ImageStaticFile, 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.ImageStaticFile + if *v == nil { + sv = &types.ImageStaticFile{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Source": + if err := awsRestjson1_deserializeDocumentStaticFileSource(&sv.Source, value); err != nil { + return err + } + + case "StaticFileId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + } + sv.StaticFileId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentIncrementalRefresh(v **types.IncrementalRefresh, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -69243,6 +71878,15 @@ func awsRestjson1_deserializeDocumentInsightVisual(v **types.InsightVisual, valu return err } + case "VisualContentAltText": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LongPlainText to be of type string, got %T instead", value) + } + sv.VisualContentAltText = ptr.String(jtv) + } + case "VisualId": if value != nil { jtv, ok := value.(string) @@ -70888,6 +73532,15 @@ func awsRestjson1_deserializeDocumentKPIVisual(v **types.KPIVisual, value interf return err } + case "VisualContentAltText": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LongPlainText to be of type string, got %T instead", value) + } + sv.VisualContentAltText = ptr.String(jtv) + } + case "VisualId": if value != nil { jtv, ok := value.(string) @@ -71036,6 +73689,270 @@ func awsRestjson1_deserializeDocumentLabelOptions(v **types.LabelOptions, value return nil } +func awsRestjson1_deserializeDocumentLayerCustomAction(v **types.LayerCustomAction, 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.LayerCustomAction + if *v == nil { + sv = &types.LayerCustomAction{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ActionOperations": + if err := awsRestjson1_deserializeDocumentLayerCustomActionOperationList(&sv.ActionOperations, value); err != nil { + return err + } + + case "CustomActionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + } + sv.CustomActionId = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LayerCustomActionName 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 WidgetStatus to be of type string, got %T instead", value) + } + sv.Status = types.WidgetStatus(jtv) + } + + case "Trigger": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LayerCustomActionTrigger to be of type string, got %T instead", value) + } + sv.Trigger = types.LayerCustomActionTrigger(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentLayerCustomActionList(v *[]types.LayerCustomAction, 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.LayerCustomAction + if *v == nil { + cv = []types.LayerCustomAction{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.LayerCustomAction + destAddr := &col + if err := awsRestjson1_deserializeDocumentLayerCustomAction(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentLayerCustomActionOperation(v **types.LayerCustomActionOperation, 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.LayerCustomActionOperation + if *v == nil { + sv = &types.LayerCustomActionOperation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "FilterOperation": + if err := awsRestjson1_deserializeDocumentCustomActionFilterOperation(&sv.FilterOperation, value); err != nil { + return err + } + + case "NavigationOperation": + if err := awsRestjson1_deserializeDocumentCustomActionNavigationOperation(&sv.NavigationOperation, value); err != nil { + return err + } + + case "SetParametersOperation": + if err := awsRestjson1_deserializeDocumentCustomActionSetParametersOperation(&sv.SetParametersOperation, value); err != nil { + return err + } + + case "URLOperation": + if err := awsRestjson1_deserializeDocumentCustomActionURLOperation(&sv.URLOperation, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentLayerCustomActionOperationList(v *[]types.LayerCustomActionOperation, 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.LayerCustomActionOperation + if *v == nil { + cv = []types.LayerCustomActionOperation{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.LayerCustomActionOperation + destAddr := &col + if err := awsRestjson1_deserializeDocumentLayerCustomActionOperation(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentLayerMapVisual(v **types.LayerMapVisual, 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.LayerMapVisual + if *v == nil { + sv = &types.LayerMapVisual{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ChartConfiguration": + if err := awsRestjson1_deserializeDocumentGeospatialLayerMapConfiguration(&sv.ChartConfiguration, value); err != nil { + return err + } + + case "DataSetIdentifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DataSetIdentifier to be of type string, got %T instead", value) + } + sv.DataSetIdentifier = ptr.String(jtv) + } + + case "Subtitle": + if err := awsRestjson1_deserializeDocumentVisualSubtitleLabelOptions(&sv.Subtitle, value); err != nil { + return err + } + + case "Title": + if err := awsRestjson1_deserializeDocumentVisualTitleLabelOptions(&sv.Title, value); err != nil { + return err + } + + case "VisualContentAltText": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LongPlainText to be of type string, got %T instead", value) + } + sv.VisualContentAltText = ptr.String(jtv) + } + + case "VisualId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + } + sv.VisualId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentLayout(v **types.Layout, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -71197,6 +74114,11 @@ func awsRestjson1_deserializeDocumentLegendOptions(v **types.LegendOptions, valu return err } + case "ValueFontConfiguration": + if err := awsRestjson1_deserializeDocumentFontConfiguration(&sv.ValueFontConfiguration, value); err != nil { + return err + } + case "Visibility": if value != nil { jtv, ok := value.(string) @@ -71837,6 +74759,15 @@ func awsRestjson1_deserializeDocumentLineChartVisual(v **types.LineChartVisual, return err } + case "VisualContentAltText": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LongPlainText to be of type string, got %T instead", value) + } + sv.VisualContentAltText = ptr.String(jtv) + } + case "VisualId": if value != nil { jtv, ok := value.(string) @@ -73606,6 +76537,24 @@ func awsRestjson1_deserializeDocumentNamespaceInfoV2(v **types.NamespaceInfoV2, sv.CreationStatus = types.NamespaceStatus(jtv) } + case "IamIdentityCenterApplicationArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.IamIdentityCenterApplicationArn = ptr.String(jtv) + } + + case "IamIdentityCenterInstanceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.IamIdentityCenterInstanceArn = ptr.String(jtv) + } + case "IdentityStore": if value != nil { jtv, ok := value.(string) @@ -77060,6 +80009,15 @@ func awsRestjson1_deserializeDocumentPieChartVisual(v **types.PieChartVisual, va return err } + case "VisualContentAltText": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LongPlainText to be of type string, got %T instead", value) + } + sv.VisualContentAltText = ptr.String(jtv) + } + case "VisualId": if value != nil { jtv, ok := value.(string) @@ -78425,6 +81383,15 @@ func awsRestjson1_deserializeDocumentPivotTableVisual(v **types.PivotTableVisual return err } + case "VisualContentAltText": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LongPlainText to be of type string, got %T instead", value) + } + sv.VisualContentAltText = ptr.String(jtv) + } + case "VisualId": if value != nil { jtv, ok := value.(string) @@ -78530,6 +81497,454 @@ func awsRestjson1_deserializeDocumentPivotTotalOptions(v **types.PivotTotalOptio return nil } +func awsRestjson1_deserializeDocumentPluginVisual(v **types.PluginVisual, 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.PluginVisual + if *v == nil { + sv = &types.PluginVisual{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ChartConfiguration": + if err := awsRestjson1_deserializeDocumentPluginVisualConfiguration(&sv.ChartConfiguration, value); err != nil { + return err + } + + case "PluginArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.PluginArn = ptr.String(jtv) + } + + case "Subtitle": + if err := awsRestjson1_deserializeDocumentVisualSubtitleLabelOptions(&sv.Subtitle, value); err != nil { + return err + } + + case "Title": + if err := awsRestjson1_deserializeDocumentVisualTitleLabelOptions(&sv.Title, value); err != nil { + return err + } + + case "VisualContentAltText": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LongPlainText to be of type string, got %T instead", value) + } + sv.VisualContentAltText = ptr.String(jtv) + } + + case "VisualId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + } + sv.VisualId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentPluginVisualConfiguration(v **types.PluginVisualConfiguration, 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.PluginVisualConfiguration + if *v == nil { + sv = &types.PluginVisualConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "FieldWells": + if err := awsRestjson1_deserializeDocumentPluginVisualFieldWells(&sv.FieldWells, value); err != nil { + return err + } + + case "SortConfiguration": + if err := awsRestjson1_deserializeDocumentPluginVisualSortConfiguration(&sv.SortConfiguration, value); err != nil { + return err + } + + case "VisualOptions": + if err := awsRestjson1_deserializeDocumentPluginVisualOptions(&sv.VisualOptions, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentPluginVisualFieldWell(v **types.PluginVisualFieldWell, 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.PluginVisualFieldWell + if *v == nil { + sv = &types.PluginVisualFieldWell{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AxisName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PluginVisualAxisName to be of type string, got %T instead", value) + } + sv.AxisName = types.PluginVisualAxisName(jtv) + } + + case "Dimensions": + if err := awsRestjson1_deserializeDocumentDimensionFieldList(&sv.Dimensions, value); err != nil { + return err + } + + case "Measures": + if err := awsRestjson1_deserializeDocumentMeasureFieldList(&sv.Measures, value); err != nil { + return err + } + + case "Unaggregated": + if err := awsRestjson1_deserializeDocumentUnaggregatedFieldList(&sv.Unaggregated, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentPluginVisualFieldWells(v *[]types.PluginVisualFieldWell, 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.PluginVisualFieldWell + if *v == nil { + cv = []types.PluginVisualFieldWell{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.PluginVisualFieldWell + destAddr := &col + if err := awsRestjson1_deserializeDocumentPluginVisualFieldWell(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentPluginVisualItemsLimitConfiguration(v **types.PluginVisualItemsLimitConfiguration, 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.PluginVisualItemsLimitConfiguration + if *v == nil { + sv = &types.PluginVisualItemsLimitConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ItemsLimit": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ItemsLimit = ptr.Int64(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentPluginVisualOptions(v **types.PluginVisualOptions, 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.PluginVisualOptions + if *v == nil { + sv = &types.PluginVisualOptions{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "VisualProperties": + if err := awsRestjson1_deserializeDocumentPluginVisualPropertiesList(&sv.VisualProperties, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentPluginVisualPropertiesList(v *[]types.PluginVisualProperty, 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.PluginVisualProperty + if *v == nil { + cv = []types.PluginVisualProperty{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.PluginVisualProperty + destAddr := &col + if err := awsRestjson1_deserializeDocumentPluginVisualProperty(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentPluginVisualProperty(v **types.PluginVisualProperty, 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.PluginVisualProperty + if *v == nil { + sv = &types.PluginVisualProperty{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "Value": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Value = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentPluginVisualSortConfiguration(v **types.PluginVisualSortConfiguration, 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.PluginVisualSortConfiguration + if *v == nil { + sv = &types.PluginVisualSortConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "PluginVisualTableQuerySort": + if err := awsRestjson1_deserializeDocumentPluginVisualTableQuerySort(&sv.PluginVisualTableQuerySort, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentPluginVisualTableQuerySort(v **types.PluginVisualTableQuerySort, 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.PluginVisualTableQuerySort + if *v == nil { + sv = &types.PluginVisualTableQuerySort{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ItemsLimitConfiguration": + if err := awsRestjson1_deserializeDocumentPluginVisualItemsLimitConfiguration(&sv.ItemsLimitConfiguration, value); err != nil { + return err + } + + case "RowSort": + if err := awsRestjson1_deserializeDocumentRowSortList(&sv.RowSort, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentPostgreSqlParameters(v **types.PostgreSqlParameters, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -79591,6 +83006,15 @@ func awsRestjson1_deserializeDocumentRadarChartVisual(v **types.RadarChartVisual return err } + case "VisualContentAltText": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LongPlainText to be of type string, got %T instead", value) + } + sv.VisualContentAltText = ptr.String(jtv) + } + case "VisualId": if value != nil { jtv, ok := value.(string) @@ -82117,6 +85541,15 @@ func awsRestjson1_deserializeDocumentSankeyDiagramVisual(v **types.SankeyDiagram return err } + case "VisualContentAltText": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LongPlainText to be of type string, got %T instead", value) + } + sv.VisualContentAltText = ptr.String(jtv) + } + case "VisualId": if value != nil { jtv, ok := value.(string) @@ -82457,6 +85890,15 @@ func awsRestjson1_deserializeDocumentScatterPlotVisual(v **types.ScatterPlotVisu return err } + case "VisualContentAltText": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LongPlainText to be of type string, got %T instead", value) + } + sv.VisualContentAltText = ptr.String(jtv) + } + case "VisualId": if value != nil { jtv, ok := value.(string) @@ -83668,6 +87110,11 @@ func awsRestjson1_deserializeDocumentSheet(v **types.Sheet, value interface{}) e for key, value := range shape { switch key { + case "Images": + if err := awsRestjson1_deserializeDocumentSheetImageList(&sv.Images, value); err != nil { + return err + } + case "Name": if value != nil { jtv, ok := value.(string) @@ -83935,6 +87382,11 @@ func awsRestjson1_deserializeDocumentSheetDefinition(v **types.SheetDefinition, return err } + case "Images": + if err := awsRestjson1_deserializeDocumentSheetImageList(&sv.Images, value); err != nil { + return err + } + case "Layouts": if err := awsRestjson1_deserializeDocumentLayoutList(&sv.Layouts, value); err != nil { return err @@ -84149,6 +87601,315 @@ func awsRestjson1_deserializeDocumentSheetElementRenderingRuleList(v *[]types.Sh return nil } +func awsRestjson1_deserializeDocumentSheetImage(v **types.SheetImage, 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.SheetImage + if *v == nil { + sv = &types.SheetImage{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Actions": + if err := awsRestjson1_deserializeDocumentImageCustomActionList(&sv.Actions, value); err != nil { + return err + } + + case "ImageContentAltText": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LongPlainText to be of type string, got %T instead", value) + } + sv.ImageContentAltText = ptr.String(jtv) + } + + case "Interactions": + if err := awsRestjson1_deserializeDocumentImageInteractionOptions(&sv.Interactions, value); err != nil { + return err + } + + case "Scaling": + if err := awsRestjson1_deserializeDocumentSheetImageScalingConfiguration(&sv.Scaling, value); err != nil { + return err + } + + case "SheetImageId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + } + sv.SheetImageId = ptr.String(jtv) + } + + case "Source": + if err := awsRestjson1_deserializeDocumentSheetImageSource(&sv.Source, value); err != nil { + return err + } + + case "Tooltip": + if err := awsRestjson1_deserializeDocumentSheetImageTooltipConfiguration(&sv.Tooltip, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSheetImageList(v *[]types.SheetImage, 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.SheetImage + if *v == nil { + cv = []types.SheetImage{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.SheetImage + destAddr := &col + if err := awsRestjson1_deserializeDocumentSheetImage(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentSheetImageScalingConfiguration(v **types.SheetImageScalingConfiguration, 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.SheetImageScalingConfiguration + if *v == nil { + sv = &types.SheetImageScalingConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ScalingType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SheetImageScalingType to be of type string, got %T instead", value) + } + sv.ScalingType = types.SheetImageScalingType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSheetImageSource(v **types.SheetImageSource, 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.SheetImageSource + if *v == nil { + sv = &types.SheetImageSource{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "SheetImageStaticFileSource": + if err := awsRestjson1_deserializeDocumentSheetImageStaticFileSource(&sv.SheetImageStaticFileSource, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSheetImageStaticFileSource(v **types.SheetImageStaticFileSource, 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.SheetImageStaticFileSource + if *v == nil { + sv = &types.SheetImageStaticFileSource{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "StaticFileId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + } + sv.StaticFileId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSheetImageTooltipConfiguration(v **types.SheetImageTooltipConfiguration, 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.SheetImageTooltipConfiguration + if *v == nil { + sv = &types.SheetImageTooltipConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "TooltipText": + if err := awsRestjson1_deserializeDocumentSheetImageTooltipText(&sv.TooltipText, value); err != nil { + return err + } + + case "Visibility": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Visibility to be of type string, got %T instead", value) + } + sv.Visibility = types.Visibility(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSheetImageTooltipText(v **types.SheetImageTooltipText, 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.SheetImageTooltipText + if *v == nil { + sv = &types.SheetImageTooltipText{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "PlainText": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LongPlainText to be of type string, got %T instead", value) + } + sv.PlainText = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentSheetLayoutElementMaximizationOption(v **types.SheetLayoutElementMaximizationOption, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -85965,6 +89726,51 @@ func awsRestjson1_deserializeDocumentSparkParameters(v **types.SparkParameters, return nil } +func awsRestjson1_deserializeDocumentSpatialStaticFile(v **types.SpatialStaticFile, 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.SpatialStaticFile + if *v == nil { + sv = &types.SpatialStaticFile{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Source": + if err := awsRestjson1_deserializeDocumentStaticFileSource(&sv.Source, value); err != nil { + return err + } + + case "StaticFileId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + } + sv.StaticFileId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentSqlServerParameters(v **types.SqlServerParameters, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -86161,6 +89967,220 @@ func awsRestjson1_deserializeDocumentStarburstParameters(v **types.StarburstPara return nil } +func awsRestjson1_deserializeDocumentStaticFile(v **types.StaticFile, 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.StaticFile + if *v == nil { + sv = &types.StaticFile{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ImageStaticFile": + if err := awsRestjson1_deserializeDocumentImageStaticFile(&sv.ImageStaticFile, value); err != nil { + return err + } + + case "SpatialStaticFile": + if err := awsRestjson1_deserializeDocumentSpatialStaticFile(&sv.SpatialStaticFile, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentStaticFileList(v *[]types.StaticFile, 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.StaticFile + if *v == nil { + cv = []types.StaticFile{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.StaticFile + destAddr := &col + if err := awsRestjson1_deserializeDocumentStaticFile(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentStaticFileS3SourceOptions(v **types.StaticFileS3SourceOptions, 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.StaticFileS3SourceOptions + if *v == nil { + sv = &types.StaticFileS3SourceOptions{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BucketName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.BucketName = ptr.String(jtv) + } + + case "ObjectKey": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ObjectKey = ptr.String(jtv) + } + + case "Region": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Region = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentStaticFileSource(v **types.StaticFileSource, 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.StaticFileSource + if *v == nil { + sv = &types.StaticFileSource{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "S3Options": + if err := awsRestjson1_deserializeDocumentStaticFileS3SourceOptions(&sv.S3Options, value); err != nil { + return err + } + + case "UrlOptions": + if err := awsRestjson1_deserializeDocumentStaticFileUrlSourceOptions(&sv.UrlOptions, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentStaticFileUrlSourceOptions(v **types.StaticFileUrlSourceOptions, 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.StaticFileUrlSourceOptions + if *v == nil { + sv = &types.StaticFileUrlSourceOptions{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Url": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Url = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentStringDatasetParameter(v **types.StringDatasetParameter, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -88414,6 +92434,15 @@ func awsRestjson1_deserializeDocumentTableVisual(v **types.TableVisual, value in return err } + case "VisualContentAltText": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LongPlainText to be of type string, got %T instead", value) + } + sv.VisualContentAltText = ptr.String(jtv) + } + case "VisualId": if value != nil { jtv, ok := value.(string) @@ -89190,6 +93219,11 @@ func awsRestjson1_deserializeDocumentTemplateVersionDefinition(v **types.Templat return err } + case "StaticFiles": + if err := awsRestjson1_deserializeDocumentStaticFileList(&sv.StaticFiles, value); err != nil { + return err + } + default: _, _ = key, value @@ -94494,6 +98528,15 @@ func awsRestjson1_deserializeDocumentTreeMapVisual(v **types.TreeMapVisual, valu return err } + case "VisualContentAltText": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LongPlainText to be of type string, got %T instead", value) + } + sv.VisualContentAltText = ptr.String(jtv) + } + case "VisualId": if value != nil { jtv, ok := value.(string) @@ -95596,6 +99639,11 @@ func awsRestjson1_deserializeDocumentVisual(v **types.Visual, value interface{}) return err } + case "LayerMapVisual": + if err := awsRestjson1_deserializeDocumentLayerMapVisual(&sv.LayerMapVisual, value); err != nil { + return err + } + case "LineChartVisual": if err := awsRestjson1_deserializeDocumentLineChartVisual(&sv.LineChartVisual, value); err != nil { return err @@ -95611,6 +99659,11 @@ func awsRestjson1_deserializeDocumentVisual(v **types.Visual, value interface{}) return err } + case "PluginVisual": + if err := awsRestjson1_deserializeDocumentPluginVisual(&sv.PluginVisual, value); err != nil { + return err + } + case "RadarChartVisual": if err := awsRestjson1_deserializeDocumentRadarChartVisual(&sv.RadarChartVisual, value); err != nil { return err @@ -96999,6 +101052,15 @@ func awsRestjson1_deserializeDocumentWaterfallVisual(v **types.WaterfallVisual, return err } + case "VisualContentAltText": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LongPlainText to be of type string, got %T instead", value) + } + sv.VisualContentAltText = ptr.String(jtv) + } + case "VisualId": if value != nil { jtv, ok := value.(string) @@ -97573,6 +101635,15 @@ func awsRestjson1_deserializeDocumentWordCloudVisual(v **types.WordCloudVisual, return err } + case "VisualContentAltText": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LongPlainText to be of type string, got %T instead", value) + } + sv.VisualContentAltText = ptr.String(jtv) + } + case "VisualId": if value != nil { jtv, ok := value.(string) diff --git a/service/quicksight/generated.json b/service/quicksight/generated.json index ae1010a3228..823b3904c88 100644 --- a/service/quicksight/generated.json +++ b/service/quicksight/generated.json @@ -82,6 +82,7 @@ "api_op_DescribeDashboardPermissions.go", "api_op_DescribeDashboardSnapshotJob.go", "api_op_DescribeDashboardSnapshotJobResult.go", + "api_op_DescribeDashboardsQAConfiguration.go", "api_op_DescribeDataSet.go", "api_op_DescribeDataSetPermissions.go", "api_op_DescribeDataSetRefreshProperties.go", @@ -160,6 +161,7 @@ "api_op_SearchDataSources.go", "api_op_SearchFolders.go", "api_op_SearchGroups.go", + "api_op_SearchTopics.go", "api_op_StartAssetBundleExportJob.go", "api_op_StartAssetBundleImportJob.go", "api_op_StartDashboardSnapshotJob.go", @@ -178,6 +180,7 @@ "api_op_UpdateDashboardLinks.go", "api_op_UpdateDashboardPermissions.go", "api_op_UpdateDashboardPublishedVersion.go", + "api_op_UpdateDashboardsQAConfiguration.go", "api_op_UpdateDataSet.go", "api_op_UpdateDataSetPermissions.go", "api_op_UpdateDataSource.go", diff --git a/service/quicksight/serializers.go b/service/quicksight/serializers.go index a583248cc9e..a6e6b9dd9ff 100644 --- a/service/quicksight/serializers.go +++ b/service/quicksight/serializers.go @@ -3080,6 +3080,13 @@ func awsRestjson1_serializeOpDocumentCreateTopicInput(v *CreateTopicInput, value object := value.Object() defer object.Close() + if v.FolderArns != nil { + ok := object.Key("FolderArns") + if err := awsRestjson1_serializeDocumentFolderArnList(v.FolderArns, ok); err != nil { + return err + } + } + if v.Tags != nil { ok := object.Key("Tags") if err := awsRestjson1_serializeDocumentTagList(v.Tags, ok); err != nil { @@ -7260,6 +7267,77 @@ func awsRestjson1_serializeOpHttpBindingsDescribeDashboardSnapshotJobResultInput return nil } +type awsRestjson1_serializeOpDescribeDashboardsQAConfiguration struct { +} + +func (*awsRestjson1_serializeOpDescribeDashboardsQAConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeDashboardsQAConfiguration) 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.(*DescribeDashboardsQAConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/dashboards-qa-configuration") + 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_serializeOpHttpBindingsDescribeDashboardsQAConfigurationInput(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_serializeOpHttpBindingsDescribeDashboardsQAConfigurationInput(v *DescribeDashboardsQAConfigurationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} + } + if v.AwsAccountId != nil { + if err := encoder.SetURI("AwsAccountId").String(*v.AwsAccountId); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpDescribeDataSet struct { } @@ -14157,6 +14235,112 @@ func awsRestjson1_serializeOpDocumentSearchGroupsInput(v *SearchGroupsInput, val return nil } +type awsRestjson1_serializeOpSearchTopics struct { +} + +func (*awsRestjson1_serializeOpSearchTopics) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpSearchTopics) 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.(*SearchTopicsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/search/topics") + 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_serializeOpHttpBindingsSearchTopicsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentSearchTopicsInput(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_serializeOpHttpBindingsSearchTopicsInput(v *SearchTopicsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} + } + if v.AwsAccountId != nil { + if err := encoder.SetURI("AwsAccountId").String(*v.AwsAccountId); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentSearchTopicsInput(v *SearchTopicsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsRestjson1_serializeDocumentTopicSearchFilterList(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) + } + + return nil +} + type awsRestjson1_serializeOpStartAssetBundleExportJob struct { } @@ -16142,6 +16326,100 @@ func awsRestjson1_serializeOpHttpBindingsUpdateDashboardPublishedVersionInput(v return nil } +type awsRestjson1_serializeOpUpdateDashboardsQAConfiguration struct { +} + +func (*awsRestjson1_serializeOpUpdateDashboardsQAConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateDashboardsQAConfiguration) 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.(*UpdateDashboardsQAConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/dashboards-qa-configuration") + 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_serializeOpHttpBindingsUpdateDashboardsQAConfigurationInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateDashboardsQAConfigurationInput(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_serializeOpHttpBindingsUpdateDashboardsQAConfigurationInput(v *UpdateDashboardsQAConfigurationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} + } + if v.AwsAccountId != nil { + if err := encoder.SetURI("AwsAccountId").String(*v.AwsAccountId); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateDashboardsQAConfigurationInput(v *UpdateDashboardsQAConfigurationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.DashboardsQAStatus) > 0 { + ok := object.Key("DashboardsQAStatus") + ok.String(string(v.DashboardsQAStatus)) + } + + return nil +} + type awsRestjson1_serializeOpUpdateDataSet struct { } @@ -19648,6 +19926,13 @@ func awsRestjson1_serializeDocumentAnalysisDefinition(v *types.AnalysisDefinitio } } + if v.StaticFiles != nil { + ok := object.Key("StaticFiles") + if err := awsRestjson1_serializeDocumentStaticFileList(v.StaticFiles, ok); err != nil { + return err + } + } + return nil } @@ -22247,6 +22532,11 @@ func awsRestjson1_serializeDocumentBarChartVisual(v *types.BarChartVisual, value } } + if v.VisualContentAltText != nil { + ok := object.Key("VisualContentAltText") + ok.String(*v.VisualContentAltText) + } + if v.VisualId != nil { ok := object.Key("VisualId") ok.String(*v.VisualId) @@ -22794,6 +23084,11 @@ func awsRestjson1_serializeDocumentBoxPlotVisual(v *types.BoxPlotVisual, value s } } + if v.VisualContentAltText != nil { + ok := object.Key("VisualContentAltText") + ok.String(*v.VisualContentAltText) + } + if v.VisualId != nil { ok := object.Key("VisualId") ok.String(*v.VisualId) @@ -24207,6 +24502,11 @@ func awsRestjson1_serializeDocumentComboChartVisual(v *types.ComboChartVisual, v } } + if v.VisualContentAltText != nil { + ok := object.Key("VisualContentAltText") + ok.String(*v.VisualContentAltText) + } + if v.VisualId != nil { ok := object.Key("VisualId") ok.String(*v.VisualId) @@ -24956,6 +25256,11 @@ func awsRestjson1_serializeDocumentCustomContentVisual(v *types.CustomContentVis } } + if v.VisualContentAltText != nil { + ok := object.Key("VisualContentAltText") + ok.String(*v.VisualContentAltText) + } + if v.VisualId != nil { ok := object.Key("VisualId") ok.String(*v.VisualId) @@ -25332,6 +25637,13 @@ func awsRestjson1_serializeDocumentDashboardVersionDefinition(v *types.Dashboard } } + if v.StaticFiles != nil { + ok := object.Key("StaticFiles") + if err := awsRestjson1_serializeDocumentStaticFileList(v.StaticFiles, ok); err != nil { + return err + } + } + return nil } @@ -28168,6 +28480,11 @@ func awsRestjson1_serializeDocumentFilledMapVisual(v *types.FilledMapVisual, val } } + if v.VisualContentAltText != nil { + ok := object.Key("VisualContentAltText") + ok.String(*v.VisualContentAltText) + } + if v.VisualId != nil { ok := object.Key("VisualId") ok.String(*v.VisualId) @@ -28973,6 +29290,11 @@ func awsRestjson1_serializeDocumentFontConfiguration(v *types.FontConfiguration, ok.String(string(v.FontDecoration)) } + if v.FontFamily != nil { + ok := object.Key("FontFamily") + ok.String(*v.FontFamily) + } + if v.FontSize != nil { ok := object.Key("FontSize") if err := awsRestjson1_serializeDocumentFontSize(v.FontSize, ok); err != nil { @@ -29012,6 +29334,11 @@ func awsRestjson1_serializeDocumentFontSize(v *types.FontSize, value smithyjson. object := value.Object() defer object.Close() + if v.Absolute != nil { + ok := object.Key("Absolute") + ok.String(*v.Absolute) + } + if len(v.Relative) > 0 { ok := object.Key("Relative") ok.String(string(v.Relative)) @@ -29620,6 +29947,11 @@ func awsRestjson1_serializeDocumentFunnelChartVisual(v *types.FunnelChartVisual, } } + if v.VisualContentAltText != nil { + ok := object.Key("VisualContentAltText") + ok.String(*v.VisualContentAltText) + } + if v.VisualId != nil { ok := object.Key("VisualId") ok.String(*v.VisualId) @@ -29884,6 +30216,11 @@ func awsRestjson1_serializeDocumentGaugeChartVisual(v *types.GaugeChartVisual, v } } + if v.VisualContentAltText != nil { + ok := object.Key("VisualContentAltText") + ok.String(*v.VisualContentAltText) + } + if v.VisualId != nil { ok := object.Key("VisualId") ok.String(*v.VisualId) @@ -29892,6 +30229,168 @@ func awsRestjson1_serializeDocumentGaugeChartVisual(v *types.GaugeChartVisual, v return nil } +func awsRestjson1_serializeDocumentGeospatialCategoricalColor(v *types.GeospatialCategoricalColor, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CategoryDataColors != nil { + ok := object.Key("CategoryDataColors") + if err := awsRestjson1_serializeDocumentGeospatialCategoricalDataColorList(v.CategoryDataColors, ok); err != nil { + return err + } + } + + if v.DefaultOpacity != nil { + ok := object.Key("DefaultOpacity") + switch { + case math.IsNaN(*v.DefaultOpacity): + ok.String("NaN") + + case math.IsInf(*v.DefaultOpacity, 1): + ok.String("Infinity") + + case math.IsInf(*v.DefaultOpacity, -1): + ok.String("-Infinity") + + default: + ok.Double(*v.DefaultOpacity) + + } + } + + if v.NullDataSettings != nil { + ok := object.Key("NullDataSettings") + if err := awsRestjson1_serializeDocumentGeospatialNullDataSettings(v.NullDataSettings, ok); err != nil { + return err + } + } + + if len(v.NullDataVisibility) > 0 { + ok := object.Key("NullDataVisibility") + ok.String(string(v.NullDataVisibility)) + } + + return nil +} + +func awsRestjson1_serializeDocumentGeospatialCategoricalDataColor(v *types.GeospatialCategoricalDataColor, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Color != nil { + ok := object.Key("Color") + ok.String(*v.Color) + } + + if v.DataValue != nil { + ok := object.Key("DataValue") + ok.String(*v.DataValue) + } + + return nil +} + +func awsRestjson1_serializeDocumentGeospatialCategoricalDataColorList(v []types.GeospatialCategoricalDataColor, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentGeospatialCategoricalDataColor(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentGeospatialCircleRadius(v *types.GeospatialCircleRadius, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Radius != nil { + ok := object.Key("Radius") + switch { + case math.IsNaN(*v.Radius): + ok.String("NaN") + + case math.IsInf(*v.Radius, 1): + ok.String("Infinity") + + case math.IsInf(*v.Radius, -1): + ok.String("-Infinity") + + default: + ok.Double(*v.Radius) + + } + } + + return nil +} + +func awsRestjson1_serializeDocumentGeospatialCircleSymbolStyle(v *types.GeospatialCircleSymbolStyle, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CircleRadius != nil { + ok := object.Key("CircleRadius") + if err := awsRestjson1_serializeDocumentGeospatialCircleRadius(v.CircleRadius, ok); err != nil { + return err + } + } + + if v.FillColor != nil { + ok := object.Key("FillColor") + if err := awsRestjson1_serializeDocumentGeospatialColor(v.FillColor, ok); err != nil { + return err + } + } + + if v.StrokeColor != nil { + ok := object.Key("StrokeColor") + if err := awsRestjson1_serializeDocumentGeospatialColor(v.StrokeColor, ok); err != nil { + return err + } + } + + if v.StrokeWidth != nil { + ok := object.Key("StrokeWidth") + if err := awsRestjson1_serializeDocumentGeospatialLineWidth(v.StrokeWidth, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentGeospatialColor(v *types.GeospatialColor, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Categorical != nil { + ok := object.Key("Categorical") + if err := awsRestjson1_serializeDocumentGeospatialCategoricalColor(v.Categorical, ok); err != nil { + return err + } + } + + if v.Gradient != nil { + ok := object.Key("Gradient") + if err := awsRestjson1_serializeDocumentGeospatialGradientColor(v.Gradient, ok); err != nil { + return err + } + } + + if v.Solid != nil { + ok := object.Key("Solid") + if err := awsRestjson1_serializeDocumentGeospatialSolidColor(v.Solid, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentGeoSpatialColumnGroup(v *types.GeoSpatialColumnGroup, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -29995,6 +30494,107 @@ func awsRestjson1_serializeDocumentGeospatialCoordinateBounds(v *types.Geospatia return nil } +func awsRestjson1_serializeDocumentGeospatialDataSourceItem(v *types.GeospatialDataSourceItem, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.StaticFileDataSource != nil { + ok := object.Key("StaticFileDataSource") + if err := awsRestjson1_serializeDocumentGeospatialStaticFileSource(v.StaticFileDataSource, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentGeospatialGradientColor(v *types.GeospatialGradientColor, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DefaultOpacity != nil { + ok := object.Key("DefaultOpacity") + switch { + case math.IsNaN(*v.DefaultOpacity): + ok.String("NaN") + + case math.IsInf(*v.DefaultOpacity, 1): + ok.String("Infinity") + + case math.IsInf(*v.DefaultOpacity, -1): + ok.String("-Infinity") + + default: + ok.Double(*v.DefaultOpacity) + + } + } + + if v.NullDataSettings != nil { + ok := object.Key("NullDataSettings") + if err := awsRestjson1_serializeDocumentGeospatialNullDataSettings(v.NullDataSettings, ok); err != nil { + return err + } + } + + if len(v.NullDataVisibility) > 0 { + ok := object.Key("NullDataVisibility") + ok.String(string(v.NullDataVisibility)) + } + + if v.StepColors != nil { + ok := object.Key("StepColors") + if err := awsRestjson1_serializeDocumentGeospatialGradientStepColorList(v.StepColors, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentGeospatialGradientStepColor(v *types.GeospatialGradientStepColor, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Color != nil { + ok := object.Key("Color") + ok.String(*v.Color) + } + + { + ok := object.Key("DataValue") + switch { + case math.IsNaN(v.DataValue): + ok.String("NaN") + + case math.IsInf(v.DataValue, 1): + ok.String("Infinity") + + case math.IsInf(v.DataValue, -1): + ok.String("-Infinity") + + default: + ok.Double(v.DataValue) + + } + } + + return nil +} + +func awsRestjson1_serializeDocumentGeospatialGradientStepColorList(v []types.GeospatialGradientStepColor, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentGeospatialGradientStepColor(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocumentGeospatialHeatmapColorScale(v *types.GeospatialHeatmapColorScale, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -30048,6 +30648,285 @@ func awsRestjson1_serializeDocumentGeospatialHeatmapDataColorList(v []types.Geos return nil } +func awsRestjson1_serializeDocumentGeospatialLayerColorField(v *types.GeospatialLayerColorField, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ColorDimensionsFields != nil { + ok := object.Key("ColorDimensionsFields") + if err := awsRestjson1_serializeDocumentGeospatialLayerDimensionFieldList(v.ColorDimensionsFields, ok); err != nil { + return err + } + } + + if v.ColorValuesFields != nil { + ok := object.Key("ColorValuesFields") + if err := awsRestjson1_serializeDocumentGeospatialLayerMeasureFieldList(v.ColorValuesFields, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentGeospatialLayerDefinition(v *types.GeospatialLayerDefinition, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LineLayer != nil { + ok := object.Key("LineLayer") + if err := awsRestjson1_serializeDocumentGeospatialLineLayer(v.LineLayer, ok); err != nil { + return err + } + } + + if v.PointLayer != nil { + ok := object.Key("PointLayer") + if err := awsRestjson1_serializeDocumentGeospatialPointLayer(v.PointLayer, ok); err != nil { + return err + } + } + + if v.PolygonLayer != nil { + ok := object.Key("PolygonLayer") + if err := awsRestjson1_serializeDocumentGeospatialPolygonLayer(v.PolygonLayer, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentGeospatialLayerDimensionFieldList(v []types.DimensionField, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentDimensionField(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentGeospatialLayerItem(v *types.GeospatialLayerItem, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Actions != nil { + ok := object.Key("Actions") + if err := awsRestjson1_serializeDocumentLayerCustomActionList(v.Actions, ok); err != nil { + return err + } + } + + if v.DataSource != nil { + ok := object.Key("DataSource") + if err := awsRestjson1_serializeDocumentGeospatialDataSourceItem(v.DataSource, ok); err != nil { + return err + } + } + + if v.JoinDefinition != nil { + ok := object.Key("JoinDefinition") + if err := awsRestjson1_serializeDocumentGeospatialLayerJoinDefinition(v.JoinDefinition, ok); err != nil { + return err + } + } + + if v.Label != nil { + ok := object.Key("Label") + ok.String(*v.Label) + } + + if v.LayerDefinition != nil { + ok := object.Key("LayerDefinition") + if err := awsRestjson1_serializeDocumentGeospatialLayerDefinition(v.LayerDefinition, ok); err != nil { + return err + } + } + + if v.LayerId != nil { + ok := object.Key("LayerId") + ok.String(*v.LayerId) + } + + if len(v.LayerType) > 0 { + ok := object.Key("LayerType") + ok.String(string(v.LayerType)) + } + + if v.Tooltip != nil { + ok := object.Key("Tooltip") + if err := awsRestjson1_serializeDocumentTooltipOptions(v.Tooltip, ok); err != nil { + return err + } + } + + if len(v.Visibility) > 0 { + ok := object.Key("Visibility") + ok.String(string(v.Visibility)) + } + + return nil +} + +func awsRestjson1_serializeDocumentGeospatialLayerJoinDefinition(v *types.GeospatialLayerJoinDefinition, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ColorField != nil { + ok := object.Key("ColorField") + if err := awsRestjson1_serializeDocumentGeospatialLayerColorField(v.ColorField, ok); err != nil { + return err + } + } + + if v.DatasetKeyField != nil { + ok := object.Key("DatasetKeyField") + if err := awsRestjson1_serializeDocumentUnaggregatedField(v.DatasetKeyField, ok); err != nil { + return err + } + } + + if v.ShapeKeyField != nil { + ok := object.Key("ShapeKeyField") + ok.String(*v.ShapeKeyField) + } + + return nil +} + +func awsRestjson1_serializeDocumentGeospatialLayerMapConfiguration(v *types.GeospatialLayerMapConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Interactions != nil { + ok := object.Key("Interactions") + if err := awsRestjson1_serializeDocumentVisualInteractionOptions(v.Interactions, ok); err != nil { + return err + } + } + + if v.Legend != nil { + ok := object.Key("Legend") + if err := awsRestjson1_serializeDocumentLegendOptions(v.Legend, ok); err != nil { + return err + } + } + + if v.MapLayers != nil { + ok := object.Key("MapLayers") + if err := awsRestjson1_serializeDocumentGeospatialMapLayerList(v.MapLayers, ok); err != nil { + return err + } + } + + if v.MapState != nil { + ok := object.Key("MapState") + if err := awsRestjson1_serializeDocumentGeospatialMapState(v.MapState, ok); err != nil { + return err + } + } + + if v.MapStyle != nil { + ok := object.Key("MapStyle") + if err := awsRestjson1_serializeDocumentGeospatialMapStyle(v.MapStyle, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentGeospatialLayerMeasureFieldList(v []types.MeasureField, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentMeasureField(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentGeospatialLineLayer(v *types.GeospatialLineLayer, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Style != nil { + ok := object.Key("Style") + if err := awsRestjson1_serializeDocumentGeospatialLineStyle(v.Style, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentGeospatialLineStyle(v *types.GeospatialLineStyle, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LineSymbolStyle != nil { + ok := object.Key("LineSymbolStyle") + if err := awsRestjson1_serializeDocumentGeospatialLineSymbolStyle(v.LineSymbolStyle, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentGeospatialLineSymbolStyle(v *types.GeospatialLineSymbolStyle, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.FillColor != nil { + ok := object.Key("FillColor") + if err := awsRestjson1_serializeDocumentGeospatialColor(v.FillColor, ok); err != nil { + return err + } + } + + if v.LineWidth != nil { + ok := object.Key("LineWidth") + if err := awsRestjson1_serializeDocumentGeospatialLineWidth(v.LineWidth, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentGeospatialLineWidth(v *types.GeospatialLineWidth, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LineWidth != nil { + ok := object.Key("LineWidth") + switch { + case math.IsNaN(*v.LineWidth): + ok.String("NaN") + + case math.IsInf(*v.LineWidth, 1): + ok.String("Infinity") + + case math.IsInf(*v.LineWidth, -1): + ok.String("-Infinity") + + default: + ok.Double(*v.LineWidth) + + } + } + + return nil +} + func awsRestjson1_serializeDocumentGeospatialMapAggregatedFieldWells(v *types.GeospatialMapAggregatedFieldWells, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -30153,6 +31032,60 @@ func awsRestjson1_serializeDocumentGeospatialMapFieldWells(v *types.GeospatialMa return nil } +func awsRestjson1_serializeDocumentGeospatialMapLayerList(v []types.GeospatialLayerItem, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentGeospatialLayerItem(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentGeospatialMapState(v *types.GeospatialMapState, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Bounds != nil { + ok := object.Key("Bounds") + if err := awsRestjson1_serializeDocumentGeospatialCoordinateBounds(v.Bounds, ok); err != nil { + return err + } + } + + if len(v.MapNavigation) > 0 { + ok := object.Key("MapNavigation") + ok.String(string(v.MapNavigation)) + } + + return nil +} + +func awsRestjson1_serializeDocumentGeospatialMapStyle(v *types.GeospatialMapStyle, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BackgroundColor != nil { + ok := object.Key("BackgroundColor") + ok.String(*v.BackgroundColor) + } + + if len(v.BaseMapStyle) > 0 { + ok := object.Key("BaseMapStyle") + ok.String(string(v.BaseMapStyle)) + } + + if len(v.BaseMapVisibility) > 0 { + ok := object.Key("BaseMapVisibility") + ok.String(string(v.BaseMapVisibility)) + } + + return nil +} + func awsRestjson1_serializeDocumentGeospatialMapStyleOptions(v *types.GeospatialMapStyleOptions, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -30204,6 +31137,11 @@ func awsRestjson1_serializeDocumentGeospatialMapVisual(v *types.GeospatialMapVis } } + if v.VisualContentAltText != nil { + ok := object.Key("VisualContentAltText") + ok.String(*v.VisualContentAltText) + } + if v.VisualId != nil { ok := object.Key("VisualId") ok.String(*v.VisualId) @@ -30212,6 +31150,83 @@ func awsRestjson1_serializeDocumentGeospatialMapVisual(v *types.GeospatialMapVis return nil } +func awsRestjson1_serializeDocumentGeospatialNullDataSettings(v *types.GeospatialNullDataSettings, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.SymbolStyle != nil { + ok := object.Key("SymbolStyle") + if err := awsRestjson1_serializeDocumentGeospatialNullSymbolStyle(v.SymbolStyle, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentGeospatialNullSymbolStyle(v *types.GeospatialNullSymbolStyle, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.FillColor != nil { + ok := object.Key("FillColor") + ok.String(*v.FillColor) + } + + if v.StrokeColor != nil { + ok := object.Key("StrokeColor") + ok.String(*v.StrokeColor) + } + + if v.StrokeWidth != nil { + ok := object.Key("StrokeWidth") + switch { + case math.IsNaN(*v.StrokeWidth): + ok.String("NaN") + + case math.IsInf(*v.StrokeWidth, 1): + ok.String("Infinity") + + case math.IsInf(*v.StrokeWidth, -1): + ok.String("-Infinity") + + default: + ok.Double(*v.StrokeWidth) + + } + } + + return nil +} + +func awsRestjson1_serializeDocumentGeospatialPointLayer(v *types.GeospatialPointLayer, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Style != nil { + ok := object.Key("Style") + if err := awsRestjson1_serializeDocumentGeospatialPointStyle(v.Style, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentGeospatialPointStyle(v *types.GeospatialPointStyle, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CircleSymbolStyle != nil { + ok := object.Key("CircleSymbolStyle") + if err := awsRestjson1_serializeDocumentGeospatialCircleSymbolStyle(v.CircleSymbolStyle, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentGeospatialPointStyleOptions(v *types.GeospatialPointStyleOptions, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -30238,6 +31253,91 @@ func awsRestjson1_serializeDocumentGeospatialPointStyleOptions(v *types.Geospati return nil } +func awsRestjson1_serializeDocumentGeospatialPolygonLayer(v *types.GeospatialPolygonLayer, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Style != nil { + ok := object.Key("Style") + if err := awsRestjson1_serializeDocumentGeospatialPolygonStyle(v.Style, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentGeospatialPolygonStyle(v *types.GeospatialPolygonStyle, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.PolygonSymbolStyle != nil { + ok := object.Key("PolygonSymbolStyle") + if err := awsRestjson1_serializeDocumentGeospatialPolygonSymbolStyle(v.PolygonSymbolStyle, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentGeospatialPolygonSymbolStyle(v *types.GeospatialPolygonSymbolStyle, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.FillColor != nil { + ok := object.Key("FillColor") + if err := awsRestjson1_serializeDocumentGeospatialColor(v.FillColor, ok); err != nil { + return err + } + } + + if v.StrokeColor != nil { + ok := object.Key("StrokeColor") + if err := awsRestjson1_serializeDocumentGeospatialColor(v.StrokeColor, ok); err != nil { + return err + } + } + + if v.StrokeWidth != nil { + ok := object.Key("StrokeWidth") + if err := awsRestjson1_serializeDocumentGeospatialLineWidth(v.StrokeWidth, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentGeospatialSolidColor(v *types.GeospatialSolidColor, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Color != nil { + ok := object.Key("Color") + ok.String(*v.Color) + } + + if len(v.State) > 0 { + ok := object.Key("State") + ok.String(string(v.State)) + } + + return nil +} + +func awsRestjson1_serializeDocumentGeospatialStaticFileSource(v *types.GeospatialStaticFileSource, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.StaticFileId != nil { + ok := object.Key("StaticFileId") + ok.String(*v.StaticFileId) + } + + return nil +} + func awsRestjson1_serializeDocumentGeospatialWindowOptions(v *types.GeospatialWindowOptions, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -30800,6 +31900,11 @@ func awsRestjson1_serializeDocumentHeatMapVisual(v *types.HeatMapVisual, value s } } + if v.VisualContentAltText != nil { + ok := object.Key("VisualContentAltText") + ok.String(*v.VisualContentAltText) + } + if v.VisualId != nil { ok := object.Key("VisualId") ok.String(*v.VisualId) @@ -30995,6 +32100,11 @@ func awsRestjson1_serializeDocumentHistogramVisual(v *types.HistogramVisual, val } } + if v.VisualContentAltText != nil { + ok := object.Key("VisualContentAltText") + ok.String(*v.VisualContentAltText) + } + if v.VisualId != nil { ok := object.Key("VisualId") ok.String(*v.VisualId) @@ -31068,6 +32178,120 @@ func awsRestjson1_serializeDocumentImageConfiguration(v *types.ImageConfiguratio return nil } +func awsRestjson1_serializeDocumentImageCustomAction(v *types.ImageCustomAction, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ActionOperations != nil { + ok := object.Key("ActionOperations") + if err := awsRestjson1_serializeDocumentImageCustomActionOperationList(v.ActionOperations, ok); err != nil { + return err + } + } + + if v.CustomActionId != nil { + ok := object.Key("CustomActionId") + ok.String(*v.CustomActionId) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if len(v.Status) > 0 { + ok := object.Key("Status") + ok.String(string(v.Status)) + } + + if len(v.Trigger) > 0 { + ok := object.Key("Trigger") + ok.String(string(v.Trigger)) + } + + return nil +} + +func awsRestjson1_serializeDocumentImageCustomActionList(v []types.ImageCustomAction, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentImageCustomAction(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentImageCustomActionOperation(v *types.ImageCustomActionOperation, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.NavigationOperation != nil { + ok := object.Key("NavigationOperation") + if err := awsRestjson1_serializeDocumentCustomActionNavigationOperation(v.NavigationOperation, ok); err != nil { + return err + } + } + + if v.SetParametersOperation != nil { + ok := object.Key("SetParametersOperation") + if err := awsRestjson1_serializeDocumentCustomActionSetParametersOperation(v.SetParametersOperation, ok); err != nil { + return err + } + } + + if v.URLOperation != nil { + ok := object.Key("URLOperation") + if err := awsRestjson1_serializeDocumentCustomActionURLOperation(v.URLOperation, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentImageCustomActionOperationList(v []types.ImageCustomActionOperation, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentImageCustomActionOperation(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentImageInteractionOptions(v *types.ImageInteractionOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ImageMenuOption != nil { + ok := object.Key("ImageMenuOption") + if err := awsRestjson1_serializeDocumentImageMenuOption(v.ImageMenuOption, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentImageMenuOption(v *types.ImageMenuOption, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.AvailabilityStatus) > 0 { + ok := object.Key("AvailabilityStatus") + ok.String(string(v.AvailabilityStatus)) + } + + return nil +} + func awsRestjson1_serializeDocumentImageSetConfiguration(v *types.ImageSetConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -31102,6 +32326,25 @@ func awsRestjson1_serializeDocumentImageSource(v types.ImageSource, value smithy return nil } +func awsRestjson1_serializeDocumentImageStaticFile(v *types.ImageStaticFile, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Source != nil { + ok := object.Key("Source") + if err := awsRestjson1_serializeDocumentStaticFileSource(v.Source, ok); err != nil { + return err + } + } + + if v.StaticFileId != nil { + ok := object.Key("StaticFileId") + ok.String(*v.StaticFileId) + } + + return nil +} + func awsRestjson1_serializeDocumentIncrementalRefresh(v *types.IncrementalRefresh, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -31230,6 +32473,11 @@ func awsRestjson1_serializeDocumentInsightVisual(v *types.InsightVisual, value s } } + if v.VisualContentAltText != nil { + ok := object.Key("VisualContentAltText") + ok.String(*v.VisualContentAltText) + } + if v.VisualId != nil { ok := object.Key("VisualId") ok.String(*v.VisualId) @@ -31874,6 +33122,11 @@ func awsRestjson1_serializeDocumentKPIVisual(v *types.KPIVisual, value smithyjso } } + if v.VisualContentAltText != nil { + ok := object.Key("VisualContentAltText") + ok.String(*v.VisualContentAltText) + } + if v.VisualId != nil { ok := object.Key("VisualId") ok.String(*v.VisualId) @@ -31932,6 +33185,144 @@ func awsRestjson1_serializeDocumentLabelOptions(v *types.LabelOptions, value smi return nil } +func awsRestjson1_serializeDocumentLayerCustomAction(v *types.LayerCustomAction, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ActionOperations != nil { + ok := object.Key("ActionOperations") + if err := awsRestjson1_serializeDocumentLayerCustomActionOperationList(v.ActionOperations, ok); err != nil { + return err + } + } + + if v.CustomActionId != nil { + ok := object.Key("CustomActionId") + ok.String(*v.CustomActionId) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if len(v.Status) > 0 { + ok := object.Key("Status") + ok.String(string(v.Status)) + } + + if len(v.Trigger) > 0 { + ok := object.Key("Trigger") + ok.String(string(v.Trigger)) + } + + return nil +} + +func awsRestjson1_serializeDocumentLayerCustomActionList(v []types.LayerCustomAction, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentLayerCustomAction(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentLayerCustomActionOperation(v *types.LayerCustomActionOperation, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.FilterOperation != nil { + ok := object.Key("FilterOperation") + if err := awsRestjson1_serializeDocumentCustomActionFilterOperation(v.FilterOperation, ok); err != nil { + return err + } + } + + if v.NavigationOperation != nil { + ok := object.Key("NavigationOperation") + if err := awsRestjson1_serializeDocumentCustomActionNavigationOperation(v.NavigationOperation, ok); err != nil { + return err + } + } + + if v.SetParametersOperation != nil { + ok := object.Key("SetParametersOperation") + if err := awsRestjson1_serializeDocumentCustomActionSetParametersOperation(v.SetParametersOperation, ok); err != nil { + return err + } + } + + if v.URLOperation != nil { + ok := object.Key("URLOperation") + if err := awsRestjson1_serializeDocumentCustomActionURLOperation(v.URLOperation, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentLayerCustomActionOperationList(v []types.LayerCustomActionOperation, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentLayerCustomActionOperation(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentLayerMapVisual(v *types.LayerMapVisual, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ChartConfiguration != nil { + ok := object.Key("ChartConfiguration") + if err := awsRestjson1_serializeDocumentGeospatialLayerMapConfiguration(v.ChartConfiguration, ok); err != nil { + return err + } + } + + if v.DataSetIdentifier != nil { + ok := object.Key("DataSetIdentifier") + ok.String(*v.DataSetIdentifier) + } + + if v.Subtitle != nil { + ok := object.Key("Subtitle") + if err := awsRestjson1_serializeDocumentVisualSubtitleLabelOptions(v.Subtitle, ok); err != nil { + return err + } + } + + if v.Title != nil { + ok := object.Key("Title") + if err := awsRestjson1_serializeDocumentVisualTitleLabelOptions(v.Title, ok); err != nil { + return err + } + } + + if v.VisualContentAltText != nil { + ok := object.Key("VisualContentAltText") + ok.String(*v.VisualContentAltText) + } + + if v.VisualId != nil { + ok := object.Key("VisualId") + ok.String(*v.VisualId) + } + + return nil +} + func awsRestjson1_serializeDocumentLayout(v *types.Layout, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -32008,6 +33399,13 @@ func awsRestjson1_serializeDocumentLegendOptions(v *types.LegendOptions, value s } } + if v.ValueFontConfiguration != nil { + ok := object.Key("ValueFontConfiguration") + if err := awsRestjson1_serializeDocumentFontConfiguration(v.ValueFontConfiguration, ok); err != nil { + return err + } + } + if len(v.Visibility) > 0 { ok := object.Key("Visibility") ok.String(string(v.Visibility)) @@ -32404,6 +33802,11 @@ func awsRestjson1_serializeDocumentLineChartVisual(v *types.LineChartVisual, val } } + if v.VisualContentAltText != nil { + ok := object.Key("VisualContentAltText") + ok.String(*v.VisualContentAltText) + } + if v.VisualId != nil { ok := object.Key("VisualId") ok.String(*v.VisualId) @@ -34676,6 +36079,11 @@ func awsRestjson1_serializeDocumentPieChartVisual(v *types.PieChartVisual, value } } + if v.VisualContentAltText != nil { + ok := object.Key("VisualContentAltText") + ok.String(*v.VisualContentAltText) + } + if v.VisualId != nil { ok := object.Key("VisualId") ok.String(*v.VisualId) @@ -35344,6 +36752,11 @@ func awsRestjson1_serializeDocumentPivotTableVisual(v *types.PivotTableVisual, v } } + if v.VisualContentAltText != nil { + ok := object.Key("VisualContentAltText") + ok.String(*v.VisualContentAltText) + } + if v.VisualId != nil { ok := object.Key("VisualId") ok.String(*v.VisualId) @@ -35407,6 +36820,214 @@ func awsRestjson1_serializeDocumentPivotTotalOptions(v *types.PivotTotalOptions, return nil } +func awsRestjson1_serializeDocumentPluginVisual(v *types.PluginVisual, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ChartConfiguration != nil { + ok := object.Key("ChartConfiguration") + if err := awsRestjson1_serializeDocumentPluginVisualConfiguration(v.ChartConfiguration, ok); err != nil { + return err + } + } + + if v.PluginArn != nil { + ok := object.Key("PluginArn") + ok.String(*v.PluginArn) + } + + if v.Subtitle != nil { + ok := object.Key("Subtitle") + if err := awsRestjson1_serializeDocumentVisualSubtitleLabelOptions(v.Subtitle, ok); err != nil { + return err + } + } + + if v.Title != nil { + ok := object.Key("Title") + if err := awsRestjson1_serializeDocumentVisualTitleLabelOptions(v.Title, ok); err != nil { + return err + } + } + + if v.VisualContentAltText != nil { + ok := object.Key("VisualContentAltText") + ok.String(*v.VisualContentAltText) + } + + if v.VisualId != nil { + ok := object.Key("VisualId") + ok.String(*v.VisualId) + } + + return nil +} + +func awsRestjson1_serializeDocumentPluginVisualConfiguration(v *types.PluginVisualConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.FieldWells != nil { + ok := object.Key("FieldWells") + if err := awsRestjson1_serializeDocumentPluginVisualFieldWells(v.FieldWells, ok); err != nil { + return err + } + } + + if v.SortConfiguration != nil { + ok := object.Key("SortConfiguration") + if err := awsRestjson1_serializeDocumentPluginVisualSortConfiguration(v.SortConfiguration, ok); err != nil { + return err + } + } + + if v.VisualOptions != nil { + ok := object.Key("VisualOptions") + if err := awsRestjson1_serializeDocumentPluginVisualOptions(v.VisualOptions, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentPluginVisualFieldWell(v *types.PluginVisualFieldWell, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.AxisName) > 0 { + ok := object.Key("AxisName") + ok.String(string(v.AxisName)) + } + + if v.Dimensions != nil { + ok := object.Key("Dimensions") + if err := awsRestjson1_serializeDocumentDimensionFieldList(v.Dimensions, ok); err != nil { + return err + } + } + + if v.Measures != nil { + ok := object.Key("Measures") + if err := awsRestjson1_serializeDocumentMeasureFieldList(v.Measures, ok); err != nil { + return err + } + } + + if v.Unaggregated != nil { + ok := object.Key("Unaggregated") + if err := awsRestjson1_serializeDocumentUnaggregatedFieldList(v.Unaggregated, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentPluginVisualFieldWells(v []types.PluginVisualFieldWell, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentPluginVisualFieldWell(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentPluginVisualItemsLimitConfiguration(v *types.PluginVisualItemsLimitConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ItemsLimit != nil { + ok := object.Key("ItemsLimit") + ok.Long(*v.ItemsLimit) + } + + return nil +} + +func awsRestjson1_serializeDocumentPluginVisualOptions(v *types.PluginVisualOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.VisualProperties != nil { + ok := object.Key("VisualProperties") + if err := awsRestjson1_serializeDocumentPluginVisualPropertiesList(v.VisualProperties, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentPluginVisualPropertiesList(v []types.PluginVisualProperty, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentPluginVisualProperty(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentPluginVisualProperty(v *types.PluginVisualProperty, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.Value != nil { + ok := object.Key("Value") + ok.String(*v.Value) + } + + return nil +} + +func awsRestjson1_serializeDocumentPluginVisualSortConfiguration(v *types.PluginVisualSortConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.PluginVisualTableQuerySort != nil { + ok := object.Key("PluginVisualTableQuerySort") + if err := awsRestjson1_serializeDocumentPluginVisualTableQuerySort(v.PluginVisualTableQuerySort, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentPluginVisualTableQuerySort(v *types.PluginVisualTableQuerySort, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ItemsLimitConfiguration != nil { + ok := object.Key("ItemsLimitConfiguration") + if err := awsRestjson1_serializeDocumentPluginVisualItemsLimitConfiguration(v.ItemsLimitConfiguration, ok); err != nil { + return err + } + } + + if v.RowSort != nil { + ok := object.Key("RowSort") + if err := awsRestjson1_serializeDocumentRowSortList(v.RowSort, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentPostgreSqlParameters(v *types.PostgreSqlParameters, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -35851,6 +37472,11 @@ func awsRestjson1_serializeDocumentRadarChartVisual(v *types.RadarChartVisual, v } } + if v.VisualContentAltText != nil { + ok := object.Key("VisualContentAltText") + ok.String(*v.VisualContentAltText) + } + if v.VisualId != nil { ok := object.Key("VisualId") ok.String(*v.VisualId) @@ -37049,6 +38675,11 @@ func awsRestjson1_serializeDocumentSankeyDiagramVisual(v *types.SankeyDiagramVis } } + if v.VisualContentAltText != nil { + ok := object.Key("VisualContentAltText") + ok.String(*v.VisualContentAltText) + } + if v.VisualId != nil { ok := object.Key("VisualId") ok.String(*v.VisualId) @@ -37299,6 +38930,11 @@ func awsRestjson1_serializeDocumentScatterPlotVisual(v *types.ScatterPlotVisual, } } + if v.VisualContentAltText != nil { + ok := object.Key("VisualContentAltText") + ok.String(*v.VisualContentAltText) + } + if v.VisualId != nil { ok := object.Key("VisualId") ok.String(*v.VisualId) @@ -37877,6 +39513,13 @@ func awsRestjson1_serializeDocumentSheetDefinition(v *types.SheetDefinition, val } } + if v.Images != nil { + ok := object.Key("Images") + if err := awsRestjson1_serializeDocumentSheetImageList(v.Images, ok); err != nil { + return err + } + } + if v.Layouts != nil { ok := object.Key("Layouts") if err := awsRestjson1_serializeDocumentLayoutList(v.Layouts, ok); err != nil { @@ -37987,6 +39630,140 @@ func awsRestjson1_serializeDocumentSheetElementRenderingRuleList(v []types.Sheet return nil } +func awsRestjson1_serializeDocumentSheetImage(v *types.SheetImage, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Actions != nil { + ok := object.Key("Actions") + if err := awsRestjson1_serializeDocumentImageCustomActionList(v.Actions, ok); err != nil { + return err + } + } + + if v.ImageContentAltText != nil { + ok := object.Key("ImageContentAltText") + ok.String(*v.ImageContentAltText) + } + + if v.Interactions != nil { + ok := object.Key("Interactions") + if err := awsRestjson1_serializeDocumentImageInteractionOptions(v.Interactions, ok); err != nil { + return err + } + } + + if v.Scaling != nil { + ok := object.Key("Scaling") + if err := awsRestjson1_serializeDocumentSheetImageScalingConfiguration(v.Scaling, ok); err != nil { + return err + } + } + + if v.SheetImageId != nil { + ok := object.Key("SheetImageId") + ok.String(*v.SheetImageId) + } + + if v.Source != nil { + ok := object.Key("Source") + if err := awsRestjson1_serializeDocumentSheetImageSource(v.Source, ok); err != nil { + return err + } + } + + if v.Tooltip != nil { + ok := object.Key("Tooltip") + if err := awsRestjson1_serializeDocumentSheetImageTooltipConfiguration(v.Tooltip, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentSheetImageList(v []types.SheetImage, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentSheetImage(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentSheetImageScalingConfiguration(v *types.SheetImageScalingConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.ScalingType) > 0 { + ok := object.Key("ScalingType") + ok.String(string(v.ScalingType)) + } + + return nil +} + +func awsRestjson1_serializeDocumentSheetImageSource(v *types.SheetImageSource, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.SheetImageStaticFileSource != nil { + ok := object.Key("SheetImageStaticFileSource") + if err := awsRestjson1_serializeDocumentSheetImageStaticFileSource(v.SheetImageStaticFileSource, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentSheetImageStaticFileSource(v *types.SheetImageStaticFileSource, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.StaticFileId != nil { + ok := object.Key("StaticFileId") + ok.String(*v.StaticFileId) + } + + return nil +} + +func awsRestjson1_serializeDocumentSheetImageTooltipConfiguration(v *types.SheetImageTooltipConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.TooltipText != nil { + ok := object.Key("TooltipText") + if err := awsRestjson1_serializeDocumentSheetImageTooltipText(v.TooltipText, ok); err != nil { + return err + } + } + + if len(v.Visibility) > 0 { + ok := object.Key("Visibility") + ok.String(string(v.Visibility)) + } + + return nil +} + +func awsRestjson1_serializeDocumentSheetImageTooltipText(v *types.SheetImageTooltipText, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.PlainText != nil { + ok := object.Key("PlainText") + ok.String(*v.PlainText) + } + + return nil +} + func awsRestjson1_serializeDocumentSheetLayoutElementMaximizationOption(v *types.SheetLayoutElementMaximizationOption, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -38549,6 +40326,25 @@ func awsRestjson1_serializeDocumentSparkParameters(v *types.SparkParameters, val return nil } +func awsRestjson1_serializeDocumentSpatialStaticFile(v *types.SpatialStaticFile, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Source != nil { + ok := object.Key("Source") + if err := awsRestjson1_serializeDocumentStaticFileSource(v.Source, ok); err != nil { + return err + } + } + + if v.StaticFileId != nil { + ok := object.Key("StaticFileId") + ok.String(*v.StaticFileId) + } + + return nil +} + func awsRestjson1_serializeDocumentSqlServerParameters(v *types.SqlServerParameters, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -38639,6 +40435,95 @@ func awsRestjson1_serializeDocumentStatePersistenceConfigurations(v *types.State return nil } +func awsRestjson1_serializeDocumentStaticFile(v *types.StaticFile, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ImageStaticFile != nil { + ok := object.Key("ImageStaticFile") + if err := awsRestjson1_serializeDocumentImageStaticFile(v.ImageStaticFile, ok); err != nil { + return err + } + } + + if v.SpatialStaticFile != nil { + ok := object.Key("SpatialStaticFile") + if err := awsRestjson1_serializeDocumentSpatialStaticFile(v.SpatialStaticFile, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentStaticFileList(v []types.StaticFile, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentStaticFile(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentStaticFileS3SourceOptions(v *types.StaticFileS3SourceOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BucketName != nil { + ok := object.Key("BucketName") + ok.String(*v.BucketName) + } + + if v.ObjectKey != nil { + ok := object.Key("ObjectKey") + ok.String(*v.ObjectKey) + } + + if v.Region != nil { + ok := object.Key("Region") + ok.String(*v.Region) + } + + return nil +} + +func awsRestjson1_serializeDocumentStaticFileSource(v *types.StaticFileSource, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.S3Options != nil { + ok := object.Key("S3Options") + if err := awsRestjson1_serializeDocumentStaticFileS3SourceOptions(v.S3Options, ok); err != nil { + return err + } + } + + if v.UrlOptions != nil { + ok := object.Key("UrlOptions") + if err := awsRestjson1_serializeDocumentStaticFileUrlSourceOptions(v.UrlOptions, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentStaticFileUrlSourceOptions(v *types.StaticFileUrlSourceOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Url != nil { + ok := object.Key("Url") + ok.String(*v.Url) + } + + return nil +} + func awsRestjson1_serializeDocumentStringDatasetParameter(v *types.StringDatasetParameter, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -39632,6 +41517,11 @@ func awsRestjson1_serializeDocumentTableVisual(v *types.TableVisual, value smith } } + if v.VisualContentAltText != nil { + ok := object.Key("VisualContentAltText") + ok.String(*v.VisualContentAltText) + } + if v.VisualId != nil { ok := object.Key("VisualId") ok.String(*v.VisualId) @@ -39819,6 +41709,13 @@ func awsRestjson1_serializeDocumentTemplateVersionDefinition(v *types.TemplateVe } } + if v.StaticFiles != nil { + ok := object.Key("StaticFiles") + if err := awsRestjson1_serializeDocumentStaticFileList(v.StaticFiles, ok); err != nil { + return err + } + } + return nil } @@ -41494,6 +43391,41 @@ func awsRestjson1_serializeDocumentTopicRelativeDateFilter(v *types.TopicRelativ return nil } +func awsRestjson1_serializeDocumentTopicSearchFilter(v *types.TopicSearchFilter, 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 len(v.Operator) > 0 { + ok := object.Key("Operator") + ok.String(string(v.Operator)) + } + + if v.Value != nil { + ok := object.Key("Value") + ok.String(*v.Value) + } + + return nil +} + +func awsRestjson1_serializeDocumentTopicSearchFilterList(v []types.TopicSearchFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentTopicSearchFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocumentTopicSingularFilterConstant(v *types.TopicSingularFilterConstant, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -41983,6 +43915,11 @@ func awsRestjson1_serializeDocumentTreeMapVisual(v *types.TreeMapVisual, value s } } + if v.VisualContentAltText != nil { + ok := object.Key("VisualContentAltText") + ok.String(*v.VisualContentAltText) + } + if v.VisualId != nil { ok := object.Key("VisualId") ok.String(*v.VisualId) @@ -42415,6 +44352,13 @@ func awsRestjson1_serializeDocumentVisual(v *types.Visual, value smithyjson.Valu } } + if v.LayerMapVisual != nil { + ok := object.Key("LayerMapVisual") + if err := awsRestjson1_serializeDocumentLayerMapVisual(v.LayerMapVisual, ok); err != nil { + return err + } + } + if v.LineChartVisual != nil { ok := object.Key("LineChartVisual") if err := awsRestjson1_serializeDocumentLineChartVisual(v.LineChartVisual, ok); err != nil { @@ -42436,6 +44380,13 @@ func awsRestjson1_serializeDocumentVisual(v *types.Visual, value smithyjson.Valu } } + if v.PluginVisual != nil { + ok := object.Key("PluginVisual") + if err := awsRestjson1_serializeDocumentPluginVisual(v.PluginVisual, ok); err != nil { + return err + } + } + if v.RadarChartVisual != nil { ok := object.Key("RadarChartVisual") if err := awsRestjson1_serializeDocumentRadarChartVisual(v.RadarChartVisual, ok); err != nil { @@ -42985,6 +44936,11 @@ func awsRestjson1_serializeDocumentWaterfallVisual(v *types.WaterfallVisual, val } } + if v.VisualContentAltText != nil { + ok := object.Key("VisualContentAltText") + ok.String(*v.VisualContentAltText) + } + if v.VisualId != nil { ok := object.Key("VisualId") ok.String(*v.VisualId) @@ -43258,6 +45214,11 @@ func awsRestjson1_serializeDocumentWordCloudVisual(v *types.WordCloudVisual, val } } + if v.VisualContentAltText != nil { + ok := object.Key("VisualContentAltText") + ok.String(*v.VisualContentAltText) + } + if v.VisualId != nil { ok := object.Key("VisualId") ok.String(*v.VisualId) diff --git a/service/quicksight/snapshot/api_op_DescribeDashboardsQAConfiguration.go.snap b/service/quicksight/snapshot/api_op_DescribeDashboardsQAConfiguration.go.snap new file mode 100644 index 00000000000..3cb8702a059 --- /dev/null +++ b/service/quicksight/snapshot/api_op_DescribeDashboardsQAConfiguration.go.snap @@ -0,0 +1,41 @@ +DescribeDashboardsQAConfiguration + 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/quicksight/snapshot/api_op_SearchTopics.go.snap b/service/quicksight/snapshot/api_op_SearchTopics.go.snap new file mode 100644 index 00000000000..7806f817efd --- /dev/null +++ b/service/quicksight/snapshot/api_op_SearchTopics.go.snap @@ -0,0 +1,41 @@ +SearchTopics + 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/quicksight/snapshot/api_op_UpdateDashboardsQAConfiguration.go.snap b/service/quicksight/snapshot/api_op_UpdateDashboardsQAConfiguration.go.snap new file mode 100644 index 00000000000..5e6bf99dc4e --- /dev/null +++ b/service/quicksight/snapshot/api_op_UpdateDashboardsQAConfiguration.go.snap @@ -0,0 +1,41 @@ +UpdateDashboardsQAConfiguration + 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/quicksight/snapshot_test.go b/service/quicksight/snapshot_test.go index 177fc3f539d..4879330e679 100644 --- a/service/quicksight/snapshot_test.go +++ b/service/quicksight/snapshot_test.go @@ -950,6 +950,18 @@ func TestCheckSnapshot_DescribeDashboardSnapshotJobResult(t *testing.T) { } } +func TestCheckSnapshot_DescribeDashboardsQAConfiguration(t *testing.T) { + svc := New(Options{}) + _, err := svc.DescribeDashboardsQAConfiguration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DescribeDashboardsQAConfiguration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DescribeDataSet(t *testing.T) { svc := New(Options{}) _, err := svc.DescribeDataSet(context.Background(), nil, func(o *Options) { @@ -1886,6 +1898,18 @@ func TestCheckSnapshot_SearchGroups(t *testing.T) { } } +func TestCheckSnapshot_SearchTopics(t *testing.T) { + svc := New(Options{}) + _, err := svc.SearchTopics(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "SearchTopics") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_StartAssetBundleExportJob(t *testing.T) { svc := New(Options{}) _, err := svc.StartAssetBundleExportJob(context.Background(), nil, func(o *Options) { @@ -2102,6 +2126,18 @@ func TestCheckSnapshot_UpdateDashboardPublishedVersion(t *testing.T) { } } +func TestCheckSnapshot_UpdateDashboardsQAConfiguration(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateDashboardsQAConfiguration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "UpdateDashboardsQAConfiguration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_UpdateDataSet(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateDataSet(context.Background(), nil, func(o *Options) { @@ -3325,6 +3361,18 @@ func TestUpdateSnapshot_DescribeDashboardSnapshotJobResult(t *testing.T) { } } +func TestUpdateSnapshot_DescribeDashboardsQAConfiguration(t *testing.T) { + svc := New(Options{}) + _, err := svc.DescribeDashboardsQAConfiguration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DescribeDashboardsQAConfiguration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DescribeDataSet(t *testing.T) { svc := New(Options{}) _, err := svc.DescribeDataSet(context.Background(), nil, func(o *Options) { @@ -4261,6 +4309,18 @@ func TestUpdateSnapshot_SearchGroups(t *testing.T) { } } +func TestUpdateSnapshot_SearchTopics(t *testing.T) { + svc := New(Options{}) + _, err := svc.SearchTopics(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "SearchTopics") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_StartAssetBundleExportJob(t *testing.T) { svc := New(Options{}) _, err := svc.StartAssetBundleExportJob(context.Background(), nil, func(o *Options) { @@ -4477,6 +4537,18 @@ func TestUpdateSnapshot_UpdateDashboardPublishedVersion(t *testing.T) { } } +func TestUpdateSnapshot_UpdateDashboardsQAConfiguration(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateDashboardsQAConfiguration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "UpdateDashboardsQAConfiguration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_UpdateDataSet(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateDataSet(context.Background(), nil, func(o *Options) { diff --git a/service/quicksight/types/enums.go b/service/quicksight/types/enums.go index 650e956b25b..a85c179980b 100644 --- a/service/quicksight/types/enums.go +++ b/service/quicksight/types/enums.go @@ -1365,6 +1365,25 @@ func (DashboardFilterAttribute) Values() []DashboardFilterAttribute { } } +type DashboardsQAStatus string + +// Enum values for DashboardsQAStatus +const ( + DashboardsQAStatusEnabled DashboardsQAStatus = "ENABLED" + DashboardsQAStatusDisabled DashboardsQAStatus = "DISABLED" +) + +// Values returns all known values for DashboardsQAStatus. 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 (DashboardsQAStatus) Values() []DashboardsQAStatus { + return []DashboardsQAStatus{ + "ENABLED", + "DISABLED", + } +} + type DashboardUIState string // Enum values for DashboardUIState @@ -2121,6 +2140,25 @@ func (FunnelChartMeasureDataLabelStyle) Values() []FunnelChartMeasureDataLabelSt } } +type GeospatialColorState string + +// Enum values for GeospatialColorState +const ( + GeospatialColorStateEnabled GeospatialColorState = "ENABLED" + GeospatialColorStateDisabled GeospatialColorState = "DISABLED" +) + +// Values returns all known values for GeospatialColorState. 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 (GeospatialColorState) Values() []GeospatialColorState { + return []GeospatialColorState{ + "ENABLED", + "DISABLED", + } +} + type GeoSpatialCountryCode string // Enum values for GeoSpatialCountryCode @@ -2167,6 +2205,46 @@ func (GeoSpatialDataRole) Values() []GeoSpatialDataRole { } } +type GeospatialLayerType string + +// Enum values for GeospatialLayerType +const ( + GeospatialLayerTypePoint GeospatialLayerType = "POINT" + GeospatialLayerTypeLine GeospatialLayerType = "LINE" + GeospatialLayerTypePolygon GeospatialLayerType = "POLYGON" +) + +// Values returns all known values for GeospatialLayerType. 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 (GeospatialLayerType) Values() []GeospatialLayerType { + return []GeospatialLayerType{ + "POINT", + "LINE", + "POLYGON", + } +} + +type GeospatialMapNavigation string + +// Enum values for GeospatialMapNavigation +const ( + GeospatialMapNavigationEnabled GeospatialMapNavigation = "ENABLED" + GeospatialMapNavigationDisabled GeospatialMapNavigation = "DISABLED" +) + +// Values returns all known values for GeospatialMapNavigation. 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 (GeospatialMapNavigation) Values() []GeospatialMapNavigation { + return []GeospatialMapNavigation{ + "ENABLED", + "DISABLED", + } +} + type GeospatialSelectedPointStyle string // Enum values for GeospatialSelectedPointStyle @@ -2370,6 +2448,25 @@ func (IdentityType) Values() []IdentityType { } } +type ImageCustomActionTrigger string + +// Enum values for ImageCustomActionTrigger +const ( + ImageCustomActionTriggerClick ImageCustomActionTrigger = "CLICK" + ImageCustomActionTriggerMenu ImageCustomActionTrigger = "MENU" +) + +// Values returns all known values for ImageCustomActionTrigger. 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 (ImageCustomActionTrigger) Values() []ImageCustomActionTrigger { + return []ImageCustomActionTrigger{ + "CLICK", + "MENU", + } +} + type IncludeFolderMembers string // Enum values for IncludeFolderMembers @@ -2674,6 +2771,25 @@ func (KPIVisualStandardLayoutType) Values() []KPIVisualStandardLayoutType { } } +type LayerCustomActionTrigger string + +// Enum values for LayerCustomActionTrigger +const ( + LayerCustomActionTriggerDataPointClick LayerCustomActionTrigger = "DATA_POINT_CLICK" + LayerCustomActionTriggerDataPointMenu LayerCustomActionTrigger = "DATA_POINT_MENU" +) + +// Values returns all known values for LayerCustomActionTrigger. 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 (LayerCustomActionTrigger) Values() []LayerCustomActionTrigger { + return []LayerCustomActionTrigger{ + "DATA_POINT_CLICK", + "DATA_POINT_MENU", + } +} + type LayoutElementType string // Enum values for LayoutElementType @@ -2682,6 +2798,7 @@ const ( LayoutElementTypeFilterControl LayoutElementType = "FILTER_CONTROL" LayoutElementTypeParameterControl LayoutElementType = "PARAMETER_CONTROL" LayoutElementTypeTextBox LayoutElementType = "TEXT_BOX" + LayoutElementTypeImage LayoutElementType = "IMAGE" ) // Values returns all known values for LayoutElementType. Note that this can be @@ -2694,6 +2811,7 @@ func (LayoutElementType) Values() []LayoutElementType { "FILTER_CONTROL", "PARAMETER_CONTROL", "TEXT_BOX", + "IMAGE", } } @@ -3482,6 +3600,25 @@ func (PivotTableSubtotalLevel) Values() []PivotTableSubtotalLevel { } } +type PluginVisualAxisName string + +// Enum values for PluginVisualAxisName +const ( + PluginVisualAxisNameGroupBy PluginVisualAxisName = "GROUP_BY" + PluginVisualAxisNameValue PluginVisualAxisName = "VALUE" +) + +// Values returns all known values for PluginVisualAxisName. 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 (PluginVisualAxisName) Values() []PluginVisualAxisName { + return []PluginVisualAxisName{ + "GROUP_BY", + "VALUE", + } +} + type PrimaryValueDisplayType string // Enum values for PrimaryValueDisplayType @@ -4128,6 +4265,29 @@ func (SheetControlSliderType) Values() []SheetControlSliderType { } } +type SheetImageScalingType string + +// Enum values for SheetImageScalingType +const ( + SheetImageScalingTypeScaleToWidth SheetImageScalingType = "SCALE_TO_WIDTH" + SheetImageScalingTypeScaleToHeight SheetImageScalingType = "SCALE_TO_HEIGHT" + SheetImageScalingTypeScaleToContainer SheetImageScalingType = "SCALE_TO_CONTAINER" + SheetImageScalingTypeScaleNone SheetImageScalingType = "SCALE_NONE" +) + +// Values returns all known values for SheetImageScalingType. 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 (SheetImageScalingType) Values() []SheetImageScalingType { + return []SheetImageScalingType{ + "SCALE_TO_WIDTH", + "SCALE_TO_HEIGHT", + "SCALE_TO_CONTAINER", + "SCALE_NONE", + } +} + type SimpleAttributeAggregationFunction string // Enum values for SimpleAttributeAggregationFunction @@ -4774,6 +4934,54 @@ func (TopBottomSortOrder) Values() []TopBottomSortOrder { } } +type TopicFilterAttribute string + +// Enum values for TopicFilterAttribute +const ( + TopicFilterAttributeQuicksightUser TopicFilterAttribute = "QUICKSIGHT_USER" + TopicFilterAttributeQuicksightViewerOrOwner TopicFilterAttribute = "QUICKSIGHT_VIEWER_OR_OWNER" + TopicFilterAttributeDirectQuicksightViewerOrOwner TopicFilterAttribute = "DIRECT_QUICKSIGHT_VIEWER_OR_OWNER" + TopicFilterAttributeQuicksightOwner TopicFilterAttribute = "QUICKSIGHT_OWNER" + TopicFilterAttributeDirectQuicksightOwner TopicFilterAttribute = "DIRECT_QUICKSIGHT_OWNER" + TopicFilterAttributeDirectQuicksightSoleOwner TopicFilterAttribute = "DIRECT_QUICKSIGHT_SOLE_OWNER" + TopicFilterAttributeTopicName TopicFilterAttribute = "TOPIC_NAME" +) + +// Values returns all known values for TopicFilterAttribute. 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 (TopicFilterAttribute) Values() []TopicFilterAttribute { + return []TopicFilterAttribute{ + "QUICKSIGHT_USER", + "QUICKSIGHT_VIEWER_OR_OWNER", + "DIRECT_QUICKSIGHT_VIEWER_OR_OWNER", + "QUICKSIGHT_OWNER", + "DIRECT_QUICKSIGHT_OWNER", + "DIRECT_QUICKSIGHT_SOLE_OWNER", + "TOPIC_NAME", + } +} + +type TopicFilterOperator string + +// Enum values for TopicFilterOperator +const ( + TopicFilterOperatorStringEquals TopicFilterOperator = "StringEquals" + TopicFilterOperatorStringLike TopicFilterOperator = "StringLike" +) + +// Values returns all known values for TopicFilterOperator. 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 (TopicFilterOperator) Values() []TopicFilterOperator { + return []TopicFilterOperator{ + "StringEquals", + "StringLike", + } +} + type TopicIRFilterFunction string // Enum values for TopicIRFilterFunction diff --git a/service/quicksight/types/types.go b/service/quicksight/types/types.go index 54273c30cbc..1d4be8e7f8a 100644 --- a/service/quicksight/types/types.go +++ b/service/quicksight/types/types.go @@ -327,6 +327,9 @@ type AnalysisDefinition struct { // detailed information about a sheet within this analysis. Sheets []SheetDefinition + // The static files for the definition. + StaticFiles []StaticFile + noSmithyDocumentSerde } @@ -1543,7 +1546,9 @@ type AssetBundleImportJobWarning struct { type AssetBundleImportSource struct { // The bytes of the base64 encoded asset bundle import zip file. This file can't - // exceed 20 MB. + // exceed 20 MB. If the size of the file that you want to upload is more than 20 + // MB, add the file to your Amazon S3 bucket and use S3Uri of the file for this + // operation. // // If you are calling the API operations from the Amazon Web Services SDK for // Java, JavaScript, Python, or PHP, the SDK encodes base64 automatically to allow @@ -1553,7 +1558,7 @@ type AssetBundleImportSource struct { // The Amazon S3 URI for an asset bundle import file that exists in an Amazon S3 // bucket that the caller has read access to. The file must be a zip format file - // and can't exceed 20 MB. + // and can't exceed 1 GB. S3Uri *string noSmithyDocumentSerde @@ -2041,6 +2046,9 @@ type BarChartVisual struct { // The title that is displayed on the visual. Title *VisualTitleLabelOptions + // The alt text for the visual. + VisualContentAltText *string + noSmithyDocumentSerde } @@ -2353,6 +2361,9 @@ type BoxPlotVisual struct { // The title that is displayed on the visual. Title *VisualTitleLabelOptions + // The alt text for the visual. + VisualContentAltText *string + noSmithyDocumentSerde } @@ -3219,6 +3230,9 @@ type ComboChartVisual struct { // The title that is displayed on the visual. Title *VisualTitleLabelOptions + // The alt text for the visual. + VisualContentAltText *string + noSmithyDocumentSerde } @@ -3705,6 +3719,9 @@ type CustomContentVisual struct { // The title that is displayed on the visual. Title *VisualTitleLabelOptions + // The alt text for the visual. + VisualContentAltText *string + noSmithyDocumentSerde } @@ -4142,6 +4159,9 @@ type DashboardVersionDefinition struct { // An array of sheet definitions for a dashboard. Sheets []SheetDefinition + // The static files for the definition. + StaticFiles []StaticFile + noSmithyDocumentSerde } @@ -6428,6 +6448,9 @@ type FilledMapVisual struct { // The title that is displayed on the visual. Title *VisualTitleLabelOptions + // The alt text for the visual. + VisualContentAltText *string + noSmithyDocumentSerde } @@ -7080,6 +7103,9 @@ type FontConfiguration struct { // Determines the appearance of decorative lines on the text. FontDecoration FontDecoration + // The font family that you want to use. + FontFamily *string + // The option that determines the text display size. FontSize *FontSize @@ -7095,6 +7121,9 @@ type FontConfiguration struct { // The option that determines the text display size. type FontSize struct { + // The font size that you want to use in px. + Absolute *string + // The lexical name for the text size, proportional to its surrounding context. Relative RelativeFontSize @@ -7447,6 +7476,9 @@ type FunnelChartVisual struct { // The title that is displayed on the visual. Title *VisualTitleLabelOptions + // The alt text for the visual. + VisualContentAltText *string + noSmithyDocumentSerde } @@ -7593,6 +7625,87 @@ type GaugeChartVisual struct { // The title that is displayed on the visual. Title *VisualTitleLabelOptions + // The alt text for the visual. + VisualContentAltText *string + + noSmithyDocumentSerde +} + +// The definition for a categorical color. +type GeospatialCategoricalColor struct { + + // A list of categorical data colors for each category. + // + // This member is required. + CategoryDataColors []GeospatialCategoricalDataColor + + // The default opacity of a categorical color. + DefaultOpacity *float64 + + // The null data visualization settings. + NullDataSettings *GeospatialNullDataSettings + + // The state of visibility for null data. + NullDataVisibility Visibility + + noSmithyDocumentSerde +} + +// The categorical data color for a single category. +type GeospatialCategoricalDataColor struct { + + // The color and opacity values for the category data color. + // + // This member is required. + Color *string + + // The data value for the category data color. + // + // This member is required. + DataValue *string + + noSmithyDocumentSerde +} + +// The geospatial radius for a circle. +type GeospatialCircleRadius struct { + + // The positive value for the radius of a circle. + Radius *float64 + + noSmithyDocumentSerde +} + +// The properties for a circle symbol style. +type GeospatialCircleSymbolStyle struct { + + // The radius of the circle. + CircleRadius *GeospatialCircleRadius + + // The color and opacity values for the fill color. + FillColor *GeospatialColor + + // The color and opacity values for the stroke color. + StrokeColor *GeospatialColor + + // The width of the stroke (border). + StrokeWidth *GeospatialLineWidth + + noSmithyDocumentSerde +} + +// The visualization properties for solid, gradient, and categorical colors. +type GeospatialColor struct { + + // The visualization properties for the categorical color. + Categorical *GeospatialCategoricalColor + + // The visualization properties for the gradient color. + Gradient *GeospatialGradientColor + + // The visualization properties for the solid color. + Solid *GeospatialSolidColor + noSmithyDocumentSerde } @@ -7641,6 +7754,51 @@ type GeospatialCoordinateBounds struct { noSmithyDocumentSerde } +// The data source properties for the geospatial data. +type GeospatialDataSourceItem struct { + + // The static file data source properties for the geospatial data. + StaticFileDataSource *GeospatialStaticFileSource + + noSmithyDocumentSerde +} + +// The definition for a gradient color. +type GeospatialGradientColor struct { + + // A list of gradient step colors for the gradient. + // + // This member is required. + StepColors []GeospatialGradientStepColor + + // The default opacity for the gradient color. + DefaultOpacity *float64 + + // The null data visualization settings. + NullDataSettings *GeospatialNullDataSettings + + // The state of visibility for null data. + NullDataVisibility Visibility + + noSmithyDocumentSerde +} + +// The gradient step color for a single step. +type GeospatialGradientStepColor struct { + + // The color and opacity values for the gradient step color. + // + // This member is required. + Color *string + + // The data value for the gradient step color. + // + // This member is required. + DataValue float64 + + noSmithyDocumentSerde +} + // The color scale specification for the heatmap point style. type GeospatialHeatmapColorScale struct { @@ -7670,6 +7828,145 @@ type GeospatialHeatmapDataColor struct { noSmithyDocumentSerde } +// The color field that defines a gradient or categorical style. +type GeospatialLayerColorField struct { + + // A list of color dimension fields. + ColorDimensionsFields []DimensionField + + // A list of color measure fields. + ColorValuesFields []MeasureField + + noSmithyDocumentSerde +} + +// The definition properties for a geospatial layer. +type GeospatialLayerDefinition struct { + + // The definition for a line layer. + LineLayer *GeospatialLineLayer + + // The definition for a point layer. + PointLayer *GeospatialPointLayer + + // The definition for a polygon layer. + PolygonLayer *GeospatialPolygonLayer + + noSmithyDocumentSerde +} + +// The properties for a single geospatial layer. +type GeospatialLayerItem struct { + + // The ID of the layer. + // + // This member is required. + LayerId *string + + // A list of custom actions for a layer. + Actions []LayerCustomAction + + // The data source for the layer. + DataSource *GeospatialDataSourceItem + + // The join definition properties for a layer. + JoinDefinition *GeospatialLayerJoinDefinition + + // The label that is displayed for the layer. + Label *string + + // The definition properties for a layer. + LayerDefinition *GeospatialLayerDefinition + + // The layer type. + LayerType GeospatialLayerType + + // The display options for the visual tooltip. + Tooltip *TooltipOptions + + // The state of visibility for the layer. + Visibility Visibility + + noSmithyDocumentSerde +} + +// The custom actions for a layer. +type GeospatialLayerJoinDefinition struct { + + // The geospatial color field for the join definition. + ColorField *GeospatialLayerColorField + + // The unaggregated field for a table. + DatasetKeyField *UnaggregatedField + + // The name of the field or property in the geospatial data source. + ShapeKeyField *string + + noSmithyDocumentSerde +} + +// The map definition that defines map state, map style, and geospatial layers. +type GeospatialLayerMapConfiguration struct { + + // The general visual interactions setup for visual publish options + Interactions *VisualInteractionOptions + + // The options for the legend setup of a visual. + Legend *LegendOptions + + // The geospatial layers to visualize on the map. + MapLayers []GeospatialLayerItem + + // The map state properties for the map. + MapState *GeospatialMapState + + // The map style properties for the map. + MapStyle *GeospatialMapStyle + + noSmithyDocumentSerde +} + +// The geospatial Line layer. +type GeospatialLineLayer struct { + + // The visualization style for a line layer. + // + // This member is required. + Style *GeospatialLineStyle + + noSmithyDocumentSerde +} + +// The visualization style for a line layer. +type GeospatialLineStyle struct { + + // The symbol style for a line style. + LineSymbolStyle *GeospatialLineSymbolStyle + + noSmithyDocumentSerde +} + +// The symbol style for a line layer. +type GeospatialLineSymbolStyle struct { + + // The color and opacity values for the fill color. + FillColor *GeospatialColor + + // The width value for a line. + LineWidth *GeospatialLineWidth + + noSmithyDocumentSerde +} + +// The width properties for a line. +type GeospatialLineWidth struct { + + // The positive value for the width of a line. + LineWidth *float64 + + noSmithyDocumentSerde +} + // The aggregated field wells for a geospatial map. type GeospatialMapAggregatedFieldWells struct { @@ -7729,6 +8026,33 @@ type GeospatialMapFieldWells struct { noSmithyDocumentSerde } +// The map state properties for a map. +type GeospatialMapState struct { + + // The bound options (north, south, west, east) of the geospatial window options. + Bounds *GeospatialCoordinateBounds + + // Enables or disables map navigation for a map. + MapNavigation GeospatialMapNavigation + + noSmithyDocumentSerde +} + +// The map style properties for a map. +type GeospatialMapStyle struct { + + // The background color and opacity values for a map. + BackgroundColor *string + + // The selected base map style. + BaseMapStyle BaseMapStyleType + + // The state of visibility for the base map. + BaseMapVisibility Visibility + + noSmithyDocumentSerde +} + // The map style options of the geospatial map. type GeospatialMapStyleOptions struct { @@ -7767,6 +8091,55 @@ type GeospatialMapVisual struct { // The title that is displayed on the visual. Title *VisualTitleLabelOptions + // The alt text for the visual. + VisualContentAltText *string + + noSmithyDocumentSerde +} + +// The properties for the visualization of null data. +type GeospatialNullDataSettings struct { + + // The symbol style for null data. + // + // This member is required. + SymbolStyle *GeospatialNullSymbolStyle + + noSmithyDocumentSerde +} + +// The symbol style for null data. +type GeospatialNullSymbolStyle struct { + + // The color and opacity values for the fill color. + FillColor *string + + // The color and opacity values for the stroke color. + StrokeColor *string + + // The width of the border stroke. + StrokeWidth *float64 + + noSmithyDocumentSerde +} + +// The geospatial Point layer. +type GeospatialPointLayer struct { + + // The visualization style for a point layer. + // + // This member is required. + Style *GeospatialPointStyle + + noSmithyDocumentSerde +} + +// The point style for a point layer. +type GeospatialPointStyle struct { + + // The circle symbol style for a point layer. + CircleSymbolStyle *GeospatialCircleSymbolStyle + noSmithyDocumentSerde } @@ -7785,6 +8158,66 @@ type GeospatialPointStyleOptions struct { noSmithyDocumentSerde } +// The geospatial polygon layer. +type GeospatialPolygonLayer struct { + + // The visualization style for a polygon layer. + // + // This member is required. + Style *GeospatialPolygonStyle + + noSmithyDocumentSerde +} + +// The polygon style for a polygon layer. +type GeospatialPolygonStyle struct { + + // The polygon symbol style for a polygon layer. + PolygonSymbolStyle *GeospatialPolygonSymbolStyle + + noSmithyDocumentSerde +} + +// The polygon symbol style for a polygon layer. +type GeospatialPolygonSymbolStyle struct { + + // The color and opacity values for the fill color. + FillColor *GeospatialColor + + // The color and opacity values for the stroke color. + StrokeColor *GeospatialColor + + // The width of the border stroke. + StrokeWidth *GeospatialLineWidth + + noSmithyDocumentSerde +} + +// The definition for a solid color. +type GeospatialSolidColor struct { + + // The color and opacity values for the color. + // + // This member is required. + Color *string + + // Enables and disables the view state of the color. + State GeospatialColorState + + noSmithyDocumentSerde +} + +// The source properties for a geospatial static file. +type GeospatialStaticFileSource struct { + + // The ID of the static file. + // + // This member is required. + StaticFileId *string + + noSmithyDocumentSerde +} + // The window options of the geospatial map visual. type GeospatialWindowOptions struct { @@ -8129,6 +8562,9 @@ type HeatMapVisual struct { // The title that is displayed on the visual. Title *VisualTitleLabelOptions + // The alt text for the visual. + VisualContentAltText *string + noSmithyDocumentSerde } @@ -8228,6 +8664,9 @@ type HistogramVisual struct { // The title that is displayed on the visual. Title *VisualTitleLabelOptions + // The alt text for the visual. + VisualContentAltText *string + noSmithyDocumentSerde } @@ -8309,6 +8748,85 @@ type ImageConfiguration struct { noSmithyDocumentSerde } +// A custom action defined on an image. +type ImageCustomAction struct { + + // A list of ImageCustomActionOperations . + // + // This is a union type structure. For this structure to be valid, only one of the + // attributes can be defined. + // + // This member is required. + ActionOperations []ImageCustomActionOperation + + // The ID of the custom action. + // + // This member is required. + CustomActionId *string + + // The name of the custom action. + // + // This member is required. + Name *string + + // The trigger of the VisualCustomAction . + // + // Valid values are defined as follows: + // + // - CLICK : Initiates a custom action by a left pointer click on a data point. + // + // - MENU : Initiates a custom action by right pointer click from the menu. + // + // This member is required. + Trigger ImageCustomActionTrigger + + // The status of the custom action. + Status WidgetStatus + + noSmithyDocumentSerde +} + +// The operation that is defined by the custom action. +// +// This is a union type structure. For this structure to be valid, only one of the +// attributes can be defined. +type ImageCustomActionOperation struct { + + // The navigation operation that navigates between different sheets in the same + // analysis. + // + // This is a union type structure. For this structure to be valid, only one of the + // attributes can be defined. + NavigationOperation *CustomActionNavigationOperation + + // The set parameter operation that sets parameters in custom action. + SetParametersOperation *CustomActionSetParametersOperation + + // The URL operation that opens a link to another webpage. + URLOperation *CustomActionURLOperation + + noSmithyDocumentSerde +} + +// The general image interactions setup for image publish options. +type ImageInteractionOptions struct { + + // The menu options for the image. + ImageMenuOption *ImageMenuOption + + noSmithyDocumentSerde +} + +// The menu options for the interactions of an image. +type ImageMenuOption struct { + + // The availability status of the image menu. If the value of this property is set + // to ENABLED , dashboard readers can interact with the image menu. + AvailabilityStatus DashboardBehavior + + noSmithyDocumentSerde +} + // The image set. type ImageSet struct { @@ -8365,6 +8883,20 @@ type ImageSourceMemberS3Uri struct { func (*ImageSourceMemberS3Uri) isImageSource() {} +// A static file that contains an image. +type ImageStaticFile struct { + + // The ID of the static file that contains an image. + // + // This member is required. + StaticFileId *string + + // The source of the image static file. + Source *StaticFileSource + + noSmithyDocumentSerde +} + // The incremental refresh configuration for a dataset. type IncrementalRefresh struct { @@ -8496,6 +9028,9 @@ type InsightVisual struct { // The title that is displayed on the visual. Title *VisualTitleLabelOptions + // The alt text for the visual. + VisualContentAltText *string + noSmithyDocumentSerde } @@ -8874,60 +9409,158 @@ type KPIVisual struct { // templates can have visuals with the same identifiers. // // This member is required. - VisualId *string - - // The list of custom actions that are configured for a visual. - Actions []VisualCustomAction - - // The configuration of a KPI visual. - ChartConfiguration *KPIConfiguration + VisualId *string + + // The list of custom actions that are configured for a visual. + Actions []VisualCustomAction + + // The configuration of a KPI visual. + ChartConfiguration *KPIConfiguration + + // The column hierarchy that is used during drill-downs and drill-ups. + ColumnHierarchies []ColumnHierarchy + + // The conditional formatting of a KPI visual. + ConditionalFormatting *KPIConditionalFormatting + + // The subtitle that is displayed on the visual. + Subtitle *VisualSubtitleLabelOptions + + // The title that is displayed on the visual. + Title *VisualTitleLabelOptions + + // The alt text for the visual. + VisualContentAltText *string + + noSmithyDocumentSerde +} + +// The options that determine the layout a KPI visual. +type KPIVisualLayoutOptions struct { + + // The standard layout of the KPI visual. + StandardLayout *KPIVisualStandardLayout + + noSmithyDocumentSerde +} + +// The standard layout of the KPI visual. +type KPIVisualStandardLayout struct { + + // The standard layout type. + // + // This member is required. + Type KPIVisualStandardLayoutType + + noSmithyDocumentSerde +} + +// The share label options for the labels. +type LabelOptions struct { + + // The text for the label. + CustomLabel *string + + // The font configuration of the label. + FontConfiguration *FontConfiguration + + // Determines whether or not the label is visible. + Visibility Visibility + + noSmithyDocumentSerde +} + +// A layer custom action. +type LayerCustomAction struct { + + // A list of LayerCustomActionOperations . + // + // This is a union type structure. For this structure to be valid, only one of the + // attributes can be defined. + // + // This member is required. + ActionOperations []LayerCustomActionOperation + + // The ID of the custom action. + // + // This member is required. + CustomActionId *string + + // The name of the custom action. + // + // This member is required. + Name *string + + // The trigger of the LayerCustomAction . + // + // Valid values are defined as follows: + // + // - DATA_POINT_CLICK : Initiates a custom action by a left pointer click on a + // data point. + // + // - DATA_POINT_MENU : Initiates a custom action by right pointer click from the + // menu. + // + // This member is required. + Trigger LayerCustomActionTrigger - // The column hierarchy that is used during drill-downs and drill-ups. - ColumnHierarchies []ColumnHierarchy + // The status of the LayerCustomAction . + Status WidgetStatus - // The conditional formatting of a KPI visual. - ConditionalFormatting *KPIConditionalFormatting + noSmithyDocumentSerde +} - // The subtitle that is displayed on the visual. - Subtitle *VisualSubtitleLabelOptions +// The operation that is defined by the custom action. +// +// This is a union type structure. For this structure to be valid, only one of the +// attributes can be defined. +type LayerCustomActionOperation struct { - // The title that is displayed on the visual. - Title *VisualTitleLabelOptions + // The filter operation that filters data included in a visual or in an entire + // sheet. + FilterOperation *CustomActionFilterOperation - noSmithyDocumentSerde -} + // The navigation operation that navigates between different sheets in the same + // analysis. + // + // This is a union type structure. For this structure to be valid, only one of the + // attributes can be defined. + NavigationOperation *CustomActionNavigationOperation -// The options that determine the layout a KPI visual. -type KPIVisualLayoutOptions struct { + // The set parameter operation that sets parameters in custom action. + SetParametersOperation *CustomActionSetParametersOperation - // The standard layout of the KPI visual. - StandardLayout *KPIVisualStandardLayout + // The URL operation that opens a link to another webpage. + URLOperation *CustomActionURLOperation noSmithyDocumentSerde } -// The standard layout of the KPI visual. -type KPIVisualStandardLayout struct { +// A layer map visual. +type LayerMapVisual struct { - // The standard layout type. + // The dataset that is used to create the layer map visual. You can't create a + // visual without a dataset. // // This member is required. - Type KPIVisualStandardLayoutType + DataSetIdentifier *string - noSmithyDocumentSerde -} + // The ID of the visual. + // + // This member is required. + VisualId *string -// The share label options for the labels. -type LabelOptions struct { + // The configuration settings of the visual. + ChartConfiguration *GeospatialLayerMapConfiguration - // The text for the label. - CustomLabel *string + // The subtitle label options for a visual. + Subtitle *VisualSubtitleLabelOptions - // The font configuration of the label. - FontConfiguration *FontConfiguration + // The title label options for a visual. + Title *VisualTitleLabelOptions - // Determines whether or not the label is visible. - Visibility Visibility + // The alt text for the visual. + VisualContentAltText *string noSmithyDocumentSerde } @@ -8996,6 +9629,9 @@ type LegendOptions struct { // The custom title for the legend. Title *LabelOptions + // Configures the display properties of the given text. + ValueFontConfiguration *FontConfiguration + // Determines whether or not the legend is visible. Visibility Visibility @@ -9240,6 +9876,9 @@ type LineChartVisual struct { // The title that is displayed on the visual. Title *VisualTitleLabelOptions + // The alt text for the visual. + VisualContentAltText *string + noSmithyDocumentSerde } @@ -9729,6 +10368,12 @@ type NamespaceInfoV2 struct { // The creation status of a namespace that is not yet completely created. CreationStatus NamespaceStatus + // The Amazon Resource Name (ARN) for the IAM Identity Center application. + IamIdentityCenterApplicationArn *string + + // The Amazon Resource Name (ARN) for the IAM Identity Center instance. + IamIdentityCenterInstanceArn *string + // The identity store used for the namespace. IdentityStore IdentityStore @@ -10839,6 +11484,9 @@ type PieChartVisual struct { // The title that is displayed on the visual. Title *VisualTitleLabelOptions + // The alt text for the visual. + VisualContentAltText *string + noSmithyDocumentSerde } @@ -11198,6 +11846,9 @@ type PivotTableVisual struct { // The title that is displayed on the visual. Title *VisualTitleLabelOptions + // The alt text for the visual. + VisualContentAltText *string + noSmithyDocumentSerde } @@ -11231,6 +11882,120 @@ type PivotTotalOptions struct { noSmithyDocumentSerde } +// A flexible visualization type that allows engineers to create new custom charts +// in Amazon QuickSight. +type PluginVisual struct { + + // The Amazon Resource Name (ARN) that reflects the plugin and version. + // + // This member is required. + PluginArn *string + + // The ID of the visual that you want to use. + // + // This member is required. + VisualId *string + + // A description of the plugin field wells and their persisted properties. + ChartConfiguration *PluginVisualConfiguration + + // The subtitle label options for a visual. + Subtitle *VisualSubtitleLabelOptions + + // The title label options for a visual. + Title *VisualTitleLabelOptions + + // The alt text for the visual. + VisualContentAltText *string + + noSmithyDocumentSerde +} + +// The plugin visual configuration. This includes the field wells, sorting +// options, and persisted options of the plugin visual. +type PluginVisualConfiguration struct { + + // The field wells configuration of the plugin visual. + FieldWells []PluginVisualFieldWell + + // The sort configuration of the plugin visual. + SortConfiguration *PluginVisualSortConfiguration + + // The persisted properties of the plugin visual. + VisualOptions *PluginVisualOptions + + noSmithyDocumentSerde +} + +// A collection of field wells for a plugin visual. +type PluginVisualFieldWell struct { + + // The semantic axis name for the field well. + AxisName PluginVisualAxisName + + // A list of dimensions for the field well. + Dimensions []DimensionField + + // A list of measures that exist in the field well. + Measures []MeasureField + + // A list of unaggregated fields that exist in the field well. + Unaggregated []UnaggregatedField + + noSmithyDocumentSerde +} + +// A query limits configuration. +type PluginVisualItemsLimitConfiguration struct { + + // Determines how many values are be fetched at once. + ItemsLimit *int64 + + noSmithyDocumentSerde +} + +// The options and persisted properties for the plugin visual. +type PluginVisualOptions struct { + + // The persisted properties and their values. + VisualProperties []PluginVisualProperty + + noSmithyDocumentSerde +} + +// The key value pair of the persisted property. +type PluginVisualProperty struct { + + // The name of the plugin visual property. + Name *string + + // The value of the plugin visual property. + Value *string + + noSmithyDocumentSerde +} + +// Determines how the plugin visual sorts the data during query. +type PluginVisualSortConfiguration struct { + + // The table query sorting options for the plugin visual. + PluginVisualTableQuerySort *PluginVisualTableQuerySort + + noSmithyDocumentSerde +} + +// The table query sorting options for the plugin visual. +type PluginVisualTableQuerySort struct { + + // The maximum amount of data to be returned by a query. + ItemsLimitConfiguration *PluginVisualItemsLimitConfiguration + + // Determines how data is sorted in the response. + RowSort []FieldSortOptions + + noSmithyDocumentSerde +} + // The parameters for PostgreSQL. type PostgreSqlParameters struct { @@ -11480,6 +12245,9 @@ type RadarChartVisual struct { // The title that is displayed on the visual. Title *VisualTitleLabelOptions + // The alt text for the visual. + VisualContentAltText *string + noSmithyDocumentSerde } @@ -12512,6 +13280,9 @@ type SankeyDiagramVisual struct { // The title that is displayed on the visual. Title *VisualTitleLabelOptions + // The alt text for the visual. + VisualContentAltText *string + noSmithyDocumentSerde } @@ -12663,6 +13434,9 @@ type ScatterPlotVisual struct { // The title that is displayed on the visual. Title *VisualTitleLabelOptions + // The alt text for the visual. + VisualContentAltText *string + noSmithyDocumentSerde } @@ -12950,6 +13724,9 @@ type SharedViewConfigurations struct { // with other components, such as controls, filters, and so on. type Sheet struct { + // A list of images on a sheet. + Images []SheetImage + // The name of a sheet. This name is displayed on the sheet's tab in the Amazon // QuickSight console. Name *string @@ -13031,6 +13808,9 @@ type SheetDefinition struct { // [Adding filter controls to analysis sheets]: https://docs.aws.amazon.com/quicksight/latest/user/filter-controls.html FilterControls []FilterControl + // A list of images on a sheet. + Images []SheetImage + // Layouts define how the components of a sheet are arranged. // // For more information, see [Types of layout] in the Amazon QuickSight User Guide. @@ -13095,6 +13875,101 @@ type SheetElementRenderingRule struct { noSmithyDocumentSerde } +// An image that is located on a sheet. +type SheetImage struct { + + // The ID of the sheet image. + // + // This member is required. + SheetImageId *string + + // The source of the image. + // + // This member is required. + Source *SheetImageSource + + // A list of custom actions that are configured for an image. + Actions []ImageCustomAction + + // The alt text for the image. + ImageContentAltText *string + + // The general image interactions setup for an image. + Interactions *ImageInteractionOptions + + // Determines how the image is scaled. + Scaling *SheetImageScalingConfiguration + + // The tooltip to be shown when hovering over the image. + Tooltip *SheetImageTooltipConfiguration + + noSmithyDocumentSerde +} + +// Determines how the image is scaled +type SheetImageScalingConfiguration struct { + + // The scaling option to use when fitting the image inside the container. + // + // Valid values are defined as follows: + // + // - SCALE_TO_WIDTH : The image takes up the entire width of the container. The + // image aspect ratio is preserved. + // + // - SCALE_TO_HEIGHT : The image takes up the entire height of the container. The + // image aspect ratio is preserved. + // + // - SCALE_TO_CONTAINER : The image takes up the entire width and height of the + // container. The image aspect ratio is not preserved. + // + // - SCALE_NONE : The image is displayed in its original size and is not scaled + // to the container. + ScalingType SheetImageScalingType + + noSmithyDocumentSerde +} + +// The source of the image. +type SheetImageSource struct { + + // The source of the static file that contains the image. + SheetImageStaticFileSource *SheetImageStaticFileSource + + noSmithyDocumentSerde +} + +// The source of the static file that contains the image. +type SheetImageStaticFileSource struct { + + // The ID of the static file that contains the image. + // + // This member is required. + StaticFileId *string + + noSmithyDocumentSerde +} + +// The tooltip configuration for a sheet image. +type SheetImageTooltipConfiguration struct { + + // The text that appears in the tooltip. + TooltipText *SheetImageTooltipText + + // The visibility of the tooltip. + Visibility Visibility + + noSmithyDocumentSerde +} + +// The text that appears in the sheet image tooltip. +type SheetImageTooltipText struct { + + // The plain text format. + PlainText *string + + noSmithyDocumentSerde +} + // The sheet layout maximization options of a dashbaord. type SheetLayoutElementMaximizationOption struct { @@ -13574,6 +14449,20 @@ type SparkParameters struct { noSmithyDocumentSerde } +// A static file that contains the geospatial data. +type SpatialStaticFile struct { + + // The ID of the spatial static file. + // + // This member is required. + StaticFileId *string + + // The source of the spatial static file. + Source *StaticFileSource + + noSmithyDocumentSerde +} + // The parameters for SQL Server. type SqlServerParameters struct { @@ -13652,6 +14541,64 @@ type StatePersistenceConfigurations struct { noSmithyDocumentSerde } +// The static file. +type StaticFile struct { + + // The image static file. + ImageStaticFile *ImageStaticFile + + // The spacial static file. + SpatialStaticFile *SpatialStaticFile + + noSmithyDocumentSerde +} + +// The structure that contains the Amazon S3 location to download the static file +// from. +type StaticFileS3SourceOptions struct { + + // The name of the Amazon S3 bucket. + // + // This member is required. + BucketName *string + + // The identifier of the static file in the Amazon S3 bucket. + // + // This member is required. + ObjectKey *string + + // The Region of the Amazon S3 account that contains the bucket. + // + // This member is required. + Region *string + + noSmithyDocumentSerde +} + +// The source of the static file. +type StaticFileSource struct { + + // The structure that contains the Amazon S3 location to download the static file + // from. + S3Options *StaticFileS3SourceOptions + + // The structure that contains the URL to download the static file from. + UrlOptions *StaticFileUrlSourceOptions + + noSmithyDocumentSerde +} + +// The structure that contains the URL to download the static file from. +type StaticFileUrlSourceOptions struct { + + // The URL to download the static file from. + // + // This member is required. + Url *string + + noSmithyDocumentSerde +} + // A string parameter for a dataset. type StringDatasetParameter struct { @@ -14241,6 +15188,9 @@ type TableVisual struct { // The title that is displayed on the visual. Title *VisualTitleLabelOptions + // The alt text for the visual. + VisualContentAltText *string + noSmithyDocumentSerde } @@ -14504,6 +15454,9 @@ type TemplateVersionDefinition struct { // An array of sheet definitions for a template. Sheets []SheetDefinition + // The static files for the definition. + StaticFiles []StaticFile + noSmithyDocumentSerde } @@ -15745,6 +16698,27 @@ type TopicReviewedAnswer struct { noSmithyDocumentSerde } +// The filter that is used to search for a topic. +type TopicSearchFilter struct { + + // The name of the topic search filter. + // + // This member is required. + Name TopicFilterAttribute + + // The operator like equals or like. + // + // This member is required. + Operator TopicFilterOperator + + // The value of the topic search filter. + // + // This member is required. + Value *string + + noSmithyDocumentSerde +} + // A structure that represents a singular filter constant, used in filters to // specify a single value to match against. type TopicSingularFilterConstant struct { @@ -16088,6 +17062,9 @@ type TreeMapVisual struct { // The title that is displayed on the visual. Title *VisualTitleLabelOptions + // The alt text for the visual. + VisualContentAltText *string + noSmithyDocumentSerde } @@ -16480,6 +17457,9 @@ type Visual struct { // [Using KPIs]: https://docs.aws.amazon.com/quicksight/latest/user/kpi.html KPIVisual *KPIVisual + // The properties for a layer map visual + LayerMapVisual *LayerMapVisual + // A line chart. // // For more information, see [Using line charts] in the Amazon QuickSight User Guide. @@ -16501,6 +17481,9 @@ type Visual struct { // [Using pivot tables]: https://docs.aws.amazon.com/quicksight/latest/user/pivot-table.html PivotTableVisual *PivotTableVisual + // The custom plugin visual type. + PluginVisual *PluginVisual + // A radar chart visual. // // For more information, see [Using radar charts] in the Amazon QuickSight User Guide. @@ -16930,6 +17913,9 @@ type WaterfallVisual struct { // The title that is displayed on the visual. Title *VisualTitleLabelOptions + // The alt text for the visual. + VisualContentAltText *string + noSmithyDocumentSerde } @@ -17085,6 +18071,9 @@ type WordCloudVisual struct { // The title that is displayed on the visual. Title *VisualTitleLabelOptions + // The alt text for the visual. + VisualContentAltText *string + noSmithyDocumentSerde } diff --git a/service/quicksight/validators.go b/service/quicksight/validators.go index e05ab0d2b3f..68a4f1aec52 100644 --- a/service/quicksight/validators.go +++ b/service/quicksight/validators.go @@ -1490,6 +1490,26 @@ func (m *validateOpDescribeDashboardSnapshotJobResult) HandleInitialize(ctx cont return next.HandleInitialize(ctx, in) } +type validateOpDescribeDashboardsQAConfiguration struct { +} + +func (*validateOpDescribeDashboardsQAConfiguration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeDashboardsQAConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeDashboardsQAConfigurationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeDashboardsQAConfigurationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDescribeDataSet struct { } @@ -3050,6 +3070,26 @@ func (m *validateOpSearchGroups) HandleInitialize(ctx context.Context, in middle return next.HandleInitialize(ctx, in) } +type validateOpSearchTopics struct { +} + +func (*validateOpSearchTopics) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpSearchTopics) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*SearchTopicsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpSearchTopicsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpStartAssetBundleExportJob struct { } @@ -3410,6 +3450,26 @@ func (m *validateOpUpdateDashboardPublishedVersion) HandleInitialize(ctx context return next.HandleInitialize(ctx, in) } +type validateOpUpdateDashboardsQAConfiguration struct { +} + +func (*validateOpUpdateDashboardsQAConfiguration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateDashboardsQAConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateDashboardsQAConfigurationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateDashboardsQAConfigurationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateDataSet struct { } @@ -4266,6 +4326,10 @@ func addOpDescribeDashboardSnapshotJobResultValidationMiddleware(stack *middlewa return stack.Initialize.Add(&validateOpDescribeDashboardSnapshotJobResult{}, middleware.After) } +func addOpDescribeDashboardsQAConfigurationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeDashboardsQAConfiguration{}, middleware.After) +} + func addOpDescribeDataSetValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeDataSet{}, middleware.After) } @@ -4578,6 +4642,10 @@ func addOpSearchGroupsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpSearchGroups{}, middleware.After) } +func addOpSearchTopicsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpSearchTopics{}, middleware.After) +} + func addOpStartAssetBundleExportJobValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpStartAssetBundleExportJob{}, middleware.After) } @@ -4650,6 +4718,10 @@ func addOpUpdateDashboardPublishedVersionValidationMiddleware(stack *middleware. return stack.Initialize.Add(&validateOpUpdateDashboardPublishedVersion{}, middleware.After) } +func addOpUpdateDashboardsQAConfigurationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateDashboardsQAConfiguration{}, middleware.After) +} + func addOpUpdateDataSetValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateDataSet{}, middleware.After) } @@ -4892,6 +4964,11 @@ func validateAnalysisDefinition(v *types.AnalysisDefinition) error { invalidParams.AddNested("AnalysisDefaults", err.(smithy.InvalidParamsError)) } } + if v.StaticFiles != nil { + if err := validateStaticFileList(v.StaticFiles); err != nil { + invalidParams.AddNested("StaticFiles", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -8584,6 +8661,11 @@ func validateDashboardVersionDefinition(v *types.DashboardVersionDefinition) err invalidParams.AddNested("AnalysisDefaults", err.(smithy.InvalidParamsError)) } } + if v.StaticFiles != nil { + if err := validateStaticFileList(v.StaticFiles); err != nil { + invalidParams.AddNested("StaticFiles", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -11277,16 +11359,22 @@ func validateGaugeChartVisual(v *types.GaugeChartVisual) error { } } -func validateGeoSpatialColumnGroup(v *types.GeoSpatialColumnGroup) error { +func validateGeospatialCategoricalColor(v *types.GeospatialCategoricalColor) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "GeoSpatialColumnGroup"} - if v.Name == nil { - invalidParams.Add(smithy.NewErrParamRequired("Name")) + invalidParams := smithy.InvalidParamsError{Context: "GeospatialCategoricalColor"} + if v.CategoryDataColors == nil { + invalidParams.Add(smithy.NewErrParamRequired("CategoryDataColors")) + } else if v.CategoryDataColors != nil { + if err := validateGeospatialCategoricalDataColorList(v.CategoryDataColors); err != nil { + invalidParams.AddNested("CategoryDataColors", err.(smithy.InvalidParamsError)) + } } - if v.Columns == nil { - invalidParams.Add(smithy.NewErrParamRequired("Columns")) + if v.NullDataSettings != nil { + if err := validateGeospatialNullDataSettings(v.NullDataSettings); err != nil { + invalidParams.AddNested("NullDataSettings", err.(smithy.InvalidParamsError)) + } } if invalidParams.Len() > 0 { return invalidParams @@ -11295,22 +11383,16 @@ func validateGeoSpatialColumnGroup(v *types.GeoSpatialColumnGroup) error { } } -func validateGeospatialCoordinateBounds(v *types.GeospatialCoordinateBounds) error { +func validateGeospatialCategoricalDataColor(v *types.GeospatialCategoricalDataColor) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "GeospatialCoordinateBounds"} - if v.North == nil { - invalidParams.Add(smithy.NewErrParamRequired("North")) - } - if v.South == nil { - invalidParams.Add(smithy.NewErrParamRequired("South")) - } - if v.West == nil { - invalidParams.Add(smithy.NewErrParamRequired("West")) + invalidParams := smithy.InvalidParamsError{Context: "GeospatialCategoricalDataColor"} + if v.Color == nil { + invalidParams.Add(smithy.NewErrParamRequired("Color")) } - if v.East == nil { - invalidParams.Add(smithy.NewErrParamRequired("East")) + if v.DataValue == nil { + invalidParams.Add(smithy.NewErrParamRequired("DataValue")) } if invalidParams.Len() > 0 { return invalidParams @@ -11319,14 +11401,14 @@ func validateGeospatialCoordinateBounds(v *types.GeospatialCoordinateBounds) err } } -func validateGeospatialHeatmapColorScale(v *types.GeospatialHeatmapColorScale) error { +func validateGeospatialCategoricalDataColorList(v []types.GeospatialCategoricalDataColor) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "GeospatialHeatmapColorScale"} - if v.Colors != nil { - if err := validateGeospatialHeatmapDataColorList(v.Colors); err != nil { - invalidParams.AddNested("Colors", err.(smithy.InvalidParamsError)) + invalidParams := smithy.InvalidParamsError{Context: "GeospatialCategoricalDataColorList"} + for i := range v { + if err := validateGeospatialCategoricalDataColor(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { @@ -11336,14 +11418,19 @@ func validateGeospatialHeatmapColorScale(v *types.GeospatialHeatmapColorScale) e } } -func validateGeospatialHeatmapConfiguration(v *types.GeospatialHeatmapConfiguration) error { +func validateGeospatialCircleSymbolStyle(v *types.GeospatialCircleSymbolStyle) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "GeospatialHeatmapConfiguration"} - if v.HeatmapColor != nil { - if err := validateGeospatialHeatmapColorScale(v.HeatmapColor); err != nil { - invalidParams.AddNested("HeatmapColor", err.(smithy.InvalidParamsError)) + invalidParams := smithy.InvalidParamsError{Context: "GeospatialCircleSymbolStyle"} + if v.FillColor != nil { + if err := validateGeospatialColor(v.FillColor); err != nil { + invalidParams.AddNested("FillColor", err.(smithy.InvalidParamsError)) + } + } + if v.StrokeColor != nil { + if err := validateGeospatialColor(v.StrokeColor); err != nil { + invalidParams.AddNested("StrokeColor", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { @@ -11353,13 +11440,25 @@ func validateGeospatialHeatmapConfiguration(v *types.GeospatialHeatmapConfigurat } } -func validateGeospatialHeatmapDataColor(v *types.GeospatialHeatmapDataColor) error { +func validateGeospatialColor(v *types.GeospatialColor) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "GeospatialHeatmapDataColor"} - if v.Color == nil { - invalidParams.Add(smithy.NewErrParamRequired("Color")) + invalidParams := smithy.InvalidParamsError{Context: "GeospatialColor"} + if v.Solid != nil { + if err := validateGeospatialSolidColor(v.Solid); err != nil { + invalidParams.AddNested("Solid", err.(smithy.InvalidParamsError)) + } + } + if v.Gradient != nil { + if err := validateGeospatialGradientColor(v.Gradient); err != nil { + invalidParams.AddNested("Gradient", err.(smithy.InvalidParamsError)) + } + } + if v.Categorical != nil { + if err := validateGeospatialCategoricalColor(v.Categorical); err != nil { + invalidParams.AddNested("Categorical", err.(smithy.InvalidParamsError)) + } } if invalidParams.Len() > 0 { return invalidParams @@ -11368,15 +11467,16 @@ func validateGeospatialHeatmapDataColor(v *types.GeospatialHeatmapDataColor) err } } -func validateGeospatialHeatmapDataColorList(v []types.GeospatialHeatmapDataColor) error { +func validateGeoSpatialColumnGroup(v *types.GeoSpatialColumnGroup) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "GeospatialHeatmapDataColorList"} - for i := range v { - if err := validateGeospatialHeatmapDataColor(&v[i]); err != nil { - invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) - } + invalidParams := smithy.InvalidParamsError{Context: "GeoSpatialColumnGroup"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Columns == nil { + invalidParams.Add(smithy.NewErrParamRequired("Columns")) } if invalidParams.Len() > 0 { return invalidParams @@ -11385,25 +11485,22 @@ func validateGeospatialHeatmapDataColorList(v []types.GeospatialHeatmapDataColor } } -func validateGeospatialMapAggregatedFieldWells(v *types.GeospatialMapAggregatedFieldWells) error { +func validateGeospatialCoordinateBounds(v *types.GeospatialCoordinateBounds) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "GeospatialMapAggregatedFieldWells"} - if v.Geospatial != nil { - if err := validateDimensionFieldList(v.Geospatial); err != nil { - invalidParams.AddNested("Geospatial", err.(smithy.InvalidParamsError)) - } + invalidParams := smithy.InvalidParamsError{Context: "GeospatialCoordinateBounds"} + if v.North == nil { + invalidParams.Add(smithy.NewErrParamRequired("North")) } - if v.Values != nil { - if err := validateMeasureFieldList(v.Values); err != nil { - invalidParams.AddNested("Values", err.(smithy.InvalidParamsError)) - } + if v.South == nil { + invalidParams.Add(smithy.NewErrParamRequired("South")) } - if v.Colors != nil { - if err := validateDimensionFieldList(v.Colors); err != nil { - invalidParams.AddNested("Colors", err.(smithy.InvalidParamsError)) - } + if v.West == nil { + invalidParams.Add(smithy.NewErrParamRequired("West")) + } + if v.East == nil { + invalidParams.Add(smithy.NewErrParamRequired("East")) } if invalidParams.Len() > 0 { return invalidParams @@ -11412,34 +11509,14 @@ func validateGeospatialMapAggregatedFieldWells(v *types.GeospatialMapAggregatedF } } -func validateGeospatialMapConfiguration(v *types.GeospatialMapConfiguration) error { +func validateGeospatialDataSourceItem(v *types.GeospatialDataSourceItem) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "GeospatialMapConfiguration"} - if v.FieldWells != nil { - if err := validateGeospatialMapFieldWells(v.FieldWells); err != nil { - invalidParams.AddNested("FieldWells", err.(smithy.InvalidParamsError)) - } - } - if v.Tooltip != nil { - if err := validateTooltipOptions(v.Tooltip); err != nil { - invalidParams.AddNested("Tooltip", err.(smithy.InvalidParamsError)) - } - } - if v.WindowOptions != nil { - if err := validateGeospatialWindowOptions(v.WindowOptions); err != nil { - invalidParams.AddNested("WindowOptions", err.(smithy.InvalidParamsError)) - } - } - if v.PointStyleOptions != nil { - if err := validateGeospatialPointStyleOptions(v.PointStyleOptions); err != nil { - invalidParams.AddNested("PointStyleOptions", err.(smithy.InvalidParamsError)) - } - } - if v.VisualPalette != nil { - if err := validateVisualPalette(v.VisualPalette); err != nil { - invalidParams.AddNested("VisualPalette", err.(smithy.InvalidParamsError)) + invalidParams := smithy.InvalidParamsError{Context: "GeospatialDataSourceItem"} + if v.StaticFileDataSource != nil { + if err := validateGeospatialStaticFileSource(v.StaticFileDataSource); err != nil { + invalidParams.AddNested("StaticFileDataSource", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { @@ -11449,14 +11526,21 @@ func validateGeospatialMapConfiguration(v *types.GeospatialMapConfiguration) err } } -func validateGeospatialMapFieldWells(v *types.GeospatialMapFieldWells) error { +func validateGeospatialGradientColor(v *types.GeospatialGradientColor) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "GeospatialMapFieldWells"} - if v.GeospatialMapAggregatedFieldWells != nil { - if err := validateGeospatialMapAggregatedFieldWells(v.GeospatialMapAggregatedFieldWells); err != nil { - invalidParams.AddNested("GeospatialMapAggregatedFieldWells", err.(smithy.InvalidParamsError)) + invalidParams := smithy.InvalidParamsError{Context: "GeospatialGradientColor"} + if v.StepColors == nil { + invalidParams.Add(smithy.NewErrParamRequired("StepColors")) + } else if v.StepColors != nil { + if err := validateGeospatialGradientStepColorList(v.StepColors); err != nil { + invalidParams.AddNested("StepColors", err.(smithy.InvalidParamsError)) + } + } + if v.NullDataSettings != nil { + if err := validateGeospatialNullDataSettings(v.NullDataSettings); err != nil { + invalidParams.AddNested("NullDataSettings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { @@ -11466,28 +11550,13 @@ func validateGeospatialMapFieldWells(v *types.GeospatialMapFieldWells) error { } } -func validateGeospatialMapVisual(v *types.GeospatialMapVisual) error { +func validateGeospatialGradientStepColor(v *types.GeospatialGradientStepColor) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "GeospatialMapVisual"} - if v.VisualId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VisualId")) - } - if v.ChartConfiguration != nil { - if err := validateGeospatialMapConfiguration(v.ChartConfiguration); err != nil { - invalidParams.AddNested("ChartConfiguration", err.(smithy.InvalidParamsError)) - } - } - if v.ColumnHierarchies != nil { - if err := validateColumnHierarchyList(v.ColumnHierarchies); err != nil { - invalidParams.AddNested("ColumnHierarchies", err.(smithy.InvalidParamsError)) - } - } - if v.Actions != nil { - if err := validateVisualCustomActionList(v.Actions); err != nil { - invalidParams.AddNested("Actions", err.(smithy.InvalidParamsError)) - } + invalidParams := smithy.InvalidParamsError{Context: "GeospatialGradientStepColor"} + if v.Color == nil { + invalidParams.Add(smithy.NewErrParamRequired("Color")) } if invalidParams.Len() > 0 { return invalidParams @@ -11496,14 +11565,14 @@ func validateGeospatialMapVisual(v *types.GeospatialMapVisual) error { } } -func validateGeospatialPointStyleOptions(v *types.GeospatialPointStyleOptions) error { +func validateGeospatialGradientStepColorList(v []types.GeospatialGradientStepColor) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "GeospatialPointStyleOptions"} - if v.HeatmapConfiguration != nil { - if err := validateGeospatialHeatmapConfiguration(v.HeatmapConfiguration); err != nil { - invalidParams.AddNested("HeatmapConfiguration", err.(smithy.InvalidParamsError)) + invalidParams := smithy.InvalidParamsError{Context: "GeospatialGradientStepColorList"} + for i := range v { + if err := validateGeospatialGradientStepColor(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { @@ -11513,14 +11582,14 @@ func validateGeospatialPointStyleOptions(v *types.GeospatialPointStyleOptions) e } } -func validateGeospatialWindowOptions(v *types.GeospatialWindowOptions) error { +func validateGeospatialHeatmapColorScale(v *types.GeospatialHeatmapColorScale) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "GeospatialWindowOptions"} - if v.Bounds != nil { - if err := validateGeospatialCoordinateBounds(v.Bounds); err != nil { - invalidParams.AddNested("Bounds", err.(smithy.InvalidParamsError)) + invalidParams := smithy.InvalidParamsError{Context: "GeospatialHeatmapColorScale"} + if v.Colors != nil { + if err := validateGeospatialHeatmapDataColorList(v.Colors); err != nil { + invalidParams.AddNested("Colors", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { @@ -11530,14 +11599,14 @@ func validateGeospatialWindowOptions(v *types.GeospatialWindowOptions) error { } } -func validateGradientColor(v *types.GradientColor) error { +func validateGeospatialHeatmapConfiguration(v *types.GeospatialHeatmapConfiguration) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "GradientColor"} - if v.Stops != nil { - if err := validateGradientStopList(v.Stops); err != nil { - invalidParams.AddNested("Stops", err.(smithy.InvalidParamsError)) + invalidParams := smithy.InvalidParamsError{Context: "GeospatialHeatmapConfiguration"} + if v.HeatmapColor != nil { + if err := validateGeospatialHeatmapColorScale(v.HeatmapColor); err != nil { + invalidParams.AddNested("HeatmapColor", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { @@ -11547,11 +11616,14 @@ func validateGradientColor(v *types.GradientColor) error { } } -func validateGradientStop(v *types.GradientStop) error { +func validateGeospatialHeatmapDataColor(v *types.GeospatialHeatmapDataColor) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "GradientStop"} + invalidParams := smithy.InvalidParamsError{Context: "GeospatialHeatmapDataColor"} + if v.Color == nil { + invalidParams.Add(smithy.NewErrParamRequired("Color")) + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -11559,13 +11631,13 @@ func validateGradientStop(v *types.GradientStop) error { } } -func validateGradientStopList(v []types.GradientStop) error { +func validateGeospatialHeatmapDataColorList(v []types.GeospatialHeatmapDataColor) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "GradientStopList"} + invalidParams := smithy.InvalidParamsError{Context: "GeospatialHeatmapDataColorList"} for i := range v { - if err := validateGradientStop(&v[i]); err != nil { + if err := validateGeospatialHeatmapDataColor(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } @@ -11576,14 +11648,19 @@ func validateGradientStopList(v []types.GradientStop) error { } } -func validateGridLayoutCanvasSizeOptions(v *types.GridLayoutCanvasSizeOptions) error { +func validateGeospatialLayerColorField(v *types.GeospatialLayerColorField) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "GridLayoutCanvasSizeOptions"} - if v.ScreenCanvasSizeOptions != nil { - if err := validateGridLayoutScreenCanvasSizeOptions(v.ScreenCanvasSizeOptions); err != nil { - invalidParams.AddNested("ScreenCanvasSizeOptions", err.(smithy.InvalidParamsError)) + invalidParams := smithy.InvalidParamsError{Context: "GeospatialLayerColorField"} + if v.ColorDimensionsFields != nil { + if err := validateGeospatialLayerDimensionFieldList(v.ColorDimensionsFields); err != nil { + invalidParams.AddNested("ColorDimensionsFields", err.(smithy.InvalidParamsError)) + } + } + if v.ColorValuesFields != nil { + if err := validateGeospatialLayerMeasureFieldList(v.ColorValuesFields); err != nil { + invalidParams.AddNested("ColorValuesFields", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { @@ -11593,21 +11670,24 @@ func validateGridLayoutCanvasSizeOptions(v *types.GridLayoutCanvasSizeOptions) e } } -func validateGridLayoutConfiguration(v *types.GridLayoutConfiguration) error { +func validateGeospatialLayerDefinition(v *types.GeospatialLayerDefinition) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "GridLayoutConfiguration"} - if v.Elements == nil { - invalidParams.Add(smithy.NewErrParamRequired("Elements")) - } else if v.Elements != nil { - if err := validateGridLayoutElementList(v.Elements); err != nil { - invalidParams.AddNested("Elements", err.(smithy.InvalidParamsError)) + invalidParams := smithy.InvalidParamsError{Context: "GeospatialLayerDefinition"} + if v.PointLayer != nil { + if err := validateGeospatialPointLayer(v.PointLayer); err != nil { + invalidParams.AddNested("PointLayer", err.(smithy.InvalidParamsError)) } } - if v.CanvasSizeOptions != nil { - if err := validateGridLayoutCanvasSizeOptions(v.CanvasSizeOptions); err != nil { - invalidParams.AddNested("CanvasSizeOptions", err.(smithy.InvalidParamsError)) + if v.LineLayer != nil { + if err := validateGeospatialLineLayer(v.LineLayer); err != nil { + invalidParams.AddNested("LineLayer", err.(smithy.InvalidParamsError)) + } + } + if v.PolygonLayer != nil { + if err := validateGeospatialPolygonLayer(v.PolygonLayer); err != nil { + invalidParams.AddNested("PolygonLayer", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { @@ -11617,11 +11697,587 @@ func validateGridLayoutConfiguration(v *types.GridLayoutConfiguration) error { } } -func validateGridLayoutElement(v *types.GridLayoutElement) error { +func validateGeospatialLayerDimensionFieldList(v []types.DimensionField) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "GridLayoutElement"} + invalidParams := smithy.InvalidParamsError{Context: "GeospatialLayerDimensionFieldList"} + for i := range v { + if err := validateDimensionField(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateGeospatialLayerItem(v *types.GeospatialLayerItem) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GeospatialLayerItem"} + if v.LayerId == nil { + invalidParams.Add(smithy.NewErrParamRequired("LayerId")) + } + if v.DataSource != nil { + if err := validateGeospatialDataSourceItem(v.DataSource); err != nil { + invalidParams.AddNested("DataSource", err.(smithy.InvalidParamsError)) + } + } + if v.LayerDefinition != nil { + if err := validateGeospatialLayerDefinition(v.LayerDefinition); err != nil { + invalidParams.AddNested("LayerDefinition", err.(smithy.InvalidParamsError)) + } + } + if v.Tooltip != nil { + if err := validateTooltipOptions(v.Tooltip); err != nil { + invalidParams.AddNested("Tooltip", err.(smithy.InvalidParamsError)) + } + } + if v.JoinDefinition != nil { + if err := validateGeospatialLayerJoinDefinition(v.JoinDefinition); err != nil { + invalidParams.AddNested("JoinDefinition", err.(smithy.InvalidParamsError)) + } + } + if v.Actions != nil { + if err := validateLayerCustomActionList(v.Actions); err != nil { + invalidParams.AddNested("Actions", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateGeospatialLayerJoinDefinition(v *types.GeospatialLayerJoinDefinition) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GeospatialLayerJoinDefinition"} + if v.DatasetKeyField != nil { + if err := validateUnaggregatedField(v.DatasetKeyField); err != nil { + invalidParams.AddNested("DatasetKeyField", err.(smithy.InvalidParamsError)) + } + } + if v.ColorField != nil { + if err := validateGeospatialLayerColorField(v.ColorField); err != nil { + invalidParams.AddNested("ColorField", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateGeospatialLayerMapConfiguration(v *types.GeospatialLayerMapConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GeospatialLayerMapConfiguration"} + if v.MapLayers != nil { + if err := validateGeospatialMapLayerList(v.MapLayers); err != nil { + invalidParams.AddNested("MapLayers", err.(smithy.InvalidParamsError)) + } + } + if v.MapState != nil { + if err := validateGeospatialMapState(v.MapState); err != nil { + invalidParams.AddNested("MapState", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateGeospatialLayerMeasureFieldList(v []types.MeasureField) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GeospatialLayerMeasureFieldList"} + for i := range v { + if err := validateMeasureField(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateGeospatialLineLayer(v *types.GeospatialLineLayer) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GeospatialLineLayer"} + if v.Style == nil { + invalidParams.Add(smithy.NewErrParamRequired("Style")) + } else if v.Style != nil { + if err := validateGeospatialLineStyle(v.Style); err != nil { + invalidParams.AddNested("Style", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateGeospatialLineStyle(v *types.GeospatialLineStyle) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GeospatialLineStyle"} + if v.LineSymbolStyle != nil { + if err := validateGeospatialLineSymbolStyle(v.LineSymbolStyle); err != nil { + invalidParams.AddNested("LineSymbolStyle", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateGeospatialLineSymbolStyle(v *types.GeospatialLineSymbolStyle) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GeospatialLineSymbolStyle"} + if v.FillColor != nil { + if err := validateGeospatialColor(v.FillColor); err != nil { + invalidParams.AddNested("FillColor", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateGeospatialMapAggregatedFieldWells(v *types.GeospatialMapAggregatedFieldWells) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GeospatialMapAggregatedFieldWells"} + if v.Geospatial != nil { + if err := validateDimensionFieldList(v.Geospatial); err != nil { + invalidParams.AddNested("Geospatial", err.(smithy.InvalidParamsError)) + } + } + if v.Values != nil { + if err := validateMeasureFieldList(v.Values); err != nil { + invalidParams.AddNested("Values", err.(smithy.InvalidParamsError)) + } + } + if v.Colors != nil { + if err := validateDimensionFieldList(v.Colors); err != nil { + invalidParams.AddNested("Colors", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateGeospatialMapConfiguration(v *types.GeospatialMapConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GeospatialMapConfiguration"} + if v.FieldWells != nil { + if err := validateGeospatialMapFieldWells(v.FieldWells); err != nil { + invalidParams.AddNested("FieldWells", err.(smithy.InvalidParamsError)) + } + } + if v.Tooltip != nil { + if err := validateTooltipOptions(v.Tooltip); err != nil { + invalidParams.AddNested("Tooltip", err.(smithy.InvalidParamsError)) + } + } + if v.WindowOptions != nil { + if err := validateGeospatialWindowOptions(v.WindowOptions); err != nil { + invalidParams.AddNested("WindowOptions", err.(smithy.InvalidParamsError)) + } + } + if v.PointStyleOptions != nil { + if err := validateGeospatialPointStyleOptions(v.PointStyleOptions); err != nil { + invalidParams.AddNested("PointStyleOptions", err.(smithy.InvalidParamsError)) + } + } + if v.VisualPalette != nil { + if err := validateVisualPalette(v.VisualPalette); err != nil { + invalidParams.AddNested("VisualPalette", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateGeospatialMapFieldWells(v *types.GeospatialMapFieldWells) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GeospatialMapFieldWells"} + if v.GeospatialMapAggregatedFieldWells != nil { + if err := validateGeospatialMapAggregatedFieldWells(v.GeospatialMapAggregatedFieldWells); err != nil { + invalidParams.AddNested("GeospatialMapAggregatedFieldWells", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateGeospatialMapLayerList(v []types.GeospatialLayerItem) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GeospatialMapLayerList"} + for i := range v { + if err := validateGeospatialLayerItem(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateGeospatialMapState(v *types.GeospatialMapState) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GeospatialMapState"} + if v.Bounds != nil { + if err := validateGeospatialCoordinateBounds(v.Bounds); err != nil { + invalidParams.AddNested("Bounds", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateGeospatialMapVisual(v *types.GeospatialMapVisual) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GeospatialMapVisual"} + if v.VisualId == nil { + invalidParams.Add(smithy.NewErrParamRequired("VisualId")) + } + if v.ChartConfiguration != nil { + if err := validateGeospatialMapConfiguration(v.ChartConfiguration); err != nil { + invalidParams.AddNested("ChartConfiguration", err.(smithy.InvalidParamsError)) + } + } + if v.ColumnHierarchies != nil { + if err := validateColumnHierarchyList(v.ColumnHierarchies); err != nil { + invalidParams.AddNested("ColumnHierarchies", err.(smithy.InvalidParamsError)) + } + } + if v.Actions != nil { + if err := validateVisualCustomActionList(v.Actions); err != nil { + invalidParams.AddNested("Actions", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateGeospatialNullDataSettings(v *types.GeospatialNullDataSettings) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GeospatialNullDataSettings"} + if v.SymbolStyle == nil { + invalidParams.Add(smithy.NewErrParamRequired("SymbolStyle")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateGeospatialPointLayer(v *types.GeospatialPointLayer) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GeospatialPointLayer"} + if v.Style == nil { + invalidParams.Add(smithy.NewErrParamRequired("Style")) + } else if v.Style != nil { + if err := validateGeospatialPointStyle(v.Style); err != nil { + invalidParams.AddNested("Style", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateGeospatialPointStyle(v *types.GeospatialPointStyle) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GeospatialPointStyle"} + if v.CircleSymbolStyle != nil { + if err := validateGeospatialCircleSymbolStyle(v.CircleSymbolStyle); err != nil { + invalidParams.AddNested("CircleSymbolStyle", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateGeospatialPointStyleOptions(v *types.GeospatialPointStyleOptions) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GeospatialPointStyleOptions"} + if v.HeatmapConfiguration != nil { + if err := validateGeospatialHeatmapConfiguration(v.HeatmapConfiguration); err != nil { + invalidParams.AddNested("HeatmapConfiguration", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateGeospatialPolygonLayer(v *types.GeospatialPolygonLayer) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GeospatialPolygonLayer"} + if v.Style == nil { + invalidParams.Add(smithy.NewErrParamRequired("Style")) + } else if v.Style != nil { + if err := validateGeospatialPolygonStyle(v.Style); err != nil { + invalidParams.AddNested("Style", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateGeospatialPolygonStyle(v *types.GeospatialPolygonStyle) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GeospatialPolygonStyle"} + if v.PolygonSymbolStyle != nil { + if err := validateGeospatialPolygonSymbolStyle(v.PolygonSymbolStyle); err != nil { + invalidParams.AddNested("PolygonSymbolStyle", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateGeospatialPolygonSymbolStyle(v *types.GeospatialPolygonSymbolStyle) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GeospatialPolygonSymbolStyle"} + if v.FillColor != nil { + if err := validateGeospatialColor(v.FillColor); err != nil { + invalidParams.AddNested("FillColor", err.(smithy.InvalidParamsError)) + } + } + if v.StrokeColor != nil { + if err := validateGeospatialColor(v.StrokeColor); err != nil { + invalidParams.AddNested("StrokeColor", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateGeospatialSolidColor(v *types.GeospatialSolidColor) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GeospatialSolidColor"} + if v.Color == nil { + invalidParams.Add(smithy.NewErrParamRequired("Color")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateGeospatialStaticFileSource(v *types.GeospatialStaticFileSource) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GeospatialStaticFileSource"} + if v.StaticFileId == nil { + invalidParams.Add(smithy.NewErrParamRequired("StaticFileId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateGeospatialWindowOptions(v *types.GeospatialWindowOptions) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GeospatialWindowOptions"} + if v.Bounds != nil { + if err := validateGeospatialCoordinateBounds(v.Bounds); err != nil { + invalidParams.AddNested("Bounds", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateGradientColor(v *types.GradientColor) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GradientColor"} + if v.Stops != nil { + if err := validateGradientStopList(v.Stops); err != nil { + invalidParams.AddNested("Stops", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateGradientStop(v *types.GradientStop) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GradientStop"} + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateGradientStopList(v []types.GradientStop) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GradientStopList"} + for i := range v { + if err := validateGradientStop(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateGridLayoutCanvasSizeOptions(v *types.GridLayoutCanvasSizeOptions) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GridLayoutCanvasSizeOptions"} + if v.ScreenCanvasSizeOptions != nil { + if err := validateGridLayoutScreenCanvasSizeOptions(v.ScreenCanvasSizeOptions); err != nil { + invalidParams.AddNested("ScreenCanvasSizeOptions", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateGridLayoutConfiguration(v *types.GridLayoutConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GridLayoutConfiguration"} + if v.Elements == nil { + invalidParams.Add(smithy.NewErrParamRequired("Elements")) + } else if v.Elements != nil { + if err := validateGridLayoutElementList(v.Elements); err != nil { + invalidParams.AddNested("Elements", err.(smithy.InvalidParamsError)) + } + } + if v.CanvasSizeOptions != nil { + if err := validateGridLayoutCanvasSizeOptions(v.CanvasSizeOptions); err != nil { + invalidParams.AddNested("CanvasSizeOptions", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateGridLayoutElement(v *types.GridLayoutElement) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GridLayoutElement"} if v.ElementId == nil { invalidParams.Add(smithy.NewErrParamRequired("ElementId")) } @@ -12030,22 +12686,109 @@ func validateHistogramMeasureFieldList(v []types.MeasureField) error { } } -func validateHistogramVisual(v *types.HistogramVisual) error { +func validateHistogramVisual(v *types.HistogramVisual) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "HistogramVisual"} + if v.VisualId == nil { + invalidParams.Add(smithy.NewErrParamRequired("VisualId")) + } + if v.ChartConfiguration != nil { + if err := validateHistogramConfiguration(v.ChartConfiguration); err != nil { + invalidParams.AddNested("ChartConfiguration", err.(smithy.InvalidParamsError)) + } + } + if v.Actions != nil { + if err := validateVisualCustomActionList(v.Actions); err != nil { + invalidParams.AddNested("Actions", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateIdentifier(v *types.Identifier) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Identifier"} + if v.Identity == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identity")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateImageCustomAction(v *types.ImageCustomAction) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ImageCustomAction"} + if v.CustomActionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("CustomActionId")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if len(v.Trigger) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Trigger")) + } + if v.ActionOperations == nil { + invalidParams.Add(smithy.NewErrParamRequired("ActionOperations")) + } else if v.ActionOperations != nil { + if err := validateImageCustomActionOperationList(v.ActionOperations); err != nil { + invalidParams.AddNested("ActionOperations", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateImageCustomActionList(v []types.ImageCustomAction) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ImageCustomActionList"} + for i := range v { + if err := validateImageCustomAction(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateImageCustomActionOperation(v *types.ImageCustomActionOperation) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "HistogramVisual"} - if v.VisualId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VisualId")) + invalidParams := smithy.InvalidParamsError{Context: "ImageCustomActionOperation"} + if v.NavigationOperation != nil { + if err := validateCustomActionNavigationOperation(v.NavigationOperation); err != nil { + invalidParams.AddNested("NavigationOperation", err.(smithy.InvalidParamsError)) + } } - if v.ChartConfiguration != nil { - if err := validateHistogramConfiguration(v.ChartConfiguration); err != nil { - invalidParams.AddNested("ChartConfiguration", err.(smithy.InvalidParamsError)) + if v.URLOperation != nil { + if err := validateCustomActionURLOperation(v.URLOperation); err != nil { + invalidParams.AddNested("URLOperation", err.(smithy.InvalidParamsError)) } } - if v.Actions != nil { - if err := validateVisualCustomActionList(v.Actions); err != nil { - invalidParams.AddNested("Actions", err.(smithy.InvalidParamsError)) + if v.SetParametersOperation != nil { + if err := validateCustomActionSetParametersOperation(v.SetParametersOperation); err != nil { + invalidParams.AddNested("SetParametersOperation", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { @@ -12055,13 +12798,15 @@ func validateHistogramVisual(v *types.HistogramVisual) error { } } -func validateIdentifier(v *types.Identifier) error { +func validateImageCustomActionOperationList(v []types.ImageCustomActionOperation) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "Identifier"} - if v.Identity == nil { - invalidParams.Add(smithy.NewErrParamRequired("Identity")) + invalidParams := smithy.InvalidParamsError{Context: "ImageCustomActionOperationList"} + for i := range v { + if err := validateImageCustomActionOperation(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } } if invalidParams.Len() > 0 { return invalidParams @@ -12085,6 +12830,26 @@ func validateImageSetConfiguration(v *types.ImageSetConfiguration) error { } } +func validateImageStaticFile(v *types.ImageStaticFile) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ImageStaticFile"} + if v.StaticFileId == nil { + invalidParams.Add(smithy.NewErrParamRequired("StaticFileId")) + } + if v.Source != nil { + if err := validateStaticFileSource(v.Source); err != nil { + invalidParams.AddNested("Source", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateIncrementalRefresh(v *types.IncrementalRefresh) error { if v == nil { return nil @@ -12675,6 +13440,123 @@ func validateKPIVisualStandardLayout(v *types.KPIVisualStandardLayout) error { } } +func validateLayerCustomAction(v *types.LayerCustomAction) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "LayerCustomAction"} + if v.CustomActionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("CustomActionId")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if len(v.Trigger) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Trigger")) + } + if v.ActionOperations == nil { + invalidParams.Add(smithy.NewErrParamRequired("ActionOperations")) + } else if v.ActionOperations != nil { + if err := validateLayerCustomActionOperationList(v.ActionOperations); err != nil { + invalidParams.AddNested("ActionOperations", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateLayerCustomActionList(v []types.LayerCustomAction) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "LayerCustomActionList"} + for i := range v { + if err := validateLayerCustomAction(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateLayerCustomActionOperation(v *types.LayerCustomActionOperation) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "LayerCustomActionOperation"} + if v.FilterOperation != nil { + if err := validateCustomActionFilterOperation(v.FilterOperation); err != nil { + invalidParams.AddNested("FilterOperation", err.(smithy.InvalidParamsError)) + } + } + if v.NavigationOperation != nil { + if err := validateCustomActionNavigationOperation(v.NavigationOperation); err != nil { + invalidParams.AddNested("NavigationOperation", err.(smithy.InvalidParamsError)) + } + } + if v.URLOperation != nil { + if err := validateCustomActionURLOperation(v.URLOperation); err != nil { + invalidParams.AddNested("URLOperation", err.(smithy.InvalidParamsError)) + } + } + if v.SetParametersOperation != nil { + if err := validateCustomActionSetParametersOperation(v.SetParametersOperation); err != nil { + invalidParams.AddNested("SetParametersOperation", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateLayerCustomActionOperationList(v []types.LayerCustomActionOperation) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "LayerCustomActionOperationList"} + for i := range v { + if err := validateLayerCustomActionOperation(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateLayerMapVisual(v *types.LayerMapVisual) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "LayerMapVisual"} + if v.VisualId == nil { + invalidParams.Add(smithy.NewErrParamRequired("VisualId")) + } + if v.ChartConfiguration != nil { + if err := validateGeospatialLayerMapConfiguration(v.ChartConfiguration); err != nil { + invalidParams.AddNested("ChartConfiguration", err.(smithy.InvalidParamsError)) + } + } + if v.DataSetIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("DataSetIdentifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateLayout(v *types.Layout) error { if v == nil { return nil @@ -14619,27 +15501,150 @@ func validatePivotTableTotalOptions(v *types.PivotTableTotalOptions) error { } } -func validatePivotTableVisual(v *types.PivotTableVisual) error { +func validatePivotTableVisual(v *types.PivotTableVisual) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PivotTableVisual"} + if v.VisualId == nil { + invalidParams.Add(smithy.NewErrParamRequired("VisualId")) + } + if v.ChartConfiguration != nil { + if err := validatePivotTableConfiguration(v.ChartConfiguration); err != nil { + invalidParams.AddNested("ChartConfiguration", err.(smithy.InvalidParamsError)) + } + } + if v.ConditionalFormatting != nil { + if err := validatePivotTableConditionalFormatting(v.ConditionalFormatting); err != nil { + invalidParams.AddNested("ConditionalFormatting", err.(smithy.InvalidParamsError)) + } + } + if v.Actions != nil { + if err := validateVisualCustomActionList(v.Actions); err != nil { + invalidParams.AddNested("Actions", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validatePivotTotalOptions(v *types.PivotTotalOptions) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PivotTotalOptions"} + if v.TotalAggregationOptions != nil { + if err := validateTotalAggregationOptionList(v.TotalAggregationOptions); err != nil { + invalidParams.AddNested("TotalAggregationOptions", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validatePluginVisual(v *types.PluginVisual) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PluginVisual"} + if v.VisualId == nil { + invalidParams.Add(smithy.NewErrParamRequired("VisualId")) + } + if v.PluginArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("PluginArn")) + } + if v.ChartConfiguration != nil { + if err := validatePluginVisualConfiguration(v.ChartConfiguration); err != nil { + invalidParams.AddNested("ChartConfiguration", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validatePluginVisualConfiguration(v *types.PluginVisualConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PluginVisualConfiguration"} + if v.FieldWells != nil { + if err := validatePluginVisualFieldWells(v.FieldWells); err != nil { + invalidParams.AddNested("FieldWells", err.(smithy.InvalidParamsError)) + } + } + if v.SortConfiguration != nil { + if err := validatePluginVisualSortConfiguration(v.SortConfiguration); err != nil { + invalidParams.AddNested("SortConfiguration", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validatePluginVisualFieldWell(v *types.PluginVisualFieldWell) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PluginVisualFieldWell"} + if v.Dimensions != nil { + if err := validateDimensionFieldList(v.Dimensions); err != nil { + invalidParams.AddNested("Dimensions", err.(smithy.InvalidParamsError)) + } + } + if v.Measures != nil { + if err := validateMeasureFieldList(v.Measures); err != nil { + invalidParams.AddNested("Measures", err.(smithy.InvalidParamsError)) + } + } + if v.Unaggregated != nil { + if err := validateUnaggregatedFieldList(v.Unaggregated); err != nil { + invalidParams.AddNested("Unaggregated", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validatePluginVisualFieldWells(v []types.PluginVisualFieldWell) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PluginVisualFieldWells"} + for i := range v { + if err := validatePluginVisualFieldWell(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validatePluginVisualSortConfiguration(v *types.PluginVisualSortConfiguration) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "PivotTableVisual"} - if v.VisualId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VisualId")) - } - if v.ChartConfiguration != nil { - if err := validatePivotTableConfiguration(v.ChartConfiguration); err != nil { - invalidParams.AddNested("ChartConfiguration", err.(smithy.InvalidParamsError)) - } - } - if v.ConditionalFormatting != nil { - if err := validatePivotTableConditionalFormatting(v.ConditionalFormatting); err != nil { - invalidParams.AddNested("ConditionalFormatting", err.(smithy.InvalidParamsError)) - } - } - if v.Actions != nil { - if err := validateVisualCustomActionList(v.Actions); err != nil { - invalidParams.AddNested("Actions", err.(smithy.InvalidParamsError)) + invalidParams := smithy.InvalidParamsError{Context: "PluginVisualSortConfiguration"} + if v.PluginVisualTableQuerySort != nil { + if err := validatePluginVisualTableQuerySort(v.PluginVisualTableQuerySort); err != nil { + invalidParams.AddNested("PluginVisualTableQuerySort", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { @@ -14649,14 +15654,14 @@ func validatePivotTableVisual(v *types.PivotTableVisual) error { } } -func validatePivotTotalOptions(v *types.PivotTotalOptions) error { +func validatePluginVisualTableQuerySort(v *types.PluginVisualTableQuerySort) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "PivotTotalOptions"} - if v.TotalAggregationOptions != nil { - if err := validateTotalAggregationOptionList(v.TotalAggregationOptions); err != nil { - invalidParams.AddNested("TotalAggregationOptions", err.(smithy.InvalidParamsError)) + invalidParams := smithy.InvalidParamsError{Context: "PluginVisualTableQuerySort"} + if v.RowSort != nil { + if err := validateRowSortList(v.RowSort); err != nil { + invalidParams.AddNested("RowSort", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { @@ -16217,6 +17222,11 @@ func validateSheetDefinition(v *types.SheetDefinition) error { invalidParams.AddNested("TextBoxes", err.(smithy.InvalidParamsError)) } } + if v.Images != nil { + if err := validateSheetImageList(v.Images); err != nil { + invalidParams.AddNested("Images", err.(smithy.InvalidParamsError)) + } + } if v.Layouts != nil { if err := validateLayoutList(v.Layouts); err != nil { invalidParams.AddNested("Layouts", err.(smithy.InvalidParamsError)) @@ -16286,6 +17296,82 @@ func validateSheetElementRenderingRuleList(v []types.SheetElementRenderingRule) } } +func validateSheetImage(v *types.SheetImage) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SheetImage"} + if v.SheetImageId == nil { + invalidParams.Add(smithy.NewErrParamRequired("SheetImageId")) + } + if v.Source == nil { + invalidParams.Add(smithy.NewErrParamRequired("Source")) + } else if v.Source != nil { + if err := validateSheetImageSource(v.Source); err != nil { + invalidParams.AddNested("Source", err.(smithy.InvalidParamsError)) + } + } + if v.Actions != nil { + if err := validateImageCustomActionList(v.Actions); err != nil { + invalidParams.AddNested("Actions", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateSheetImageList(v []types.SheetImage) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SheetImageList"} + for i := range v { + if err := validateSheetImage(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateSheetImageSource(v *types.SheetImageSource) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SheetImageSource"} + if v.SheetImageStaticFileSource != nil { + if err := validateSheetImageStaticFileSource(v.SheetImageStaticFileSource); err != nil { + invalidParams.AddNested("SheetImageStaticFileSource", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateSheetImageStaticFileSource(v *types.SheetImageStaticFileSource) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SheetImageStaticFileSource"} + if v.StaticFileId == nil { + invalidParams.Add(smithy.NewErrParamRequired("StaticFileId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateSheetTextBox(v *types.SheetTextBox) error { if v == nil { return nil @@ -16672,6 +17758,26 @@ func validateSparkParameters(v *types.SparkParameters) error { } } +func validateSpatialStaticFile(v *types.SpatialStaticFile) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SpatialStaticFile"} + if v.StaticFileId == nil { + invalidParams.Add(smithy.NewErrParamRequired("StaticFileId")) + } + if v.Source != nil { + if err := validateStaticFileSource(v.Source); err != nil { + invalidParams.AddNested("Source", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateSqlServerParameters(v *types.SqlServerParameters) error { if v == nil { return nil @@ -16731,6 +17837,103 @@ func validateStatePersistenceConfigurations(v *types.StatePersistenceConfigurati } } +func validateStaticFile(v *types.StaticFile) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StaticFile"} + if v.ImageStaticFile != nil { + if err := validateImageStaticFile(v.ImageStaticFile); err != nil { + invalidParams.AddNested("ImageStaticFile", err.(smithy.InvalidParamsError)) + } + } + if v.SpatialStaticFile != nil { + if err := validateSpatialStaticFile(v.SpatialStaticFile); err != nil { + invalidParams.AddNested("SpatialStaticFile", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateStaticFileList(v []types.StaticFile) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StaticFileList"} + for i := range v { + if err := validateStaticFile(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateStaticFileS3SourceOptions(v *types.StaticFileS3SourceOptions) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StaticFileS3SourceOptions"} + if v.BucketName == nil { + invalidParams.Add(smithy.NewErrParamRequired("BucketName")) + } + if v.ObjectKey == nil { + invalidParams.Add(smithy.NewErrParamRequired("ObjectKey")) + } + if v.Region == nil { + invalidParams.Add(smithy.NewErrParamRequired("Region")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateStaticFileSource(v *types.StaticFileSource) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StaticFileSource"} + if v.UrlOptions != nil { + if err := validateStaticFileUrlSourceOptions(v.UrlOptions); err != nil { + invalidParams.AddNested("UrlOptions", err.(smithy.InvalidParamsError)) + } + } + if v.S3Options != nil { + if err := validateStaticFileS3SourceOptions(v.S3Options); err != nil { + invalidParams.AddNested("S3Options", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateStaticFileUrlSourceOptions(v *types.StaticFileUrlSourceOptions) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StaticFileUrlSourceOptions"} + if v.Url == nil { + invalidParams.Add(smithy.NewErrParamRequired("Url")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateStringDatasetParameter(v *types.StringDatasetParameter) error { if v == nil { return nil @@ -17460,6 +18663,11 @@ func validateTemplateVersionDefinition(v *types.TemplateVersionDefinition) error invalidParams.AddNested("AnalysisDefaults", err.(smithy.InvalidParamsError)) } } + if v.StaticFiles != nil { + if err := validateStaticFileList(v.StaticFiles); err != nil { + invalidParams.AddNested("StaticFiles", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -18147,6 +19355,44 @@ func validateTopicRefreshSchedule(v *types.TopicRefreshSchedule) error { } } +func validateTopicSearchFilter(v *types.TopicSearchFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TopicSearchFilter"} + if len(v.Operator) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Operator")) + } + if len(v.Name) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Value == nil { + invalidParams.Add(smithy.NewErrParamRequired("Value")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateTopicSearchFilterList(v []types.TopicSearchFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TopicSearchFilterList"} + for i := range v { + if err := validateTopicSearchFilter(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateTopicSortClause(v *types.TopicSortClause) error { if v == nil { return nil @@ -18748,6 +19994,11 @@ func validateVisual(v *types.Visual) error { invalidParams.AddNested("FilledMapVisual", err.(smithy.InvalidParamsError)) } } + if v.LayerMapVisual != nil { + if err := validateLayerMapVisual(v.LayerMapVisual); err != nil { + invalidParams.AddNested("LayerMapVisual", err.(smithy.InvalidParamsError)) + } + } if v.FunnelChartVisual != nil { if err := validateFunnelChartVisual(v.FunnelChartVisual); err != nil { invalidParams.AddNested("FunnelChartVisual", err.(smithy.InvalidParamsError)) @@ -18808,6 +20059,11 @@ func validateVisual(v *types.Visual) error { invalidParams.AddNested("RadarChartVisual", err.(smithy.InvalidParamsError)) } } + if v.PluginVisual != nil { + if err := validatePluginVisual(v.PluginVisual); err != nil { + invalidParams.AddNested("PluginVisual", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -20982,6 +22238,21 @@ func validateOpDescribeDashboardSnapshotJobResultInput(v *DescribeDashboardSnaps } } +func validateOpDescribeDashboardsQAConfigurationInput(v *DescribeDashboardsQAConfigurationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeDashboardsQAConfigurationInput"} + if v.AwsAccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AwsAccountId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDescribeDataSetInput(v *DescribeDataSetInput) error { if v == nil { return nil @@ -22439,6 +23710,28 @@ func validateOpSearchGroupsInput(v *SearchGroupsInput) error { } } +func validateOpSearchTopicsInput(v *SearchTopicsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SearchTopicsInput"} + if v.AwsAccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AwsAccountId")) + } + if v.Filters == nil { + invalidParams.Add(smithy.NewErrParamRequired("Filters")) + } else if v.Filters != nil { + if err := validateTopicSearchFilterList(v.Filters); err != nil { + invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpStartAssetBundleExportJobInput(v *StartAssetBundleExportJobInput) error { if v == nil { return nil @@ -22906,6 +24199,24 @@ func validateOpUpdateDashboardPublishedVersionInput(v *UpdateDashboardPublishedV } } +func validateOpUpdateDashboardsQAConfigurationInput(v *UpdateDashboardsQAConfigurationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateDashboardsQAConfigurationInput"} + if v.AwsAccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AwsAccountId")) + } + if len(v.DashboardsQAStatus) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("DashboardsQAStatus")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateDataSetInput(v *UpdateDataSetInput) error { if v == nil { return nil diff --git a/service/sagemaker/api_op_CreateInferenceComponent.go b/service/sagemaker/api_op_CreateInferenceComponent.go index 03666e4e067..dcd9615dd0e 100644 --- a/service/sagemaker/api_op_CreateInferenceComponent.go +++ b/service/sagemaker/api_op_CreateInferenceComponent.go @@ -47,22 +47,14 @@ type CreateInferenceComponentInput struct { // This member is required. InferenceComponentName *string - // Runtime settings for a model that is deployed with an inference component. - // - // This member is required. - RuntimeConfig *types.InferenceComponentRuntimeConfig - // Details about the resources to deploy with this inference component, including // the model, container, and compute resources. // // This member is required. Specification *types.InferenceComponentSpecification - // The name of an existing production variant where you host the inference - // component. - // - // This member is required. - VariantName *string + // Runtime settings for a model that is deployed with an inference component. + RuntimeConfig *types.InferenceComponentRuntimeConfig // A list of key-value pairs associated with the model. For more information, see [Tagging Amazon Web Services resources] // in the Amazon Web Services General Reference. @@ -70,6 +62,10 @@ type CreateInferenceComponentInput struct { // [Tagging Amazon Web Services resources]: https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tags []types.Tag + // The name of an existing production variant where you host the inference + // component. + VariantName *string + noSmithyDocumentSerde } diff --git a/service/sagemaker/deserializers.go b/service/sagemaker/deserializers.go index 1b2054e14fa..d1b4aa27d81 100644 --- a/service/sagemaker/deserializers.go +++ b/service/sagemaker/deserializers.go @@ -42842,6 +42842,11 @@ func awsAwsjson11_deserializeDocumentClusterInstanceGroupDetails(v **types.Clust return err } + case "OverrideVpcConfig": + if err := awsAwsjson11_deserializeDocumentVpcConfig(&sv.OverrideVpcConfig, value); err != nil { + return err + } + case "TargetCount": if value != nil { jtv, ok := value.(json.Number) @@ -43210,6 +43215,11 @@ func awsAwsjson11_deserializeDocumentClusterNodeDetails(v **types.ClusterNodeDet return err } + case "OverrideVpcConfig": + if err := awsAwsjson11_deserializeDocumentVpcConfig(&sv.OverrideVpcConfig, value); err != nil { + return err + } + case "Placement": if err := awsAwsjson11_deserializeDocumentClusterInstancePlacement(&sv.Placement, value); err != nil { return err @@ -56570,6 +56580,15 @@ func awsAwsjson11_deserializeDocumentInferenceComponentSpecificationSummary(v ** for key, value := range shape { switch key { + case "BaseInferenceComponentName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InferenceComponentName to be of type string, got %T instead", value) + } + sv.BaseInferenceComponentName = ptr.String(jtv) + } + case "ComputeResourceRequirements": if err := awsAwsjson11_deserializeDocumentInferenceComponentComputeResourceRequirements(&sv.ComputeResourceRequirements, value); err != nil { return err @@ -64304,6 +64323,51 @@ func awsAwsjson11_deserializeDocumentModelRegisterSettings(v **types.ModelRegist return nil } +func awsAwsjson11_deserializeDocumentModelShardingConfig(v **types.ModelShardingConfig, 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.ModelShardingConfig + if *v == nil { + sv = &types.ModelShardingConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Image": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OptimizationContainerImage to be of type string, got %T instead", value) + } + sv.Image = ptr.String(jtv) + } + + case "OverrideEnvironment": + if err := awsAwsjson11_deserializeDocumentOptimizationJobEnvironmentVariables(&sv.OverrideEnvironment, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentModelStepMetadata(v **types.ModelStepMetadata, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -67628,6 +67692,16 @@ loop: uv = &types.OptimizationConfigMemberModelQuantizationConfig{Value: mv} break loop + case "ModelShardingConfig": + var mv types.ModelShardingConfig + destAddr := &mv + if err := awsAwsjson11_deserializeDocumentModelShardingConfig(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.OptimizationConfigMemberModelShardingConfig{Value: mv} + break loop + default: uv = &types.UnknownUnionMember{Tag: key} break loop diff --git a/service/sagemaker/serializers.go b/service/sagemaker/serializers.go index b80cccd09f4..f4d69fa3d01 100644 --- a/service/sagemaker/serializers.go +++ b/service/sagemaker/serializers.go @@ -22340,6 +22340,13 @@ func awsAwsjson11_serializeDocumentClusterInstanceGroupSpecification(v *types.Cl } } + if v.OverrideVpcConfig != nil { + ok := object.Key("OverrideVpcConfig") + if err := awsAwsjson11_serializeDocumentVpcConfig(v.OverrideVpcConfig, ok); err != nil { + return err + } + } + if v.ThreadsPerCore != nil { ok := object.Key("ThreadsPerCore") ok.Integer(*v.ThreadsPerCore) @@ -25643,6 +25650,11 @@ func awsAwsjson11_serializeDocumentInferenceComponentSpecification(v *types.Infe object := value.Object() defer object.Close() + if v.BaseInferenceComponentName != nil { + ok := object.Key("BaseInferenceComponentName") + ok.String(*v.BaseInferenceComponentName) + } + if v.ComputeResourceRequirements != nil { ok := object.Key("ComputeResourceRequirements") if err := awsAwsjson11_serializeDocumentInferenceComponentComputeResourceRequirements(v.ComputeResourceRequirements, ok); err != nil { @@ -27250,6 +27262,25 @@ func awsAwsjson11_serializeDocumentModelRegisterSettings(v *types.ModelRegisterS return nil } +func awsAwsjson11_serializeDocumentModelShardingConfig(v *types.ModelShardingConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Image != nil { + ok := object.Key("Image") + ok.String(*v.Image) + } + + if v.OverrideEnvironment != nil { + ok := object.Key("OverrideEnvironment") + if err := awsAwsjson11_serializeDocumentOptimizationJobEnvironmentVariables(v.OverrideEnvironment, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson11_serializeDocumentModelVariantActionMap(v map[string]types.ModelVariantAction, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -28103,6 +28134,12 @@ func awsAwsjson11_serializeDocumentOptimizationConfig(v types.OptimizationConfig return err } + case *types.OptimizationConfigMemberModelShardingConfig: + av := object.Key("ModelShardingConfig") + if err := awsAwsjson11_serializeDocumentModelShardingConfig(&uv.Value, av); err != nil { + return err + } + default: return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) diff --git a/service/sagemaker/types/enums.go b/service/sagemaker/types/enums.go index 48c2caec941..81198ed2ba9 100644 --- a/service/sagemaker/types/enums.go +++ b/service/sagemaker/types/enums.go @@ -5510,6 +5510,24 @@ const ( ProductionVariantInstanceTypeMlC6i16xlarge ProductionVariantInstanceType = "ml.c6i.16xlarge" ProductionVariantInstanceTypeMlC6i24xlarge ProductionVariantInstanceType = "ml.c6i.24xlarge" ProductionVariantInstanceTypeMlC6i32xlarge ProductionVariantInstanceType = "ml.c6i.32xlarge" + ProductionVariantInstanceTypeMlM6iLarge ProductionVariantInstanceType = "ml.m6i.large" + ProductionVariantInstanceTypeMlM6iXlarge ProductionVariantInstanceType = "ml.m6i.xlarge" + ProductionVariantInstanceTypeMlM6i2xlarge ProductionVariantInstanceType = "ml.m6i.2xlarge" + ProductionVariantInstanceTypeMlM6i4xlarge ProductionVariantInstanceType = "ml.m6i.4xlarge" + ProductionVariantInstanceTypeMlM6i8xlarge ProductionVariantInstanceType = "ml.m6i.8xlarge" + ProductionVariantInstanceTypeMlM6i12xlarge ProductionVariantInstanceType = "ml.m6i.12xlarge" + ProductionVariantInstanceTypeMlM6i16xlarge ProductionVariantInstanceType = "ml.m6i.16xlarge" + ProductionVariantInstanceTypeMlM6i24xlarge ProductionVariantInstanceType = "ml.m6i.24xlarge" + ProductionVariantInstanceTypeMlM6i32xlarge ProductionVariantInstanceType = "ml.m6i.32xlarge" + ProductionVariantInstanceTypeMlR6iLarge ProductionVariantInstanceType = "ml.r6i.large" + ProductionVariantInstanceTypeMlR6iXlarge ProductionVariantInstanceType = "ml.r6i.xlarge" + ProductionVariantInstanceTypeMlR6i2xlarge ProductionVariantInstanceType = "ml.r6i.2xlarge" + ProductionVariantInstanceTypeMlR6i4xlarge ProductionVariantInstanceType = "ml.r6i.4xlarge" + ProductionVariantInstanceTypeMlR6i8xlarge ProductionVariantInstanceType = "ml.r6i.8xlarge" + ProductionVariantInstanceTypeMlR6i12xlarge ProductionVariantInstanceType = "ml.r6i.12xlarge" + ProductionVariantInstanceTypeMlR6i16xlarge ProductionVariantInstanceType = "ml.r6i.16xlarge" + ProductionVariantInstanceTypeMlR6i24xlarge ProductionVariantInstanceType = "ml.r6i.24xlarge" + ProductionVariantInstanceTypeMlR6i32xlarge ProductionVariantInstanceType = "ml.r6i.32xlarge" ProductionVariantInstanceTypeMlG5Xlarge ProductionVariantInstanceType = "ml.g5.xlarge" ProductionVariantInstanceTypeMlG52xlarge ProductionVariantInstanceType = "ml.g5.2xlarge" ProductionVariantInstanceTypeMlG54xlarge ProductionVariantInstanceType = "ml.g5.4xlarge" @@ -5526,6 +5544,14 @@ const ( ProductionVariantInstanceTypeMlG616xlarge ProductionVariantInstanceType = "ml.g6.16xlarge" ProductionVariantInstanceTypeMlG624xlarge ProductionVariantInstanceType = "ml.g6.24xlarge" ProductionVariantInstanceTypeMlG648xlarge ProductionVariantInstanceType = "ml.g6.48xlarge" + ProductionVariantInstanceTypeMlG6eXlarge ProductionVariantInstanceType = "ml.g6e.xlarge" + ProductionVariantInstanceTypeMlG6e2xlarge ProductionVariantInstanceType = "ml.g6e.2xlarge" + ProductionVariantInstanceTypeMlG6e4xlarge ProductionVariantInstanceType = "ml.g6e.4xlarge" + ProductionVariantInstanceTypeMlG6e8xlarge ProductionVariantInstanceType = "ml.g6e.8xlarge" + ProductionVariantInstanceTypeMlG6e12xlarge ProductionVariantInstanceType = "ml.g6e.12xlarge" + ProductionVariantInstanceTypeMlG6e16xlarge ProductionVariantInstanceType = "ml.g6e.16xlarge" + ProductionVariantInstanceTypeMlG6e24xlarge ProductionVariantInstanceType = "ml.g6e.24xlarge" + ProductionVariantInstanceTypeMlG6e48xlarge ProductionVariantInstanceType = "ml.g6e.48xlarge" ProductionVariantInstanceTypeMlP4d24xlarge ProductionVariantInstanceType = "ml.p4d.24xlarge" ProductionVariantInstanceTypeMlC7gLarge ProductionVariantInstanceType = "ml.c7g.large" ProductionVariantInstanceTypeMlC7gXlarge ProductionVariantInstanceType = "ml.c7g.xlarge" @@ -5587,11 +5613,13 @@ const ( ProductionVariantInstanceTypeMlTrn12xlarge ProductionVariantInstanceType = "ml.trn1.2xlarge" ProductionVariantInstanceTypeMlTrn132xlarge ProductionVariantInstanceType = "ml.trn1.32xlarge" ProductionVariantInstanceTypeMlTrn1n32xlarge ProductionVariantInstanceType = "ml.trn1n.32xlarge" + ProductionVariantInstanceTypeMlTrn248xlarge ProductionVariantInstanceType = "ml.trn2.48xlarge" ProductionVariantInstanceTypeMlInf2Xlarge ProductionVariantInstanceType = "ml.inf2.xlarge" ProductionVariantInstanceTypeMlInf28xlarge ProductionVariantInstanceType = "ml.inf2.8xlarge" ProductionVariantInstanceTypeMlInf224xlarge ProductionVariantInstanceType = "ml.inf2.24xlarge" ProductionVariantInstanceTypeMlInf248xlarge ProductionVariantInstanceType = "ml.inf2.48xlarge" ProductionVariantInstanceTypeMlP548xlarge ProductionVariantInstanceType = "ml.p5.48xlarge" + ProductionVariantInstanceTypeMlP5e48xlarge ProductionVariantInstanceType = "ml.p5e.48xlarge" ProductionVariantInstanceTypeMlM7iLarge ProductionVariantInstanceType = "ml.m7i.large" ProductionVariantInstanceTypeMlM7iXlarge ProductionVariantInstanceType = "ml.m7i.xlarge" ProductionVariantInstanceTypeMlM7i2xlarge ProductionVariantInstanceType = "ml.m7i.2xlarge" @@ -5704,6 +5732,24 @@ func (ProductionVariantInstanceType) Values() []ProductionVariantInstanceType { "ml.c6i.16xlarge", "ml.c6i.24xlarge", "ml.c6i.32xlarge", + "ml.m6i.large", + "ml.m6i.xlarge", + "ml.m6i.2xlarge", + "ml.m6i.4xlarge", + "ml.m6i.8xlarge", + "ml.m6i.12xlarge", + "ml.m6i.16xlarge", + "ml.m6i.24xlarge", + "ml.m6i.32xlarge", + "ml.r6i.large", + "ml.r6i.xlarge", + "ml.r6i.2xlarge", + "ml.r6i.4xlarge", + "ml.r6i.8xlarge", + "ml.r6i.12xlarge", + "ml.r6i.16xlarge", + "ml.r6i.24xlarge", + "ml.r6i.32xlarge", "ml.g5.xlarge", "ml.g5.2xlarge", "ml.g5.4xlarge", @@ -5720,6 +5766,14 @@ func (ProductionVariantInstanceType) Values() []ProductionVariantInstanceType { "ml.g6.16xlarge", "ml.g6.24xlarge", "ml.g6.48xlarge", + "ml.g6e.xlarge", + "ml.g6e.2xlarge", + "ml.g6e.4xlarge", + "ml.g6e.8xlarge", + "ml.g6e.12xlarge", + "ml.g6e.16xlarge", + "ml.g6e.24xlarge", + "ml.g6e.48xlarge", "ml.p4d.24xlarge", "ml.c7g.large", "ml.c7g.xlarge", @@ -5781,11 +5835,13 @@ func (ProductionVariantInstanceType) Values() []ProductionVariantInstanceType { "ml.trn1.2xlarge", "ml.trn1.32xlarge", "ml.trn1n.32xlarge", + "ml.trn2.48xlarge", "ml.inf2.xlarge", "ml.inf2.8xlarge", "ml.inf2.24xlarge", "ml.inf2.48xlarge", "ml.p5.48xlarge", + "ml.p5e.48xlarge", "ml.m7i.large", "ml.m7i.xlarge", "ml.m7i.2xlarge", diff --git a/service/sagemaker/types/types.go b/service/sagemaker/types/types.go index 05d113999c6..44be12f8774 100644 --- a/service/sagemaker/types/types.go +++ b/service/sagemaker/types/types.go @@ -3274,6 +3274,13 @@ type ClusterInstanceGroupDetails struct { // cluster instance group is created or updated. OnStartDeepHealthChecks []DeepHealthCheckType + // Specifies an Amazon Virtual Private Cloud (VPC) that your SageMaker jobs, + // hosted models, and compute resources have access to. You can control access to + // and from your resources by configuring a VPC. For more information, see [Give SageMaker Access to Resources in your Amazon VPC]. + // + // [Give SageMaker Access to Resources in your Amazon VPC]: https://docs.aws.amazon.com/sagemaker/latest/dg/infrastructure-give-access.html + OverrideVpcConfig *VpcConfig + // The number of instances you specified to add to the instance group of a // SageMaker HyperPod cluster. TargetCount *int32 @@ -3327,6 +3334,13 @@ type ClusterInstanceGroupSpecification struct { // cluster instance group is created or updated. OnStartDeepHealthChecks []DeepHealthCheckType + // Specifies an Amazon Virtual Private Cloud (VPC) that your SageMaker jobs, + // hosted models, and compute resources have access to. You can control access to + // and from your resources by configuring a VPC. For more information, see [Give SageMaker Access to Resources in your Amazon VPC]. + // + // [Give SageMaker Access to Resources in your Amazon VPC]: https://docs.aws.amazon.com/sagemaker/latest/dg/infrastructure-give-access.html + OverrideVpcConfig *VpcConfig + // Specifies the value for Threads per core. For instance types that support // multithreading, you can specify 1 for disabling multithreading and 2 for // enabling multithreading. For instance types that doesn't support multithreading, @@ -3443,6 +3457,13 @@ type ClusterNodeDetails struct { // The LifeCycle configuration applied to the instance. LifeCycleConfig *ClusterLifeCycleConfig + // Specifies an Amazon Virtual Private Cloud (VPC) that your SageMaker jobs, + // hosted models, and compute resources have access to. You can control access to + // and from your resources by configuring a VPC. For more information, see [Give SageMaker Access to Resources in your Amazon VPC]. + // + // [Give SageMaker Access to Resources in your Amazon VPC]: https://docs.aws.amazon.com/sagemaker/latest/dg/infrastructure-give-access.html + OverrideVpcConfig *VpcConfig + // The placement details of the SageMaker HyperPod cluster node. Placement *ClusterInstancePlacement @@ -8832,9 +8853,9 @@ type ImageVersion struct { noSmithyDocumentSerde } -// Defines the compute resources to allocate to run a model that you assign to an -// inference component. These resources include CPU cores, accelerators, and -// memory. +// Defines the compute resources to allocate to run a model, plus any adapter +// models, that you assign to an inference component. These resources include CPU +// cores, accelerators, and memory. type InferenceComponentComputeResourceRequirements struct { // The minimum MB of memory to allocate to run a model that you assign to an @@ -8935,10 +8956,30 @@ type InferenceComponentRuntimeConfigSummary struct { // the model, container, and compute resources. type InferenceComponentSpecification struct { - // The compute resources allocated to run the model assigned to the inference - // component. + // The name of an existing inference component that is to contain the inference + // component that you're creating with your request. // - // This member is required. + // Specify this parameter only if your request is meant to create an adapter + // inference component. An adapter inference component contains the path to an + // adapter model. The purpose of the adapter model is to tailor the inference + // output of a base foundation model, which is hosted by the base inference + // component. The adapter inference component uses the compute resources that you + // assigned to the base inference component. + // + // When you create an adapter inference component, use the Container parameter to + // specify the location of the adapter artifacts. In the parameter value, use the + // ArtifactUrl parameter of the InferenceComponentContainerSpecification data type. + // + // Before you can create an adapter inference component, you must have an existing + // inference component that contains the foundation model that you want to adapt. + BaseInferenceComponentName *string + + // The compute resources allocated to run the model, plus any adapter models, that + // you assign to the inference component. + // + // Omit this parameter if your request is meant to create an adapter inference + // component. An adapter inference component is loaded by a base inference + // component, and it uses the compute resources of the base inference component. ComputeResourceRequirements *InferenceComponentComputeResourceRequirements // Defines a container that provides the runtime environment for a model that you @@ -8958,8 +8999,11 @@ type InferenceComponentSpecification struct { // Details about the resources that are deployed with this inference component. type InferenceComponentSpecificationSummary struct { - // The compute resources allocated to run the model assigned to the inference - // component. + // The name of the base inference component that contains this inference component. + BaseInferenceComponentName *string + + // The compute resources allocated to run the model, plus any adapter models, that + // you assign to the inference component. ComputeResourceRequirements *InferenceComponentComputeResourceRequirements // Details about the container that provides the runtime environment for the model @@ -11678,6 +11722,20 @@ type ModelRegisterSettings struct { noSmithyDocumentSerde } +// Settings for the model sharding technique that's applied by a model +// optimization job. +type ModelShardingConfig struct { + + // The URI of an LMI DLC in Amazon ECR. SageMaker uses this image to run the + // optimization. + Image *string + + // Environment variables that override the default ones in the model container. + OverrideEnvironment map[string]string + + noSmithyDocumentSerde +} + // Metadata for Model steps. type ModelStepMetadata struct { @@ -12817,6 +12875,7 @@ type OnlineStoreSecurityConfig struct { // // OptimizationConfigMemberModelCompilationConfig // OptimizationConfigMemberModelQuantizationConfig +// OptimizationConfigMemberModelShardingConfig type OptimizationConfig interface { isOptimizationConfig() } @@ -12841,6 +12900,16 @@ type OptimizationConfigMemberModelQuantizationConfig struct { func (*OptimizationConfigMemberModelQuantizationConfig) isOptimizationConfig() {} +// Settings for the model sharding technique that's applied by a model +// optimization job. +type OptimizationConfigMemberModelShardingConfig struct { + Value ModelShardingConfig + + noSmithyDocumentSerde +} + +func (*OptimizationConfigMemberModelShardingConfig) isOptimizationConfig() {} + // The location of the source model to optimize with an optimization job. type OptimizationJobModelSource struct { diff --git a/service/sagemaker/types/types_exported_test.go b/service/sagemaker/types/types_exported_test.go index be97515e498..cb3b5aa7979 100644 --- a/service/sagemaker/types/types_exported_test.go +++ b/service/sagemaker/types/types_exported_test.go @@ -167,6 +167,9 @@ func ExampleOptimizationConfig_outputUsage() { case *types.OptimizationConfigMemberModelQuantizationConfig: _ = v.Value // Value is types.ModelQuantizationConfig + case *types.OptimizationConfigMemberModelShardingConfig: + _ = v.Value // Value is types.ModelShardingConfig + case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) @@ -178,6 +181,7 @@ func ExampleOptimizationConfig_outputUsage() { var _ *types.ModelCompilationConfig var _ *types.ModelQuantizationConfig +var _ *types.ModelShardingConfig func ExampleScalingPolicy_outputUsage() { var union types.ScalingPolicy diff --git a/service/sagemaker/validators.go b/service/sagemaker/validators.go index 71f70760de9..579bf8cf7e3 100644 --- a/service/sagemaker/validators.go +++ b/service/sagemaker/validators.go @@ -7609,6 +7609,11 @@ func validateClusterInstanceGroupSpecification(v *types.ClusterInstanceGroupSpec invalidParams.AddNested("InstanceStorageConfigs", err.(smithy.InvalidParamsError)) } } + if v.OverrideVpcConfig != nil { + if err := validateVpcConfig(v.OverrideVpcConfig); err != nil { + invalidParams.AddNested("OverrideVpcConfig", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -9472,9 +9477,7 @@ func validateInferenceComponentSpecification(v *types.InferenceComponentSpecific return nil } invalidParams := smithy.InvalidParamsError{Context: "InferenceComponentSpecification"} - if v.ComputeResourceRequirements == nil { - invalidParams.Add(smithy.NewErrParamRequired("ComputeResourceRequirements")) - } else if v.ComputeResourceRequirements != nil { + if v.ComputeResourceRequirements != nil { if err := validateInferenceComponentComputeResourceRequirements(v.ComputeResourceRequirements); err != nil { invalidParams.AddNested("ComputeResourceRequirements", err.(smithy.InvalidParamsError)) } @@ -13975,9 +13978,6 @@ func validateOpCreateInferenceComponentInput(v *CreateInferenceComponentInput) e if v.EndpointName == nil { invalidParams.Add(smithy.NewErrParamRequired("EndpointName")) } - if v.VariantName == nil { - invalidParams.Add(smithy.NewErrParamRequired("VariantName")) - } if v.Specification == nil { invalidParams.Add(smithy.NewErrParamRequired("Specification")) } else if v.Specification != nil { @@ -13985,9 +13985,7 @@ func validateOpCreateInferenceComponentInput(v *CreateInferenceComponentInput) e invalidParams.AddNested("Specification", err.(smithy.InvalidParamsError)) } } - if v.RuntimeConfig == nil { - invalidParams.Add(smithy.NewErrParamRequired("RuntimeConfig")) - } else if v.RuntimeConfig != nil { + if v.RuntimeConfig != nil { if err := validateInferenceComponentRuntimeConfig(v.RuntimeConfig); err != nil { invalidParams.AddNested("RuntimeConfig", err.(smithy.InvalidParamsError)) } diff --git a/service/ses/deserializers.go b/service/ses/deserializers.go index eebc657332f..d670ab2a4c8 100644 --- a/service/ses/deserializers.go +++ b/service/ses/deserializers.go @@ -10353,6 +10353,68 @@ func awsAwsquery_deserializeDocumentConfigurationSetSendingPausedException(v **t return nil } +func awsAwsquery_deserializeDocumentConnectAction(v **types.ConnectAction, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ConnectAction + if *v == nil { + sv = &types.ConnectAction{} + } 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("IAMRoleARN", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.IAMRoleARN = ptr.String(xtv) + } + + case strings.EqualFold("InstanceARN", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.InstanceARN = 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_deserializeDocumentCustomVerificationEmailInvalidContentException(v **types.CustomVerificationEmailInvalidContentException, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -13240,6 +13302,12 @@ func awsAwsquery_deserializeDocumentReceiptAction(v **types.ReceiptAction, decod return err } + case strings.EqualFold("ConnectAction", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentConnectAction(&sv.ConnectAction, nodeDecoder); err != nil { + return err + } + case strings.EqualFold("LambdaAction", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) if err := awsAwsquery_deserializeDocumentLambdaAction(&sv.LambdaAction, nodeDecoder); err != nil { diff --git a/service/ses/serializers.go b/service/ses/serializers.go index f2345c37487..a437891add2 100644 --- a/service/ses/serializers.go +++ b/service/ses/serializers.go @@ -5191,6 +5191,23 @@ func awsAwsquery_serializeDocumentConfigurationSetAttributeList(v []types.Config return nil } +func awsAwsquery_serializeDocumentConnectAction(v *types.ConnectAction, value query.Value) error { + object := value.Object() + _ = object + + if v.IAMRoleARN != nil { + objectKey := object.Key("IAMRoleARN") + objectKey.String(*v.IAMRoleARN) + } + + if v.InstanceARN != nil { + objectKey := object.Key("InstanceARN") + objectKey.String(*v.InstanceARN) + } + + return nil +} + func awsAwsquery_serializeDocumentContent(v *types.Content, value query.Value) error { object := value.Object() _ = object @@ -5495,6 +5512,13 @@ func awsAwsquery_serializeDocumentReceiptAction(v *types.ReceiptAction, value qu } } + if v.ConnectAction != nil { + objectKey := object.Key("ConnectAction") + if err := awsAwsquery_serializeDocumentConnectAction(v.ConnectAction, objectKey); err != nil { + return err + } + } + if v.LambdaAction != nil { objectKey := object.Key("LambdaAction") if err := awsAwsquery_serializeDocumentLambdaAction(v.LambdaAction, objectKey); err != nil { diff --git a/service/ses/types/types.go b/service/ses/types/types.go index 6284d0b29e0..09925d5369f 100644 --- a/service/ses/types/types.go +++ b/service/ses/types/types.go @@ -310,6 +310,37 @@ type ConfigurationSet struct { noSmithyDocumentSerde } +// When included in a receipt rule, this action parses the received message and +// starts an email contact in Amazon Connect on your behalf. +// +// When you receive emails, the maximum email size (including headers) is 40 MB. +// Additionally, emails may only have up to 10 attachments. Emails larger than 40 +// MB or with more than 10 attachments will be bounced. +// +// We recommend that you configure this action via Amazon Connect. +type ConnectAction struct { + + // The Amazon Resource Name (ARN) of the IAM role to be used by Amazon Simple + // Email Service while starting email contacts to the Amazon Connect instance. This + // role should have permission to invoke connect:StartEmailContact for the given + // Amazon Connect instance. + // + // This member is required. + IAMRoleARN *string + + // The Amazon Resource Name (ARN) for the Amazon Connect instance that Amazon SES + // integrates with for starting email contacts. + // + // For more information about Amazon Connect instances, see the [Amazon Connect Administrator Guide] + // + // [Amazon Connect Administrator Guide]: https://docs.aws.amazon.com/connect/latest/adminguide/amazon-connect-instances.html + // + // This member is required. + InstanceARN *string + + noSmithyDocumentSerde +} + // Represents textual data, plus an optional character set specification. // // By default, the text must be 7-bit ASCII, due to the constraints of the SMTP @@ -824,6 +855,10 @@ type ReceiptAction struct { // (Amazon SNS). BounceAction *BounceAction + // Parses the received message and starts an email contact in Amazon Connect on + // your behalf. + ConnectAction *ConnectAction + // Calls an Amazon Web Services Lambda function, and optionally, publishes a // notification to Amazon SNS. LambdaAction *LambdaAction @@ -1113,24 +1148,26 @@ type S3Action struct { IamRoleArn *string // The customer managed key that Amazon SES should use to encrypt your emails - // before saving them to the Amazon S3 bucket. You can use the default managed key - // or a custom managed key that you created in Amazon Web Services KMS as follows: + // before saving them to the Amazon S3 bucket. You can use the Amazon Web Services + // managed key or a customer managed key that you created in Amazon Web Services + // KMS as follows: // - // - To use the default managed key, provide an ARN in the form of + // - To use the Amazon Web Services managed key, provide an ARN in the form of // arn:aws:kms:REGION:ACCOUNT-ID-WITHOUT-HYPHENS:alias/aws/ses . For example, if // your Amazon Web Services account ID is 123456789012 and you want to use the - // default managed key in the US West (Oregon) Region, the ARN of the default - // master key would be arn:aws:kms:us-west-2:123456789012:alias/aws/ses . If you - // use the default managed key, you don't need to perform any extra steps to give - // Amazon SES permission to use the key. - // - // - To use a custom managed key that you created in Amazon Web Services KMS, - // provide the ARN of the managed key and ensure that you add a statement to your - // key's policy to give Amazon SES permission to use it. For more information about - // giving permissions, see the [Amazon SES Developer Guide]. - // - // For more information about key policies, see the [Amazon Web Services KMS Developer Guide]. If you do not specify a - // managed key, Amazon SES does not encrypt your emails. + // Amazon Web Services managed key in the US West (Oregon) Region, the ARN of the + // Amazon Web Services managed key would be + // arn:aws:kms:us-west-2:123456789012:alias/aws/ses . If you use the Amazon Web + // Services managed key, you don't need to perform any extra steps to give Amazon + // SES permission to use the key. + // + // - To use a customer managed key that you created in Amazon Web Services KMS, + // provide the ARN of the customer managed key and ensure that you add a statement + // to your key's policy to give Amazon SES permission to use it. For more + // information about giving permissions, see the [Amazon SES Developer Guide]. + // + // For more information about key policies, see the [Amazon Web Services KMS Developer Guide]. If you do not specify an + // Amazon Web Services KMS key, Amazon SES does not encrypt your emails. // // Your mail is encrypted by Amazon SES using the Amazon S3 encryption client // before the mail is submitted to Amazon S3 for storage. It is not encrypted using diff --git a/service/ses/validators.go b/service/ses/validators.go index 0c8af08c790..990398d9c2c 100644 --- a/service/ses/validators.go +++ b/service/ses/validators.go @@ -1609,6 +1609,24 @@ func validateConfigurationSet(v *types.ConfigurationSet) error { } } +func validateConnectAction(v *types.ConnectAction) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ConnectAction"} + if v.InstanceARN == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceARN")) + } + if v.IAMRoleARN == nil { + invalidParams.Add(smithy.NewErrParamRequired("IAMRoleARN")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateContent(v *types.Content) error { if v == nil { return nil @@ -1861,6 +1879,11 @@ func validateReceiptAction(v *types.ReceiptAction) error { invalidParams.AddNested("SNSAction", err.(smithy.InvalidParamsError)) } } + if v.ConnectAction != nil { + if err := validateConnectAction(v.ConnectAction); err != nil { + invalidParams.AddNested("ConnectAction", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { diff --git a/service/sfn/api_op_DescribeStateMachine.go b/service/sfn/api_op_DescribeStateMachine.go index 8d92fe94e1a..2a325a6e6b8 100644 --- a/service/sfn/api_op_DescribeStateMachine.go +++ b/service/sfn/api_op_DescribeStateMachine.go @@ -175,6 +175,10 @@ type DescribeStateMachineOutput struct { // Selects whether X-Ray tracing is enabled. TracingConfiguration *types.TracingConfiguration + // A map of state name to a list of variables referenced by that state. States + // that do not use variable references will not be shown in the response. + VariableReferences map[string][]string + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/sfn/api_op_DescribeStateMachineForExecution.go b/service/sfn/api_op_DescribeStateMachineForExecution.go index 168c1661d93..0afde574e98 100644 --- a/service/sfn/api_op_DescribeStateMachineForExecution.go +++ b/service/sfn/api_op_DescribeStateMachineForExecution.go @@ -112,6 +112,10 @@ type DescribeStateMachineForExecutionOutput struct { // Selects whether X-Ray tracing is enabled. TracingConfiguration *types.TracingConfiguration + // A map of state name to a list of variables referenced by that state. States + // that do not use variable references will not be shown in the response. + VariableReferences map[string][]string + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/sfn/api_op_TestState.go b/service/sfn/api_op_TestState.go index 538d65021e1..5981a3ae4b7 100644 --- a/service/sfn/api_op_TestState.go +++ b/service/sfn/api_op_TestState.go @@ -85,12 +85,6 @@ type TestStateInput struct { // This member is required. Definition *string - // The Amazon Resource Name (ARN) of the execution role with the required IAM - // permissions for the state. - // - // This member is required. - RoleArn *string - // A string that contains the JSON input data for the state. Input *string @@ -127,6 +121,14 @@ type TestStateInput struct { // [IAM permissions to test a state]: https://docs.aws.amazon.com/step-functions/latest/dg/test-state-isolation.html#test-state-permissions RevealSecrets bool + // The Amazon Resource Name (ARN) of the execution role with the required IAM + // permissions for the state. + RoleArn *string + + // JSON object literal that sets variables used in the state under test. Object + // keys are the variable names and values are the variable values. + Variables *string + noSmithyDocumentSerde } diff --git a/service/sfn/api_op_ValidateStateMachineDefinition.go b/service/sfn/api_op_ValidateStateMachineDefinition.go index cf1c100505f..8b97a905193 100644 --- a/service/sfn/api_op_ValidateStateMachineDefinition.go +++ b/service/sfn/api_op_ValidateStateMachineDefinition.go @@ -11,26 +11,39 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Validates the syntax of a state machine definition. +// Validates the syntax of a state machine definition specified in [Amazon States Language] (ASL), a +// JSON-based, structured language. // // You can validate that a state machine definition is correct without creating a -// state machine resource. Step Functions will implicitly perform the same syntax -// check when you invoke CreateStateMachine and UpdateStateMachine . State machine -// definitions are specified using a JSON-based, structured language. For more -// information on Amazon States Language see [Amazon States Language](ASL). +// state machine resource. // // Suggested uses for ValidateStateMachineDefinition : // // - Integrate automated checks into your code review or Continuous Integration -// (CI) process to validate state machine definitions before starting deployments. +// (CI) process to check state machine definitions before starting deployments. // -// - Run the validation from a Git pre-commit hook to check your state machine -// definitions before committing them to your source repository. +// - Run validation from a Git pre-commit hook to verify the definition before +// committing to your source repository. // -// Errors found in the state machine definition will be returned in the response -// as a list of diagnostic elements, rather than raise an exception. +// Validation will look for problems in your state machine definition and return a +// result and a list of diagnostic elements. +// +// The result value will be OK when your workflow definition can be successfully +// created or updated. Note the result can be OK even when diagnostic warnings are +// present in the response. The result value will be FAIL when the workflow +// definition contains errors that would prevent you from creating or updating your +// state machine. +// +// The list of [ValidateStateMachineDefinitionDiagnostic] data elements can contain zero or more WARNING and/or ERROR +// elements. +// +// The ValidateStateMachineDefinition API might add new diagnostics in the future, +// adjust diagnostic codes, or change the message wording. Your automated processes +// should only rely on the value of the result field value (OK, FAIL). Do not rely +// on the exact order, count, or wording of diagnostic messages. // // [Amazon States Language]: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html +// [ValidateStateMachineDefinitionDiagnostic]: https://docs.aws.amazon.com/step-functions/latest/apireference/API_ValidateStateMachineDefinitionDiagnostic.html func (c *Client) ValidateStateMachineDefinition(ctx context.Context, params *ValidateStateMachineDefinitionInput, optFns ...func(*Options)) (*ValidateStateMachineDefinitionOutput, error) { if params == nil { params = &ValidateStateMachineDefinitionInput{} @@ -76,8 +89,10 @@ type ValidateStateMachineDefinitionInput struct { type ValidateStateMachineDefinitionOutput struct { - // If the result is OK , this field will be empty. When there are errors, this - // field will contain an array of Diagnostic objects to help you troubleshoot. + // An array of diagnostic errors and warnings found during validation of the state + // machine definition. Since warnings do not prevent deploying your workflow + // definition, the result value could be OK even when warning diagnostics are + // present in the response. // // This member is required. Diagnostics []types.ValidateStateMachineDefinitionDiagnostic diff --git a/service/sfn/deserializers.go b/service/sfn/deserializers.go index ebd68e0535f..16a68a5920c 100644 --- a/service/sfn/deserializers.go +++ b/service/sfn/deserializers.go @@ -6286,6 +6286,82 @@ func awsAwsjson10_deserializeDocumentActivityWorkerLimitExceeded(v **types.Activ return nil } +func awsAwsjson10_deserializeDocumentAssignedVariables(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 VariableValue to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsAwsjson10_deserializeDocumentAssignedVariablesDetails(v **types.AssignedVariablesDetails, 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.AssignedVariablesDetails + if *v == nil { + sv = &types.AssignedVariablesDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "truncated": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected truncated to be of type *bool, got %T instead", value) + } + sv.Truncated = jtv + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeDocumentBillingDetails(v **types.BillingDetails, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -6525,6 +6601,73 @@ func awsAwsjson10_deserializeDocumentEncryptionConfiguration(v **types.Encryptio return nil } +func awsAwsjson10_deserializeDocumentEvaluationFailedEventDetails(v **types.EvaluationFailedEventDetails, 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.EvaluationFailedEventDetails + if *v == nil { + sv = &types.EvaluationFailedEventDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "cause": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SensitiveCause to be of type string, got %T instead", value) + } + sv.Cause = ptr.String(jtv) + } + + case "error": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SensitiveError to be of type string, got %T instead", value) + } + sv.Error = ptr.String(jtv) + } + + case "location": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EvaluationFailureLocation to be of type string, got %T instead", value) + } + sv.Location = ptr.String(jtv) + } + + case "state": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StateName to be of type string, got %T instead", value) + } + sv.State = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeDocumentExecutionAbortedEventDetails(v **types.ExecutionAbortedEventDetails, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -7247,6 +7390,11 @@ func awsAwsjson10_deserializeDocumentHistoryEvent(v **types.HistoryEvent, value return err } + case "evaluationFailedEventDetails": + if err := awsAwsjson10_deserializeDocumentEvaluationFailedEventDetails(&sv.EvaluationFailedEventDetails, value); err != nil { + return err + } + case "executionAbortedEventDetails": if err := awsAwsjson10_deserializeDocumentExecutionAbortedEventDetails(&sv.ExecutionAbortedEventDetails, value); err != nil { return err @@ -7553,6 +7701,15 @@ func awsAwsjson10_deserializeDocumentInspectionData(v **types.InspectionData, va for key, value := range shape { switch key { + case "afterArguments": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SensitiveData to be of type string, got %T instead", value) + } + sv.AfterArguments = ptr.String(jtv) + } + case "afterInputPath": if value != nil { jtv, ok := value.(string) @@ -7617,6 +7774,15 @@ func awsAwsjson10_deserializeDocumentInspectionData(v **types.InspectionData, va sv.Result = ptr.String(jtv) } + case "variables": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SensitiveData to be of type string, got %T instead", value) + } + sv.Variables = ptr.String(jtv) + } + default: _, _ = key, value @@ -9681,6 +9847,16 @@ func awsAwsjson10_deserializeDocumentStateExitedEventDetails(v **types.StateExit for key, value := range shape { switch key { + case "assignedVariables": + if err := awsAwsjson10_deserializeDocumentAssignedVariables(&sv.AssignedVariables, value); err != nil { + return err + } + + case "assignedVariablesDetails": + if err := awsAwsjson10_deserializeDocumentAssignedVariablesDetails(&sv.AssignedVariablesDetails, value); err != nil { + return err + } + case "name": if value != nil { jtv, ok := value.(string) @@ -11184,6 +11360,76 @@ func awsAwsjson10_deserializeDocumentValidationException(v **types.ValidationExc return nil } +func awsAwsjson10_deserializeDocumentVariableNameList(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 VariableName to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentVariableReferences(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 + mapVar := parsedVal + if err := awsAwsjson10_deserializeDocumentVariableNameList(&mapVar, value); err != nil { + return err + } + parsedVal = mapVar + mv[key] = parsedVal + + } + *v = mv + return nil +} + func awsAwsjson10_deserializeOpDocumentCreateActivityOutput(v **CreateActivityOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -12183,6 +12429,11 @@ func awsAwsjson10_deserializeOpDocumentDescribeStateMachineForExecutionOutput(v } } + case "variableReferences": + if err := awsAwsjson10_deserializeDocumentVariableReferences(&sv.VariableReferences, value); err != nil { + return err + } + default: _, _ = key, value @@ -12326,6 +12577,11 @@ func awsAwsjson10_deserializeOpDocumentDescribeStateMachineOutput(v **DescribeSt sv.Type = types.StateMachineType(jtv) } + case "variableReferences": + if err := awsAwsjson10_deserializeDocumentVariableReferences(&sv.VariableReferences, value); err != nil { + return err + } + default: _, _ = key, value diff --git a/service/sfn/serializers.go b/service/sfn/serializers.go index 87ac6f5eb0e..e5348fa6e42 100644 --- a/service/sfn/serializers.go +++ b/service/sfn/serializers.go @@ -3108,6 +3108,11 @@ func awsAwsjson10_serializeOpDocumentTestStateInput(v *TestStateInput, value smi ok.String(*v.RoleArn) } + if v.Variables != nil { + ok := object.Key("variables") + ok.String(*v.Variables) + } + return nil } diff --git a/service/sfn/types/enums.go b/service/sfn/types/enums.go index ca9f1466e7a..ddfe83a181a 100644 --- a/service/sfn/types/enums.go +++ b/service/sfn/types/enums.go @@ -153,6 +153,7 @@ const ( HistoryEventTypeMapRunSucceeded HistoryEventType = "MapRunSucceeded" HistoryEventTypeExecutionRedriven HistoryEventType = "ExecutionRedriven" HistoryEventTypeMapRunRedriven HistoryEventType = "MapRunRedriven" + HistoryEventTypeEvaluationFailed HistoryEventType = "EvaluationFailed" ) // Values returns all known values for HistoryEventType. Note that this can be @@ -222,6 +223,7 @@ func (HistoryEventType) Values() []HistoryEventType { "MapRunSucceeded", "ExecutionRedriven", "MapRunRedriven", + "EvaluationFailed", } } diff --git a/service/sfn/types/types.go b/service/sfn/types/types.go index f366d23d56f..ae14ff9ad99 100644 --- a/service/sfn/types/types.go +++ b/service/sfn/types/types.go @@ -128,6 +128,17 @@ type ActivityTimedOutEventDetails struct { noSmithyDocumentSerde } +// Provides details about assigned variables in an execution history event. +type AssignedVariablesDetails struct { + + // Indicates whether assigned variables were truncated in the response. Always + // false for API calls. In CloudWatch logs, the value will be true if the data is + // truncated due to size limits. + Truncated bool + + noSmithyDocumentSerde +} + // An object that describes workflow billing details. type BillingDetails struct { @@ -196,6 +207,29 @@ type EncryptionConfiguration struct { noSmithyDocumentSerde } +// Contains details about an evaluation failure that occurred while processing a +// state, for example, when a JSONata expression throws an error. This event will +// only be present in state machines that have QueryLanguage set to JSONata, or +// individual states set to JSONata. +type EvaluationFailedEventDetails struct { + + // The name of the state in which the evaluation error occurred. + // + // This member is required. + State *string + + // A more detailed explanation of the cause of the failure. + Cause *string + + // The error code of the failure. + Error *string + + // The location of the field in the state in which the evaluation error occurred. + Location *string + + noSmithyDocumentSerde +} + // Contains details about an abort of an execution. type ExecutionAbortedEventDetails struct { @@ -404,6 +438,10 @@ type HistoryEvent struct { // Contains details about an activity timeout that occurred during an execution. ActivityTimedOutEventDetails *ActivityTimedOutEventDetails + // Contains details about an evaluation failure that occurred while processing a + // state. + EvaluationFailedEventDetails *EvaluationFailedEventDetails + // Contains details about an abort of an execution. ExecutionAbortedEventDetails *ExecutionAbortedEventDetails @@ -509,7 +547,8 @@ type HistoryEvent struct { type HistoryEventExecutionDataDetails struct { // Indicates whether input or output was truncated in the response. Always false - // for API calls. + // for API calls. In CloudWatch logs, the value will be true if the data is + // truncated due to size limits. Truncated bool noSmithyDocumentSerde @@ -519,23 +558,33 @@ type HistoryEventExecutionDataDetails struct { // and output data processing flow, and HTTP request and response information. type InspectionData struct { - // The input after Step Functions applies the [InputPath] filter. + // The input after Step Functions applies an Arguments filter. This event will + // only be present when QueryLanguage for the state machine or individual states is + // set to JSONata. For more info, see [Transforming data with Step Functions]. + // + // [Transforming data with Step Functions]: https://docs.aws.amazon.com/step-functions/latest/dg/data-transform.html + AfterArguments *string + + // The input after Step Functions applies the [InputPath] filter. Not populated when + // QueryLanguage is JSONata. // // [InputPath]: https://docs.aws.amazon.com/step-functions/latest/dg/input-output-inputpath-params.html#input-output-inputpath AfterInputPath *string - // The effective input after Step Functions applies the [Parameters] filter. + // The effective input after Step Functions applies the [Parameters] filter. Not populated + // when QueryLanguage is JSONata. // // [Parameters]: https://docs.aws.amazon.com/step-functions/latest/dg/input-output-inputpath-params.html#input-output-parameters AfterParameters *string // The effective result combined with the raw state input after Step Functions - // applies the [ResultPath]filter. + // applies the [ResultPath]filter. Not populated when QueryLanguage is JSONata. // // [ResultPath]: https://docs.aws.amazon.com/step-functions/latest/dg/input-output-resultpath.html AfterResultPath *string - // The effective result after Step Functions applies the [ResultSelector] filter. + // The effective result after Step Functions applies the [ResultSelector] filter. Not populated + // when QueryLanguage is JSONata. // // [ResultSelector]: https://docs.aws.amazon.com/step-functions/latest/dg/input-output-inputpath-params.html#input-output-resultselector AfterResultSelector *string @@ -552,6 +601,11 @@ type InspectionData struct { // The state's raw result. Result *string + // JSON string that contains the set of workflow variables after execution of the + // state. The set will include variables assigned in the state and variables set up + // as test state input. + Variables *string + noSmithyDocumentSerde } @@ -1005,6 +1059,12 @@ type StateExitedEventDetails struct { // This member is required. Name *string + // Map of variable name and value as a serialized JSON representation. + AssignedVariables map[string]string + + // Provides details about input or output in an execution history event. + AssignedVariablesDetails *AssignedVariablesDetails + // The JSON output data of the state. Length constraints apply to the payload // size, and are expressed as bytes in UTF-8 encoding. Output *string @@ -1322,9 +1382,58 @@ type TracingConfiguration struct { noSmithyDocumentSerde } -// Describes an error found during validation. Validation errors found in the -// definition return in the response as diagnostic elements, rather than raise an -// exception. +// Describes potential issues found during state machine validation. Rather than +// raise an exception, validation will return a list of diagnostic elements +// containing diagnostic information. +// +// The [ValidateStateMachineDefinitionlAPI] might add new diagnostics in the future, adjust diagnostic codes, or +// change the message wording. Your automated processes should only rely on the +// value of the result field value (OK, FAIL). Do not rely on the exact order, +// count, or wording of diagnostic messages. +// +// # List of warning codes +// +// NO_DOLLAR No .$ on a field that appears to be a JSONPath or Intrinsic Function. +// +// NO_PATH Field value looks like a path, but field name does not end with 'Path'. +// +// PASS_RESULT_IS_STATIC Attempt to use a path in the result of a pass state. +// +// # List of error codes +// +// INVALID_JSON_DESCRIPTION JSON syntax problem found. +// +// MISSING_DESCRIPTION Received a null or empty workflow input. +// +// SCHEMA_VALIDATION_FAILED Schema validation reported errors. +// +// INVALID_RESOURCE The value of a Task-state resource field is invalid. +// +// MISSING_END_STATE The workflow does not have a terminal state. +// +// DUPLICATE_STATE_NAME The same state name appears more than once. +// +// INVALID_STATE_NAME The state name does not follow the naming convention. +// +// STATE_MACHINE_NAME_EMPTY The state machine name has not been specified. +// +// STATE_MACHINE_NAME_INVALID The state machine name does not follow the naming +// convention. +// +// STATE_MACHINE_NAME_TOO_LONG The state name exceeds the allowed length. +// +// STATE_MACHINE_NAME_ALREADY_EXISTS The state name already exists. +// +// DUPLICATE_LABEL_NAME A label name appears more than once. +// +// INVALID_LABEL_NAME You have provided an invalid label name. +// +// MISSING_TRANSITION_TARGET The value of "Next" field doesn't match a known state +// name. +// +// TOO_DEEPLY_NESTED The states are too deeply nested. +// +// [ValidateStateMachineDefinitionlAPI]: https://docs.aws.amazon.com/step-functions/latest/apireference/API_ValidateStateMachineDefinition.html type ValidateStateMachineDefinitionDiagnostic struct { // Identifying code for the diagnostic. @@ -1340,6 +1449,9 @@ type ValidateStateMachineDefinitionDiagnostic struct { // A value of ERROR means that you cannot create or update a state machine with // this definition. // + // WARNING level diagnostics alert you to potential issues, but they will not + // prevent you from creating or updating your state machine. + // // This member is required. Severity ValidateStateMachineDefinitionSeverity diff --git a/service/sfn/validators.go b/service/sfn/validators.go index a38ebfd296d..74603100f3c 100644 --- a/service/sfn/validators.go +++ b/service/sfn/validators.go @@ -1330,9 +1330,6 @@ func validateOpTestStateInput(v *TestStateInput) error { if v.Definition == nil { invalidParams.Add(smithy.NewErrParamRequired("Definition")) } - if v.RoleArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("RoleArn")) - } if invalidParams.Len() > 0 { return invalidParams } else { diff --git a/service/sns/api_op_CreateTopic.go b/service/sns/api_op_CreateTopic.go index 6d86faa06a7..3af284af7cc 100644 --- a/service/sns/api_op_CreateTopic.go +++ b/service/sns/api_op_CreateTopic.go @@ -82,12 +82,8 @@ type CreateTopicInput struct { // // The following attributes apply only to [FIFO topics]: // - // - ArchivePolicy – Adds or updates an inline policy document to archive - // messages stored in the specified Amazon SNS topic. - // - // - BeginningArchiveTime – The earliest starting point at which a message in the - // topic’s archive can be replayed from. This point in time is based on the - // configured message retention period set by the topic’s message archiving policy. + // - ArchivePolicy – The policy that sets the retention period for messages + // stored in the message archive of an Amazon SNS FIFO topic. // // - ContentBasedDeduplication – Enables content-based deduplication for FIFO // topics. diff --git a/service/sns/api_op_GetTopicAttributes.go b/service/sns/api_op_GetTopicAttributes.go index 9fa8b475a71..1b3497dab2a 100644 --- a/service/sns/api_op_GetTopicAttributes.go +++ b/service/sns/api_op_GetTopicAttributes.go @@ -92,7 +92,12 @@ type GetTopicAttributesOutput struct { // // The following attributes apply only to [FIFO topics]: // - // - FifoTopic – When this is set to true , a FIFO topic is created. + // - ArchivePolicy – The policy that sets the retention period for messages + // stored in the message archive of an Amazon SNS FIFO topic. + // + // - BeginningArchiveTime – The earliest starting point at which a message in the + // topic’s archive can be replayed from. This point in time is based on the + // configured message retention period set by the topic’s message archiving policy. // // - ContentBasedDeduplication – Enables content-based deduplication for FIFO // topics. @@ -108,6 +113,8 @@ type GetTopicAttributesOutput struct { // (Optional) To override the generated value, you can specify a value for the // MessageDeduplicationId parameter for the Publish action. // + // - FifoTopic – When this is set to true , a FIFO topic is created. + // // [Key Terms]: https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html#sse-key-terms // [KeyId]: https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters // [server-side-encryption]: https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html diff --git a/service/sns/api_op_SetTopicAttributes.go b/service/sns/api_op_SetTopicAttributes.go index 2fd5ea43260..27a71e67f32 100644 --- a/service/sns/api_op_SetTopicAttributes.go +++ b/service/sns/api_op_SetTopicAttributes.go @@ -145,6 +145,9 @@ type SetTopicAttributesInput struct { // // The following attribute applies only to [FIFO topics]: // + // - ArchivePolicy – The policy that sets the retention period for messages + // stored in the message archive of an Amazon SNS FIFO topic. + // // - ContentBasedDeduplication – Enables content-based deduplication for FIFO // topics. // diff --git a/service/timestreamwrite/internal/endpoints/endpoints.go b/service/timestreamwrite/internal/endpoints/endpoints.go index 2d21f981d70..7fe655ed8db 100644 --- a/service/timestreamwrite/internal/endpoints/endpoints.go +++ b/service/timestreamwrite/internal/endpoints/endpoints.go @@ -142,6 +142,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-northeast-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-south-1", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-southeast-2", }: endpoints.Endpoint{}, diff --git a/service/vpclattice/internal/endpoints/endpoints.go b/service/vpclattice/internal/endpoints/endpoints.go index 1f42064d070..4da160349ae 100644 --- a/service/vpclattice/internal/endpoints/endpoints.go +++ b/service/vpclattice/internal/endpoints/endpoints.go @@ -175,6 +175,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-central-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-central-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-north-1", }: endpoints.Endpoint{}, @@ -190,6 +193,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-west-3", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "me-central-1", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "me-south-1", }: endpoints.Endpoint{}, diff --git a/service/workspaces/api_op_ImportWorkspaceImage.go b/service/workspaces/api_op_ImportWorkspaceImage.go index 5ac8a6b8c4e..d13bfd86c37 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, 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 + // protocol you want to use for your BYOL Workspace image, either PCoIP, WSP, or + // bring your own protocol (BYOP). To use DCV, 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 . // // For non-GPU-enabled bundles (bundles other than Graphics or GraphicsPro), - // specify BYOL_REGULAR , BYOL_REGULAR_DCV , or BYOL_REGULAR_BYOP , depending on + // specify BYOL_REGULAR , BYOL_REGULAR_WSP , or BYOL_REGULAR_BYOP , depending on // the protocol. // // The BYOL_REGULAR_BYOP and BYOL_GRAPHICS_G4DN_BYOP values are only supported by