Skip to content

Commit

Permalink
feat: codegen for fixing protocol tests
Browse files Browse the repository at this point in the history
* Protocol codegen fixes via protocol tests (awslabls/smithy-typescript#141)
  • Loading branch information
AllanZhengYP committed Mar 5, 2020
1 parent b76e8e4 commit 20dad3a
Show file tree
Hide file tree
Showing 188 changed files with 8,623 additions and 3,755 deletions.
20 changes: 15 additions & 5 deletions clients/client-accessanalyzer/protocols/Aws_restJson1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2744,7 +2744,11 @@ const serializeAws_restJson1_1FindingIdList = (
input: Array<string>,
context: __SerdeContext
): any => {
return (input || []).map(entry => entry);
const contents = [];
for (let entry of input) {
contents.push(entry);
}
return contents;
};

const serializeAws_restJson1_1InlineArchiveRule = (
Expand All @@ -2768,9 +2772,11 @@ const serializeAws_restJson1_1InlineArchiveRulesList = (
input: Array<InlineArchiveRule>,
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 = (
Expand Down Expand Up @@ -2802,7 +2808,11 @@ const serializeAws_restJson1_1ValueList = (
input: Array<string>,
context: __SerdeContext
): any => {
return (input || []).map(entry => entry);
const contents = [];
for (let entry of input) {
contents.push(entry);
}
return contents;
};

const deserializeAws_restJson1_1ActionList = (
Expand Down
12 changes: 10 additions & 2 deletions clients/client-acm-pca/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2756,7 +2756,11 @@ const serializeAws_json1_1ActionList = (
input: Array<ActionType | string>,
context: __SerdeContext
): any => {
return (input || []).map(entry => entry);
const contents = [];
for (let entry of input) {
contents.push(entry);
}
return contents;
};

const serializeAws_json1_1CertificateAuthorityConfiguration = (
Expand Down Expand Up @@ -3132,7 +3136,11 @@ const serializeAws_json1_1TagList = (
input: Array<Tag>,
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 = (
Expand Down
44 changes: 35 additions & 9 deletions clients/client-acm/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1657,7 +1657,11 @@ const serializeAws_json1_1CertificateStatuses = (
input: Array<CertificateStatus | string>,
context: __SerdeContext
): any => {
return (input || []).map(entry => entry);
const contents = [];
for (let entry of input) {
contents.push(entry);
}
return contents;
};

const serializeAws_json1_1DeleteCertificateRequest = (
Expand Down Expand Up @@ -1686,7 +1690,11 @@ const serializeAws_json1_1DomainList = (
input: Array<string>,
context: __SerdeContext
): any => {
return (input || []).map(entry => entry);
const contents = [];
for (let entry of input) {
contents.push(entry);
}
return contents;
};

const serializeAws_json1_1DomainValidationOption = (
Expand All @@ -1707,9 +1715,11 @@ const serializeAws_json1_1DomainValidationOptionList = (
input: Array<DomainValidationOption>,
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 = (
Expand All @@ -1730,7 +1740,11 @@ const serializeAws_json1_1ExtendedKeyUsageFilterList = (
input: Array<ExtendedKeyUsageName | string>,
context: __SerdeContext
): any => {
return (input || []).map(entry => entry);
const contents = [];
for (let entry of input) {
contents.push(entry);
}
return contents;
};

const serializeAws_json1_1Filters = (
Expand Down Expand Up @@ -1801,14 +1815,22 @@ const serializeAws_json1_1KeyAlgorithmList = (
input: Array<KeyAlgorithm | string>,
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<KeyUsageName | string>,
context: __SerdeContext
): any => {
return (input || []).map(entry => entry);
const contents = [];
for (let entry of input) {
contents.push(entry);
}
return contents;
};

const serializeAws_json1_1ListCertificatesRequest = (
Expand Down Expand Up @@ -1948,7 +1970,11 @@ const serializeAws_json1_1TagList = (
input: Array<Tag>,
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 = (
Expand Down
88 changes: 70 additions & 18 deletions clients/client-alexa-for-business/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8429,14 +8429,22 @@ const serializeAws_json1_1FilterList = (
input: Array<Filter>,
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<string>,
context: __SerdeContext
): any => {
return (input || []).map(entry => entry);
const contents = [];
for (let entry of input) {
contents.push(entry);
}
return contents;
};

const serializeAws_json1_1IPDialIn = (
Expand Down Expand Up @@ -8502,7 +8510,11 @@ const serializeAws_json1_1AudioList = (
input: Array<Audio>,
context: __SerdeContext
): any => {
return (input || []).map(entry => serializeAws_json1_1Audio(entry, context));
const contents = [];
for (let entry of input) {
contents.push(serializeAws_json1_1Audio(entry, context));
}
return contents;
};

const serializeAws_json1_1Content = (
Expand Down Expand Up @@ -8575,7 +8587,11 @@ const serializeAws_json1_1SsmlList = (
input: Array<Ssml>,
context: __SerdeContext
): any => {
return (input || []).map(entry => serializeAws_json1_1Ssml(entry, context));
const contents = [];
for (let entry of input) {
contents.push(serializeAws_json1_1Ssml(entry, context));
}
return contents;
};

const serializeAws_json1_1Text = (
Expand All @@ -8596,7 +8612,11 @@ const serializeAws_json1_1TextList = (
input: Array<Text>,
context: __SerdeContext
): any => {
return (input || []).map(entry => serializeAws_json1_1Text(entry, context));
const contents = [];
for (let entry of input) {
contents.push(serializeAws_json1_1Text(entry, context));
}
return contents;
};

const serializeAws_json1_1DeleteDeviceUsageDataRequest = (
Expand Down Expand Up @@ -9383,14 +9403,22 @@ const serializeAws_json1_1EndOfMeetingReminderMinutesList = (
input: Array<number>,
context: __SerdeContext
): any => {
return (input || []).map(entry => entry);
const contents = [];
for (let entry of input) {
contents.push(entry);
}
return contents;
};

const serializeAws_json1_1Features = (
input: Array<Feature | string>,
context: __SerdeContext
): any => {
return (input || []).map(entry => entry);
const contents = [];
for (let entry of input) {
contents.push(entry);
}
return contents;
};

const serializeAws_json1_1ForgetSmartHomeAppliancesRequest = (
Expand Down Expand Up @@ -9732,9 +9760,11 @@ const serializeAws_json1_1PhoneNumberList = (
input: Array<PhoneNumber>,
context: __SerdeContext
): any => {
return (input || []).map(entry =>
serializeAws_json1_1PhoneNumber(entry, context)
);
const contents = [];
for (let entry of input) {
contents.push(serializeAws_json1_1PhoneNumber(entry, context));
}
return contents;
};

const serializeAws_json1_1PutConferencePreferenceRequest = (
Expand Down Expand Up @@ -10112,7 +10142,11 @@ const serializeAws_json1_1ShortSkillIdList = (
input: Array<string>,
context: __SerdeContext
): any => {
return (input || []).map(entry => entry);
const contents = [];
for (let entry of input) {
contents.push(entry);
}
return contents;
};

const serializeAws_json1_1SipAddress = (
Expand All @@ -10133,9 +10167,11 @@ const serializeAws_json1_1SipAddressList = (
input: Array<SipAddress>,
context: __SerdeContext
): any => {
return (input || []).map(entry =>
serializeAws_json1_1SipAddress(entry, context)
);
const contents = [];
for (let entry of input) {
contents.push(serializeAws_json1_1SipAddress(entry, context));
}
return contents;
};

const serializeAws_json1_1Sort = (
Expand All @@ -10156,7 +10192,11 @@ const serializeAws_json1_1SortList = (
input: Array<Sort>,
context: __SerdeContext
): any => {
return (input || []).map(entry => serializeAws_json1_1Sort(entry, context));
const contents = [];
for (let entry of input) {
contents.push(serializeAws_json1_1Sort(entry, context));
}
return contents;
};

const serializeAws_json1_1StartDeviceSyncRequest = (
Expand Down Expand Up @@ -10205,14 +10245,22 @@ const serializeAws_json1_1TagKeyList = (
input: Array<string>,
context: __SerdeContext
): any => {
return (input || []).map(entry => entry);
const contents = [];
for (let entry of input) {
contents.push(entry);
}
return contents;
};

const serializeAws_json1_1TagList = (
input: Array<Tag>,
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_1TagResourceRequest = (
Expand All @@ -10233,7 +10281,11 @@ const serializeAws_json1_1TrustAnchorList = (
input: Array<string>,
context: __SerdeContext
): any => {
return (input || []).map(entry => entry);
const contents = [];
for (let entry of input) {
contents.push(entry);
}
return contents;
};

const serializeAws_json1_1UntagResourceRequest = (
Expand Down
22 changes: 15 additions & 7 deletions clients/client-amplify/protocols/Aws_restJson1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5542,7 +5542,11 @@ const serializeAws_restJson1_1AutoBranchCreationPatterns = (
input: Array<string>,
context: __SerdeContext
): any => {
return (input || []).map(entry => entry);
const contents = [];
for (let entry of input) {
contents.push(entry);
}
return contents;
};

const serializeAws_restJson1_1CustomRule = (
Expand All @@ -5569,9 +5573,11 @@ const serializeAws_restJson1_1CustomRules = (
input: Array<CustomRule>,
context: __SerdeContext
): any => {
return (input || []).map(entry =>
serializeAws_restJson1_1CustomRule(entry, context)
);
const contents = [];
for (let entry of input) {
contents.push(serializeAws_restJson1_1CustomRule(entry, context));
}
return contents;
};

const serializeAws_restJson1_1EnvironmentVariables = (
Expand Down Expand Up @@ -5614,9 +5620,11 @@ const serializeAws_restJson1_1SubDomainSettings = (
input: Array<SubDomainSetting>,
context: __SerdeContext
): any => {
return (input || []).map(entry =>
serializeAws_restJson1_1SubDomainSetting(entry, context)
);
const contents = [];
for (let entry of input) {
contents.push(serializeAws_restJson1_1SubDomainSetting(entry, context));
}
return contents;
};

const serializeAws_restJson1_1TagMap = (
Expand Down
Loading

0 comments on commit 20dad3a

Please sign in to comment.