@aws-sdk/client-lex-runtime-v2 3.140.0 → 3.145.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,10 @@
1
1
  import { __assign, __awaiter, __generator, __read } from "tslib";
2
2
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
3
- import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, } from "@aws-sdk/smithy-client";
3
+ import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map as __map, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
4
4
  import { LexRuntimeV2ServiceException as __BaseException } from "../models/LexRuntimeV2ServiceException";
5
5
  import { AccessDeniedException, BadGatewayException, ConflictException, DependencyFailedException, InternalServerException, ResourceNotFoundException, StartConversationRequestEventStream, ThrottlingException, ValidationException, } from "../models/models_0";
6
6
  export var serializeAws_restJson1DeleteSessionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
7
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, labelValue, labelValue, body;
7
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
8
8
  return __generator(this, function (_c) {
9
9
  switch (_c.label) {
10
10
  case 0: return [4, context.endpoint()];
@@ -13,46 +13,10 @@ export var serializeAws_restJson1DeleteSessionCommand = function (input, context
13
13
  headers = {};
14
14
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
15
15
  "/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}";
16
- if (input.botId !== undefined) {
17
- labelValue = input.botId;
18
- if (labelValue.length <= 0) {
19
- throw new Error("Empty value provided for input HTTP label: botId.");
20
- }
21
- resolvedPath = resolvedPath.replace("{botId}", __extendedEncodeURIComponent(labelValue));
22
- }
23
- else {
24
- throw new Error("No value provided for input HTTP label: botId.");
25
- }
26
- if (input.botAliasId !== undefined) {
27
- labelValue = input.botAliasId;
28
- if (labelValue.length <= 0) {
29
- throw new Error("Empty value provided for input HTTP label: botAliasId.");
30
- }
31
- resolvedPath = resolvedPath.replace("{botAliasId}", __extendedEncodeURIComponent(labelValue));
32
- }
33
- else {
34
- throw new Error("No value provided for input HTTP label: botAliasId.");
35
- }
36
- if (input.localeId !== undefined) {
37
- labelValue = input.localeId;
38
- if (labelValue.length <= 0) {
39
- throw new Error("Empty value provided for input HTTP label: localeId.");
40
- }
41
- resolvedPath = resolvedPath.replace("{localeId}", __extendedEncodeURIComponent(labelValue));
42
- }
43
- else {
44
- throw new Error("No value provided for input HTTP label: localeId.");
45
- }
46
- if (input.sessionId !== undefined) {
47
- labelValue = input.sessionId;
48
- if (labelValue.length <= 0) {
49
- throw new Error("Empty value provided for input HTTP label: sessionId.");
50
- }
51
- resolvedPath = resolvedPath.replace("{sessionId}", __extendedEncodeURIComponent(labelValue));
52
- }
53
- else {
54
- throw new Error("No value provided for input HTTP label: sessionId.");
55
- }
16
+ resolvedPath = __resolvedPath(resolvedPath, input, "botId", function () { return input.botId; }, "{botId}", false);
17
+ resolvedPath = __resolvedPath(resolvedPath, input, "botAliasId", function () { return input.botAliasId; }, "{botAliasId}", false);
18
+ resolvedPath = __resolvedPath(resolvedPath, input, "localeId", function () { return input.localeId; }, "{localeId}", false);
19
+ resolvedPath = __resolvedPath(resolvedPath, input, "sessionId", function () { return input.sessionId; }, "{sessionId}", false);
56
20
  return [2, new __HttpRequest({
57
21
  protocol: protocol,
58
22
  hostname: hostname,
@@ -66,7 +30,7 @@ export var serializeAws_restJson1DeleteSessionCommand = function (input, context
66
30
  });
67
31
  }); };
68
32
  export var serializeAws_restJson1GetSessionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
69
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, labelValue, labelValue, body;
33
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
70
34
  return __generator(this, function (_c) {
71
35
  switch (_c.label) {
72
36
  case 0: return [4, context.endpoint()];
@@ -75,46 +39,10 @@ export var serializeAws_restJson1GetSessionCommand = function (input, context) {
75
39
  headers = {};
76
40
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
77
41
  "/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}";
78
- if (input.botId !== undefined) {
79
- labelValue = input.botId;
80
- if (labelValue.length <= 0) {
81
- throw new Error("Empty value provided for input HTTP label: botId.");
82
- }
83
- resolvedPath = resolvedPath.replace("{botId}", __extendedEncodeURIComponent(labelValue));
84
- }
85
- else {
86
- throw new Error("No value provided for input HTTP label: botId.");
87
- }
88
- if (input.botAliasId !== undefined) {
89
- labelValue = input.botAliasId;
90
- if (labelValue.length <= 0) {
91
- throw new Error("Empty value provided for input HTTP label: botAliasId.");
92
- }
93
- resolvedPath = resolvedPath.replace("{botAliasId}", __extendedEncodeURIComponent(labelValue));
94
- }
95
- else {
96
- throw new Error("No value provided for input HTTP label: botAliasId.");
97
- }
98
- if (input.localeId !== undefined) {
99
- labelValue = input.localeId;
100
- if (labelValue.length <= 0) {
101
- throw new Error("Empty value provided for input HTTP label: localeId.");
102
- }
103
- resolvedPath = resolvedPath.replace("{localeId}", __extendedEncodeURIComponent(labelValue));
104
- }
105
- else {
106
- throw new Error("No value provided for input HTTP label: localeId.");
107
- }
108
- if (input.sessionId !== undefined) {
109
- labelValue = input.sessionId;
110
- if (labelValue.length <= 0) {
111
- throw new Error("Empty value provided for input HTTP label: sessionId.");
112
- }
113
- resolvedPath = resolvedPath.replace("{sessionId}", __extendedEncodeURIComponent(labelValue));
114
- }
115
- else {
116
- throw new Error("No value provided for input HTTP label: sessionId.");
117
- }
42
+ resolvedPath = __resolvedPath(resolvedPath, input, "botId", function () { return input.botId; }, "{botId}", false);
43
+ resolvedPath = __resolvedPath(resolvedPath, input, "botAliasId", function () { return input.botAliasId; }, "{botAliasId}", false);
44
+ resolvedPath = __resolvedPath(resolvedPath, input, "localeId", function () { return input.localeId; }, "{localeId}", false);
45
+ resolvedPath = __resolvedPath(resolvedPath, input, "sessionId", function () { return input.sessionId; }, "{sessionId}", false);
118
46
  return [2, new __HttpRequest({
119
47
  protocol: protocol,
120
48
  hostname: hostname,
@@ -128,55 +56,22 @@ export var serializeAws_restJson1GetSessionCommand = function (input, context) {
128
56
  });
129
57
  }); };
130
58
  export var serializeAws_restJson1PutSessionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
131
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, labelValue, labelValue, body;
59
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
132
60
  return __generator(this, function (_c) {
133
61
  switch (_c.label) {
134
62
  case 0: return [4, context.endpoint()];
135
63
  case 1:
136
64
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
137
- headers = __assign({ "content-type": "application/json" }, (isSerializableHeaderValue(input.responseContentType) && { responsecontenttype: input.responseContentType }));
65
+ headers = map({}, isSerializableHeaderValue, {
66
+ "content-type": "application/json",
67
+ responsecontenttype: input.responseContentType,
68
+ });
138
69
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
139
70
  "/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}";
140
- if (input.botId !== undefined) {
141
- labelValue = input.botId;
142
- if (labelValue.length <= 0) {
143
- throw new Error("Empty value provided for input HTTP label: botId.");
144
- }
145
- resolvedPath = resolvedPath.replace("{botId}", __extendedEncodeURIComponent(labelValue));
146
- }
147
- else {
148
- throw new Error("No value provided for input HTTP label: botId.");
149
- }
150
- if (input.botAliasId !== undefined) {
151
- labelValue = input.botAliasId;
152
- if (labelValue.length <= 0) {
153
- throw new Error("Empty value provided for input HTTP label: botAliasId.");
154
- }
155
- resolvedPath = resolvedPath.replace("{botAliasId}", __extendedEncodeURIComponent(labelValue));
156
- }
157
- else {
158
- throw new Error("No value provided for input HTTP label: botAliasId.");
159
- }
160
- if (input.localeId !== undefined) {
161
- labelValue = input.localeId;
162
- if (labelValue.length <= 0) {
163
- throw new Error("Empty value provided for input HTTP label: localeId.");
164
- }
165
- resolvedPath = resolvedPath.replace("{localeId}", __extendedEncodeURIComponent(labelValue));
166
- }
167
- else {
168
- throw new Error("No value provided for input HTTP label: localeId.");
169
- }
170
- if (input.sessionId !== undefined) {
171
- labelValue = input.sessionId;
172
- if (labelValue.length <= 0) {
173
- throw new Error("Empty value provided for input HTTP label: sessionId.");
174
- }
175
- resolvedPath = resolvedPath.replace("{sessionId}", __extendedEncodeURIComponent(labelValue));
176
- }
177
- else {
178
- throw new Error("No value provided for input HTTP label: sessionId.");
179
- }
71
+ resolvedPath = __resolvedPath(resolvedPath, input, "botId", function () { return input.botId; }, "{botId}", false);
72
+ resolvedPath = __resolvedPath(resolvedPath, input, "botAliasId", function () { return input.botAliasId; }, "{botAliasId}", false);
73
+ resolvedPath = __resolvedPath(resolvedPath, input, "localeId", function () { return input.localeId; }, "{localeId}", false);
74
+ resolvedPath = __resolvedPath(resolvedPath, input, "sessionId", function () { return input.sessionId; }, "{sessionId}", false);
180
75
  body = JSON.stringify(__assign(__assign(__assign({}, (input.messages != null && { messages: serializeAws_restJson1Messages(input.messages, context) })), (input.requestAttributes != null && {
181
76
  requestAttributes: serializeAws_restJson1StringMap(input.requestAttributes, context),
182
77
  })), (input.sessionState != null && {
@@ -195,7 +90,7 @@ export var serializeAws_restJson1PutSessionCommand = function (input, context) {
195
90
  });
196
91
  }); };
197
92
  export var serializeAws_restJson1RecognizeTextCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
198
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, labelValue, labelValue, body;
93
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
199
94
  return __generator(this, function (_c) {
200
95
  switch (_c.label) {
201
96
  case 0: return [4, context.endpoint()];
@@ -206,46 +101,10 @@ export var serializeAws_restJson1RecognizeTextCommand = function (input, context
206
101
  };
207
102
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
208
103
  "/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}/text";
209
- if (input.botId !== undefined) {
210
- labelValue = input.botId;
211
- if (labelValue.length <= 0) {
212
- throw new Error("Empty value provided for input HTTP label: botId.");
213
- }
214
- resolvedPath = resolvedPath.replace("{botId}", __extendedEncodeURIComponent(labelValue));
215
- }
216
- else {
217
- throw new Error("No value provided for input HTTP label: botId.");
218
- }
219
- if (input.botAliasId !== undefined) {
220
- labelValue = input.botAliasId;
221
- if (labelValue.length <= 0) {
222
- throw new Error("Empty value provided for input HTTP label: botAliasId.");
223
- }
224
- resolvedPath = resolvedPath.replace("{botAliasId}", __extendedEncodeURIComponent(labelValue));
225
- }
226
- else {
227
- throw new Error("No value provided for input HTTP label: botAliasId.");
228
- }
229
- if (input.localeId !== undefined) {
230
- labelValue = input.localeId;
231
- if (labelValue.length <= 0) {
232
- throw new Error("Empty value provided for input HTTP label: localeId.");
233
- }
234
- resolvedPath = resolvedPath.replace("{localeId}", __extendedEncodeURIComponent(labelValue));
235
- }
236
- else {
237
- throw new Error("No value provided for input HTTP label: localeId.");
238
- }
239
- if (input.sessionId !== undefined) {
240
- labelValue = input.sessionId;
241
- if (labelValue.length <= 0) {
242
- throw new Error("Empty value provided for input HTTP label: sessionId.");
243
- }
244
- resolvedPath = resolvedPath.replace("{sessionId}", __extendedEncodeURIComponent(labelValue));
245
- }
246
- else {
247
- throw new Error("No value provided for input HTTP label: sessionId.");
248
- }
104
+ resolvedPath = __resolvedPath(resolvedPath, input, "botId", function () { return input.botId; }, "{botId}", false);
105
+ resolvedPath = __resolvedPath(resolvedPath, input, "botAliasId", function () { return input.botAliasId; }, "{botAliasId}", false);
106
+ resolvedPath = __resolvedPath(resolvedPath, input, "localeId", function () { return input.localeId; }, "{localeId}", false);
107
+ resolvedPath = __resolvedPath(resolvedPath, input, "sessionId", function () { return input.sessionId; }, "{sessionId}", false);
249
108
  body = JSON.stringify(__assign(__assign(__assign({}, (input.requestAttributes != null && {
250
109
  requestAttributes: serializeAws_restJson1StringMap(input.requestAttributes, context),
251
110
  })), (input.sessionState != null && {
@@ -264,59 +123,25 @@ export var serializeAws_restJson1RecognizeTextCommand = function (input, context
264
123
  });
265
124
  }); };
266
125
  export var serializeAws_restJson1RecognizeUtteranceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
267
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, labelValue, labelValue, body;
126
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
268
127
  return __generator(this, function (_c) {
269
128
  switch (_c.label) {
270
129
  case 0: return [4, context.endpoint()];
271
130
  case 1:
272
131
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
273
- headers = __assign(__assign(__assign(__assign({ "content-type": "application/octet-stream", "x-amz-content-sha256": "UNSIGNED-PAYLOAD" }, (isSerializableHeaderValue(input.sessionState) && { "x-amz-lex-session-state": input.sessionState })), (isSerializableHeaderValue(input.requestAttributes) && {
132
+ headers = map({}, isSerializableHeaderValue, {
133
+ "x-amz-content-sha256": "UNSIGNED-PAYLOAD",
134
+ "content-type": input.requestContentType || "application/octet-stream",
135
+ "x-amz-lex-session-state": input.sessionState,
274
136
  "x-amz-lex-request-attributes": input.requestAttributes,
275
- })), (isSerializableHeaderValue(input.requestContentType) && { "content-type": input.requestContentType })), (isSerializableHeaderValue(input.responseContentType) && {
276
137
  "response-content-type": input.responseContentType,
277
- }));
138
+ });
278
139
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
279
140
  "/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}/utterance";
280
- if (input.botId !== undefined) {
281
- labelValue = input.botId;
282
- if (labelValue.length <= 0) {
283
- throw new Error("Empty value provided for input HTTP label: botId.");
284
- }
285
- resolvedPath = resolvedPath.replace("{botId}", __extendedEncodeURIComponent(labelValue));
286
- }
287
- else {
288
- throw new Error("No value provided for input HTTP label: botId.");
289
- }
290
- if (input.botAliasId !== undefined) {
291
- labelValue = input.botAliasId;
292
- if (labelValue.length <= 0) {
293
- throw new Error("Empty value provided for input HTTP label: botAliasId.");
294
- }
295
- resolvedPath = resolvedPath.replace("{botAliasId}", __extendedEncodeURIComponent(labelValue));
296
- }
297
- else {
298
- throw new Error("No value provided for input HTTP label: botAliasId.");
299
- }
300
- if (input.localeId !== undefined) {
301
- labelValue = input.localeId;
302
- if (labelValue.length <= 0) {
303
- throw new Error("Empty value provided for input HTTP label: localeId.");
304
- }
305
- resolvedPath = resolvedPath.replace("{localeId}", __extendedEncodeURIComponent(labelValue));
306
- }
307
- else {
308
- throw new Error("No value provided for input HTTP label: localeId.");
309
- }
310
- if (input.sessionId !== undefined) {
311
- labelValue = input.sessionId;
312
- if (labelValue.length <= 0) {
313
- throw new Error("Empty value provided for input HTTP label: sessionId.");
314
- }
315
- resolvedPath = resolvedPath.replace("{sessionId}", __extendedEncodeURIComponent(labelValue));
316
- }
317
- else {
318
- throw new Error("No value provided for input HTTP label: sessionId.");
319
- }
141
+ resolvedPath = __resolvedPath(resolvedPath, input, "botId", function () { return input.botId; }, "{botId}", false);
142
+ resolvedPath = __resolvedPath(resolvedPath, input, "botAliasId", function () { return input.botAliasId; }, "{botAliasId}", false);
143
+ resolvedPath = __resolvedPath(resolvedPath, input, "localeId", function () { return input.localeId; }, "{localeId}", false);
144
+ resolvedPath = __resolvedPath(resolvedPath, input, "sessionId", function () { return input.sessionId; }, "{sessionId}", false);
320
145
  if (input.inputStream !== undefined) {
321
146
  body = input.inputStream;
322
147
  }
@@ -333,57 +158,21 @@ export var serializeAws_restJson1RecognizeUtteranceCommand = function (input, co
333
158
  });
334
159
  }); };
335
160
  export var serializeAws_restJson1StartConversationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
336
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, labelValue, labelValue, body;
161
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
337
162
  return __generator(this, function (_c) {
338
163
  switch (_c.label) {
339
164
  case 0: return [4, context.endpoint()];
340
165
  case 1:
341
166
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
342
- headers = __assign({}, (isSerializableHeaderValue(input.conversationMode) && {
167
+ headers = map({}, isSerializableHeaderValue, {
343
168
  "x-amz-lex-conversation-mode": input.conversationMode,
344
- }));
169
+ });
345
170
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
346
171
  "/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}/conversation";
347
- if (input.botId !== undefined) {
348
- labelValue = input.botId;
349
- if (labelValue.length <= 0) {
350
- throw new Error("Empty value provided for input HTTP label: botId.");
351
- }
352
- resolvedPath = resolvedPath.replace("{botId}", __extendedEncodeURIComponent(labelValue));
353
- }
354
- else {
355
- throw new Error("No value provided for input HTTP label: botId.");
356
- }
357
- if (input.botAliasId !== undefined) {
358
- labelValue = input.botAliasId;
359
- if (labelValue.length <= 0) {
360
- throw new Error("Empty value provided for input HTTP label: botAliasId.");
361
- }
362
- resolvedPath = resolvedPath.replace("{botAliasId}", __extendedEncodeURIComponent(labelValue));
363
- }
364
- else {
365
- throw new Error("No value provided for input HTTP label: botAliasId.");
366
- }
367
- if (input.localeId !== undefined) {
368
- labelValue = input.localeId;
369
- if (labelValue.length <= 0) {
370
- throw new Error("Empty value provided for input HTTP label: localeId.");
371
- }
372
- resolvedPath = resolvedPath.replace("{localeId}", __extendedEncodeURIComponent(labelValue));
373
- }
374
- else {
375
- throw new Error("No value provided for input HTTP label: localeId.");
376
- }
377
- if (input.sessionId !== undefined) {
378
- labelValue = input.sessionId;
379
- if (labelValue.length <= 0) {
380
- throw new Error("Empty value provided for input HTTP label: sessionId.");
381
- }
382
- resolvedPath = resolvedPath.replace("{sessionId}", __extendedEncodeURIComponent(labelValue));
383
- }
384
- else {
385
- throw new Error("No value provided for input HTTP label: sessionId.");
386
- }
172
+ resolvedPath = __resolvedPath(resolvedPath, input, "botId", function () { return input.botId; }, "{botId}", false);
173
+ resolvedPath = __resolvedPath(resolvedPath, input, "botAliasId", function () { return input.botAliasId; }, "{botAliasId}", false);
174
+ resolvedPath = __resolvedPath(resolvedPath, input, "localeId", function () { return input.localeId; }, "{localeId}", false);
175
+ resolvedPath = __resolvedPath(resolvedPath, input, "sessionId", function () { return input.sessionId; }, "{sessionId}", false);
387
176
  if (input.requestEventStream !== undefined) {
388
177
  body = serializeAws_restJson1StartConversationRequestEventStream(input.requestEventStream, context);
389
178
  }
@@ -407,36 +196,32 @@ export var deserializeAws_restJson1DeleteSessionCommand = function (output, cont
407
196
  if (output.statusCode !== 200 && output.statusCode >= 300) {
408
197
  return [2, deserializeAws_restJson1DeleteSessionCommandError(output, context)];
409
198
  }
410
- contents = {
199
+ contents = map({
411
200
  $metadata: deserializeMetadata(output),
412
- botAliasId: undefined,
413
- botId: undefined,
414
- localeId: undefined,
415
- sessionId: undefined,
416
- };
201
+ });
417
202
  _a = __expectNonNull;
418
203
  _b = __expectObject;
419
204
  return [4, parseBody(output.body, context)];
420
205
  case 1:
421
206
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
422
- if (data.botAliasId !== undefined && data.botAliasId !== null) {
207
+ if (data.botAliasId != null) {
423
208
  contents.botAliasId = __expectString(data.botAliasId);
424
209
  }
425
- if (data.botId !== undefined && data.botId !== null) {
210
+ if (data.botId != null) {
426
211
  contents.botId = __expectString(data.botId);
427
212
  }
428
- if (data.localeId !== undefined && data.localeId !== null) {
213
+ if (data.localeId != null) {
429
214
  contents.localeId = __expectString(data.localeId);
430
215
  }
431
- if (data.sessionId !== undefined && data.sessionId !== null) {
216
+ if (data.sessionId != null) {
432
217
  contents.sessionId = __expectString(data.sessionId);
433
218
  }
434
- return [2, Promise.resolve(contents)];
219
+ return [2, contents];
435
220
  }
436
221
  });
437
222
  }); };
438
223
  var deserializeAws_restJson1DeleteSessionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
439
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
224
+ var parsedOutput, _a, errorCode, _b, parsedBody;
440
225
  var _c;
441
226
  return __generator(this, function (_d) {
442
227
  switch (_d.label) {
@@ -477,14 +262,14 @@ var deserializeAws_restJson1DeleteSessionCommandError = function (output, contex
477
262
  case 13: throw _d.sent();
478
263
  case 14:
479
264
  parsedBody = parsedOutput.body;
480
- $metadata = deserializeMetadata(output);
481
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
482
- response = new __BaseException({
483
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
484
- $fault: "client",
485
- $metadata: $metadata,
265
+ throwDefaultError({
266
+ output: output,
267
+ parsedBody: parsedBody,
268
+ exceptionCtor: __BaseException,
269
+ errorCode: errorCode,
486
270
  });
487
- throw __decorateServiceException(response, parsedBody);
271
+ _d.label = 15;
272
+ case 15: return [2];
488
273
  }
489
274
  });
490
275
  }); };
@@ -496,36 +281,32 @@ export var deserializeAws_restJson1GetSessionCommand = function (output, context
496
281
  if (output.statusCode !== 200 && output.statusCode >= 300) {
497
282
  return [2, deserializeAws_restJson1GetSessionCommandError(output, context)];
498
283
  }
499
- contents = {
284
+ contents = map({
500
285
  $metadata: deserializeMetadata(output),
501
- interpretations: undefined,
502
- messages: undefined,
503
- sessionId: undefined,
504
- sessionState: undefined,
505
- };
286
+ });
506
287
  _a = __expectNonNull;
507
288
  _b = __expectObject;
508
289
  return [4, parseBody(output.body, context)];
509
290
  case 1:
510
291
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
511
- if (data.interpretations !== undefined && data.interpretations !== null) {
292
+ if (data.interpretations != null) {
512
293
  contents.interpretations = deserializeAws_restJson1Interpretations(data.interpretations, context);
513
294
  }
514
- if (data.messages !== undefined && data.messages !== null) {
295
+ if (data.messages != null) {
515
296
  contents.messages = deserializeAws_restJson1Messages(data.messages, context);
516
297
  }
517
- if (data.sessionId !== undefined && data.sessionId !== null) {
298
+ if (data.sessionId != null) {
518
299
  contents.sessionId = __expectString(data.sessionId);
519
300
  }
520
- if (data.sessionState !== undefined && data.sessionState !== null) {
301
+ if (data.sessionState != null) {
521
302
  contents.sessionState = deserializeAws_restJson1SessionState(data.sessionState, context);
522
303
  }
523
- return [2, Promise.resolve(contents)];
304
+ return [2, contents];
524
305
  }
525
306
  });
526
307
  }); };
527
308
  var deserializeAws_restJson1GetSessionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
528
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
309
+ var parsedOutput, _a, errorCode, _b, parsedBody;
529
310
  var _c;
530
311
  return __generator(this, function (_d) {
531
312
  switch (_d.label) {
@@ -562,14 +343,14 @@ var deserializeAws_restJson1GetSessionCommandError = function (output, context)
562
343
  case 11: throw _d.sent();
563
344
  case 12:
564
345
  parsedBody = parsedOutput.body;
565
- $metadata = deserializeMetadata(output);
566
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
567
- response = new __BaseException({
568
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
569
- $fault: "client",
570
- $metadata: $metadata,
346
+ throwDefaultError({
347
+ output: output,
348
+ parsedBody: parsedBody,
349
+ exceptionCtor: __BaseException,
350
+ errorCode: errorCode,
571
351
  });
572
- throw __decorateServiceException(response, parsedBody);
352
+ _d.label = 13;
353
+ case 13: return [2];
573
354
  }
574
355
  });
575
356
  }); };
@@ -579,37 +360,21 @@ export var deserializeAws_restJson1PutSessionCommand = function (output, context
579
360
  if (output.statusCode !== 200 && output.statusCode >= 300) {
580
361
  return [2, deserializeAws_restJson1PutSessionCommandError(output, context)];
581
362
  }
582
- contents = {
363
+ contents = map({
583
364
  $metadata: deserializeMetadata(output),
584
- audioStream: undefined,
585
- contentType: undefined,
586
- messages: undefined,
587
- requestAttributes: undefined,
588
- sessionId: undefined,
589
- sessionState: undefined,
590
- };
591
- if (output.headers["content-type"] !== undefined) {
592
- contents.contentType = output.headers["content-type"];
593
- }
594
- if (output.headers["x-amz-lex-messages"] !== undefined) {
595
- contents.messages = output.headers["x-amz-lex-messages"];
596
- }
597
- if (output.headers["x-amz-lex-session-state"] !== undefined) {
598
- contents.sessionState = output.headers["x-amz-lex-session-state"];
599
- }
600
- if (output.headers["x-amz-lex-request-attributes"] !== undefined) {
601
- contents.requestAttributes = output.headers["x-amz-lex-request-attributes"];
602
- }
603
- if (output.headers["x-amz-lex-session-id"] !== undefined) {
604
- contents.sessionId = output.headers["x-amz-lex-session-id"];
605
- }
365
+ contentType: [, output.headers["content-type"]],
366
+ messages: [, output.headers["x-amz-lex-messages"]],
367
+ sessionState: [, output.headers["x-amz-lex-session-state"]],
368
+ requestAttributes: [, output.headers["x-amz-lex-request-attributes"]],
369
+ sessionId: [, output.headers["x-amz-lex-session-id"]],
370
+ });
606
371
  data = output.body;
607
372
  contents.audioStream = data;
608
- return [2, Promise.resolve(contents)];
373
+ return [2, contents];
609
374
  });
610
375
  }); };
611
376
  var deserializeAws_restJson1PutSessionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
612
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
377
+ var parsedOutput, _a, errorCode, _b, parsedBody;
613
378
  var _c;
614
379
  return __generator(this, function (_d) {
615
380
  switch (_d.label) {
@@ -658,14 +423,14 @@ var deserializeAws_restJson1PutSessionCommandError = function (output, context)
658
423
  case 17: throw _d.sent();
659
424
  case 18:
660
425
  parsedBody = parsedOutput.body;
661
- $metadata = deserializeMetadata(output);
662
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
663
- response = new __BaseException({
664
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
665
- $fault: "client",
666
- $metadata: $metadata,
426
+ throwDefaultError({
427
+ output: output,
428
+ parsedBody: parsedBody,
429
+ exceptionCtor: __BaseException,
430
+ errorCode: errorCode,
667
431
  });
668
- throw __decorateServiceException(response, parsedBody);
432
+ _d.label = 19;
433
+ case 19: return [2];
669
434
  }
670
435
  });
671
436
  }); };
@@ -677,40 +442,35 @@ export var deserializeAws_restJson1RecognizeTextCommand = function (output, cont
677
442
  if (output.statusCode !== 200 && output.statusCode >= 300) {
678
443
  return [2, deserializeAws_restJson1RecognizeTextCommandError(output, context)];
679
444
  }
680
- contents = {
445
+ contents = map({
681
446
  $metadata: deserializeMetadata(output),
682
- interpretations: undefined,
683
- messages: undefined,
684
- requestAttributes: undefined,
685
- sessionId: undefined,
686
- sessionState: undefined,
687
- };
447
+ });
688
448
  _a = __expectNonNull;
689
449
  _b = __expectObject;
690
450
  return [4, parseBody(output.body, context)];
691
451
  case 1:
692
452
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
693
- if (data.interpretations !== undefined && data.interpretations !== null) {
453
+ if (data.interpretations != null) {
694
454
  contents.interpretations = deserializeAws_restJson1Interpretations(data.interpretations, context);
695
455
  }
696
- if (data.messages !== undefined && data.messages !== null) {
456
+ if (data.messages != null) {
697
457
  contents.messages = deserializeAws_restJson1Messages(data.messages, context);
698
458
  }
699
- if (data.requestAttributes !== undefined && data.requestAttributes !== null) {
459
+ if (data.requestAttributes != null) {
700
460
  contents.requestAttributes = deserializeAws_restJson1StringMap(data.requestAttributes, context);
701
461
  }
702
- if (data.sessionId !== undefined && data.sessionId !== null) {
462
+ if (data.sessionId != null) {
703
463
  contents.sessionId = __expectString(data.sessionId);
704
464
  }
705
- if (data.sessionState !== undefined && data.sessionState !== null) {
465
+ if (data.sessionState != null) {
706
466
  contents.sessionState = deserializeAws_restJson1SessionState(data.sessionState, context);
707
467
  }
708
- return [2, Promise.resolve(contents)];
468
+ return [2, contents];
709
469
  }
710
470
  });
711
471
  }); };
712
472
  var deserializeAws_restJson1RecognizeTextCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
713
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
473
+ var parsedOutput, _a, errorCode, _b, parsedBody;
714
474
  var _c;
715
475
  return __generator(this, function (_d) {
716
476
  switch (_d.label) {
@@ -759,14 +519,14 @@ var deserializeAws_restJson1RecognizeTextCommandError = function (output, contex
759
519
  case 17: throw _d.sent();
760
520
  case 18:
761
521
  parsedBody = parsedOutput.body;
762
- $metadata = deserializeMetadata(output);
763
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
764
- response = new __BaseException({
765
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
766
- $fault: "client",
767
- $metadata: $metadata,
522
+ throwDefaultError({
523
+ output: output,
524
+ parsedBody: parsedBody,
525
+ exceptionCtor: __BaseException,
526
+ errorCode: errorCode,
768
527
  });
769
- throw __decorateServiceException(response, parsedBody);
528
+ _d.label = 19;
529
+ case 19: return [2];
770
530
  }
771
531
  });
772
532
  }); };
@@ -776,49 +536,24 @@ export var deserializeAws_restJson1RecognizeUtteranceCommand = function (output,
776
536
  if (output.statusCode !== 200 && output.statusCode >= 300) {
777
537
  return [2, deserializeAws_restJson1RecognizeUtteranceCommandError(output, context)];
778
538
  }
779
- contents = {
539
+ contents = map({
780
540
  $metadata: deserializeMetadata(output),
781
- audioStream: undefined,
782
- contentType: undefined,
783
- inputMode: undefined,
784
- inputTranscript: undefined,
785
- interpretations: undefined,
786
- messages: undefined,
787
- requestAttributes: undefined,
788
- sessionId: undefined,
789
- sessionState: undefined,
790
- };
791
- if (output.headers["x-amz-lex-input-mode"] !== undefined) {
792
- contents.inputMode = output.headers["x-amz-lex-input-mode"];
793
- }
794
- if (output.headers["content-type"] !== undefined) {
795
- contents.contentType = output.headers["content-type"];
796
- }
797
- if (output.headers["x-amz-lex-messages"] !== undefined) {
798
- contents.messages = output.headers["x-amz-lex-messages"];
799
- }
800
- if (output.headers["x-amz-lex-interpretations"] !== undefined) {
801
- contents.interpretations = output.headers["x-amz-lex-interpretations"];
802
- }
803
- if (output.headers["x-amz-lex-session-state"] !== undefined) {
804
- contents.sessionState = output.headers["x-amz-lex-session-state"];
805
- }
806
- if (output.headers["x-amz-lex-request-attributes"] !== undefined) {
807
- contents.requestAttributes = output.headers["x-amz-lex-request-attributes"];
808
- }
809
- if (output.headers["x-amz-lex-session-id"] !== undefined) {
810
- contents.sessionId = output.headers["x-amz-lex-session-id"];
811
- }
812
- if (output.headers["x-amz-lex-input-transcript"] !== undefined) {
813
- contents.inputTranscript = output.headers["x-amz-lex-input-transcript"];
814
- }
541
+ inputMode: [, output.headers["x-amz-lex-input-mode"]],
542
+ contentType: [, output.headers["content-type"]],
543
+ messages: [, output.headers["x-amz-lex-messages"]],
544
+ interpretations: [, output.headers["x-amz-lex-interpretations"]],
545
+ sessionState: [, output.headers["x-amz-lex-session-state"]],
546
+ requestAttributes: [, output.headers["x-amz-lex-request-attributes"]],
547
+ sessionId: [, output.headers["x-amz-lex-session-id"]],
548
+ inputTranscript: [, output.headers["x-amz-lex-input-transcript"]],
549
+ });
815
550
  data = output.body;
816
551
  contents.audioStream = data;
817
- return [2, Promise.resolve(contents)];
552
+ return [2, contents];
818
553
  });
819
554
  }); };
820
555
  var deserializeAws_restJson1RecognizeUtteranceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
821
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
556
+ var parsedOutput, _a, errorCode, _b, parsedBody;
822
557
  var _c;
823
558
  return __generator(this, function (_d) {
824
559
  switch (_d.label) {
@@ -867,14 +602,14 @@ var deserializeAws_restJson1RecognizeUtteranceCommandError = function (output, c
867
602
  case 17: throw _d.sent();
868
603
  case 18:
869
604
  parsedBody = parsedOutput.body;
870
- $metadata = deserializeMetadata(output);
871
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
872
- response = new __BaseException({
873
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
874
- $fault: "client",
875
- $metadata: $metadata,
605
+ throwDefaultError({
606
+ output: output,
607
+ parsedBody: parsedBody,
608
+ exceptionCtor: __BaseException,
609
+ errorCode: errorCode,
876
610
  });
877
- throw __decorateServiceException(response, parsedBody);
611
+ _d.label = 19;
612
+ case 19: return [2];
878
613
  }
879
614
  });
880
615
  }); };
@@ -884,17 +619,16 @@ export var deserializeAws_restJson1StartConversationCommand = function (output,
884
619
  if (output.statusCode !== 200 && output.statusCode >= 300) {
885
620
  return [2, deserializeAws_restJson1StartConversationCommandError(output, context)];
886
621
  }
887
- contents = {
622
+ contents = map({
888
623
  $metadata: deserializeMetadata(output),
889
- responseEventStream: undefined,
890
- };
624
+ });
891
625
  data = output.body;
892
626
  contents.responseEventStream = deserializeAws_restJson1StartConversationResponseEventStream(data, context);
893
- return [2, Promise.resolve(contents)];
627
+ return [2, contents];
894
628
  });
895
629
  }); };
