Skip to content

Commit f69ff44

Browse files
authored
feat: update clients as of 12/12/2020 (#1771)
1 parent e22d9ef commit f69ff44

File tree

250 files changed

+136207
-81011
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

250 files changed

+136207
-81011
lines changed

Diff for: clients/client-accessanalyzer/protocols/Aws_restJson1.ts

+200-113
Large diffs are not rendered by default.

Diff for: clients/client-acm-pca/protocols/Aws_json1_1.ts

+262-175
Large diffs are not rendered by default.

Diff for: clients/client-acm/protocols/Aws_json1_1.ts

+260-105
Large diffs are not rendered by default.

Diff for: clients/client-alexa-for-business/protocols/Aws_json1_1.ts

+1,061-725
Large diffs are not rendered by default.

Diff for: clients/client-amplify/protocols/Aws_restJson1.ts

+448-298
Large diffs are not rendered by default.

Diff for: clients/client-amplifybackend/protocols/Aws_restJson1.ts

+400-262
Large diffs are not rendered by default.

Diff for: clients/client-api-gateway/protocols/Aws_restJson1.ts

+892-677
Large diffs are not rendered by default.

Diff for: clients/client-apigatewaymanagementapi/protocols/Aws_restJson1.ts

+4-7
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ export const serializeAws_restJson1DeleteConnectionCommand = async (
2424
input: DeleteConnectionCommandInput,
2525
context: __SerdeContext
2626
): Promise<__HttpRequest> => {
27-
const headers: any = {
28-
"Content-Type": "",
29-
};
27+
const headers: any = {};
3028
let resolvedPath = "/@connections/{ConnectionId}";
3129
if (input.ConnectionId !== undefined) {
3230
const labelValue: string = input.ConnectionId;
@@ -54,9 +52,7 @@ export const serializeAws_restJson1GetConnectionCommand = async (
5452
input: GetConnectionCommandInput,
5553
context: __SerdeContext
5654
): Promise<__HttpRequest> => {
57-
const headers: any = {
58-
"Content-Type": "",
59-
};
55+
const headers: any = {};
6056
let resolvedPath = "/@connections/{ConnectionId}";
6157
if (input.ConnectionId !== undefined) {
6258
const labelValue: string = input.ConnectionId;
@@ -85,7 +81,7 @@ export const serializeAws_restJson1PostToConnectionCommand = async (
8581
context: __SerdeContext
8682
): Promise<__HttpRequest> => {
8783
const headers: any = {
88-
"Content-Type": "application/octet-stream",
84+
"content-type": "application/octet-stream",
8985
};
9086
let resolvedPath = "/@connections/{ConnectionId}";
9187
if (input.ConnectionId !== undefined) {
@@ -417,6 +413,7 @@ const collectBodyString = (streamBody: any, context: __SerdeContext): Promise<st
417413

418414
const isSerializableHeaderValue = (value: any): boolean =>
419415
value !== undefined &&
416+
value !== null &&
420417
value !== "" &&
421418
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
422419
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);

Diff for: clients/client-apigatewayv2/protocols/Aws_restJson1.ts

+840-577
Large diffs are not rendered by default.

Diff for: clients/client-app-mesh/protocols/Aws_restJson1.ts

+705-383
Large diffs are not rendered by default.

Diff for: clients/client-appconfig/protocols/Aws_restJson1.ts

+202-152
Large diffs are not rendered by default.

Diff for: clients/client-appflow/protocols/Aws_restJson1.ts

+779-504
Large diffs are not rendered by default.

Diff for: clients/client-appintegrations/protocols/Aws_restJson1.ts

+57-48
Original file line numberDiff line numberDiff line change
@@ -58,19 +58,19 @@ export const serializeAws_restJson1CreateEventIntegrationCommand = async (
5858
context: __SerdeContext
5959
): Promise<__HttpRequest> => {
6060
const headers: any = {
61-
"Content-Type": "application/json",
61+
"content-type": "application/json",
6262
};
6363
let resolvedPath = "/eventIntegrations";
6464
let body: any;
6565
body = JSON.stringify({
6666
ClientToken: input.ClientToken ?? generateIdempotencyToken(),
67-
...(input.Description !== undefined && { Description: input.Description }),
68-
...(input.EventBridgeBus !== undefined && { EventBridgeBus: input.EventBridgeBus }),
69-
...(input.EventFilter !== undefined && {
70-
EventFilter: serializeAws_restJson1EventFilter(input.EventFilter, context),
71-
}),
72-
...(input.Name !== undefined && { Name: input.Name }),
73-
...(input.Tags !== undefined && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
67+
...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
68+
...(input.EventBridgeBus !== undefined &&
69+
input.EventBridgeBus !== null && { EventBridgeBus: input.EventBridgeBus }),
70+
...(input.EventFilter !== undefined &&
71+
input.EventFilter !== null && { EventFilter: serializeAws_restJson1EventFilter(input.EventFilter, context) }),
72+
...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
73+
...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
7474
});
7575
const { hostname, protocol = "https", port } = await context.endpoint();
7676
return new __HttpRequest({
@@ -88,9 +88,7 @@ export const serializeAws_restJson1DeleteEventIntegrationCommand = async (
8888
input: DeleteEventIntegrationCommandInput,
8989
context: __SerdeContext
9090
): Promise<__HttpRequest> => {
91-
const headers: any = {
92-
"Content-Type": "",
93-
};
91+
const headers: any = {};
9492
let resolvedPath = "/eventIntegrations/{Name}";
9593
if (input.Name !== undefined) {
9694
const labelValue: string = input.Name;
@@ -118,9 +116,7 @@ export const serializeAws_restJson1GetEventIntegrationCommand = async (
118116
input: GetEventIntegrationCommandInput,
119117
context: __SerdeContext
120118
): Promise<__HttpRequest> => {
121-
const headers: any = {
122-
"Content-Type": "",
123-
};
119+
const headers: any = {};
124120
let resolvedPath = "/eventIntegrations/{Name}";
125121
if (input.Name !== undefined) {
126122
const labelValue: string = input.Name;
@@ -148,9 +144,7 @@ export const serializeAws_restJson1ListEventIntegrationAssociationsCommand = asy
148144
input: ListEventIntegrationAssociationsCommandInput,
149145
context: __SerdeContext
150146
): Promise<__HttpRequest> => {
151-
const headers: any = {
152-
"Content-Type": "",
153-
};
147+
const headers: any = {};
154148
let resolvedPath = "/eventIntegrations/{EventIntegrationName}/associations";
155149
if (input.EventIntegrationName !== undefined) {
156150
const labelValue: string = input.EventIntegrationName;
@@ -183,9 +177,7 @@ export const serializeAws_restJson1ListEventIntegrationsCommand = async (
183177
input: ListEventIntegrationsCommandInput,
184178
context: __SerdeContext
185179
): Promise<__HttpRequest> => {
186-
const headers: any = {
187-
"Content-Type": "",
188-
};
180+
const headers: any = {};
189181
let resolvedPath = "/eventIntegrations";
190182
const query: any = {
191183
...(input.NextToken !== undefined && { nextToken: input.NextToken }),
@@ -209,9 +201,7 @@ export const serializeAws_restJson1ListTagsForResourceCommand = async (
209201
input: ListTagsForResourceCommandInput,
210202
context: __SerdeContext
211203
): Promise<__HttpRequest> => {
212-
const headers: any = {
213-
"Content-Type": "",
214-
};
204+
const headers: any = {};
215205
let resolvedPath = "/tags/{resourceArn}";
216206
if (input.resourceArn !== undefined) {
217207
const labelValue: string = input.resourceArn;
@@ -240,7 +230,7 @@ export const serializeAws_restJson1TagResourceCommand = async (
240230
context: __SerdeContext
241231
): Promise<__HttpRequest> => {
242232
const headers: any = {
243-
"Content-Type": "application/json",
233+
"content-type": "application/json",
244234
};
245235
let resolvedPath = "/tags/{resourceArn}";
246236
if (input.resourceArn !== undefined) {
@@ -254,7 +244,7 @@ export const serializeAws_restJson1TagResourceCommand = async (
254244
}
255245
let body: any;
256246
body = JSON.stringify({
257-
...(input.tags !== undefined && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
247+
...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
258248
});
259249
const { hostname, protocol = "https", port } = await context.endpoint();
260250
return new __HttpRequest({
@@ -272,9 +262,7 @@ export const serializeAws_restJson1UntagResourceCommand = async (
272262
input: UntagResourceCommandInput,
273263
context: __SerdeContext
274264
): Promise<__HttpRequest> => {
275-
const headers: any = {
276-
"Content-Type": "",
277-
};
265+
const headers: any = {};
278266
let resolvedPath = "/tags/{resourceArn}";
279267
if (input.resourceArn !== undefined) {
280268
const labelValue: string = input.resourceArn;
@@ -307,7 +295,7 @@ export const serializeAws_restJson1UpdateEventIntegrationCommand = async (
307295
context: __SerdeContext
308296
): Promise<__HttpRequest> => {
309297
const headers: any = {
310-
"Content-Type": "application/json",
298+
"content-type": "application/json",
311299
};
312300
let resolvedPath = "/eventIntegrations/{Name}";
313301
if (input.Name !== undefined) {
@@ -321,7 +309,7 @@ export const serializeAws_restJson1UpdateEventIntegrationCommand = async (
321309
}
322310
let body: any;
323311
body = JSON.stringify({
324-
...(input.Description !== undefined && { Description: input.Description }),
312+
...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
325313
});
326314
const { hostname, protocol = "https", port } = await context.endpoint();
327315
return new __HttpRequest({
@@ -1230,31 +1218,35 @@ const deserializeAws_restJson1ThrottlingExceptionResponse = async (
12301218

12311219
const serializeAws_restJson1EventFilter = (input: EventFilter, context: __SerdeContext): any => {
12321220
return {
1233-
...(input.Source !== undefined && { Source: input.Source }),
1221+
...(input.Source !== undefined && input.Source !== null && { Source: input.Source }),
12341222
};
12351223
};
12361224

12371225
const serializeAws_restJson1TagMap = (input: { [key: string]: string }, context: __SerdeContext): any => {
1238-
return Object.entries(input).reduce(
1239-
(acc: { [key: string]: string }, [key, value]: [string, any]) => ({
1226+
return Object.entries(input).reduce((acc: { [key: string]: string }, [key, value]: [string, any]) => {
1227+
if (value === null) {
1228+
return acc;
1229+
}
1230+
return {
12401231
...acc,
12411232
[key]: value,
1242-
}),
1243-
{}
1244-
);
1233+
};
1234+
}, {});
12451235
};
12461236

12471237
const deserializeAws_restJson1ClientAssociationMetadata = (
12481238
output: any,
12491239
context: __SerdeContext
12501240
): { [key: string]: string } => {
1251-
return Object.entries(output).reduce(
1252-
(acc: { [key: string]: string }, [key, value]: [string, any]) => ({
1241+
return Object.entries(output).reduce((acc: { [key: string]: string }, [key, value]: [string, any]) => {
1242+
if (value === null) {
1243+
return acc;
1244+
}
1245+
return {
12531246
...acc,
12541247
[key]: value,
1255-
}),
1256-
{}
1257-
);
1248+
};
1249+
}, {});
12581250
};
12591251

12601252
const deserializeAws_restJson1EventFilter = (output: any, context: __SerdeContext): EventFilter => {
@@ -1317,21 +1309,37 @@ const deserializeAws_restJson1EventIntegrationAssociationsList = (
13171309
output: any,
13181310
context: __SerdeContext
13191311
): EventIntegrationAssociation[] => {
1320-
return (output || []).map((entry: any) => deserializeAws_restJson1EventIntegrationAssociation(entry, context));
1312+
return (output || [])
1313+
.filter((e: any) => e != null)
1314+
.map((entry: any) => {
1315+
if (entry === null) {
1316+
return null as any;
1317+
}
1318+
return deserializeAws_restJson1EventIntegrationAssociation(entry, context);
1319+
});
13211320
};
13221321

13231322
const deserializeAws_restJson1EventIntegrationsList = (output: any, context: __SerdeContext): EventIntegration[] => {
1324-
return (output || []).map((entry: any) => deserializeAws_restJson1EventIntegration(entry, context));
1323+
return (output || [])
1324+
.filter((e: any) => e != null)
1325+
.map((entry: any) => {
1326+
if (entry === null) {
1327+
return null as any;
1328+
}
1329+
return deserializeAws_restJson1EventIntegration(entry, context);
1330+
});
13251331
};
13261332

13271333
const deserializeAws_restJson1TagMap = (output: any, context: __SerdeContext): { [key: string]: string } => {
1328-
return Object.entries(output).reduce(
1329-
(acc: { [key: string]: string }, [key, value]: [string, any]) => ({
1334+
return Object.entries(output).reduce((acc: { [key: string]: string }, [key, value]: [string, any]) => {
1335+
if (value === null) {
1336+
return acc;
1337+
}
1338+
return {
13301339
...acc,
13311340
[key]: value,
1332-
}),
1333-
{}
1334-
);
1341+
};
1342+
}, {});
13351343
};
13361344

13371345
const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
@@ -1354,6 +1362,7 @@ const collectBodyString = (streamBody: any, context: __SerdeContext): Promise<st
13541362

13551363
const isSerializableHeaderValue = (value: any): boolean =>
13561364
value !== undefined &&
1365+
value !== null &&
13571366
value !== "" &&
13581367
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
13591368
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);

0 commit comments

Comments
 (0)