From 20dad3aabf1fe6e1fa23d11090797bedb8e93270 Mon Sep 17 00:00:00 2001 From: AllanFly120 Date: Thu, 5 Mar 2020 19:02:08 +0000 Subject: [PATCH] feat: codegen for fixing protocol tests * Protocol codegen fixes via protocol tests (awslabls/smithy-typescript#141) --- .../protocols/Aws_restJson1_1.ts | 20 +- .../client-acm-pca/protocols/Aws_json1_1.ts | 12 +- clients/client-acm/protocols/Aws_json1_1.ts | 44 +- .../protocols/Aws_json1_1.ts | 88 ++- .../protocols/Aws_restJson1_1.ts | 22 +- .../protocols/Aws_restJson1_1.ts | 42 +- .../protocols/Aws_restJson1_1.ts | 46 +- .../protocols/Aws_restJson1_1.ts | 92 ++- .../protocols/Aws_restJson1_1.ts | 16 +- .../protocols/Aws_json1_1.ts | 22 +- .../protocols/Aws_json1_1.ts | 98 ++- .../protocols/Aws_json1_1.ts | 18 +- .../client-appstream/protocols/Aws_json1_1.ts | 104 +++- .../protocols/Aws_restJson1_1.ts | 22 +- .../client-athena/protocols/Aws_json1_1.ts | 24 +- .../protocols/Aws_json1_1.ts | 54 +- .../protocols/Aws_query.ts | 104 ++-- .../protocols/Aws_restJson1_1.ts | 42 +- .../client-batch/protocols/Aws_restJson1_1.ts | 94 ++- .../client-budgets/protocols/Aws_json1_1.ts | 24 +- .../client-chime/protocols/Aws_restJson1_1.ts | 112 +++- .../client-cloud9/protocols/Aws_json1_1.ts | 12 +- .../protocols/Aws_restJson1_1.ts | 142 +++-- .../protocols/Aws_query.ts | 56 +- .../protocols/Aws_restXml.ts | 92 +-- .../protocols/Aws_json1_1.ts | 24 +- .../client-cloudhsm/protocols/Aws_json1_1.ts | 24 +- .../client-cloudsearch/protocols/Aws_query.ts | 16 +- .../protocols/Aws_json1_1.ts | 62 +- .../protocols/Aws_json1_1.ts | 68 ++- .../protocols/Aws_json1_1.ts | 40 +- .../client-cloudwatch/protocols/Aws_query.ts | 68 +-- .../client-codebuild/protocols/Aws_json1_1.ts | 96 ++- .../protocols/Aws_json1_1.ts | 82 ++- .../protocols/Aws_json1_1.ts | 182 ++++-- .../protocols/Aws_json1_1.ts | 70 ++- .../protocols/Aws_restJson1_1.ts | 46 +- .../client-codestar/protocols/Aws_json1_1.ts | 12 +- .../protocols/Aws_json1_1.ts | 164 +++-- .../protocols/Aws_json1_1.ts | 46 +- .../protocols/Aws_restJson1_1.ts | 14 +- .../protocols/Aws_json1_1.ts | 38 +- .../protocols/Aws_json1_0.ts | 30 +- .../protocols/Aws_json1_1.ts | 232 +++++-- .../protocols/Aws_restJson1_1.ts | 40 +- .../protocols/Aws_restJson1_1.ts | 6 +- .../protocols/Aws_json1_1.ts | 12 +- .../protocols/Aws_json1_1.ts | 36 +- .../protocols/Aws_json1_1.ts | 64 +- .../protocols/Aws_json1_1.ts | 56 +- .../protocols/Aws_restJson1_1.ts | 18 +- .../client-datasync/protocols/Aws_json1_1.ts | 46 +- clients/client-dax/protocols/Aws_json1_1.ts | 62 +- .../protocols/Aws_restJson1_1.ts | 14 +- .../protocols/Aws_json1_1.ts | 68 ++- .../protocols/Aws_json1_1.ts | 26 +- .../protocols/Aws_json1_1.ts | 88 ++- .../client-dlm/protocols/Aws_restJson1_1.ts | 58 +- clients/client-docdb/protocols/Aws_query.ts | 44 +- .../client-dynamodb/protocols/Aws_json1_0.ts | 238 +++++--- clients/client-ec2/protocols/Aws_ec2.ts | 572 ++++++++--------- clients/client-ecr/protocols/Aws_json1_1.ts | 50 +- clients/client-ecs/protocols/Aws_json1_1.ts | 310 +++++++--- .../client-efs/protocols/Aws_restJson1_1.ts | 34 +- .../client-eks/protocols/Aws_restJson1_1.ts | 36 +- .../protocols/Aws_query.ts | 56 +- .../protocols/Aws_query.ts | 100 +-- .../protocols/Aws_query.ts | 56 +- .../protocols/Aws_restJson1_1.ts | 98 ++- .../client-elasticache/protocols/Aws_query.ts | 84 +-- .../protocols/Aws_restJson1_1.ts | 20 +- clients/client-emr/protocols/Aws_json1_1.ts | 198 ++++-- .../protocols/Aws_json1_1.ts | 68 ++- .../client-firehose/protocols/Aws_json1_1.ts | 48 +- clients/client-fms/protocols/Aws_json1_1.ts | 32 +- .../client-forecast/protocols/Aws_json1_1.ts | 88 ++- .../protocols/Aws_json1_1.ts | 48 +- clients/client-fsx/protocols/Aws_json1_1.ts | 80 ++- .../client-gamelift/protocols/Aws_json1_1.ts | 136 +++-- .../protocols/Aws_restJson1_1.ts | 28 +- .../protocols/Aws_json1_1.ts | 16 +- clients/client-glue/protocols/Aws_json1_1.ts | 322 +++++++--- .../protocols/Aws_restJson1_1.ts | 84 ++- .../protocols/Aws_restJson1_1.ts | 40 +- .../protocols/Aws_restJson1_1.ts | 56 +- .../client-health/protocols/Aws_json1_1.ts | 114 +++- clients/client-iam/protocols/Aws_query.ts | 52 +- .../protocols/Aws_restJson1_1.ts | 72 ++- .../client-inspector/protocols/Aws_json1_1.ts | 114 +++- .../protocols/Aws_restJson1_1.ts | 34 +- .../protocols/Aws_restJson1_1.ts | 56 +- .../client-iot/protocols/Aws_restJson1_1.ts | 198 ++++-- .../protocols/Aws_restJson1_1.ts | 78 ++- .../protocols/Aws_json1_1.ts | 18 +- .../protocols/Aws_json1_1.ts | 80 ++- .../client-kafka/protocols/Aws_restJson1_1.ts | 14 +- .../client-kendra/protocols/Aws_json1_1.ts | 122 +++- .../protocols/Aws_json1_1.ts | 128 ++-- .../protocols/Aws_json1_1.ts | 84 ++- .../protocols/Aws_restJson1_1.ts | 6 +- .../protocols/Aws_restJson1_1.ts | 28 +- .../client-kinesis/protocols/Aws_json1_1.ts | 20 +- clients/client-kms/protocols/Aws_json1_1.ts | 24 +- .../protocols/Aws_json1_1.ts | 52 +- .../protocols/Aws_restJson1_1.ts | 24 +- .../protocols/Aws_restJson1_1.ts | 58 +- .../protocols/Aws_restJson1_1.ts | 8 +- .../protocols/Aws_json1_1.ts | 62 +- .../client-lightsail/protocols/Aws_json1_1.ts | 78 ++- .../protocols/Aws_json1_1.ts | 18 +- clients/client-macie/protocols/Aws_json1_1.ts | 26 +- .../protocols/Aws_restJson1_1.ts | 16 +- .../protocols/Aws_restJson1_1.ts | 22 +- .../protocols/Aws_json1_1.ts | 6 +- .../protocols/Aws_json1_1.ts | 8 +- .../protocols/Aws_restJson1_1.ts | 24 +- .../protocols/Aws_restJson1_1.ts | 200 ++++-- .../protocols/Aws_restJson1_1.ts | 200 +++--- .../protocols/Aws_restJson1_1.ts | 30 +- .../protocols/Aws_restJson1_1.ts | 31 +- .../protocols/Aws_json1_1.ts | 44 +- .../protocols/Aws_json1_1.ts | 14 +- .../client-mq/protocols/Aws_restJson1_1.ts | 14 +- clients/client-mturk/protocols/Aws_json1_1.ts | 74 ++- clients/client-neptune/protocols/Aws_query.ts | 52 +- .../protocols/Aws_restJson1_1.ts | 8 +- .../client-opsworks/protocols/Aws_json1_1.ts | 52 +- .../protocols/Aws_json1_1.ts | 26 +- .../protocols/Aws_json1_1.ts | 18 +- .../protocols/Aws_restJson1_1.ts | 8 +- .../protocols/Aws_restJson1_1.ts | 6 +- .../protocols/Aws_json1_1.ts | 42 +- clients/client-pi/protocols/Aws_json1_1.ts | 14 +- .../protocols/Aws_restJson1_1.ts | 54 +- .../protocols/Aws_restJson1_1.ts | 6 +- .../protocols/Aws_restJson1_1.ts | 74 ++- .../client-polly/protocols/Aws_restJson1_1.ts | 12 +- .../client-pricing/protocols/Aws_json1_1.ts | 6 +- .../protocols/Aws_json1_0.ts | 8 +- .../protocols/Aws_restJson1_1.ts | 152 +++-- .../client-ram/protocols/Aws_restJson1_1.ts | 58 +- .../protocols/Aws_restJson1_1.ts | 48 +- clients/client-rds/protocols/Aws_query.ts | 80 +-- .../client-redshift/protocols/Aws_query.ts | 76 +-- .../protocols/Aws_json1_1.ts | 30 +- .../protocols/Aws_json1_1.ts | 56 +- .../protocols/Aws_restJson1_1.ts | 34 +- .../protocols/Aws_restJson1_1.ts | 92 ++- .../protocols/Aws_json1_1.ts | 34 +- .../client-route-53/protocols/Aws_restXml.ts | 32 +- .../protocols/Aws_json1_1.ts | 46 +- .../protocols/Aws_restXml.ts | 16 +- clients/client-s3/protocols/Aws_restXml.ts | 92 +-- .../protocols/Aws_restJson1_1.ts | 6 +- .../client-sagemaker/protocols/Aws_json1_1.ts | 412 +++++++++---- .../protocols/Aws_restJson1_1.ts | 155 ++++- .../protocols/Aws_restJson1_1.ts | 6 +- .../protocols/Aws_json1_1.ts | 18 +- .../protocols/Aws_restJson1_1.ts | 197 ++++-- .../protocols/Aws_restJson1_1.ts | 40 +- .../protocols/Aws_json1_1.ts | 99 ++- .../protocols/Aws_json1_1.ts | 44 +- clients/client-ses/protocols/Aws_query.ts | 82 +-- .../client-sesv2/protocols/Aws_restJson1_1.ts | 60 +- clients/client-sfn/protocols/Aws_json1_0.ts | 20 +- .../client-shield/protocols/Aws_json1_1.ts | 14 +- clients/client-sms/protocols/Aws_json1_1.ts | 74 ++- .../client-snowball/protocols/Aws_json1_1.ts | 38 +- clients/client-sns/protocols/Aws_query.ts | 32 +- clients/client-sqs/protocols/Aws_query.ts | 58 +- clients/client-ssm/protocols/Aws_json1_1.ts | 576 +++++++++++++----- .../protocols/Aws_restJson1_1.ts | 6 +- .../protocols/Aws_json1_1.ts | 66 +- clients/client-sts/protocols/Aws_query.ts | 12 +- .../client-support/protocols/Aws_json1_1.ts | 32 +- clients/client-swf/protocols/Aws_json1_0.ts | 28 +- .../client-textract/protocols/Aws_json1_1.ts | 12 +- .../protocols/Aws_json1_1.ts | 12 +- .../client-transfer/protocols/Aws_json1_1.ts | 32 +- .../client-translate/protocols/Aws_json1_1.ts | 12 +- .../protocols/Aws_json1_1.ts | 124 ++-- clients/client-waf/protocols/Aws_json1_1.ts | 124 ++-- clients/client-wafv2/protocols/Aws_json1_1.ts | 74 ++- .../protocols/Aws_restJson1_1.ts | 14 +- .../protocols/Aws_restJson1_1.ts | 12 +- .../client-workmail/protocols/Aws_json1_1.ts | 6 +- .../protocols/Aws_json1_1.ts | 116 +++- .../client-xray/protocols/Aws_restJson1_1.ts | 30 +- 188 files changed, 8623 insertions(+), 3755 deletions(-) diff --git a/clients/client-accessanalyzer/protocols/Aws_restJson1_1.ts b/clients/client-accessanalyzer/protocols/Aws_restJson1_1.ts index bdbb432f52768..67fe2daa5b4fe 100644 --- a/clients/client-accessanalyzer/protocols/Aws_restJson1_1.ts +++ b/clients/client-accessanalyzer/protocols/Aws_restJson1_1.ts @@ -2744,7 +2744,11 @@ const serializeAws_restJson1_1FindingIdList = ( input: Array, context: __SerdeContext ): any => { - return (input || []).map(entry => entry); + const contents = []; + for (let entry of input) { + contents.push(entry); + } + return contents; }; const serializeAws_restJson1_1InlineArchiveRule = ( @@ -2768,9 +2772,11 @@ const serializeAws_restJson1_1InlineArchiveRulesList = ( input: Array, context: __SerdeContext ): any => { - return (input || []).map(entry => - serializeAws_restJson1_1InlineArchiveRule(entry, context) - ); + const contents = []; + for (let entry of input) { + contents.push(serializeAws_restJson1_1InlineArchiveRule(entry, context)); + } + return contents; }; const serializeAws_restJson1_1SortCriteria = ( @@ -2802,7 +2808,11 @@ const serializeAws_restJson1_1ValueList = ( input: Array, context: __SerdeContext ): any => { - return (input || []).map(entry => entry); + const contents = []; + for (let entry of input) { + contents.push(entry); + } + return contents; }; const deserializeAws_restJson1_1ActionList = ( diff --git a/clients/client-acm-pca/protocols/Aws_json1_1.ts b/clients/client-acm-pca/protocols/Aws_json1_1.ts index 749b211c2c0eb..bd3ea28ea0457 100644 --- a/clients/client-acm-pca/protocols/Aws_json1_1.ts +++ b/clients/client-acm-pca/protocols/Aws_json1_1.ts @@ -2756,7 +2756,11 @@ const serializeAws_json1_1ActionList = ( input: Array, context: __SerdeContext ): any => { - return (input || []).map(entry => entry); + const contents = []; + for (let entry of input) { + contents.push(entry); + } + return contents; }; const serializeAws_json1_1CertificateAuthorityConfiguration = ( @@ -3132,7 +3136,11 @@ const serializeAws_json1_1TagList = ( input: Array, context: __SerdeContext ): any => { - return (input || []).map(entry => serializeAws_json1_1Tag(entry, context)); + const contents = []; + for (let entry of input) { + contents.push(serializeAws_json1_1Tag(entry, context)); + } + return contents; }; const serializeAws_json1_1UntagCertificateAuthorityRequest = ( diff --git a/clients/client-acm/protocols/Aws_json1_1.ts b/clients/client-acm/protocols/Aws_json1_1.ts index f806b0cc8883d..79b3519f6907c 100644 --- a/clients/client-acm/protocols/Aws_json1_1.ts +++ b/clients/client-acm/protocols/Aws_json1_1.ts @@ -1657,7 +1657,11 @@ const serializeAws_json1_1CertificateStatuses = ( input: Array, context: __SerdeContext ): any => { - return (input || []).map(entry => entry); + const contents = []; + for (let entry of input) { + contents.push(entry); + } + return contents; }; const serializeAws_json1_1DeleteCertificateRequest = ( @@ -1686,7 +1690,11 @@ const serializeAws_json1_1DomainList = ( input: Array, context: __SerdeContext ): any => { - return (input || []).map(entry => entry); + const contents = []; + for (let entry of input) { + contents.push(entry); + } + return contents; }; const serializeAws_json1_1DomainValidationOption = ( @@ -1707,9 +1715,11 @@ const serializeAws_json1_1DomainValidationOptionList = ( input: Array, context: __SerdeContext ): any => { - return (input || []).map(entry => - serializeAws_json1_1DomainValidationOption(entry, context) - ); + const contents = []; + for (let entry of input) { + contents.push(serializeAws_json1_1DomainValidationOption(entry, context)); + } + return contents; }; const serializeAws_json1_1ExportCertificateRequest = ( @@ -1730,7 +1740,11 @@ const serializeAws_json1_1ExtendedKeyUsageFilterList = ( input: Array, context: __SerdeContext ): any => { - return (input || []).map(entry => entry); + const contents = []; + for (let entry of input) { + contents.push(entry); + } + return contents; }; const serializeAws_json1_1Filters = ( @@ -1801,14 +1815,22 @@ const serializeAws_json1_1KeyAlgorithmList = ( input: Array, context: __SerdeContext ): any => { - return (input || []).map(entry => entry); + const contents = []; + for (let entry of input) { + contents.push(entry); + } + return contents; }; const serializeAws_json1_1KeyUsageFilterList = ( input: Array, context: __SerdeContext ): any => { - return (input || []).map(entry => entry); + const contents = []; + for (let entry of input) { + contents.push(entry); + } + return contents; }; const serializeAws_json1_1ListCertificatesRequest = ( @@ -1948,7 +1970,11 @@ const serializeAws_json1_1TagList = ( input: Array, context: __SerdeContext ): any => { - return (input || []).map(entry => serializeAws_json1_1Tag(entry, context)); + const contents = []; + for (let entry of input) { + contents.push(serializeAws_json1_1Tag(entry, context)); + } + return contents; }; const serializeAws_json1_1UpdateCertificateOptionsRequest = ( diff --git a/clients/client-alexa-for-business/protocols/Aws_json1_1.ts b/clients/client-alexa-for-business/protocols/Aws_json1_1.ts index c902aba20e72a..11983471c8ddd 100644 --- a/clients/client-alexa-for-business/protocols/Aws_json1_1.ts +++ b/clients/client-alexa-for-business/protocols/Aws_json1_1.ts @@ -8429,14 +8429,22 @@ const serializeAws_json1_1FilterList = ( input: Array, context: __SerdeContext ): any => { - return (input || []).map(entry => serializeAws_json1_1Filter(entry, context)); + const contents = []; + for (let entry of input) { + contents.push(serializeAws_json1_1Filter(entry, context)); + } + return contents; }; const serializeAws_json1_1FilterValueList = ( input: Array, context: __SerdeContext ): any => { - return (input || []).map(entry => entry); + const contents = []; + for (let entry of input) { + contents.push(entry); + } + return contents; }; const serializeAws_json1_1IPDialIn = ( @@ -8502,7 +8510,11 @@ const serializeAws_json1_1AudioList = ( input: Array