896
630
  var deserializeAws_restJson1StartConversationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
897
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
631
+ var parsedOutput, _a, errorCode, _b, parsedBody;
898
632
  var _c;
899
633
  return __generator(this, function (_d) {
900
634
  switch (_d.label) {
@@ -927,23 +661,24 @@ var deserializeAws_restJson1StartConversationCommandError = function (output, co
927
661
  case 9: throw _d.sent();
928
662
  case 10:
929
663
  parsedBody = parsedOutput.body;
930
- $metadata = deserializeMetadata(output);
931
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
932
- response = new __BaseException({
933
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
934
- $fault: "client",
935
- $metadata: $metadata,
664
+ throwDefaultError({
665
+ output: output,
666
+ parsedBody: parsedBody,
667
+ exceptionCtor: __BaseException,
668
+ errorCode: errorCode,
936
669
  });
937
- throw __decorateServiceException(response, parsedBody);
670
+ _d.label = 11;
671
+ case 11: return [2];
938
672
  }
939
673
  });
940
674
  }); };
675
+ var map = __map;
941
676
  var deserializeAws_restJson1AccessDeniedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
942
677
  var contents, data, exception;
943
678
  return __generator(this, function (_a) {
944
- contents = {};
679
+ contents = map({});
945
680
  data = parsedOutput.body;
946
- if (data.message !== undefined && data.message !== null) {
681
+ if (data.message != null) {
947
682
  contents.message = __expectString(data.message);
948
683
  }
949
684
  exception = new AccessDeniedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -953,9 +688,9 @@ var deserializeAws_restJson1AccessDeniedExceptionResponse = function (parsedOutp
953
688
  var deserializeAws_restJson1BadGatewayExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
954
689
  var contents, data, exception;
955
690
  return __generator(this, function (_a) {
956
- contents = {};
691
+ contents = map({});
957
692
  data = parsedOutput.body;
958
- if (data.message !== undefined && data.message !== null) {
693
+ if (data.message != null) {
959
694
  contents.message = __expectString(data.message);
960
695
  }
961
696
  exception = new BadGatewayException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -965,9 +700,9 @@ var deserializeAws_restJson1BadGatewayExceptionResponse = function (parsedOutput
965
700
  var deserializeAws_restJson1ConflictExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
966
701
  var contents, data, exception;
967
702
  return __generator(this, function (_a) {
968
- contents = {};
703
+ contents = map({});
969
704
  data = parsedOutput.body;
970
- if (data.message !== undefined && data.message !== null) {
705
+ if (data.message != null) {
971
706
  contents.message = __expectString(data.message);
972
707
  }
973
708
  exception = new ConflictException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -977,9 +712,9 @@ var deserializeAws_restJson1ConflictExceptionResponse = function (parsedOutput,
977
712
  var deserializeAws_restJson1DependencyFailedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
978
713
  var contents, data, exception;
979
714
  return __generator(this, function (_a) {
980
- contents = {};
715
+ contents = map({});
981
716
  data = parsedOutput.body;
982
- if (data.message !== undefined && data.message !== null) {
717
+ if (data.message != null) {
983
718
  contents.message = __expectString(data.message);
984
719
  }
985
720
  exception = new DependencyFailedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -989,9 +724,9 @@ var deserializeAws_restJson1DependencyFailedExceptionResponse = function (parsed
989
724
  var deserializeAws_restJson1InternalServerExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
990
725
  var contents, data, exception;
991
726
  return __generator(this, function (_a) {
992
- contents = {};
727
+ contents = map({});
993
728
  data = parsedOutput.body;
994
- if (data.message !== undefined && data.message !== null) {
729
+ if (data.message != null) {
995
730
  contents.message = __expectString(data.message);
996
731
  }
997
732
  exception = new InternalServerException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -1001,9 +736,9 @@ var deserializeAws_restJson1InternalServerExceptionResponse = function (parsedOu
1001
736
  var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1002
737
  var contents, data, exception;
1003
738
  return __generator(this, function (_a) {
1004
- contents = {};
739
+ contents = map({});
1005
740
  data = parsedOutput.body;
1006
- if (data.message !== undefined && data.message !== null) {
741
+ if (data.message != null) {
1007
742
  contents.message = __expectString(data.message);
1008
743
  }
1009
744
  exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -1013,9 +748,9 @@ var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsed
1013
748
  var deserializeAws_restJson1ThrottlingExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1014
749
  var contents, data, exception;
1015
750
  return __generator(this, function (_a) {
1016
- contents = {};
751
+ contents = map({});
1017
752
  data = parsedOutput.body;
1018
- if (data.message !== undefined && data.message !== null) {
753
+ if (data.message != null) {
1019
754
  contents.message = __expectString(data.message);
1020
755
  }
1021
756
  exception = new ThrottlingException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -1025,9 +760,9 @@ var deserializeAws_restJson1ThrottlingExceptionResponse = function (parsedOutput
1025
760
  var deserializeAws_restJson1ValidationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1026
761
  var contents, data, exception;
1027
762
  return __generator(this, function (_a) {
1028
- contents = {};
763
+ contents = map({});
1029
764
  data = parsedOutput.body;
1030
- if (data.message !== undefined && data.message !== null) {
765
+ if (data.message != null) {
1031
766
  contents.message = __expectString(data.message);
1032
767
  }
1033
768
  exception = new ValidationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -1433,9 +1168,6 @@ var serializeAws_restJson1ActiveContextsList = function (input, context) {
1433
1168
  return input
1434
1169
  .filter(function (e) { return e != null; })
1435
1170
  .map(function (entry) {
1436
- if (entry === null) {
1437
- return null;
1438
- }
1439
1171
  return serializeAws_restJson1ActiveContext(entry, context);
1440
1172
  });
1441
1173
  };
@@ -1452,9 +1184,6 @@ var serializeAws_restJson1ButtonsList = function (input, context) {
1452
1184
  return input
1453
1185
  .filter(function (e) { return e != null; })
1454
1186
  .map(function (entry) {
1455
- if (entry === null) {
1456
- return null;
1457
- }
1458
1187
  return serializeAws_restJson1Button(entry, context);
1459
1188
  });
1460
1189
  };
@@ -1491,9 +1220,6 @@ var serializeAws_restJson1Messages = function (input, context) {
1491
1220
  return input
1492
1221
  .filter(function (e) { return e != null; })
1493
1222
  .map(function (entry) {
1494
- if (entry === null) {
1495
- return null;
1496
- }
1497
1223
  return serializeAws_restJson1Message(entry, context);
1498
1224
  });
1499
1225
  };
@@ -1515,9 +1241,6 @@ var serializeAws_restJson1RuntimeHintValuesList = function (input, context) {
1515
1241
  return input
1516
1242
  .filter(function (e) { return e != null; })
1517
1243
  .map(function (entry) {
1518
- if (entry === null) {
1519
- return null;
1520
- }
1521
1244
  return serializeAws_restJson1RuntimeHintValue(entry, context);
1522
1245
  });
1523
1246
  };
@@ -1569,9 +1292,6 @@ var serializeAws_restJson1StringList = function (input, context) {
1569
1292
  return input
1570
1293
  .filter(function (e) { return e != null; })
1571
1294
  .map(function (entry) {
1572
- if (entry === null) {
1573
- return null;
1574
- }
1575
1295
  return entry;
1576
1296
  });
1577
1297
  };
@@ -1597,9 +1317,6 @@ var serializeAws_restJson1Values = function (input, context) {
1597
1317
  return input
1598
1318
  .filter(function (e) { return e != null; })
1599
1319
  .map(function (entry) {
1600
- if (entry === null) {
1601
- return null;
1602
- }
1603
1320
  return serializeAws_restJson1Slot(entry, context);
1604
1321
  });
1605
1322
  };