Skip to content

Commit 2aaaba2

Browse files
committed
chore: codegen to use array for SetShape
1 parent 061c40d commit 2aaaba2

File tree

8 files changed

+38
-42
lines changed

8 files changed

+38
-42
lines changed

protocol_tests/aws-ec2/models/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ export interface XmlEnumsOutput {
243243
fooEnum3?: FooEnum | string;
244244
fooEnumList?: (FooEnum | string)[];
245245
fooEnumMap?: { [key: string]: FooEnum | string };
246-
fooEnumSet?: Set<FooEnum | string>;
246+
fooEnumSet?: (FooEnum | string)[];
247247
}
248248

249249
export namespace XmlEnumsOutput {
@@ -265,7 +265,7 @@ export interface XmlListsOutput {
265265

266266
renamedListMembers?: string[];
267267
stringList?: string[];
268-
stringSet?: Set<string>;
268+
stringSet?: string[];
269269
structureList?: StructureListMember[];
270270
timestampList?: Date[];
271271
}

protocol_tests/aws-ec2/protocols/Aws_ec2.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1833,7 +1833,7 @@ const deserializeAws_ec2XmlEnumsOutput = (
18331833
);
18341834
}
18351835
if (output.fooEnumSet === "") {
1836-
contents.fooEnumSet = new Set([]);
1836+
contents.fooEnumSet = [];
18371837
}
18381838
if (
18391839
output["fooEnumSet"] !== undefined &&
@@ -1956,7 +1956,7 @@ const deserializeAws_ec2XmlListsOutput = (
19561956
);
19571957
}
19581958
if (output.stringSet === "") {
1959-
contents.stringSet = new Set([]);
1959+
contents.stringSet = [];
19601960
}
19611961
if (
19621962
output["stringSet"] !== undefined &&
@@ -2111,7 +2111,7 @@ const deserializeAws_ec2FooEnumMap = (
21112111
const deserializeAws_ec2FooEnumSet = (
21122112
output: any,
21132113
context: __SerdeContext
2114-
): Set<FooEnum | string> => {
2114+
): (FooEnum | string)[] => {
21152115
return (output || []).map((entry: any) =>
21162116
entry["#text"] !== undefined ? entry["#text"] : entry
21172117
);
@@ -2150,7 +2150,7 @@ const deserializeAws_ec2StringList = (
21502150
const deserializeAws_ec2StringSet = (
21512151
output: any,
21522152
context: __SerdeContext
2153-
): Set<string> => {
2153+
): string[] => {
21542154
return (output || []).map((entry: any) =>
21552155
entry["#text"] !== undefined ? entry["#text"] : entry
21562156
);

protocol_tests/aws-query/models/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ export interface XmlEnumsOutput {
277277
fooEnum3?: FooEnum | string;
278278
fooEnumList?: (FooEnum | string)[];
279279
fooEnumMap?: { [key: string]: FooEnum | string };
280-
fooEnumSet?: Set<FooEnum | string>;
280+
fooEnumSet?: (FooEnum | string)[];
281281
}
282282

283283
export namespace XmlEnumsOutput {
@@ -299,7 +299,7 @@ export interface XmlListsOutput {
299299

300300
renamedListMembers?: string[];
301301
stringList?: string[];
302-
stringSet?: Set<string>;
302+
stringSet?: string[];
303303
structureList?: StructureListMember[];
304304
timestampList?: Date[];
305305
}

protocol_tests/aws-query/protocols/Aws_query.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2363,7 +2363,7 @@ const deserializeAws_queryXmlEnumsOutput = (
23632363
);
23642364
}
23652365
if (output.fooEnumSet === "") {
2366-
contents.fooEnumSet = new Set([]);
2366+
contents.fooEnumSet = [];
23672367
}
23682368
if (
23692369
output["fooEnumSet"] !== undefined &&
@@ -2486,7 +2486,7 @@ const deserializeAws_queryXmlListsOutput = (
24862486
);
24872487
}
24882488
if (output.stringSet === "") {
2489-
contents.stringSet = new Set([]);
2489+
contents.stringSet = [];
24902490
}
24912491
if (
24922492
output["stringSet"] !== undefined &&
@@ -2707,7 +2707,7 @@ const deserializeAws_queryFooEnumMap = (
27072707
const deserializeAws_queryFooEnumSet = (
27082708
output: any,
27092709
context: __SerdeContext
2710-
): Set<FooEnum | string> => {
2710+
): (FooEnum | string)[] => {
27112711
return (output || []).map((entry: any) =>
27122712
entry["#text"] !== undefined ? entry["#text"] : entry
27132713
);
@@ -2763,7 +2763,7 @@ const deserializeAws_queryStringList = (
27632763
const deserializeAws_queryStringSet = (
27642764
output: any,
27652765
context: __SerdeContext
2766-
): Set<string> => {
2766+
): string[] => {
27672767
return (output || []).map((entry: any) =>
27682768
entry["#text"] !== undefined ? entry["#text"] : entry
27692769
);

protocol_tests/aws-restjson/models/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ export interface AllQueryStringTypesInput {
1616
queryFloat?: number;
1717
queryInteger?: number;
1818
queryIntegerList?: number[];
19-
queryIntegerSet?: Set<number>;
19+
queryIntegerSet?: number[];
2020
queryLong?: number;
2121
queryShort?: number;
2222
queryString?: string;
2323
queryStringList?: string[];
24-
queryStringSet?: Set<string>;
24+
queryStringSet?: string[];
2525
queryTimestamp?: Date;
2626
queryTimestampList?: Date[];
2727
}
@@ -239,7 +239,7 @@ export interface InputAndOutputWithHeadersIO {
239239
headerShort?: number;
240240
headerString?: string;
241241
headerStringList?: string[];
242-
headerStringSet?: Set<string>;
242+
headerStringSet?: string[];
243243
headerTimestampList?: Date[];
244244
headerTrueBool?: boolean;
245245
}
@@ -280,7 +280,7 @@ export interface JsonEnumsInputOutput {
280280
fooEnum3?: FooEnum | string;
281281
fooEnumList?: (FooEnum | string)[];
282282
fooEnumMap?: { [key: string]: FooEnum | string };
283-
fooEnumSet?: Set<FooEnum | string>;
283+
fooEnumSet?: (FooEnum | string)[];
284284
}
285285

286286
export namespace JsonEnumsInputOutput {
@@ -299,7 +299,7 @@ export interface JsonListsInputOutput {
299299
nestedStringList?: string[][];
300300

301301
stringList?: string[];
302-
stringSet?: Set<string>;
302+
stringSet?: string[];
303303
structureList?: StructureListMember[];
304304
timestampList?: Date[];
305305
}

protocol_tests/aws-restjson/protocols/Aws_restJson1_1.ts

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2113,11 +2113,9 @@ export const deserializeAws_restJson1_1InputAndOutputWithHeadersCommand = async
21132113
.map(_entry => _entry.trim());
21142114
}
21152115
if (output.headers["x-stringset"] !== undefined) {
2116-
contents.headerStringSet = new Set(
2117-
(output.headers["x-stringset"] || "")
2118-
.split(",")
2119-
.map(_entry => _entry.trim())
2120-
);
2116+
contents.headerStringSet = (output.headers["x-stringset"] || "")
2117+
.split(",")
2118+
.map(_entry => _entry.trim());
21212119
}
21222120
if (output.headers["x-timestamplist"] !== undefined) {
21232121
contents.headerTimestampList = __splitEvery(
@@ -3211,7 +3209,7 @@ const serializeAws_restJson1_1FooEnumMap = (
32113209
};
32123210

32133211
const serializeAws_restJson1_1FooEnumSet = (
3214-
input: Set<FooEnum | string>,
3212+
input: (FooEnum | string)[],
32153213
context: __SerdeContext
32163214
): any => {
32173215
const contents = [];
@@ -3266,7 +3264,7 @@ const serializeAws_restJson1_1StringList = (
32663264
};
32673265

32683266
const serializeAws_restJson1_1StringSet = (
3269-
input: Set<string>,
3267+
input: string[],
32703268
context: __SerdeContext
32713269
): any => {
32723270
const contents = [];
@@ -3430,7 +3428,7 @@ const deserializeAws_restJson1_1FooEnumMap = (
34303428
const deserializeAws_restJson1_1FooEnumSet = (
34313429
output: any,
34323430
context: __SerdeContext
3433-
): Set<FooEnum | string> => {
3431+
): (FooEnum | string)[] => {
34343432
return (output || []).map((entry: any) => entry);
34353433
};
34363434

@@ -3474,7 +3472,7 @@ const deserializeAws_restJson1_1StringList = (
34743472
const deserializeAws_restJson1_1StringSet = (
34753473
output: any,
34763474
context: __SerdeContext
3477-
): Set<string> => {
3475+
): string[] => {
34783476
return (output || []).map((entry: any) => entry);
34793477
};
34803478

protocol_tests/aws-restxml/models/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ export interface AllQueryStringTypesInput {
1616
queryFloat?: number;
1717
queryInteger?: number;
1818
queryIntegerList?: number[];
19-
queryIntegerSet?: Set<number>;
19+
queryIntegerSet?: number[];
2020
queryLong?: number;
2121
queryShort?: number;
2222
queryString?: string;
2323
queryStringList?: string[];
24-
queryStringSet?: Set<string>;
24+
queryStringSet?: string[];
2525
queryTimestamp?: Date;
2626
queryTimestampList?: Date[];
2727
}
@@ -278,7 +278,7 @@ export interface InputAndOutputWithHeadersIO {
278278
headerShort?: number;
279279
headerString?: string;
280280
headerStringList?: string[];
281-
headerStringSet?: Set<string>;
281+
headerStringSet?: string[];
282282
headerTimestampList?: Date[];
283283
headerTrueBool?: boolean;
284284
}
@@ -500,7 +500,7 @@ export interface XmlEnumsInputOutput {
500500
fooEnum3?: FooEnum | string;
501501
fooEnumList?: (FooEnum | string)[];
502502
fooEnumMap?: { [key: string]: FooEnum | string };
503-
fooEnumSet?: Set<FooEnum | string>;
503+
fooEnumSet?: (FooEnum | string)[];
504504
}
505505

506506
export namespace XmlEnumsInputOutput {
@@ -522,7 +522,7 @@ export interface XmlListsInputOutput {
522522

523523
renamedListMembers?: string[];
524524
stringList?: string[];
525-
stringSet?: Set<string>;
525+
stringSet?: string[];
526526
structureList?: StructureListMember[];
527527
timestampList?: Date[];
528528
}

protocol_tests/aws-restxml/protocols/Aws_restXml.ts

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2835,11 +2835,9 @@ export const deserializeAws_restXmlInputAndOutputWithHeadersCommand = async (
28352835
.map(_entry => _entry.trim());
28362836
}
28372837
if (output.headers["x-stringset"] !== undefined) {
2838-
contents.headerStringSet = new Set(
2839-
(output.headers["x-stringset"] || "")
2840-
.split(",")
2841-
.map(_entry => _entry.trim())
2842-
);
2838+
contents.headerStringSet = (output.headers["x-stringset"] || "")
2839+
.split(",")
2840+
.map(_entry => _entry.trim());
28432841
}
28442842
if (output.headers["x-timestamplist"] !== undefined) {
28452843
contents.headerTimestampList = __splitEvery(
@@ -3670,7 +3668,7 @@ export const deserializeAws_restXmlXmlEnumsCommand = async (
36703668
);
36713669
}
36723670
if (data.fooEnumSet === "") {
3673-
contents.fooEnumSet = new Set([]);
3671+
contents.fooEnumSet = [];
36743672
}
36753673
if (
36763674
data["fooEnumSet"] !== undefined &&
@@ -3825,7 +3823,7 @@ export const deserializeAws_restXmlXmlListsCommand = async (
38253823
);
38263824
}
38273825
if (data.stringSet === "") {
3828-
contents.stringSet = new Set([]);
3826+
contents.stringSet = [];
38293827
}
38303828
if (
38313829
data["stringSet"] !== undefined &&
@@ -4472,7 +4470,7 @@ const serializeAws_restXmlFooEnumMap = (
44724470
};
44734471

44744472
const serializeAws_restXmlFooEnumSet = (
4475-
input: Set<FooEnum | string>,
4473+
input: (FooEnum | string)[],
44764474
context: __SerdeContext
44774475
): any => {
44784476
const collectedNodes: any = [];
@@ -4541,7 +4539,7 @@ const serializeAws_restXmlStringList = (
45414539
};
45424540

45434541
const serializeAws_restXmlStringSet = (
4544-
input: Set<string>,
4542+
input: string[],
45454543
context: __SerdeContext
45464544
): any => {
45474545
const collectedNodes: any = [];
@@ -4883,7 +4881,7 @@ const deserializeAws_restXmlFooEnumMap = (
48834881
const deserializeAws_restXmlFooEnumSet = (
48844882
output: any,
48854883
context: __SerdeContext
4886-
): Set<FooEnum | string> => {
4884+
): (FooEnum | string)[] => {
48874885
return (output || []).map((entry: any) =>
48884886
entry["#text"] !== undefined ? entry["#text"] : entry
48894887
);
@@ -4939,7 +4937,7 @@ const deserializeAws_restXmlStringList = (
49394937
const deserializeAws_restXmlStringSet = (
49404938
output: any,
49414939
context: __SerdeContext
4942-
): Set<string> => {
4940+
): string[] => {
49434941
return (output || []).map((entry: any) =>
49444942
entry["#text"] !== undefined ? entry["#text"] : entry
49454943
);

0 commit comments

Comments
 (0)