@aws-sdk/client-m2 3.141.0 → 3.150.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,11 +1,11 @@
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, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, expectUnion as __expectUnion, extendedEncodeURIComponent as __extendedEncodeURIComponent, parseEpochTimestamp as __parseEpochTimestamp, strictParseInt32 as __strictParseInt32, } from "@aws-sdk/smithy-client";
3
+ import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, expectUnion as __expectUnion, map as __map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, strictParseInt32 as __strictParseInt32, throwDefaultError, } from "@aws-sdk/smithy-client";
4
4
  import { v4 as generateIdempotencyToken } from "uuid";
5
5
  import { M2ServiceException as __BaseException } from "../models/M2ServiceException";
6
6
  import { AccessDeniedException, BatchJobIdentifier, ConflictException, DataSetImportConfig, DatasetOrgAttributes, Definition, ExternalLocation, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, StorageConfiguration, ThrottlingException, ValidationException, } from "../models/models_0";
7
7
  export var serializeAws_restJson1CancelBatchJobExecutionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
8
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
8
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
9
9
  return __generator(this, function (_c) {
10
10
  switch (_c.label) {
11
11
  case 0: return [4, context.endpoint()];
@@ -14,26 +14,8 @@ export var serializeAws_restJson1CancelBatchJobExecutionCommand = function (inpu
14
14
  headers = {};
15
15
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
16
16
  "/applications/{applicationId}/batch-job-executions/{executionId}/cancel";
17
- if (input.applicationId !== undefined) {
18
- labelValue = input.applicationId;
19
- if (labelValue.length <= 0) {
20
- throw new Error("Empty value provided for input HTTP label: applicationId.");
21
- }
22
- resolvedPath = resolvedPath.replace("{applicationId}", __extendedEncodeURIComponent(labelValue));
23
- }
24
- else {
25
- throw new Error("No value provided for input HTTP label: applicationId.");
26
- }
27
- if (input.executionId !== undefined) {
28
- labelValue = input.executionId;
29
- if (labelValue.length <= 0) {
30
- throw new Error("Empty value provided for input HTTP label: executionId.");
31
- }
32
- resolvedPath = resolvedPath.replace("{executionId}", __extendedEncodeURIComponent(labelValue));
33
- }
34
- else {
35
- throw new Error("No value provided for input HTTP label: executionId.");
36
- }
17
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", function () { return input.applicationId; }, "{applicationId}", false);
18
+ resolvedPath = __resolvedPath(resolvedPath, input, "executionId", function () { return input.executionId; }, "{executionId}", false);
37
19
  return [2, new __HttpRequest({
38
20
  protocol: protocol,
39
21
  hostname: hostname,
@@ -72,7 +54,7 @@ export var serializeAws_restJson1CreateApplicationCommand = function (input, con
72
54
  });
73
55
  }); };
74
56
  export var serializeAws_restJson1CreateDataSetImportTaskCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
75
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
57
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
76
58
  var _c;
77
59
  return __generator(this, function (_d) {
78
60
  switch (_d.label) {
@@ -84,16 +66,7 @@ export var serializeAws_restJson1CreateDataSetImportTaskCommand = function (inpu
84
66
  };
85
67
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
86
68
  "/applications/{applicationId}/dataset-import-task";
87
- if (input.applicationId !== undefined) {
88
- labelValue = input.applicationId;
89
- if (labelValue.length <= 0) {
90
- throw new Error("Empty value provided for input HTTP label: applicationId.");
91
- }
92
- resolvedPath = resolvedPath.replace("{applicationId}", __extendedEncodeURIComponent(labelValue));
93
- }
94
- else {
95
- throw new Error("No value provided for input HTTP label: applicationId.");
96
- }
69
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", function () { return input.applicationId; }, "{applicationId}", false);
97
70
  body = JSON.stringify(__assign({ clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.importConfig != null && {
98
71
  importConfig: serializeAws_restJson1DataSetImportConfig(input.importConfig, context),
99
72
  })));
@@ -110,7 +83,7 @@ export var serializeAws_restJson1CreateDataSetImportTaskCommand = function (inpu
110
83
  });
111
84
  }); };
112
85
  export var serializeAws_restJson1CreateDeploymentCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
113
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
86
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
114
87
  var _c;
115
88
  return __generator(this, function (_d) {
116
89
  switch (_d.label) {
@@ -121,16 +94,7 @@ export var serializeAws_restJson1CreateDeploymentCommand = function (input, cont
121
94
  "content-type": "application/json",
122
95
  };
123
96
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications/{applicationId}/deployments";
124
- if (input.applicationId !== undefined) {
125
- labelValue = input.applicationId;
126
- if (labelValue.length <= 0) {
127
- throw new Error("Empty value provided for input HTTP label: applicationId.");
128
- }
129
- resolvedPath = resolvedPath.replace("{applicationId}", __extendedEncodeURIComponent(labelValue));
130
- }
131
- else {
132
- throw new Error("No value provided for input HTTP label: applicationId.");
133
- }
97
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", function () { return input.applicationId; }, "{applicationId}", false);
134
98
  body = JSON.stringify(__assign(__assign(__assign({}, (input.applicationVersion != null && { applicationVersion: input.applicationVersion })), { clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }), (input.environmentId != null && { environmentId: input.environmentId })));
135
99
  return [2, new __HttpRequest({
136
100
  protocol: protocol,
@@ -176,7 +140,7 @@ export var serializeAws_restJson1CreateEnvironmentCommand = function (input, con
176
140
  });
177
141
  }); };
178
142
  export var serializeAws_restJson1DeleteApplicationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
179
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
143
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
180
144
  return __generator(this, function (_c) {
181
145
  switch (_c.label) {
182
146
  case 0: return [4, context.endpoint()];
@@ -184,16 +148,7 @@ export var serializeAws_restJson1DeleteApplicationCommand = function (input, con
184
148
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
185
149
  headers = {};
186
150
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications/{applicationId}";
187
- if (input.applicationId !== undefined) {
188
- labelValue = input.applicationId;
189
- if (labelValue.length <= 0) {
190
- throw new Error("Empty value provided for input HTTP label: applicationId.");
191
- }
192
- resolvedPath = resolvedPath.replace("{applicationId}", __extendedEncodeURIComponent(labelValue));
193
- }
194
- else {
195
- throw new Error("No value provided for input HTTP label: applicationId.");
196
- }
151
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", function () { return input.applicationId; }, "{applicationId}", false);
197
152
  return [2, new __HttpRequest({
198
153
  protocol: protocol,
199
154
  hostname: hostname,
@@ -207,7 +162,7 @@ export var serializeAws_restJson1DeleteApplicationCommand = function (input, con
207
162
  });
208
163
  }); };
209
164
  export var serializeAws_restJson1DeleteApplicationFromEnvironmentCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
210
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
165
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
211
166
  return __generator(this, function (_c) {
212
167
  switch (_c.label) {
213
168
  case 0: return [4, context.endpoint()];
@@ -216,26 +171,8 @@ export var serializeAws_restJson1DeleteApplicationFromEnvironmentCommand = funct
216
171
  headers = {};
217
172
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
218
173
  "/applications/{applicationId}/environment/{environmentId}";
219
- if (input.applicationId !== undefined) {
220
- labelValue = input.applicationId;
221
- if (labelValue.length <= 0) {
222
- throw new Error("Empty value provided for input HTTP label: applicationId.");
223
- }
224
- resolvedPath = resolvedPath.replace("{applicationId}", __extendedEncodeURIComponent(labelValue));
225
- }
226
- else {
227
- throw new Error("No value provided for input HTTP label: applicationId.");
228
- }
229
- if (input.environmentId !== undefined) {
230
- labelValue = input.environmentId;
231
- if (labelValue.length <= 0) {
232
- throw new Error("Empty value provided for input HTTP label: environmentId.");
233
- }
234
- resolvedPath = resolvedPath.replace("{environmentId}", __extendedEncodeURIComponent(labelValue));
235
- }
236
- else {
237
- throw new Error("No value provided for input HTTP label: environmentId.");
238
- }
174
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", function () { return input.applicationId; }, "{applicationId}", false);
175
+ resolvedPath = __resolvedPath(resolvedPath, input, "environmentId", function () { return input.environmentId; }, "{environmentId}", false);
239
176
  return [2, new __HttpRequest({
240
177
  protocol: protocol,
241
178
  hostname: hostname,
@@ -249,7 +186,7 @@ export var serializeAws_restJson1DeleteApplicationFromEnvironmentCommand = funct
249
186
  });
250
187
  }); };
251
188
  export var serializeAws_restJson1DeleteEnvironmentCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
252
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
189
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
253
190
  return __generator(this, function (_c) {
254
191
  switch (_c.label) {
255
192
  case 0: return [4, context.endpoint()];
@@ -257,16 +194,7 @@ export var serializeAws_restJson1DeleteEnvironmentCommand = function (input, con
257
194
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
258
195
  headers = {};
259
196
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/environments/{environmentId}";
260
- if (input.environmentId !== undefined) {
261
- labelValue = input.environmentId;
262
- if (labelValue.length <= 0) {
263
- throw new Error("Empty value provided for input HTTP label: environmentId.");
264
- }
265
- resolvedPath = resolvedPath.replace("{environmentId}", __extendedEncodeURIComponent(labelValue));
266
- }
267
- else {
268
- throw new Error("No value provided for input HTTP label: environmentId.");
269
- }
197
+ resolvedPath = __resolvedPath(resolvedPath, input, "environmentId", function () { return input.environmentId; }, "{environmentId}", false);
270
198
  return [2, new __HttpRequest({
271
199
  protocol: protocol,
272
200
  hostname: hostname,
@@ -280,7 +208,7 @@ export var serializeAws_restJson1DeleteEnvironmentCommand = function (input, con
280
208
  });
281
209
  }); };
282
210
  export var serializeAws_restJson1GetApplicationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
283
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
211
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
284
212
  return __generator(this, function (_c) {
285
213
  switch (_c.label) {
286
214
  case 0: return [4, context.endpoint()];
@@ -288,16 +216,7 @@ export var serializeAws_restJson1GetApplicationCommand = function (input, contex
288
216
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
289
217
  headers = {};
290
218
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications/{applicationId}";
291
- if (input.applicationId !== undefined) {
292
- labelValue = input.applicationId;
293
- if (labelValue.length <= 0) {
294
- throw new Error("Empty value provided for input HTTP label: applicationId.");
295
- }
296
- resolvedPath = resolvedPath.replace("{applicationId}", __extendedEncodeURIComponent(labelValue));
297
- }
298
- else {
299
- throw new Error("No value provided for input HTTP label: applicationId.");
300
- }
219
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", function () { return input.applicationId; }, "{applicationId}", false);
301
220
  return [2, new __HttpRequest({
302
221
  protocol: protocol,
303
222
  hostname: hostname,
@@ -311,7 +230,7 @@ export var serializeAws_restJson1GetApplicationCommand = function (input, contex
311
230
  });
312
231
  }); };
313
232
  export var serializeAws_restJson1GetApplicationVersionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
314
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
233
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
315
234
  return __generator(this, function (_c) {
316
235
  switch (_c.label) {
317
236
  case 0: return [4, context.endpoint()];
@@ -320,26 +239,8 @@ export var serializeAws_restJson1GetApplicationVersionCommand = function (input,
320
239
  headers = {};
321
240
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
322
241
  "/applications/{applicationId}/versions/{applicationVersion}";
323
- if (input.applicationId !== undefined) {
324
- labelValue = input.applicationId;
325
- if (labelValue.length <= 0) {
326
- throw new Error("Empty value provided for input HTTP label: applicationId.");
327
- }
328
- resolvedPath = resolvedPath.replace("{applicationId}", __extendedEncodeURIComponent(labelValue));
329
- }
330
- else {
331
- throw new Error("No value provided for input HTTP label: applicationId.");
332
- }
333
- if (input.applicationVersion !== undefined) {
334
- labelValue = input.applicationVersion.toString();
335
- if (labelValue.length <= 0) {
336
- throw new Error("Empty value provided for input HTTP label: applicationVersion.");
337
- }
338
- resolvedPath = resolvedPath.replace("{applicationVersion}", __extendedEncodeURIComponent(labelValue));
339
- }
340
- else {
341
- throw new Error("No value provided for input HTTP label: applicationVersion.");
342
- }
242
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", function () { return input.applicationId; }, "{applicationId}", false);
243
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationVersion", function () { return input.applicationVersion.toString(); }, "{applicationVersion}", false);
343
244
  return [2, new __HttpRequest({
344
245
  protocol: protocol,
345
246
  hostname: hostname,
@@ -353,7 +254,7 @@ export var serializeAws_restJson1GetApplicationVersionCommand = function (input,
353
254
  });
354
255
  }); };
355
256
  export var serializeAws_restJson1GetBatchJobExecutionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
356
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
257
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
357
258
  return __generator(this, function (_c) {
358
259
  switch (_c.label) {
359
260
  case 0: return [4, context.endpoint()];
@@ -362,26 +263,8 @@ export var serializeAws_restJson1GetBatchJobExecutionCommand = function (input,
362
263
  headers = {};
363
264
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
364
265
  "/applications/{applicationId}/batch-job-executions/{executionId}";
365
- if (input.applicationId !== undefined) {
366
- labelValue = input.applicationId;
367
- if (labelValue.length <= 0) {
368
- throw new Error("Empty value provided for input HTTP label: applicationId.");
369
- }
370
- resolvedPath = resolvedPath.replace("{applicationId}", __extendedEncodeURIComponent(labelValue));
371
- }
372
- else {
373
- throw new Error("No value provided for input HTTP label: applicationId.");
374
- }
375
- if (input.executionId !== undefined) {
376
- labelValue = input.executionId;
377
- if (labelValue.length <= 0) {
378
- throw new Error("Empty value provided for input HTTP label: executionId.");
379
- }
380
- resolvedPath = resolvedPath.replace("{executionId}", __extendedEncodeURIComponent(labelValue));
381
- }
382
- else {
383
- throw new Error("No value provided for input HTTP label: executionId.");
384
- }
266
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", function () { return input.applicationId; }, "{applicationId}", false);
267
+ resolvedPath = __resolvedPath(resolvedPath, input, "executionId", function () { return input.executionId; }, "{executionId}", false);
385
268
  return [2, new __HttpRequest({
386
269
  protocol: protocol,
387
270
  hostname: hostname,
@@ -395,7 +278,7 @@ export var serializeAws_restJson1GetBatchJobExecutionCommand = function (input,
395
278
  });
396
279
  }); };
397
280
  export var serializeAws_restJson1GetDataSetDetailsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
398
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
281
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
399
282
  return __generator(this, function (_c) {
400
283
  switch (_c.label) {
401
284
  case 0: return [4, context.endpoint()];
@@ -404,26 +287,8 @@ export var serializeAws_restJson1GetDataSetDetailsCommand = function (input, con
404
287
  headers = {};
405
288
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
406
289
  "/applications/{applicationId}/datasets/{dataSetName}";
407
- if (input.applicationId !== undefined) {
408
- labelValue = input.applicationId;
409
- if (labelValue.length <= 0) {
410
- throw new Error("Empty value provided for input HTTP label: applicationId.");
411
- }
412
- resolvedPath = resolvedPath.replace("{applicationId}", __extendedEncodeURIComponent(labelValue));
413
- }
414
- else {
415
- throw new Error("No value provided for input HTTP label: applicationId.");
416
- }
417
- if (input.dataSetName !== undefined) {
418
- labelValue = input.dataSetName;
419
- if (labelValue.length <= 0) {
420
- throw new Error("Empty value provided for input HTTP label: dataSetName.");
421
- }
422
- resolvedPath = resolvedPath.replace("{dataSetName}", __extendedEncodeURIComponent(labelValue));
423
- }
424
- else {
425
- throw new Error("No value provided for input HTTP label: dataSetName.");
426
- }
290
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", function () { return input.applicationId; }, "{applicationId}", false);
291
+ resolvedPath = __resolvedPath(resolvedPath, input, "dataSetName", function () { return input.dataSetName; }, "{dataSetName}", false);
427
292
  return [2, new __HttpRequest({
428
293
  protocol: protocol,
429
294
  hostname: hostname,
@@ -437,7 +302,7 @@ export var serializeAws_restJson1GetDataSetDetailsCommand = function (input, con
437
302
  });
438
303
  }); };
439
304
  export var serializeAws_restJson1GetDataSetImportTaskCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
440
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
305
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
441
306
  return __generator(this, function (_c) {
442
307
  switch (_c.label) {
443
308
  case 0: return [4, context.endpoint()];
@@ -446,26 +311,8 @@ export var serializeAws_restJson1GetDataSetImportTaskCommand = function (input,
446
311
  headers = {};
447
312
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
448
313
  "/applications/{applicationId}/dataset-import-tasks/{taskId}";
449
- if (input.applicationId !== undefined) {
450
- labelValue = input.applicationId;
451
- if (labelValue.length <= 0) {
452
- throw new Error("Empty value provided for input HTTP label: applicationId.");
453
- }
454
- resolvedPath = resolvedPath.replace("{applicationId}", __extendedEncodeURIComponent(labelValue));
455
- }
456
- else {
457
- throw new Error("No value provided for input HTTP label: applicationId.");
458
- }
459
- if (input.taskId !== undefined) {
460
- labelValue = input.taskId;
461
- if (labelValue.length <= 0) {
462
- throw new Error("Empty value provided for input HTTP label: taskId.");
463
- }
464
- resolvedPath = resolvedPath.replace("{taskId}", __extendedEncodeURIComponent(labelValue));
465
- }
466
- else {
467
- throw new Error("No value provided for input HTTP label: taskId.");
468
- }
314
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", function () { return input.applicationId; }, "{applicationId}", false);
315
+ resolvedPath = __resolvedPath(resolvedPath, input, "taskId", function () { return input.taskId; }, "{taskId}", false);
469
316
  return [2, new __HttpRequest({
470
317
  protocol: protocol,
471
318
  hostname: hostname,
@@ -479,7 +326,7 @@ export var serializeAws_restJson1GetDataSetImportTaskCommand = function (input,
479
326
  });
480
327
  }); };
481
328
  export var serializeAws_restJson1GetDeploymentCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
482
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
329
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
483
330
  return __generator(this, function (_c) {
484
331
  switch (_c.label) {
485
332
  case 0: return [4, context.endpoint()];
@@ -488,26 +335,8 @@ export var serializeAws_restJson1GetDeploymentCommand = function (input, context
488
335
  headers = {};
489
336
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
490
337
  "/applications/{applicationId}/deployments/{deploymentId}";
491
- if (input.deploymentId !== undefined) {
492
- labelValue = input.deploymentId;
493
- if (labelValue.length <= 0) {
494
- throw new Error("Empty value provided for input HTTP label: deploymentId.");
495
- }
496
- resolvedPath = resolvedPath.replace("{deploymentId}", __extendedEncodeURIComponent(labelValue));
497
- }
498
- else {
499
- throw new Error("No value provided for input HTTP label: deploymentId.");
500
- }
501
- if (input.applicationId !== undefined) {
502
- labelValue = input.applicationId;
503
- if (labelValue.length <= 0) {
504
- throw new Error("Empty value provided for input HTTP label: applicationId.");
505
- }
506
- resolvedPath = resolvedPath.replace("{applicationId}", __extendedEncodeURIComponent(labelValue));
507
- }
508
- else {
509
- throw new Error("No value provided for input HTTP label: applicationId.");
510
- }
338
+ resolvedPath = __resolvedPath(resolvedPath, input, "deploymentId", function () { return input.deploymentId; }, "{deploymentId}", false);
339
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", function () { return input.applicationId; }, "{applicationId}", false);
511
340
  return [2, new __HttpRequest({
512
341
  protocol: protocol,
513
342
  hostname: hostname,
@@ -521,7 +350,7 @@ export var serializeAws_restJson1GetDeploymentCommand = function (input, context
521
350
  });
522
351
  }); };
523
352
  export var serializeAws_restJson1GetEnvironmentCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
524
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
353
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
525
354
  return __generator(this, function (_c) {
526
355
  switch (_c.label) {
527
356
  case 0: return [4, context.endpoint()];
@@ -529,16 +358,7 @@ export var serializeAws_restJson1GetEnvironmentCommand = function (input, contex
529
358
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
530
359
  headers = {};
531
360
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/environments/{environmentId}";
532
- if (input.environmentId !== undefined) {
533
- labelValue = input.environmentId;
534
- if (labelValue.length <= 0) {
535
- throw new Error("Empty value provided for input HTTP label: environmentId.");
536
- }
537
- resolvedPath = resolvedPath.replace("{environmentId}", __extendedEncodeURIComponent(labelValue));
538
- }
539
- else {
540
- throw new Error("No value provided for input HTTP label: environmentId.");
541
- }
361
+ resolvedPath = __resolvedPath(resolvedPath, input, "environmentId", function () { return input.environmentId; }, "{environmentId}", false);
542
362
  return [2, new __HttpRequest({
543
363
  protocol: protocol,
544
364
  hostname: hostname,
@@ -560,7 +380,12 @@ export var serializeAws_restJson1ListApplicationsCommand = function (input, cont
560
380
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
561
381
  headers = {};
562
382
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications";
563
- query = __assign(__assign(__assign(__assign({}, (input.nextToken !== undefined && { nextToken: input.nextToken })), (input.maxResults !== undefined && { maxResults: input.maxResults.toString() })), (input.names !== undefined && { names: (input.names || []).map(function (_entry) { return _entry; }) })), (input.environmentId !== undefined && { environmentId: input.environmentId }));
383
+ query = map({
384
+ nextToken: [, input.nextToken],
385
+ maxResults: [function () { return input.maxResults !== void 0; }, function () { return input.maxResults.toString(); }],
386
+ names: [function () { return input.names !== void 0; }, function () { return (input.names || []).map(function (_entry) { return _entry; }); }],
387
+ environmentId: [, input.environmentId],
388
+ });
564
389
  return [2, new __HttpRequest({
565
390
  protocol: protocol,
566
391
  hostname: hostname,
@@ -575,7 +400,7 @@ export var serializeAws_restJson1ListApplicationsCommand = function (input, cont
575
400
  });
576
401
  }); };
577
402
  export var serializeAws_restJson1ListApplicationVersionsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
578
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
403
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
579
404
  return __generator(this, function (_c) {
580
405
  switch (_c.label) {
581
406
  case 0: return [4, context.endpoint()];
@@ -583,17 +408,11 @@ export var serializeAws_restJson1ListApplicationVersionsCommand = function (inpu
583
408
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
584
409
  headers = {};
585
410
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications/{applicationId}/versions";
586
- if (input.applicationId !== undefined) {
587
- labelValue = input.applicationId;
588
- if (labelValue.length <= 0) {
589
- throw new Error("Empty value provided for input HTTP label: applicationId.");
590
- }
591
- resolvedPath = resolvedPath.replace("{applicationId}", __extendedEncodeURIComponent(labelValue));
592
- }
593
- else {
594
- throw new Error("No value provided for input HTTP label: applicationId.");
595
- }
596
- query = __assign(__assign({}, (input.nextToken !== undefined && { nextToken: input.nextToken })), (input.maxResults !== undefined && { maxResults: input.maxResults.toString() }));
411
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", function () { return input.applicationId; }, "{applicationId}", false);
412
+ query = map({
413
+ nextToken: [, input.nextToken],
414
+ maxResults: [function () { return input.maxResults !== void 0; }, function () { return input.maxResults.toString(); }],
415
+ });
597
416
  return [2, new __HttpRequest({
598
417
  protocol: protocol,
599
418
  hostname: hostname,
@@ -608,7 +427,7 @@ export var serializeAws_restJson1ListApplicationVersionsCommand = function (inpu
608
427
  });
609
428
  }); };
610
429
  export var serializeAws_restJson1ListBatchJobDefinitionsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
611
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
430
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
612
431
  return __generator(this, function (_c) {
613
432
  switch (_c.label) {
614
433
  case 0: return [4, context.endpoint()];
@@ -617,17 +436,12 @@ export var serializeAws_restJson1ListBatchJobDefinitionsCommand = function (inpu
617
436
  headers = {};
618
437
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
619
438
  "/applications/{applicationId}/batch-job-definitions";
620
- if (input.applicationId !== undefined) {
621
- labelValue = input.applicationId;
622
- if (labelValue.length <= 0) {
623
- throw new Error("Empty value provided for input HTTP label: applicationId.");
624
- }
625
- resolvedPath = resolvedPath.replace("{applicationId}", __extendedEncodeURIComponent(labelValue));
626
- }
627
- else {
628
- throw new Error("No value provided for input HTTP label: applicationId.");
629
- }
630
- query = __assign(__assign(__assign({}, (input.nextToken !== undefined && { nextToken: input.nextToken })), (input.maxResults !== undefined && { maxResults: input.maxResults.toString() })), (input.prefix !== undefined && { prefix: input.prefix }));
439
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", function () { return input.applicationId; }, "{applicationId}", false);
440
+ query = map({
441
+ nextToken: [, input.nextToken],
442
+ maxResults: [function () { return input.maxResults !== void 0; }, function () { return input.maxResults.toString(); }],
443
+ prefix: [, input.prefix],
444
+ });
631
445
  return [2, new __HttpRequest({
632
446
  protocol: protocol,
633
447
  hostname: hostname,
@@ -642,7 +456,7 @@ export var serializeAws_restJson1ListBatchJobDefinitionsCommand = function (inpu
642
456
  });
643
457
  }); };
644
458
  export var serializeAws_restJson1ListBatchJobExecutionsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
645
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
459
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
646
460
  return __generator(this, function (_c) {
647
461
  switch (_c.label) {
648
462
  case 0: return [4, context.endpoint()];
@@ -651,23 +465,25 @@ export var serializeAws_restJson1ListBatchJobExecutionsCommand = function (input
651
465
  headers = {};
652
466
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
653
467
  "/applications/{applicationId}/batch-job-executions";
654
- if (input.applicationId !== undefined) {
655
- labelValue = input.applicationId;
656
- if (labelValue.length <= 0) {
657
- throw new Error("Empty value provided for input HTTP label: applicationId.");
658
- }
659
- resolvedPath = resolvedPath.replace("{applicationId}", __extendedEncodeURIComponent(labelValue));
660
- }
661
- else {
662
- throw new Error("No value provided for input HTTP label: applicationId.");
663
- }
664
- query = __assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.nextToken !== undefined && { nextToken: input.nextToken })), (input.maxResults !== undefined && { maxResults: input.maxResults.toString() })), (input.executionIds !== undefined && {
665
- executionIds: (input.executionIds || []).map(function (_entry) { return _entry; }),
666
- })), (input.jobName !== undefined && { jobName: input.jobName })), (input.status !== undefined && { status: input.status })), (input.startedAfter !== undefined && {
667
- startedAfter: (input.startedAfter.toISOString().split(".")[0] + "Z").toString(),
668
- })), (input.startedBefore !== undefined && {
669
- startedBefore: (input.startedBefore.toISOString().split(".")[0] + "Z").toString(),
670
- }));
468
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", function () { return input.applicationId; }, "{applicationId}", false);
469
+ query = map({
470
+ nextToken: [, input.nextToken],
471
+ maxResults: [function () { return input.maxResults !== void 0; }, function () { return input.maxResults.toString(); }],
472
+ executionIds: [
473
+ function () { return input.executionIds !== void 0; },
474
+ function () { return (input.executionIds || []).map(function (_entry) { return _entry; }); },
475
+ ],
476
+ jobName: [, input.jobName],
477
+ status: [, input.status],
478
+ startedAfter: [
479
+ function () { return input.startedAfter !== void 0; },
480
+ function () { return (input.startedAfter.toISOString().split(".")[0] + "Z").toString(); },
481
+ ],
482
+ startedBefore: [
483
+ function () { return input.startedBefore !== void 0; },
484
+ function () { return (input.startedBefore.toISOString().split(".")[0] + "Z").toString(); },
485
+ ],
486
+ });
671
487
  return [2, new __HttpRequest({
672
488
  protocol: protocol,
673
489
  hostname: hostname,
@@ -682,7 +498,7 @@ export var serializeAws_restJson1ListBatchJobExecutionsCommand = function (input
682
498
  });
683
499
  }); };
684
500
  export var serializeAws_restJson1ListDataSetImportHistoryCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
685
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
501
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
686
502
  return __generator(this, function (_c) {
687
503
  switch (_c.label) {
688
504
  case 0: return [4, context.endpoint()];
@@ -691,17 +507,11 @@ export var serializeAws_restJson1ListDataSetImportHistoryCommand = function (inp
691
507
  headers = {};
692
508
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
693
509
  "/applications/{applicationId}/dataset-import-tasks";
694
- if (input.applicationId !== undefined) {
695
- labelValue = input.applicationId;
696
- if (labelValue.length <= 0) {
697
- throw new Error("Empty value provided for input HTTP label: applicationId.");
698
- }
699
- resolvedPath = resolvedPath.replace("{applicationId}", __extendedEncodeURIComponent(labelValue));
700
- }
701
- else {
702
- throw new Error("No value provided for input HTTP label: applicationId.");
703
- }
704
- query = __assign(__assign({}, (input.nextToken !== undefined && { nextToken: input.nextToken })), (input.maxResults !== undefined && { maxResults: input.maxResults.toString() }));
510
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", function () { return input.applicationId; }, "{applicationId}", false);
511
+ query = map({
512
+ nextToken: [, input.nextToken],
513
+ maxResults: [function () { return input.maxResults !== void 0; }, function () { return input.maxResults.toString(); }],
514
+ });
705
515
  return [2, new __HttpRequest({
706
516
  protocol: protocol,
707
517
  hostname: hostname,
@@ -716,7 +526,7 @@ export var serializeAws_restJson1ListDataSetImportHistoryCommand = function (inp
716
526
  });
717
527
  }); };
718
528
  export var serializeAws_restJson1ListDataSetsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
719
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
529
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
720
530
  return __generator(this, function (_c) {
721
531
  switch (_c.label) {
722
532
  case 0: return [4, context.endpoint()];
@@ -724,17 +534,12 @@ export var serializeAws_restJson1ListDataSetsCommand = function (input, context)
724
534
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
725
535
  headers = {};
726
536
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications/{applicationId}/datasets";
727
- if (input.applicationId !== undefined) {
728
- labelValue = input.applicationId;
729
- if (labelValue.length <= 0) {
730
- throw new Error("Empty value provided for input HTTP label: applicationId.");
731
- }
732
- resolvedPath = resolvedPath.replace("{applicationId}", __extendedEncodeURIComponent(labelValue));
733
- }
734
- else {
735
- throw new Error("No value provided for input HTTP label: applicationId.");
736
- }
737
- query = __assign(__assign(__assign({}, (input.nextToken !== undefined && { nextToken: input.nextToken })), (input.maxResults !== undefined && { maxResults: input.maxResults.toString() })), (input.prefix !== undefined && { prefix: input.prefix }));
537
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", function () { return input.applicationId; }, "{applicationId}", false);
538
+ query = map({
539
+ nextToken: [, input.nextToken],
540
+ maxResults: [function () { return input.maxResults !== void 0; }, function () { return input.maxResults.toString(); }],
541
+ prefix: [, input.prefix],
542
+ });
738
543
  return [2, new __HttpRequest({
739
544
  protocol: protocol,
740
545
  hostname: hostname,
@@ -749,7 +554,7 @@ export var serializeAws_restJson1ListDataSetsCommand = function (input, context)
749
554
  });
750
555
  }); };
751
556
  export var serializeAws_restJson1ListDeploymentsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
752
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
557
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
753
558
  return __generator(this, function (_c) {
754
559
  switch (_c.label) {
755
560
  case 0: return [4, context.endpoint()];
@@ -757,17 +562,11 @@ export var serializeAws_restJson1ListDeploymentsCommand = function (input, conte
757
562
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
758
563
  headers = {};
759
564
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications/{applicationId}/deployments";
760
- if (input.applicationId !== undefined) {
761
- labelValue = input.applicationId;
762
- if (labelValue.length <= 0) {
763
- throw new Error("Empty value provided for input HTTP label: applicationId.");
764
- }
765
- resolvedPath = resolvedPath.replace("{applicationId}", __extendedEncodeURIComponent(labelValue));
766
- }
767
- else {
768
- throw new Error("No value provided for input HTTP label: applicationId.");
769
- }
770
- query = __assign(__assign({}, (input.nextToken !== undefined && { nextToken: input.nextToken })), (input.maxResults !== undefined && { maxResults: input.maxResults.toString() }));
565
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", function () { return input.applicationId; }, "{applicationId}", false);
566
+ query = map({
567
+ nextToken: [, input.nextToken],
568
+ maxResults: [function () { return input.maxResults !== void 0; }, function () { return input.maxResults.toString(); }],
569
+ });
771
570
  return [2, new __HttpRequest({
772
571
  protocol: protocol,
773
572
  hostname: hostname,
@@ -790,7 +589,11 @@ export var serializeAws_restJson1ListEngineVersionsCommand = function (input, co
790
589
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
791
590
  headers = {};
792
591
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/engine-versions";
793
- query = __assign(__assign(__assign({}, (input.engineType !== undefined && { engineType: input.engineType })), (input.nextToken !== undefined && { nextToken: input.nextToken })), (input.maxResults !== undefined && { maxResults: input.maxResults.toString() }));
592
+ query = map({
593
+ engineType: [, input.engineType],
594
+ nextToken: [, input.nextToken],
595
+ maxResults: [function () { return input.maxResults !== void 0; }, function () { return input.maxResults.toString(); }],
596
+ });
794
597
  return [2, new __HttpRequest({
795
598
  protocol: protocol,
796
599
  hostname: hostname,
@@ -813,7 +616,12 @@ export var serializeAws_restJson1ListEnvironmentsCommand = function (input, cont
813
616
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
814
617
  headers = {};
815
618
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/environments";
816
- query = __assign(__assign(__assign(__assign({}, (input.nextToken !== undefined && { nextToken: input.nextToken })), (input.maxResults !== undefined && { maxResults: input.maxResults.toString() })), (input.names !== undefined && { names: (input.names || []).map(function (_entry) { return _entry; }) })), (input.engineType !== undefined && { engineType: input.engineType }));
619
+ query = map({
620
+ nextToken: [, input.nextToken],
621
+ maxResults: [function () { return input.maxResults !== void 0; }, function () { return input.maxResults.toString(); }],
622
+ names: [function () { return input.names !== void 0; }, function () { return (input.names || []).map(function (_entry) { return _entry; }); }],
623
+ engineType: [, input.engineType],
624
+ });
817
625
  return [2, new __HttpRequest({
818
626
  protocol: protocol,
819
627
  hostname: hostname,
@@ -828,7 +636,7 @@ export var serializeAws_restJson1ListEnvironmentsCommand = function (input, cont
828
636
  });
829
637
  }); };
830
638
  export var serializeAws_restJson1ListTagsForResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
831
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
639
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
832
640
  return __generator(this, function (_c) {
833
641
  switch (_c.label) {
834
642
  case 0: return [4, context.endpoint()];
@@ -836,16 +644,7 @@ export var serializeAws_restJson1ListTagsForResourceCommand = function (input, c
836
644
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
837
645
  headers = {};
838
646
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{resourceArn}";
839
- if (input.resourceArn !== undefined) {
840
- labelValue = input.resourceArn;
841
- if (labelValue.length <= 0) {
842
- throw new Error("Empty value provided for input HTTP label: resourceArn.");
843
- }
844
- resolvedPath = resolvedPath.replace("{resourceArn}", __extendedEncodeURIComponent(labelValue));
845
- }
846
- else {
847
- throw new Error("No value provided for input HTTP label: resourceArn.");
848
- }
647
+ resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", function () { return input.resourceArn; }, "{resourceArn}", false);
849
648
  return [2, new __HttpRequest({
850
649
  protocol: protocol,
851
650
  hostname: hostname,
@@ -859,7 +658,7 @@ export var serializeAws_restJson1ListTagsForResourceCommand = function (input, c
859
658
  });
860
659
  }); };
861
660
  export var serializeAws_restJson1StartApplicationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
862
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
661
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
863
662
  return __generator(this, function (_c) {
864
663
  switch (_c.label) {
865
664
  case 0: return [4, context.endpoint()];
@@ -867,16 +666,7 @@ export var serializeAws_restJson1StartApplicationCommand = function (input, cont
867
666
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
868
667
  headers = {};
869
668
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications/{applicationId}/start";
870
- if (input.applicationId !== undefined) {
871
- labelValue = input.applicationId;
872
- if (labelValue.length <= 0) {
873
- throw new Error("Empty value provided for input HTTP label: applicationId.");
874
- }
875
- resolvedPath = resolvedPath.replace("{applicationId}", __extendedEncodeURIComponent(labelValue));
876
- }
877
- else {
878
- throw new Error("No value provided for input HTTP label: applicationId.");
879
- }
669
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", function () { return input.applicationId; }, "{applicationId}", false);
880
670
  return [2, new __HttpRequest({
881
671
  protocol: protocol,
882
672
  hostname: hostname,
@@ -890,7 +680,7 @@ export var serializeAws_restJson1StartApplicationCommand = function (input, cont
890
680
  });
891
681
  }); };
892
682
  export var serializeAws_restJson1StartBatchJobCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
893
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
683
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
894
684
  return __generator(this, function (_c) {
895
685
  switch (_c.label) {
896
686
  case 0: return [4, context.endpoint()];
@@ -900,16 +690,7 @@ export var serializeAws_restJson1StartBatchJobCommand = function (input, context
900
690
  "content-type": "application/json",
901
691
  };
902
692
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications/{applicationId}/batch-job";
903
- if (input.applicationId !== undefined) {
904
- labelValue = input.applicationId;
905
- if (labelValue.length <= 0) {
906
- throw new Error("Empty value provided for input HTTP label: applicationId.");
907
- }
908
- resolvedPath = resolvedPath.replace("{applicationId}", __extendedEncodeURIComponent(labelValue));
909
- }
910
- else {
911
- throw new Error("No value provided for input HTTP label: applicationId.");
912
- }
693
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", function () { return input.applicationId; }, "{applicationId}", false);
913
694
  body = JSON.stringify(__assign(__assign({}, (input.batchJobIdentifier != null && {
914
695
  batchJobIdentifier: serializeAws_restJson1BatchJobIdentifier(input.batchJobIdentifier, context),
915
696
  })), (input.jobParams != null && {
@@ -928,7 +709,7 @@ export var serializeAws_restJson1StartBatchJobCommand = function (input, context
928
709
  });
929
710
  }); };
930
711
  export var serializeAws_restJson1StopApplicationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
931
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
712
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
932
713
  return __generator(this, function (_c) {
933
714
  switch (_c.label) {
934
715
  case 0: return [4, context.endpoint()];
@@ -938,16 +719,7 @@ export var serializeAws_restJson1StopApplicationCommand = function (input, conte
938
719
  "content-type": "application/json",
939
720
  };
940
721
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications/{applicationId}/stop";
941
- if (input.applicationId !== undefined) {
942
- labelValue = input.applicationId;
943
- if (labelValue.length <= 0) {
944
- throw new Error("Empty value provided for input HTTP label: applicationId.");
945
- }
946
- resolvedPath = resolvedPath.replace("{applicationId}", __extendedEncodeURIComponent(labelValue));
947
- }
948
- else {
949
- throw new Error("No value provided for input HTTP label: applicationId.");
950
- }
722
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", function () { return input.applicationId; }, "{applicationId}", false);
951
723
  body = JSON.stringify(__assign({}, (input.forceStop != null && { forceStop: input.forceStop })));
952
724
  return [2, new __HttpRequest({
953
725
  protocol: protocol,
@@ -962,7 +734,7 @@ export var serializeAws_restJson1StopApplicationCommand = function (input, conte
962
734
  });
963
735
  }); };
964
736
  export var serializeAws_restJson1TagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
965
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
737
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
966
738
  return __generator(this, function (_c) {
967
739
  switch (_c.label) {
968
740
  case 0: return [4, context.endpoint()];
@@ -972,16 +744,7 @@ export var serializeAws_restJson1TagResourceCommand = function (input, context)
972
744
  "content-type": "application/json",
973
745
  };
974
746
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{resourceArn}";
975
- if (input.resourceArn !== undefined) {
976
- labelValue = input.resourceArn;
977
- if (labelValue.length <= 0) {
978
- throw new Error("Empty value provided for input HTTP label: resourceArn.");
979
- }
980
- resolvedPath = resolvedPath.replace("{resourceArn}", __extendedEncodeURIComponent(labelValue));
981
- }
982
- else {
983
- throw new Error("No value provided for input HTTP label: resourceArn.");
984
- }
747
+ resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", function () { return input.resourceArn; }, "{resourceArn}", false);
985
748
  body = JSON.stringify(__assign({}, (input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) })));
986
749
  return [2, new __HttpRequest({
987
750
  protocol: protocol,
@@ -996,7 +759,7 @@ export var serializeAws_restJson1TagResourceCommand = function (input, context)
996
759
  });
997
760
  }); };
998
761
  export var serializeAws_restJson1UntagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
999
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
762
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
1000
763
  return __generator(this, function (_c) {
1001
764
  switch (_c.label) {
1002
765
  case 0: return [4, context.endpoint()];
@@ -1004,17 +767,10 @@ export var serializeAws_restJson1UntagResourceCommand = function (input, context
1004
767
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
1005
768
  headers = {};
1006
769
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{resourceArn}";
1007
- if (input.resourceArn !== undefined) {
1008
- labelValue = input.resourceArn;
1009
- if (labelValue.length <= 0) {
1010
- throw new Error("Empty value provided for input HTTP label: resourceArn.");
1011
- }
1012
- resolvedPath = resolvedPath.replace("{resourceArn}", __extendedEncodeURIComponent(labelValue));
1013
- }
1014
- else {
1015
- throw new Error("No value provided for input HTTP label: resourceArn.");
1016
- }
1017
- query = __assign({}, (input.tagKeys !== undefined && { tagKeys: (input.tagKeys || []).map(function (_entry) { return _entry; }) }));
770
+ resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", function () { return input.resourceArn; }, "{resourceArn}", false);
771
+ query = map({
772
+ tagKeys: [function () { return input.tagKeys !== void 0; }, function () { return (input.tagKeys || []).map(function (_entry) { return _entry; }); }],
773
+ });
1018
774
  return [2, new __HttpRequest({
1019
775
  protocol: protocol,
1020
776
  hostname: hostname,
@@ -1029,7 +785,7 @@ export var serializeAws_restJson1UntagResourceCommand = function (input, context
1029
785
  });
1030
786
  }); };
1031
787
  export var serializeAws_restJson1UpdateApplicationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
1032
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
788
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
1033
789
  return __generator(this, function (_c) {
1034
790
  switch (_c.label) {
1035
791
  case 0: return [4, context.endpoint()];
@@ -1039,16 +795,7 @@ export var serializeAws_restJson1UpdateApplicationCommand = function (input, con
1039
795
  "content-type": "application/json",
1040
796
  };
1041
797
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications/{applicationId}";
1042
- if (input.applicationId !== undefined) {
1043
- labelValue = input.applicationId;
1044
- if (labelValue.length <= 0) {
1045
- throw new Error("Empty value provided for input HTTP label: applicationId.");
1046
- }
1047
- resolvedPath = resolvedPath.replace("{applicationId}", __extendedEncodeURIComponent(labelValue));
1048
- }
1049
- else {
1050
- throw new Error("No value provided for input HTTP label: applicationId.");
1051
- }
798
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", function () { return input.applicationId; }, "{applicationId}", false);
1052
799
  body = JSON.stringify(__assign(__assign(__assign({}, (input.currentApplicationVersion != null && { currentApplicationVersion: input.currentApplicationVersion })), (input.definition != null && { definition: serializeAws_restJson1Definition(input.definition, context) })), (input.description != null && { description: input.description })));
1053
800
  return [2, new __HttpRequest({
1054
801
  protocol: protocol,
@@ -1063,7 +810,7 @@ export var serializeAws_restJson1UpdateApplicationCommand = function (input, con
1063
810
  });
1064
811
  }); };
1065
812
  export var serializeAws_restJson1UpdateEnvironmentCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
1066
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
813
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
1067
814
  return __generator(this, function (_c) {
1068
815
  switch (_c.label) {
1069
816
  case 0: return [4, context.endpoint()];
@@ -1073,16 +820,7 @@ export var serializeAws_restJson1UpdateEnvironmentCommand = function (input, con
1073
820
  "content-type": "application/json",
1074
821
  };
1075
822
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/environments/{environmentId}";
1076
- if (input.environmentId !== undefined) {
1077
- labelValue = input.environmentId;
1078
- if (labelValue.length <= 0) {
1079
- throw new Error("Empty value provided for input HTTP label: environmentId.");
1080
- }
1081
- resolvedPath = resolvedPath.replace("{environmentId}", __extendedEncodeURIComponent(labelValue));
1082
- }
1083
- else {
1084
- throw new Error("No value provided for input HTTP label: environmentId.");
1085
- }
823
+ resolvedPath = __resolvedPath(resolvedPath, input, "environmentId", function () { return input.environmentId; }, "{environmentId}", false);
1086
824
  body = JSON.stringify(__assign(__assign(__assign(__assign(__assign({}, (input.applyDuringMaintenanceWindow != null && {
1087
825
  applyDuringMaintenanceWindow: input.applyDuringMaintenanceWindow,
1088
826
  })), (input.desiredCapacity != null && { desiredCapacity: input.desiredCapacity })), (input.engineVersion != null && { engineVersion: input.engineVersion })), (input.instanceType != null && { instanceType: input.instanceType })), (input.preferredMaintenanceWindow != null && { preferredMaintenanceWindow: input.preferredMaintenanceWindow })));
@@ -1106,18 +844,18 @@ export var deserializeAws_restJson1CancelBatchJobExecutionCommand = function (ou
1106
844
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1107
845
  return [2, deserializeAws_restJson1CancelBatchJobExecutionCommandError(output, context)];
1108
846
  }
1109
- contents = {
847
+ contents = map({
1110
848
  $metadata: deserializeMetadata(output),
1111
- };
849
+ });
1112
850
  return [4, collectBody(output.body, context)];
1113
851
  case 1:
1114
852
  _a.sent();
1115
- return [2, Promise.resolve(contents)];
853
+ return [2, contents];
1116
854
  }
1117
855
  });
1118
856
  }); };
1119
857
  var deserializeAws_restJson1CancelBatchJobExecutionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1120
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
858
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1121
859
  var _c;
1122
860
  return __generator(this, function (_d) {
1123
861
  switch (_d.label) {
@@ -1158,14 +896,14 @@ var deserializeAws_restJson1CancelBatchJobExecutionCommandError = function (outp
1158
896
  case 13: throw _d.sent();
1159
897
  case 14:
1160
898
  parsedBody = parsedOutput.body;
1161
- $metadata = deserializeMetadata(output);
1162
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1163
- response = new __BaseException({
1164
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1165
- $fault: "client",
1166
- $metadata: $metadata,
899
+ throwDefaultError({
900
+ output: output,
901
+ parsedBody: parsedBody,
902
+ exceptionCtor: __BaseException,
903
+ errorCode: errorCode,
1167
904
  });
1168
- throw __decorateServiceException(response, parsedBody);
905
+ _d.label = 15;
906
+ case 15: return [2];
1169
907
  }
1170
908
  });
1171
909
  }); };
@@ -1177,32 +915,29 @@ export var deserializeAws_restJson1CreateApplicationCommand = function (output,
1177
915
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1178
916
  return [2, deserializeAws_restJson1CreateApplicationCommandError(output, context)];
1179
917
  }
1180
- contents = {
918
+ contents = map({
1181
919
  $metadata: deserializeMetadata(output),
1182
- applicationArn: undefined,
1183
- applicationId: undefined,
1184
- applicationVersion: undefined,
1185
- };
920
+ });
1186
921
  _a = __expectNonNull;
1187
922
  _b = __expectObject;
1188
923
  return [4, parseBody(output.body, context)];
1189
924
  case 1:
1190
925
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1191
- if (data.applicationArn !== undefined && data.applicationArn !== null) {
926
+ if (data.applicationArn != null) {
1192
927
  contents.applicationArn = __expectString(data.applicationArn);
1193
928
  }
1194
- if (data.applicationId !== undefined && data.applicationId !== null) {
929
+ if (data.applicationId != null) {
1195
930
  contents.applicationId = __expectString(data.applicationId);
1196
931
  }
1197
- if (data.applicationVersion !== undefined && data.applicationVersion !== null) {
932
+ if (data.applicationVersion != null) {
1198
933
  contents.applicationVersion = __expectInt32(data.applicationVersion);
1199
934
  }
1200
- return [2, Promise.resolve(contents)];
935
+ return [2, contents];
1201
936
  }
1202
937
  });
1203
938
  }); };
1204
939
  var deserializeAws_restJson1CreateApplicationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1205
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
940
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1206
941
  var _c;
1207
942
  return __generator(this, function (_d) {
1208
943
  switch (_d.label) {
@@ -1243,14 +978,14 @@ var deserializeAws_restJson1CreateApplicationCommandError = function (output, co
1243
978
  case 13: throw _d.sent();
1244
979
  case 14:
1245
980
  parsedBody = parsedOutput.body;
1246
- $metadata = deserializeMetadata(output);
1247
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1248
- response = new __BaseException({
1249
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1250
- $fault: "client",
1251
- $metadata: $metadata,
981
+ throwDefaultError({
982
+ output: output,
983
+ parsedBody: parsedBody,
984
+ exceptionCtor: __BaseException,
985
+ errorCode: errorCode,
1252
986
  });
1253
- throw __decorateServiceException(response, parsedBody);
987
+ _d.label = 15;
988
+ case 15: return [2];
1254
989
  }
1255
990
  });
1256
991
  }); };
@@ -1262,24 +997,23 @@ export var deserializeAws_restJson1CreateDataSetImportTaskCommand = function (ou
1262
997
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1263
998
  return [2, deserializeAws_restJson1CreateDataSetImportTaskCommandError(output, context)];
1264
999
  }
1265
- contents = {
1000
+ contents = map({
1266
1001
  $metadata: deserializeMetadata(output),
1267
- taskId: undefined,
1268
- };
1002
+ });
1269
1003
  _a = __expectNonNull;
1270
1004
  _b = __expectObject;
1271
1005
  return [4, parseBody(output.body, context)];
1272
1006
  case 1:
1273
1007
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1274
- if (data.taskId !== undefined && data.taskId !== null) {
1008
+ if (data.taskId != null) {
1275
1009
  contents.taskId = __expectString(data.taskId);
1276
1010
  }
1277
- return [2, Promise.resolve(contents)];
1011
+ return [2, contents];
1278
1012
  }
1279
1013
  });
1280
1014
  }); };
1281
1015
  var deserializeAws_restJson1CreateDataSetImportTaskCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1282
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1016
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1283
1017
  var _c;
1284
1018
  return __generator(this, function (_d) {
1285
1019
  switch (_d.label) {
@@ -1324,14 +1058,14 @@ var deserializeAws_restJson1CreateDataSetImportTaskCommandError = function (outp
1324
1058
  case 15: throw _d.sent();
1325
1059
  case 16:
1326
1060
  parsedBody = parsedOutput.body;
1327
- $metadata = deserializeMetadata(output);
1328
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1329
- response = new __BaseException({
1330
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1331
- $fault: "client",
1332
- $metadata: $metadata,
1061
+ throwDefaultError({
1062
+ output: output,
1063
+ parsedBody: parsedBody,
1064
+ exceptionCtor: __BaseException,
1065
+ errorCode: errorCode,
1333
1066
  });
1334
- throw __decorateServiceException(response, parsedBody);
1067
+ _d.label = 17;
1068
+ case 17: return [2];
1335
1069
  }
1336
1070
  });
1337
1071
  }); };
@@ -1343,24 +1077,23 @@ export var deserializeAws_restJson1CreateDeploymentCommand = function (output, c
1343
1077
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1344
1078
  return [2, deserializeAws_restJson1CreateDeploymentCommandError(output, context)];
1345
1079
  }
1346
- contents = {
1080
+ contents = map({
1347
1081
  $metadata: deserializeMetadata(output),
1348
- deploymentId: undefined,
1349
- };
1082
+ });
1350
1083
  _a = __expectNonNull;
1351
1084
  _b = __expectObject;
1352
1085
  return [4, parseBody(output.body, context)];
1353
1086
  case 1:
1354
1087
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1355
- if (data.deploymentId !== undefined && data.deploymentId !== null) {
1088
+ if (data.deploymentId != null) {
1356
1089
  contents.deploymentId = __expectString(data.deploymentId);
1357
1090
  }
1358
- return [2, Promise.resolve(contents)];
1091
+ return [2, contents];
1359
1092
  }
1360
1093
  });
1361
1094
  }); };
1362
1095
  var deserializeAws_restJson1CreateDeploymentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1363
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1096
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1364
1097
  var _c;
1365
1098
  return __generator(this, function (_d) {
1366
1099
  switch (_d.label) {
@@ -1405,14 +1138,14 @@ var deserializeAws_restJson1CreateDeploymentCommandError = function (output, con
1405
1138
  case 15: throw _d.sent();
1406
1139
  case 16:
1407
1140
  parsedBody = parsedOutput.body;
1408
- $metadata = deserializeMetadata(output);
1409
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1410
- response = new __BaseException({
1411
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1412
- $fault: "client",
1413
- $metadata: $metadata,
1141
+ throwDefaultError({
1142
+ output: output,
1143
+ parsedBody: parsedBody,
1144
+ exceptionCtor: __BaseException,
1145
+ errorCode: errorCode,
1414
1146
  });
1415
- throw __decorateServiceException(response, parsedBody);
1147
+ _d.label = 17;
1148
+ case 17: return [2];
1416
1149
  }
1417
1150
  });
1418
1151
  }); };
@@ -1424,24 +1157,23 @@ export var deserializeAws_restJson1CreateEnvironmentCommand = function (output,
1424
1157
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1425
1158
  return [2, deserializeAws_restJson1CreateEnvironmentCommandError(output, context)];
1426
1159
  }
1427
- contents = {
1160
+ contents = map({
1428
1161
  $metadata: deserializeMetadata(output),
1429
- environmentId: undefined,
1430
- };
1162
+ });
1431
1163
  _a = __expectNonNull;
1432
1164
  _b = __expectObject;
1433
1165
  return [4, parseBody(output.body, context)];
1434
1166
  case 1:
1435
1167
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1436
- if (data.environmentId !== undefined && data.environmentId !== null) {
1168
+ if (data.environmentId != null) {
1437
1169
  contents.environmentId = __expectString(data.environmentId);
1438
1170
  }
1439
- return [2, Promise.resolve(contents)];
1171
+ return [2, contents];
1440
1172
  }
1441
1173
  });
1442
1174
  }); };
1443
1175
  var deserializeAws_restJson1CreateEnvironmentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1444
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1176
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1445
1177
  var _c;
1446
1178
  return __generator(this, function (_d) {
1447
1179
  switch (_d.label) {
@@ -1482,14 +1214,14 @@ var deserializeAws_restJson1CreateEnvironmentCommandError = function (output, co
1482
1214
  case 13: throw _d.sent();
1483
1215
  case 14:
1484
1216
  parsedBody = parsedOutput.body;
1485
- $metadata = deserializeMetadata(output);
1486
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1487
- response = new __BaseException({
1488
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1489
- $fault: "client",
1490
- $metadata: $metadata,
1217
+ throwDefaultError({
1218
+ output: output,
1219
+ parsedBody: parsedBody,
1220
+ exceptionCtor: __BaseException,
1221
+ errorCode: errorCode,
1491
1222
  });
1492
- throw __decorateServiceException(response, parsedBody);
1223
+ _d.label = 15;
1224
+ case 15: return [2];
1493
1225
  }
1494
1226
  });
1495
1227
  }); };
@@ -1501,18 +1233,18 @@ export var deserializeAws_restJson1DeleteApplicationCommand = function (output,
1501
1233
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1502
1234
  return [2, deserializeAws_restJson1DeleteApplicationCommandError(output, context)];
1503
1235
  }
1504
- contents = {
1236
+ contents = map({
1505
1237
  $metadata: deserializeMetadata(output),
1506
- };
1238
+ });
1507
1239
  return [4, collectBody(output.body, context)];
1508
1240
  case 1:
1509
1241
  _a.sent();
1510
- return [2, Promise.resolve(contents)];
1242
+ return [2, contents];
1511
1243
  }
1512
1244
  });
1513
1245
  }); };
1514
1246
  var deserializeAws_restJson1DeleteApplicationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1515
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1247
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1516
1248
  var _c;
1517
1249
  return __generator(this, function (_d) {
1518
1250
  switch (_d.label) {
@@ -1549,14 +1281,14 @@ var deserializeAws_restJson1DeleteApplicationCommandError = function (output, co
1549
1281
  case 11: throw _d.sent();
1550
1282
  case 12:
1551
1283
  parsedBody = parsedOutput.body;
1552
- $metadata = deserializeMetadata(output);
1553
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1554
- response = new __BaseException({
1555
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1556
- $fault: "client",
1557
- $metadata: $metadata,
1284
+ throwDefaultError({
1285
+ output: output,
1286
+ parsedBody: parsedBody,
1287
+ exceptionCtor: __BaseException,
1288
+ errorCode: errorCode,
1558
1289
  });
1559
- throw __decorateServiceException(response, parsedBody);
1290
+ _d.label = 13;
1291
+ case 13: return [2];
1560
1292
  }
1561
1293
  });
1562
1294
  }); };
@@ -1568,18 +1300,18 @@ export var deserializeAws_restJson1DeleteApplicationFromEnvironmentCommand = fun
1568
1300
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1569
1301
  return [2, deserializeAws_restJson1DeleteApplicationFromEnvironmentCommandError(output, context)];
1570
1302
  }
1571
- contents = {
1303
+ contents = map({
1572
1304
  $metadata: deserializeMetadata(output),
1573
- };
1305
+ });
1574
1306
  return [4, collectBody(output.body, context)];
1575
1307
  case 1:
1576
1308
  _a.sent();
1577
- return [2, Promise.resolve(contents)];
1309
+ return [2, contents];
1578
1310
  }
1579
1311
  });
1580
1312
  }); };
1581
1313
  var deserializeAws_restJson1DeleteApplicationFromEnvironmentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1582
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1314
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1583
1315
  var _c;
1584
1316
  return __generator(this, function (_d) {
1585
1317
  switch (_d.label) {
@@ -1620,14 +1352,14 @@ var deserializeAws_restJson1DeleteApplicationFromEnvironmentCommandError = funct
1620
1352
  case 13: throw _d.sent();
1621
1353
  case 14:
1622
1354
  parsedBody = parsedOutput.body;
1623
- $metadata = deserializeMetadata(output);
1624
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1625
- response = new __BaseException({
1626
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1627
- $fault: "client",
1628
- $metadata: $metadata,
1355
+ throwDefaultError({
1356
+ output: output,
1357
+ parsedBody: parsedBody,
1358
+ exceptionCtor: __BaseException,
1359
+ errorCode: errorCode,
1629
1360
  });
1630
- throw __decorateServiceException(response, parsedBody);
1361
+ _d.label = 15;
1362
+ case 15: return [2];
1631
1363
  }
1632
1364
  });
1633
1365
  }); };
@@ -1639,18 +1371,18 @@ export var deserializeAws_restJson1DeleteEnvironmentCommand = function (output,
1639
1371
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1640
1372
  return [2, deserializeAws_restJson1DeleteEnvironmentCommandError(output, context)];
1641
1373
  }
1642
- contents = {
1374
+ contents = map({
1643
1375
  $metadata: deserializeMetadata(output),
1644
- };
1376
+ });
1645
1377
  return [4, collectBody(output.body, context)];
1646
1378
  case 1:
1647
1379
  _a.sent();
1648
- return [2, Promise.resolve(contents)];
1380
+ return [2, contents];
1649
1381
  }
1650
1382
  });
1651
1383
  }); };
1652
1384
  var deserializeAws_restJson1DeleteEnvironmentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1653
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1385
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1654
1386
  var _c;
1655
1387
  return __generator(this, function (_d) {
1656
1388
  switch (_d.label) {
@@ -1687,14 +1419,14 @@ var deserializeAws_restJson1DeleteEnvironmentCommandError = function (output, co
1687
1419
  case 11: throw _d.sent();
1688
1420
  case 12:
1689
1421
  parsedBody = parsedOutput.body;
1690
- $metadata = deserializeMetadata(output);
1691
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1692
- response = new __BaseException({
1693
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1694
- $fault: "client",
1695
- $metadata: $metadata,
1422
+ throwDefaultError({
1423
+ output: output,
1424
+ parsedBody: parsedBody,
1425
+ exceptionCtor: __BaseException,
1426
+ errorCode: errorCode,
1696
1427
  });
1697
- throw __decorateServiceException(response, parsedBody);
1428
+ _d.label = 13;
1429
+ case 13: return [2];
1698
1430
  }
1699
1431
  });
1700
1432
  }); };
@@ -1706,92 +1438,74 @@ export var deserializeAws_restJson1GetApplicationCommand = function (output, con
1706
1438
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1707
1439
  return [2, deserializeAws_restJson1GetApplicationCommandError(output, context)];
1708
1440
  }
1709
- contents = {
1441
+ contents = map({
1710
1442
  $metadata: deserializeMetadata(output),
1711
- applicationArn: undefined,
1712
- applicationId: undefined,
1713
- creationTime: undefined,
1714
- deployedVersion: undefined,
1715
- description: undefined,
1716
- engineType: undefined,
1717
- environmentId: undefined,
1718
- lastStartTime: undefined,
1719
- latestVersion: undefined,
1720
- listenerArns: undefined,
1721
- listenerPorts: undefined,
1722
- loadBalancerDnsName: undefined,
1723
- logGroups: undefined,
1724
- name: undefined,
1725
- status: undefined,
1726
- statusReason: undefined,
1727
- tags: undefined,
1728
- targetGroupArns: undefined,
1729
- };
1443
+ });
1730
1444
  _a = __expectNonNull;
1731
1445
  _b = __expectObject;
1732
1446
  return [4, parseBody(output.body, context)];
1733
1447
  case 1:
1734
1448
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1735
- if (data.applicationArn !== undefined && data.applicationArn !== null) {
1449
+ if (data.applicationArn != null) {
1736
1450
  contents.applicationArn = __expectString(data.applicationArn);
1737
1451
  }
1738
- if (data.applicationId !== undefined && data.applicationId !== null) {
1452
+ if (data.applicationId != null) {
1739
1453
  contents.applicationId = __expectString(data.applicationId);
1740
1454
  }
1741
- if (data.creationTime !== undefined && data.creationTime !== null) {
1455
+ if (data.creationTime != null) {
1742
1456
  contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime)));
1743
1457
  }
1744
- if (data.deployedVersion !== undefined && data.deployedVersion !== null) {
1458
+ if (data.deployedVersion != null) {
1745
1459
  contents.deployedVersion = deserializeAws_restJson1DeployedVersionSummary(data.deployedVersion, context);
1746
1460
  }
1747
- if (data.description !== undefined && data.description !== null) {
1461
+ if (data.description != null) {
1748
1462
  contents.description = __expectString(data.description);
1749
1463
  }
1750
- if (data.engineType !== undefined && data.engineType !== null) {
1464
+ if (data.engineType != null) {
1751
1465
  contents.engineType = __expectString(data.engineType);
1752
1466
  }
1753
- if (data.environmentId !== undefined && data.environmentId !== null) {
1467
+ if (data.environmentId != null) {
1754
1468
  contents.environmentId = __expectString(data.environmentId);
1755
1469
  }
1756
- if (data.lastStartTime !== undefined && data.lastStartTime !== null) {
1470
+ if (data.lastStartTime != null) {
1757
1471
  contents.lastStartTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastStartTime)));
1758
1472
  }
1759
- if (data.latestVersion !== undefined && data.latestVersion !== null) {
1473
+ if (data.latestVersion != null) {
1760
1474
  contents.latestVersion = deserializeAws_restJson1ApplicationVersionSummary(data.latestVersion, context);
1761
1475
  }
1762
- if (data.listenerArns !== undefined && data.listenerArns !== null) {
1476
+ if (data.listenerArns != null) {
1763
1477
  contents.listenerArns = deserializeAws_restJson1ArnList(data.listenerArns, context);
1764
1478
  }
1765
- if (data.listenerPorts !== undefined && data.listenerPorts !== null) {
1479
+ if (data.listenerPorts != null) {
1766
1480
  contents.listenerPorts = deserializeAws_restJson1PortList(data.listenerPorts, context);
1767
1481
  }
1768
- if (data.loadBalancerDnsName !== undefined && data.loadBalancerDnsName !== null) {
1482
+ if (data.loadBalancerDnsName != null) {
1769
1483
  contents.loadBalancerDnsName = __expectString(data.loadBalancerDnsName);
1770
1484
  }
1771
- if (data.logGroups !== undefined && data.logGroups !== null) {
1485
+ if (data.logGroups != null) {
1772
1486
  contents.logGroups = deserializeAws_restJson1LogGroupSummaries(data.logGroups, context);
1773
1487
  }
1774
- if (data.name !== undefined && data.name !== null) {
1488
+ if (data.name != null) {
1775
1489
  contents.name = __expectString(data.name);
1776
1490
  }
1777
- if (data.status !== undefined && data.status !== null) {
1491
+ if (data.status != null) {
1778
1492
  contents.status = __expectString(data.status);
1779
1493
  }
1780
- if (data.statusReason !== undefined && data.statusReason !== null) {
1494
+ if (data.statusReason != null) {
1781
1495
  contents.statusReason = __expectString(data.statusReason);
1782
1496
  }
1783
- if (data.tags !== undefined && data.tags !== null) {
1497
+ if (data.tags != null) {
1784
1498
  contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
1785
1499
  }
1786
- if (data.targetGroupArns !== undefined && data.targetGroupArns !== null) {
1500
+ if (data.targetGroupArns != null) {
1787
1501
  contents.targetGroupArns = deserializeAws_restJson1ArnList(data.targetGroupArns, context);
1788
1502
  }
1789
- return [2, Promise.resolve(contents)];
1503
+ return [2, contents];
1790
1504
  }
1791
1505
  });
1792
1506
  }); };
1793
1507
  var deserializeAws_restJson1GetApplicationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1794
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1508
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1795
1509
  var _c;
1796
1510
  return __generator(this, function (_d) {
1797
1511
  switch (_d.label) {
@@ -1828,14 +1542,14 @@ var deserializeAws_restJson1GetApplicationCommandError = function (output, conte
1828
1542
  case 11: throw _d.sent();
1829
1543
  case 12:
1830
1544
  parsedBody = parsedOutput.body;
1831
- $metadata = deserializeMetadata(output);
1832
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1833
- response = new __BaseException({
1834
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1835
- $fault: "client",
1836
- $metadata: $metadata,
1545
+ throwDefaultError({
1546
+ output: output,
1547
+ parsedBody: parsedBody,
1548
+ exceptionCtor: __BaseException,
1549
+ errorCode: errorCode,
1837
1550
  });
1838
- throw __decorateServiceException(response, parsedBody);
1551
+ _d.label = 13;
1552
+ case 13: return [2];
1839
1553
  }
1840
1554
  });
1841
1555
  }); };
@@ -1847,48 +1561,41 @@ export var deserializeAws_restJson1GetApplicationVersionCommand = function (outp
1847
1561
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1848
1562
  return [2, deserializeAws_restJson1GetApplicationVersionCommandError(output, context)];
1849
1563
  }
1850
- contents = {
1564
+ contents = map({
1851
1565
  $metadata: deserializeMetadata(output),
1852
- applicationVersion: undefined,
1853
- creationTime: undefined,
1854
- definitionContent: undefined,
1855
- description: undefined,
1856
- name: undefined,
1857
- status: undefined,
1858
- statusReason: undefined,
1859
- };
1566
+ });
1860
1567
  _a = __expectNonNull;
1861
1568
  _b = __expectObject;
1862
1569
  return [4, parseBody(output.body, context)];
1863
1570
  case 1:
1864
1571
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1865
- if (data.applicationVersion !== undefined && data.applicationVersion !== null) {
1572
+ if (data.applicationVersion != null) {
1866
1573
  contents.applicationVersion = __expectInt32(data.applicationVersion);
1867
1574
  }
1868
- if (data.creationTime !== undefined && data.creationTime !== null) {
1575
+ if (data.creationTime != null) {
1869
1576
  contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime)));
1870
1577
  }
1871
- if (data.definitionContent !== undefined && data.definitionContent !== null) {
1578
+ if (data.definitionContent != null) {
1872
1579
  contents.definitionContent = __expectString(data.definitionContent);
1873
1580
  }
1874
- if (data.description !== undefined && data.description !== null) {
1581
+ if (data.description != null) {
1875
1582
  contents.description = __expectString(data.description);
1876
1583
  }
1877
- if (data.name !== undefined && data.name !== null) {
1584
+ if (data.name != null) {
1878
1585
  contents.name = __expectString(data.name);
1879
1586
  }
1880
- if (data.status !== undefined && data.status !== null) {
1587
+ if (data.status != null) {
1881
1588
  contents.status = __expectString(data.status);
1882
1589
  }
1883
- if (data.statusReason !== undefined && data.statusReason !== null) {
1590
+ if (data.statusReason != null) {
1884
1591
  contents.statusReason = __expectString(data.statusReason);
1885
1592
  }
1886
- return [2, Promise.resolve(contents)];
1593
+ return [2, contents];
1887
1594
  }
1888
1595
  });
1889
1596
  }); };
1890
1597
  var deserializeAws_restJson1GetApplicationVersionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1891
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1598
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1892
1599
  var _c;
1893
1600
  return __generator(this, function (_d) {
1894
1601
  switch (_d.label) {
@@ -1925,14 +1632,14 @@ var deserializeAws_restJson1GetApplicationVersionCommandError = function (output
1925
1632
  case 11: throw _d.sent();
1926
1633
  case 12:
1927
1634
  parsedBody = parsedOutput.body;
1928
- $metadata = deserializeMetadata(output);
1929
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1930
- response = new __BaseException({
1931
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1932
- $fault: "client",
1933
- $metadata: $metadata,
1635
+ throwDefaultError({
1636
+ output: output,
1637
+ parsedBody: parsedBody,
1638
+ exceptionCtor: __BaseException,
1639
+ errorCode: errorCode,
1934
1640
  });
1935
- throw __decorateServiceException(response, parsedBody);
1641
+ _d.label = 13;
1642
+ case 13: return [2];
1936
1643
  }
1937
1644
  });
1938
1645
  }); };
@@ -1944,60 +1651,50 @@ export var deserializeAws_restJson1GetBatchJobExecutionCommand = function (outpu
1944
1651
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1945
1652
  return [2, deserializeAws_restJson1GetBatchJobExecutionCommandError(output, context)];
1946
1653
  }
1947
- contents = {
1654
+ contents = map({
1948
1655
  $metadata: deserializeMetadata(output),
1949
- applicationId: undefined,
1950
- endTime: undefined,
1951
- executionId: undefined,
1952
- jobId: undefined,
1953
- jobName: undefined,
1954
- jobType: undefined,
1955
- jobUser: undefined,
1956
- startTime: undefined,
1957
- status: undefined,
1958
- statusReason: undefined,
1959
- };
1656
+ });
1960
1657
  _a = __expectNonNull;
1961
1658
  _b = __expectObject;
1962
1659
  return [4, parseBody(output.body, context)];
1963
1660
  case 1:
1964
1661
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1965
- if (data.applicationId !== undefined && data.applicationId !== null) {
1662
+ if (data.applicationId != null) {
1966
1663
  contents.applicationId = __expectString(data.applicationId);
1967
1664
  }
1968
- if (data.endTime !== undefined && data.endTime !== null) {
1665
+ if (data.endTime != null) {
1969
1666
  contents.endTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.endTime)));
1970
1667
  }
1971
- if (data.executionId !== undefined && data.executionId !== null) {
1668
+ if (data.executionId != null) {
1972
1669
  contents.executionId = __expectString(data.executionId);
1973
1670
  }
1974
- if (data.jobId !== undefined && data.jobId !== null) {
1671
+ if (data.jobId != null) {
1975
1672
  contents.jobId = __expectString(data.jobId);
1976
1673
  }
1977
- if (data.jobName !== undefined && data.jobName !== null) {
1674
+ if (data.jobName != null) {
1978
1675
  contents.jobName = __expectString(data.jobName);
1979
1676
  }
1980
- if (data.jobType !== undefined && data.jobType !== null) {
1677
+ if (data.jobType != null) {
1981
1678
  contents.jobType = __expectString(data.jobType);
1982
1679
  }
1983
- if (data.jobUser !== undefined && data.jobUser !== null) {
1680
+ if (data.jobUser != null) {
1984
1681
  contents.jobUser = __expectString(data.jobUser);
1985
1682
  }
1986
- if (data.startTime !== undefined && data.startTime !== null) {
1683
+ if (data.startTime != null) {
1987
1684
  contents.startTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.startTime)));
1988
1685
  }
1989
- if (data.status !== undefined && data.status !== null) {
1686
+ if (data.status != null) {
1990
1687
  contents.status = __expectString(data.status);
1991
1688
  }
1992
- if (data.statusReason !== undefined && data.statusReason !== null) {
1689
+ if (data.statusReason != null) {
1993
1690
  contents.statusReason = __expectString(data.statusReason);
1994
1691
  }
1995
- return [2, Promise.resolve(contents)];
1692
+ return [2, contents];
1996
1693
  }
1997
1694
  });
1998
1695
  }); };
1999
1696
  var deserializeAws_restJson1GetBatchJobExecutionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2000
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1697
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2001
1698
  var _c;
2002
1699
  return __generator(this, function (_d) {
2003
1700
  switch (_d.label) {
@@ -2034,14 +1731,14 @@ var deserializeAws_restJson1GetBatchJobExecutionCommandError = function (output,
2034
1731
  case 11: throw _d.sent();
2035
1732
  case 12:
2036
1733
  parsedBody = parsedOutput.body;
2037
- $metadata = deserializeMetadata(output);
2038
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2039
- response = new __BaseException({
2040
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2041
- $fault: "client",
2042
- $metadata: $metadata,
1734
+ throwDefaultError({
1735
+ output: output,
1736
+ parsedBody: parsedBody,
1737
+ exceptionCtor: __BaseException,
1738
+ errorCode: errorCode,
2043
1739
  });
2044
- throw __decorateServiceException(response, parsedBody);
1740
+ _d.label = 13;
1741
+ case 13: return [2];
2045
1742
  }
2046
1743
  });
2047
1744
  }); };
@@ -2053,52 +1750,44 @@ export var deserializeAws_restJson1GetDataSetDetailsCommand = function (output,
2053
1750
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2054
1751
  return [2, deserializeAws_restJson1GetDataSetDetailsCommandError(output, context)];
2055
1752
  }
2056
- contents = {
1753
+ contents = map({
2057
1754
  $metadata: deserializeMetadata(output),
2058
- blocksize: undefined,
2059
- creationTime: undefined,
2060
- dataSetName: undefined,
2061
- dataSetOrg: undefined,
2062
- lastReferencedTime: undefined,
2063
- lastUpdatedTime: undefined,
2064
- location: undefined,
2065
- recordLength: undefined,
2066
- };
1755
+ });
2067
1756
  _a = __expectNonNull;
2068
1757
  _b = __expectObject;
2069
1758
  return [4, parseBody(output.body, context)];
2070
1759
  case 1:
2071
1760
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2072
- if (data.blocksize !== undefined && data.blocksize !== null) {
1761
+ if (data.blocksize != null) {
2073
1762
  contents.blocksize = __expectInt32(data.blocksize);
2074
1763
  }
2075
- if (data.creationTime !== undefined && data.creationTime !== null) {
1764
+ if (data.creationTime != null) {
2076
1765
  contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime)));
2077
1766
  }
2078
- if (data.dataSetName !== undefined && data.dataSetName !== null) {
1767
+ if (data.dataSetName != null) {
2079
1768
  contents.dataSetName = __expectString(data.dataSetName);
2080
1769
  }
2081
- if (data.dataSetOrg !== undefined && data.dataSetOrg !== null) {
1770
+ if (data.dataSetOrg != null) {
2082
1771
  contents.dataSetOrg = deserializeAws_restJson1DatasetDetailOrgAttributes(__expectUnion(data.dataSetOrg), context);
2083
1772
  }
2084
- if (data.lastReferencedTime !== undefined && data.lastReferencedTime !== null) {
1773
+ if (data.lastReferencedTime != null) {
2085
1774
  contents.lastReferencedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastReferencedTime)));
2086
1775
  }
2087
- if (data.lastUpdatedTime !== undefined && data.lastUpdatedTime !== null) {
1776
+ if (data.lastUpdatedTime != null) {
2088
1777
  contents.lastUpdatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedTime)));
2089
1778
  }
2090
- if (data.location !== undefined && data.location !== null) {
1779
+ if (data.location != null) {
2091
1780
  contents.location = __expectString(data.location);
2092
1781
  }
2093
- if (data.recordLength !== undefined && data.recordLength !== null) {
1782
+ if (data.recordLength != null) {
2094
1783
  contents.recordLength = __expectInt32(data.recordLength);
2095
1784
  }
2096
- return [2, Promise.resolve(contents)];
1785
+ return [2, contents];
2097
1786
  }
2098
1787
  });
2099
1788
  }); };
2100
1789
  var deserializeAws_restJson1GetDataSetDetailsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2101
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1790
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2102
1791
  var _c;
2103
1792
  return __generator(this, function (_d) {
2104
1793
  switch (_d.label) {
@@ -2135,14 +1824,14 @@ var deserializeAws_restJson1GetDataSetDetailsCommandError = function (output, co
2135
1824
  case 11: throw _d.sent();
2136
1825
  case 12:
2137
1826
  parsedBody = parsedOutput.body;
2138
- $metadata = deserializeMetadata(output);
2139
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2140
- response = new __BaseException({
2141
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2142
- $fault: "client",
2143
- $metadata: $metadata,
1827
+ throwDefaultError({
1828
+ output: output,
1829
+ parsedBody: parsedBody,
1830
+ exceptionCtor: __BaseException,
1831
+ errorCode: errorCode,
2144
1832
  });
2145
- throw __decorateServiceException(response, parsedBody);
1833
+ _d.label = 13;
1834
+ case 13: return [2];
2146
1835
  }
2147
1836
  });
2148
1837
  }); };
@@ -2154,32 +1843,29 @@ export var deserializeAws_restJson1GetDataSetImportTaskCommand = function (outpu
2154
1843
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2155
1844
  return [2, deserializeAws_restJson1GetDataSetImportTaskCommandError(output, context)];
2156
1845
  }
2157
- contents = {
1846
+ contents = map({
2158
1847
  $metadata: deserializeMetadata(output),
2159
- status: undefined,
2160
- summary: undefined,
2161
- taskId: undefined,
2162
- };
1848
+ });
2163
1849
  _a = __expectNonNull;
2164
1850
  _b = __expectObject;
2165
1851
  return [4, parseBody(output.body, context)];
2166
1852
  case 1:
2167
1853
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2168
- if (data.status !== undefined && data.status !== null) {
1854
+ if (data.status != null) {
2169
1855
  contents.status = __expectString(data.status);
2170
1856
  }
2171
- if (data.summary !== undefined && data.summary !== null) {
1857
+ if (data.summary != null) {
2172
1858
  contents.summary = deserializeAws_restJson1DataSetImportSummary(data.summary, context);
2173
1859
  }
2174
- if (data.taskId !== undefined && data.taskId !== null) {
1860
+ if (data.taskId != null) {
2175
1861
  contents.taskId = __expectString(data.taskId);
2176
1862
  }
2177
- return [2, Promise.resolve(contents)];
1863
+ return [2, contents];
2178
1864
  }
2179
1865
  });
2180
1866
  }); };
2181
1867
  var deserializeAws_restJson1GetDataSetImportTaskCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2182
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1868
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2183
1869
  var _c;
2184
1870
  return __generator(this, function (_d) {
2185
1871
  switch (_d.label) {
@@ -2216,14 +1902,14 @@ var deserializeAws_restJson1GetDataSetImportTaskCommandError = function (output,
2216
1902
  case 11: throw _d.sent();
2217
1903
  case 12:
2218
1904
  parsedBody = parsedOutput.body;
2219
- $metadata = deserializeMetadata(output);
2220
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2221
- response = new __BaseException({
2222
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2223
- $fault: "client",
2224
- $metadata: $metadata,
1905
+ throwDefaultError({
1906
+ output: output,
1907
+ parsedBody: parsedBody,
1908
+ exceptionCtor: __BaseException,
1909
+ errorCode: errorCode,
2225
1910
  });
2226
- throw __decorateServiceException(response, parsedBody);
1911
+ _d.label = 13;
1912
+ case 13: return [2];
2227
1913
  }
2228
1914
  });
2229
1915
  }); };
@@ -2235,48 +1921,41 @@ export var deserializeAws_restJson1GetDeploymentCommand = function (output, cont
2235
1921
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2236
1922
  return [2, deserializeAws_restJson1GetDeploymentCommandError(output, context)];
2237
1923
  }
2238
- contents = {
1924
+ contents = map({
2239
1925
  $metadata: deserializeMetadata(output),
2240
- applicationId: undefined,
2241
- applicationVersion: undefined,
2242
- creationTime: undefined,
2243
- deploymentId: undefined,
2244
- environmentId: undefined,
2245
- status: undefined,
2246
- statusReason: undefined,
2247
- };
1926
+ });
2248
1927
  _a = __expectNonNull;
2249
1928
  _b = __expectObject;
2250
1929
  return [4, parseBody(output.body, context)];
2251
1930
  case 1:
2252
1931
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2253
- if (data.applicationId !== undefined && data.applicationId !== null) {
1932
+ if (data.applicationId != null) {
2254
1933
  contents.applicationId = __expectString(data.applicationId);
2255
1934
  }
2256
- if (data.applicationVersion !== undefined && data.applicationVersion !== null) {
1935
+ if (data.applicationVersion != null) {
2257
1936
  contents.applicationVersion = __expectInt32(data.applicationVersion);
2258
1937
  }
2259
- if (data.creationTime !== undefined && data.creationTime !== null) {
1938
+ if (data.creationTime != null) {
2260
1939
  contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime)));
2261
1940
  }
2262
- if (data.deploymentId !== undefined && data.deploymentId !== null) {
1941
+ if (data.deploymentId != null) {
2263
1942
  contents.deploymentId = __expectString(data.deploymentId);
2264
1943
  }
2265
- if (data.environmentId !== undefined && data.environmentId !== null) {
1944
+ if (data.environmentId != null) {
2266
1945
  contents.environmentId = __expectString(data.environmentId);
2267
1946
  }
2268
- if (data.status !== undefined && data.status !== null) {
1947
+ if (data.status != null) {
2269
1948
  contents.status = __expectString(data.status);
2270
1949
  }
2271
- if (data.statusReason !== undefined && data.statusReason !== null) {
1950
+ if (data.statusReason != null) {
2272
1951
  contents.statusReason = __expectString(data.statusReason);
2273
1952
  }
2274
- return [2, Promise.resolve(contents)];
1953
+ return [2, contents];
2275
1954
  }
2276
1955
  });
2277
1956
  }); };
2278
1957
  var deserializeAws_restJson1GetDeploymentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2279
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1958
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2280
1959
  var _c;
2281
1960
  return __generator(this, function (_d) {
2282
1961
  switch (_d.label) {
@@ -2313,14 +1992,14 @@ var deserializeAws_restJson1GetDeploymentCommandError = function (output, contex
2313
1992
  case 11: throw _d.sent();
2314
1993
  case 12:
2315
1994
  parsedBody = parsedOutput.body;
2316
- $metadata = deserializeMetadata(output);
2317
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2318
- response = new __BaseException({
2319
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2320
- $fault: "client",
2321
- $metadata: $metadata,
1995
+ throwDefaultError({
1996
+ output: output,
1997
+ parsedBody: parsedBody,
1998
+ exceptionCtor: __BaseException,
1999
+ errorCode: errorCode,
2322
2000
  });
2323
- throw __decorateServiceException(response, parsedBody);
2001
+ _d.label = 13;
2002
+ case 13: return [2];
2324
2003
  }
2325
2004
  });
2326
2005
  }); };
@@ -2332,104 +2011,83 @@ export var deserializeAws_restJson1GetEnvironmentCommand = function (output, con
2332
2011
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2333
2012
  return [2, deserializeAws_restJson1GetEnvironmentCommandError(output, context)];
2334
2013
  }
2335
- contents = {
2014
+ contents = map({
2336
2015
  $metadata: deserializeMetadata(output),
2337
- actualCapacity: undefined,
2338
- creationTime: undefined,
2339
- description: undefined,
2340
- engineType: undefined,
2341
- engineVersion: undefined,
2342
- environmentArn: undefined,
2343
- environmentId: undefined,
2344
- highAvailabilityConfig: undefined,
2345
- instanceType: undefined,
2346
- loadBalancerArn: undefined,
2347
- name: undefined,
2348
- pendingMaintenance: undefined,
2349
- preferredMaintenanceWindow: undefined,
2350
- publiclyAccessible: undefined,
2351
- securityGroupIds: undefined,
2352
- status: undefined,
2353
- statusReason: undefined,
2354
- storageConfigurations: undefined,
2355
- subnetIds: undefined,
2356
- tags: undefined,
2357
- vpcId: undefined,
2358
- };
2016
+ });
2359
2017
  _a = __expectNonNull;
2360
2018
  _b = __expectObject;
2361
2019
  return [4, parseBody(output.body, context)];
2362
2020
  case 1:
2363
2021
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2364
- if (data.actualCapacity !== undefined && data.actualCapacity !== null) {
2022
+ if (data.actualCapacity != null) {
2365
2023
  contents.actualCapacity = __expectInt32(data.actualCapacity);
2366
2024
  }
2367
- if (data.creationTime !== undefined && data.creationTime !== null) {
2025
+ if (data.creationTime != null) {
2368
2026
  contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime)));
2369
2027
  }
2370
- if (data.description !== undefined && data.description !== null) {
2028
+ if (data.description != null) {
2371
2029
  contents.description = __expectString(data.description);
2372
2030
  }
2373
- if (data.engineType !== undefined && data.engineType !== null) {
2031
+ if (data.engineType != null) {
2374
2032
  contents.engineType = __expectString(data.engineType);
2375
2033
  }
2376
- if (data.engineVersion !== undefined && data.engineVersion !== null) {
2034
+ if (data.engineVersion != null) {
2377
2035
  contents.engineVersion = __expectString(data.engineVersion);
2378
2036
  }
2379
- if (data.environmentArn !== undefined && data.environmentArn !== null) {
2037
+ if (data.environmentArn != null) {
2380
2038
  contents.environmentArn = __expectString(data.environmentArn);
2381
2039
  }
2382
- if (data.environmentId !== undefined && data.environmentId !== null) {
2040
+ if (data.environmentId != null) {
2383
2041
  contents.environmentId = __expectString(data.environmentId);
2384
2042
  }
2385
- if (data.highAvailabilityConfig !== undefined && data.highAvailabilityConfig !== null) {
2043
+ if (data.highAvailabilityConfig != null) {
2386
2044
  contents.highAvailabilityConfig = deserializeAws_restJson1HighAvailabilityConfig(data.highAvailabilityConfig, context);
2387
2045
  }
2388
- if (data.instanceType !== undefined && data.instanceType !== null) {
2046
+ if (data.instanceType != null) {
2389
2047
  contents.instanceType = __expectString(data.instanceType);
2390
2048
  }
2391
- if (data.loadBalancerArn !== undefined && data.loadBalancerArn !== null) {
2049
+ if (data.loadBalancerArn != null) {
2392
2050
  contents.loadBalancerArn = __expectString(data.loadBalancerArn);
2393
2051
  }
2394
- if (data.name !== undefined && data.name !== null) {
2052
+ if (data.name != null) {
2395
2053
  contents.name = __expectString(data.name);
2396
2054
  }
2397
- if (data.pendingMaintenance !== undefined && data.pendingMaintenance !== null) {
2055
+ if (data.pendingMaintenance != null) {
2398
2056
  contents.pendingMaintenance = deserializeAws_restJson1PendingMaintenance(data.pendingMaintenance, context);
2399
2057
  }
2400
- if (data.preferredMaintenanceWindow !== undefined && data.preferredMaintenanceWindow !== null) {
2058
+ if (data.preferredMaintenanceWindow != null) {
2401
2059
  contents.preferredMaintenanceWindow = __expectString(data.preferredMaintenanceWindow);
2402
2060
  }
2403
- if (data.publiclyAccessible !== undefined && data.publiclyAccessible !== null) {
2061
+ if (data.publiclyAccessible != null) {
2404
2062
  contents.publiclyAccessible = __expectBoolean(data.publiclyAccessible);
2405
2063
  }
2406
- if (data.securityGroupIds !== undefined && data.securityGroupIds !== null) {
2064
+ if (data.securityGroupIds != null) {
2407
2065
  contents.securityGroupIds = deserializeAws_restJson1String50List(data.securityGroupIds, context);
2408
2066
  }
2409
- if (data.status !== undefined && data.status !== null) {
2067
+ if (data.status != null) {
2410
2068
  contents.status = __expectString(data.status);
2411
2069
  }
2412
- if (data.statusReason !== undefined && data.statusReason !== null) {
2070
+ if (data.statusReason != null) {
2413
2071
  contents.statusReason = __expectString(data.statusReason);
2414
2072
  }
2415
- if (data.storageConfigurations !== undefined && data.storageConfigurations !== null) {
2073
+ if (data.storageConfigurations != null) {
2416
2074
  contents.storageConfigurations = deserializeAws_restJson1StorageConfigurationList(data.storageConfigurations, context);
2417
2075
  }
2418
- if (data.subnetIds !== undefined && data.subnetIds !== null) {
2076
+ if (data.subnetIds != null) {
2419
2077
  contents.subnetIds = deserializeAws_restJson1String50List(data.subnetIds, context);
2420
2078
  }
2421
- if (data.tags !== undefined && data.tags !== null) {
2079
+ if (data.tags != null) {
2422
2080
  contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
2423
2081
  }
2424
- if (data.vpcId !== undefined && data.vpcId !== null) {
2082
+ if (data.vpcId != null) {
2425
2083
  contents.vpcId = __expectString(data.vpcId);
2426
2084
  }
2427
- return [2, Promise.resolve(contents)];
2085
+ return [2, contents];
2428
2086
  }
2429
2087
  });
2430
2088
  }); };
2431
2089
  var deserializeAws_restJson1GetEnvironmentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2432
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2090
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2433
2091
  var _c;
2434
2092
  return __generator(this, function (_d) {
2435
2093
  switch (_d.label) {
@@ -2466,14 +2124,14 @@ var deserializeAws_restJson1GetEnvironmentCommandError = function (output, conte
2466
2124
  case 11: throw _d.sent();
2467
2125
  case 12:
2468
2126
  parsedBody = parsedOutput.body;
2469
- $metadata = deserializeMetadata(output);
2470
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2471
- response = new __BaseException({
2472
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2473
- $fault: "client",
2474
- $metadata: $metadata,
2127
+ throwDefaultError({
2128
+ output: output,
2129
+ parsedBody: parsedBody,
2130
+ exceptionCtor: __BaseException,
2131
+ errorCode: errorCode,
2475
2132
  });
2476
- throw __decorateServiceException(response, parsedBody);
2133
+ _d.label = 13;
2134
+ case 13: return [2];
2477
2135
  }
2478
2136
  });
2479
2137
  }); };
@@ -2485,28 +2143,26 @@ export var deserializeAws_restJson1ListApplicationsCommand = function (output, c
2485
2143
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2486
2144
  return [2, deserializeAws_restJson1ListApplicationsCommandError(output, context)];
2487
2145
  }
2488
- contents = {
2146
+ contents = map({
2489
2147
  $metadata: deserializeMetadata(output),
2490
- applications: undefined,
2491
- nextToken: undefined,
2492
- };
2148
+ });
2493
2149
  _a = __expectNonNull;
2494
2150
  _b = __expectObject;
2495
2151
  return [4, parseBody(output.body, context)];
2496
2152
  case 1:
2497
2153
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2498
- if (data.applications !== undefined && data.applications !== null) {
2154
+ if (data.applications != null) {
2499
2155
  contents.applications = deserializeAws_restJson1ApplicationSummaryList(data.applications, context);
2500
2156
  }
2501
- if (data.nextToken !== undefined && data.nextToken !== null) {
2157
+ if (data.nextToken != null) {
2502
2158
  contents.nextToken = __expectString(data.nextToken);
2503
2159
  }
2504
- return [2, Promise.resolve(contents)];
2160
+ return [2, contents];
2505
2161
  }
2506
2162
  });
2507
2163
  }); };
2508
2164
  var deserializeAws_restJson1ListApplicationsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2509
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2165
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2510
2166
  var _c;
2511
2167
  return __generator(this, function (_d) {
2512
2168
  switch (_d.label) {
@@ -2539,14 +2195,14 @@ var deserializeAws_restJson1ListApplicationsCommandError = function (output, con
2539
2195
  case 9: throw _d.sent();
2540
2196
  case 10:
2541
2197
  parsedBody = parsedOutput.body;
2542
- $metadata = deserializeMetadata(output);
2543
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2544
- response = new __BaseException({
2545
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2546
- $fault: "client",
2547
- $metadata: $metadata,
2198
+ throwDefaultError({
2199
+ output: output,
2200
+ parsedBody: parsedBody,
2201
+ exceptionCtor: __BaseException,
2202
+ errorCode: errorCode,
2548
2203
  });
2549
- throw __decorateServiceException(response, parsedBody);
2204
+ _d.label = 11;
2205
+ case 11: return [2];
2550
2206
  }
2551
2207
  });
2552
2208
  }); };
@@ -2558,28 +2214,26 @@ export var deserializeAws_restJson1ListApplicationVersionsCommand = function (ou
2558
2214
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2559
2215
  return [2, deserializeAws_restJson1ListApplicationVersionsCommandError(output, context)];
2560
2216
  }
2561
- contents = {
2217
+ contents = map({
2562
2218
  $metadata: deserializeMetadata(output),
2563
- applicationVersions: undefined,
2564
- nextToken: undefined,
2565
- };
2219
+ });
2566
2220
  _a = __expectNonNull;
2567
2221
  _b = __expectObject;
2568
2222
  return [4, parseBody(output.body, context)];
2569
2223
  case 1:
2570
2224
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2571
- if (data.applicationVersions !== undefined && data.applicationVersions !== null) {
2225
+ if (data.applicationVersions != null) {
2572
2226
  contents.applicationVersions = deserializeAws_restJson1ApplicationVersionSummaryList(data.applicationVersions, context);
2573
2227
  }
2574
- if (data.nextToken !== undefined && data.nextToken !== null) {
2228
+ if (data.nextToken != null) {
2575
2229
  contents.nextToken = __expectString(data.nextToken);
2576
2230
  }
2577
- return [2, Promise.resolve(contents)];
2231
+ return [2, contents];
2578
2232
  }
2579
2233
  });
2580
2234
  }); };
2581
2235
  var deserializeAws_restJson1ListApplicationVersionsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2582
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2236
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2583
2237
  var _c;
2584
2238
  return __generator(this, function (_d) {
2585
2239
  switch (_d.label) {
@@ -2616,14 +2270,14 @@ var deserializeAws_restJson1ListApplicationVersionsCommandError = function (outp
2616
2270
  case 11: throw _d.sent();
2617
2271
  case 12:
2618
2272
  parsedBody = parsedOutput.body;
2619
- $metadata = deserializeMetadata(output);
2620
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2621
- response = new __BaseException({
2622
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2623
- $fault: "client",
2624
- $metadata: $metadata,
2273
+ throwDefaultError({
2274
+ output: output,
2275
+ parsedBody: parsedBody,
2276
+ exceptionCtor: __BaseException,
2277
+ errorCode: errorCode,
2625
2278
  });
2626
- throw __decorateServiceException(response, parsedBody);
2279
+ _d.label = 13;
2280
+ case 13: return [2];
2627
2281
  }
2628
2282
  });
2629
2283
  }); };
@@ -2635,28 +2289,26 @@ export var deserializeAws_restJson1ListBatchJobDefinitionsCommand = function (ou
2635
2289
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2636
2290
  return [2, deserializeAws_restJson1ListBatchJobDefinitionsCommandError(output, context)];
2637
2291
  }
2638
- contents = {
2292
+ contents = map({
2639
2293
  $metadata: deserializeMetadata(output),
2640
- batchJobDefinitions: undefined,
2641
- nextToken: undefined,
2642
- };
2294
+ });
2643
2295
  _a = __expectNonNull;
2644
2296
  _b = __expectObject;
2645
2297
  return [4, parseBody(output.body, context)];
2646
2298
  case 1:
2647
2299
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2648
- if (data.batchJobDefinitions !== undefined && data.batchJobDefinitions !== null) {
2300
+ if (data.batchJobDefinitions != null) {
2649
2301
  contents.batchJobDefinitions = deserializeAws_restJson1BatchJobDefinitions(data.batchJobDefinitions, context);
2650
2302
  }
2651
- if (data.nextToken !== undefined && data.nextToken !== null) {
2303
+ if (data.nextToken != null) {
2652
2304
  contents.nextToken = __expectString(data.nextToken);
2653
2305
  }
2654
- return [2, Promise.resolve(contents)];
2306
+ return [2, contents];
2655
2307
  }
2656
2308
  });
2657
2309
  }); };
2658
2310
  var deserializeAws_restJson1ListBatchJobDefinitionsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2659
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2311
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2660
2312
  var _c;
2661
2313
  return __generator(this, function (_d) {
2662
2314
  switch (_d.label) {
@@ -2693,14 +2345,14 @@ var deserializeAws_restJson1ListBatchJobDefinitionsCommandError = function (outp
2693
2345
  case 11: throw _d.sent();
2694
2346
  case 12:
2695
2347
  parsedBody = parsedOutput.body;
2696
- $metadata = deserializeMetadata(output);
2697
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2698
- response = new __BaseException({
2699
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2700
- $fault: "client",
2701
- $metadata: $metadata,
2348
+ throwDefaultError({
2349
+ output: output,
2350
+ parsedBody: parsedBody,
2351
+ exceptionCtor: __BaseException,
2352
+ errorCode: errorCode,
2702
2353
  });
2703
- throw __decorateServiceException(response, parsedBody);
2354
+ _d.label = 13;
2355
+ case 13: return [2];
2704
2356
  }
2705
2357
  });
2706
2358
  }); };
@@ -2712,28 +2364,26 @@ export var deserializeAws_restJson1ListBatchJobExecutionsCommand = function (out
2712
2364
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2713
2365
  return [2, deserializeAws_restJson1ListBatchJobExecutionsCommandError(output, context)];
2714
2366
  }
2715
- contents = {
2367
+ contents = map({
2716
2368
  $metadata: deserializeMetadata(output),
2717
- batchJobExecutions: undefined,
2718
- nextToken: undefined,
2719
- };
2369
+ });
2720
2370
  _a = __expectNonNull;
2721
2371
  _b = __expectObject;
2722
2372
  return [4, parseBody(output.body, context)];
2723
2373
  case 1:
2724
2374
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2725
- if (data.batchJobExecutions !== undefined && data.batchJobExecutions !== null) {
2375
+ if (data.batchJobExecutions != null) {
2726
2376
  contents.batchJobExecutions = deserializeAws_restJson1BatchJobExecutionSummaryList(data.batchJobExecutions, context);
2727
2377
  }
2728
- if (data.nextToken !== undefined && data.nextToken !== null) {
2378
+ if (data.nextToken != null) {
2729
2379
  contents.nextToken = __expectString(data.nextToken);
2730
2380
  }
2731
- return [2, Promise.resolve(contents)];
2381
+ return [2, contents];
2732
2382
  }
2733
2383
  });
2734
2384
  }); };
2735
2385
  var deserializeAws_restJson1ListBatchJobExecutionsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2736
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2386
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2737
2387
  var _c;
2738
2388
  return __generator(this, function (_d) {
2739
2389
  switch (_d.label) {
@@ -2770,14 +2420,14 @@ var deserializeAws_restJson1ListBatchJobExecutionsCommandError = function (outpu
2770
2420
  case 11: throw _d.sent();
2771
2421
  case 12:
2772
2422
  parsedBody = parsedOutput.body;
2773
- $metadata = deserializeMetadata(output);
2774
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2775
- response = new __BaseException({
2776
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2777
- $fault: "client",
2778
- $metadata: $metadata,
2423
+ throwDefaultError({
2424
+ output: output,
2425
+ parsedBody: parsedBody,
2426
+ exceptionCtor: __BaseException,
2427
+ errorCode: errorCode,
2779
2428
  });
2780
- throw __decorateServiceException(response, parsedBody);
2429
+ _d.label = 13;
2430
+ case 13: return [2];
2781
2431
  }
2782
2432
  });
2783
2433
  }); };
@@ -2789,28 +2439,26 @@ export var deserializeAws_restJson1ListDataSetImportHistoryCommand = function (o
2789
2439
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2790
2440
  return [2, deserializeAws_restJson1ListDataSetImportHistoryCommandError(output, context)];
2791
2441
  }
2792
- contents = {
2442
+ contents = map({
2793
2443
  $metadata: deserializeMetadata(output),
2794
- dataSetImportTasks: undefined,
2795
- nextToken: undefined,
2796
- };
2444
+ });
2797
2445
  _a = __expectNonNull;
2798
2446
  _b = __expectObject;
2799
2447
  return [4, parseBody(output.body, context)];
2800
2448
  case 1:
2801
2449
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2802
- if (data.dataSetImportTasks !== undefined && data.dataSetImportTasks !== null) {
2450
+ if (data.dataSetImportTasks != null) {
2803
2451
  contents.dataSetImportTasks = deserializeAws_restJson1DataSetImportTaskList(data.dataSetImportTasks, context);
2804
2452
  }
2805
- if (data.nextToken !== undefined && data.nextToken !== null) {
2453
+ if (data.nextToken != null) {
2806
2454
  contents.nextToken = __expectString(data.nextToken);
2807
2455
  }
2808
- return [2, Promise.resolve(contents)];
2456
+ return [2, contents];
2809
2457
  }
2810
2458
  });
2811
2459
  }); };
2812
2460
  var deserializeAws_restJson1ListDataSetImportHistoryCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2813
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2461
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2814
2462
  var _c;
2815
2463
  return __generator(this, function (_d) {
2816
2464
  switch (_d.label) {
@@ -2847,14 +2495,14 @@ var deserializeAws_restJson1ListDataSetImportHistoryCommandError = function (out
2847
2495
  case 11: throw _d.sent();
2848
2496
  case 12:
2849
2497
  parsedBody = parsedOutput.body;
2850
- $metadata = deserializeMetadata(output);
2851
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2852
- response = new __BaseException({
2853
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2854
- $fault: "client",
2855
- $metadata: $metadata,
2498
+ throwDefaultError({
2499
+ output: output,
2500
+ parsedBody: parsedBody,
2501
+ exceptionCtor: __BaseException,
2502
+ errorCode: errorCode,
2856
2503
  });
2857
- throw __decorateServiceException(response, parsedBody);
2504
+ _d.label = 13;
2505
+ case 13: return [2];
2858
2506
  }
2859
2507
  });
2860
2508
  }); };
@@ -2866,28 +2514,26 @@ export var deserializeAws_restJson1ListDataSetsCommand = function (output, conte
2866
2514
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2867
2515
  return [2, deserializeAws_restJson1ListDataSetsCommandError(output, context)];
2868
2516
  }
2869
- contents = {
2517
+ contents = map({
2870
2518
  $metadata: deserializeMetadata(output),
2871
- dataSets: undefined,
2872
- nextToken: undefined,
2873
- };
2519
+ });
2874
2520
  _a = __expectNonNull;
2875
2521
  _b = __expectObject;
2876
2522
  return [4, parseBody(output.body, context)];
2877
2523
  case 1:
2878
2524
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2879
- if (data.dataSets !== undefined && data.dataSets !== null) {
2525
+ if (data.dataSets != null) {
2880
2526
  contents.dataSets = deserializeAws_restJson1DataSetsSummaryList(data.dataSets, context);
2881
2527
  }
2882
- if (data.nextToken !== undefined && data.nextToken !== null) {
2528
+ if (data.nextToken != null) {
2883
2529
  contents.nextToken = __expectString(data.nextToken);
2884
2530
  }
2885
- return [2, Promise.resolve(contents)];
2531
+ return [2, contents];
2886
2532
  }
2887
2533
  });
2888
2534
  }); };
2889
2535
  var deserializeAws_restJson1ListDataSetsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2890
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2536
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2891
2537
  var _c;
2892
2538
  return __generator(this, function (_d) {
2893
2539
  switch (_d.label) {
@@ -2924,14 +2570,14 @@ var deserializeAws_restJson1ListDataSetsCommandError = function (output, context
2924
2570
  case 11: throw _d.sent();
2925
2571
  case 12:
2926
2572
  parsedBody = parsedOutput.body;
2927
- $metadata = deserializeMetadata(output);
2928
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2929
- response = new __BaseException({
2930
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2931
- $fault: "client",
2932
- $metadata: $metadata,
2573
+ throwDefaultError({
2574
+ output: output,
2575
+ parsedBody: parsedBody,
2576
+ exceptionCtor: __BaseException,
2577
+ errorCode: errorCode,
2933
2578
  });
2934
- throw __decorateServiceException(response, parsedBody);
2579
+ _d.label = 13;
2580
+ case 13: return [2];
2935
2581
  }
2936
2582
  });
2937
2583
  }); };
@@ -2943,28 +2589,26 @@ export var deserializeAws_restJson1ListDeploymentsCommand = function (output, co
2943
2589
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2944
2590
  return [2, deserializeAws_restJson1ListDeploymentsCommandError(output, context)];
2945
2591
  }
2946
- contents = {
2592
+ contents = map({
2947
2593
  $metadata: deserializeMetadata(output),
2948
- deployments: undefined,
2949
- nextToken: undefined,
2950
- };
2594
+ });
2951
2595
  _a = __expectNonNull;
2952
2596
  _b = __expectObject;
2953
2597
  return [4, parseBody(output.body, context)];
2954
2598
  case 1:
2955
2599
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2956
- if (data.deployments !== undefined && data.deployments !== null) {
2600
+ if (data.deployments != null) {
2957
2601
  contents.deployments = deserializeAws_restJson1DeploymentList(data.deployments, context);
2958
2602
  }
2959
- if (data.nextToken !== undefined && data.nextToken !== null) {
2603
+ if (data.nextToken != null) {
2960
2604
  contents.nextToken = __expectString(data.nextToken);
2961
2605
  }
2962
- return [2, Promise.resolve(contents)];
2606
+ return [2, contents];
2963
2607
  }
2964
2608
  });
2965
2609
  }); };
2966
2610
  var deserializeAws_restJson1ListDeploymentsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2967
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2611
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2968
2612
  var _c;
2969
2613
  return __generator(this, function (_d) {
2970
2614
  switch (_d.label) {
@@ -3001,14 +2645,14 @@ var deserializeAws_restJson1ListDeploymentsCommandError = function (output, cont
3001
2645
  case 11: throw _d.sent();
3002
2646
  case 12:
3003
2647
  parsedBody = parsedOutput.body;
3004
- $metadata = deserializeMetadata(output);
3005
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3006
- response = new __BaseException({
3007
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3008
- $fault: "client",
3009
- $metadata: $metadata,
2648
+ throwDefaultError({
2649
+ output: output,
2650
+ parsedBody: parsedBody,
2651
+ exceptionCtor: __BaseException,
2652
+ errorCode: errorCode,
3010
2653
  });
3011
- throw __decorateServiceException(response, parsedBody);
2654
+ _d.label = 13;
2655
+ case 13: return [2];
3012
2656
  }
3013
2657
  });
3014
2658
  }); };
@@ -3020,28 +2664,26 @@ export var deserializeAws_restJson1ListEngineVersionsCommand = function (output,
3020
2664
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3021
2665
  return [2, deserializeAws_restJson1ListEngineVersionsCommandError(output, context)];
3022
2666
  }
3023
- contents = {
2667
+ contents = map({
3024
2668
  $metadata: deserializeMetadata(output),
3025
- engineVersions: undefined,
3026
- nextToken: undefined,
3027
- };
2669
+ });
3028
2670
  _a = __expectNonNull;
3029
2671
  _b = __expectObject;
3030
2672
  return [4, parseBody(output.body, context)];
3031
2673
  case 1:
3032
2674
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3033
- if (data.engineVersions !== undefined && data.engineVersions !== null) {
2675
+ if (data.engineVersions != null) {
3034
2676
  contents.engineVersions = deserializeAws_restJson1EngineVersionsSummaryList(data.engineVersions, context);
3035
2677
  }
3036
- if (data.nextToken !== undefined && data.nextToken !== null) {
2678
+ if (data.nextToken != null) {
3037
2679
  contents.nextToken = __expectString(data.nextToken);
3038
2680
  }
3039
- return [2, Promise.resolve(contents)];
2681
+ return [2, contents];
3040
2682
  }
3041
2683
  });
3042
2684
  }); };
3043
2685
  var deserializeAws_restJson1ListEngineVersionsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3044
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2686
+ var parsedOutput, _a, errorCode, _b, parsedBody;
3045
2687
  var _c;
3046
2688
  return __generator(this, function (_d) {
3047
2689
  switch (_d.label) {
@@ -3074,14 +2716,14 @@ var deserializeAws_restJson1ListEngineVersionsCommandError = function (output, c
3074
2716
  case 9: throw _d.sent();
3075
2717
  case 10:
3076
2718
  parsedBody = parsedOutput.body;
3077
- $metadata = deserializeMetadata(output);
3078
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3079
- response = new __BaseException({
3080
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3081
- $fault: "client",
3082
- $metadata: $metadata,
2719
+ throwDefaultError({
2720
+ output: output,
2721
+ parsedBody: parsedBody,
2722
+ exceptionCtor: __BaseException,
2723
+ errorCode: errorCode,
3083
2724
  });
3084
- throw __decorateServiceException(response, parsedBody);
2725
+ _d.label = 11;
2726
+ case 11: return [2];
3085
2727
  }
3086
2728
  });
3087
2729
  }); };
@@ -3093,28 +2735,26 @@ export var deserializeAws_restJson1ListEnvironmentsCommand = function (output, c
3093
2735
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3094
2736
  return [2, deserializeAws_restJson1ListEnvironmentsCommandError(output, context)];
3095
2737
  }
3096
- contents = {
2738
+ contents = map({
3097
2739
  $metadata: deserializeMetadata(output),
3098
- environments: undefined,
3099
- nextToken: undefined,
3100
- };
2740
+ });
3101
2741
  _a = __expectNonNull;
3102
2742
  _b = __expectObject;
3103
2743
  return [4, parseBody(output.body, context)];
3104
2744
  case 1:
3105
2745
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3106
- if (data.environments !== undefined && data.environments !== null) {
2746
+ if (data.environments != null) {
3107
2747
  contents.environments = deserializeAws_restJson1EnvironmentSummaryList(data.environments, context);
3108
2748
  }
3109
- if (data.nextToken !== undefined && data.nextToken !== null) {
2749
+ if (data.nextToken != null) {
3110
2750
  contents.nextToken = __expectString(data.nextToken);
3111
2751
  }
3112
- return [2, Promise.resolve(contents)];
2752
+ return [2, contents];
3113
2753
  }
3114
2754
  });
3115
2755
  }); };
3116
2756
  var deserializeAws_restJson1ListEnvironmentsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3117
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2757
+ var parsedOutput, _a, errorCode, _b, parsedBody;
3118
2758
  var _c;
3119
2759
  return __generator(this, function (_d) {
3120
2760
  switch (_d.label) {
@@ -3147,14 +2787,14 @@ var deserializeAws_restJson1ListEnvironmentsCommandError = function (output, con
3147
2787
  case 9: throw _d.sent();
3148
2788
  case 10:
3149
2789
  parsedBody = parsedOutput.body;
3150
- $metadata = deserializeMetadata(output);
3151
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3152
- response = new __BaseException({
3153
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3154
- $fault: "client",
3155
- $metadata: $metadata,
2790
+ throwDefaultError({
2791
+ output: output,
2792
+ parsedBody: parsedBody,
2793
+ exceptionCtor: __BaseException,
2794
+ errorCode: errorCode,
3156
2795
  });
3157
- throw __decorateServiceException(response, parsedBody);
2796
+ _d.label = 11;
2797
+ case 11: return [2];
3158
2798
  }
3159
2799
  });
3160
2800
  }); };
@@ -3166,24 +2806,23 @@ export var deserializeAws_restJson1ListTagsForResourceCommand = function (output
3166
2806
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3167
2807
  return [2, deserializeAws_restJson1ListTagsForResourceCommandError(output, context)];
3168
2808
  }
3169
- contents = {
2809
+ contents = map({
3170
2810
  $metadata: deserializeMetadata(output),
3171
- tags: undefined,
3172
- };
2811
+ });
3173
2812
  _a = __expectNonNull;
3174
2813
  _b = __expectObject;
3175
2814
  return [4, parseBody(output.body, context)];
3176
2815
  case 1:
3177
2816
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3178
- if (data.tags !== undefined && data.tags !== null) {
2817
+ if (data.tags != null) {
3179
2818
  contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
3180
2819
  }
3181
- return [2, Promise.resolve(contents)];
2820
+ return [2, contents];
3182
2821
  }
3183
2822
  });
3184
2823
  }); };
3185
2824
  var deserializeAws_restJson1ListTagsForResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3186
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2825
+ var parsedOutput, _a, errorCode, _b, parsedBody;
3187
2826
  var _c;
3188
2827
  return __generator(this, function (_d) {
3189
2828
  switch (_d.label) {
@@ -3220,14 +2859,14 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
3220
2859
  case 11: throw _d.sent();
3221
2860
  case 12:
3222
2861
  parsedBody = parsedOutput.body;
3223
- $metadata = deserializeMetadata(output);
3224
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3225
- response = new __BaseException({
3226
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3227
- $fault: "client",
3228
- $metadata: $metadata,
2862
+ throwDefaultError({
2863
+ output: output,
2864
+ parsedBody: parsedBody,
2865
+ exceptionCtor: __BaseException,
2866
+ errorCode: errorCode,
3229
2867
  });
3230
- throw __decorateServiceException(response, parsedBody);
2868
+ _d.label = 13;
2869
+ case 13: return [2];
3231
2870
  }
3232
2871
  });
3233
2872
  }); };
@@ -3239,18 +2878,18 @@ export var deserializeAws_restJson1StartApplicationCommand = function (output, c
3239
2878
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3240
2879
  return [2, deserializeAws_restJson1StartApplicationCommandError(output, context)];
3241
2880
  }
3242
- contents = {
2881
+ contents = map({
3243
2882
  $metadata: deserializeMetadata(output),
3244
- };
2883
+ });
3245
2884
  return [4, collectBody(output.body, context)];
3246
2885
  case 1:
3247
2886
  _a.sent();
3248
- return [2, Promise.resolve(contents)];
2887
+ return [2, contents];
3249
2888
  }
3250
2889
  });
3251
2890
  }); };
3252
2891
  var deserializeAws_restJson1StartApplicationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3253
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2892
+ var parsedOutput, _a, errorCode, _b, parsedBody;
3254
2893
  var _c;
3255
2894
  return __generator(this, function (_d) {
3256
2895
  switch (_d.label) {
@@ -3291,14 +2930,14 @@ var deserializeAws_restJson1StartApplicationCommandError = function (output, con
3291
2930
  case 13: throw _d.sent();
3292
2931
  case 14:
3293
2932
  parsedBody = parsedOutput.body;
3294
- $metadata = deserializeMetadata(output);
3295
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3296
- response = new __BaseException({
3297
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3298
- $fault: "client",
3299
- $metadata: $metadata,
2933
+ throwDefaultError({
2934
+ output: output,
2935
+ parsedBody: parsedBody,
2936
+ exceptionCtor: __BaseException,
2937
+ errorCode: errorCode,
3300
2938
  });
3301
- throw __decorateServiceException(response, parsedBody);
2939
+ _d.label = 15;
2940
+ case 15: return [2];
3302
2941
  }
3303
2942
  });
3304
2943
  }); };
@@ -3310,24 +2949,23 @@ export var deserializeAws_restJson1StartBatchJobCommand = function (output, cont
3310
2949
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3311
2950
  return [2, deserializeAws_restJson1StartBatchJobCommandError(output, context)];
3312
2951
  }
3313
- contents = {
2952
+ contents = map({
3314
2953
  $metadata: deserializeMetadata(output),
3315
- executionId: undefined,
3316
- };
2954
+ });
3317
2955
  _a = __expectNonNull;
3318
2956
  _b = __expectObject;
3319
2957
  return [4, parseBody(output.body, context)];
3320
2958
  case 1:
3321
2959
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3322
- if (data.executionId !== undefined && data.executionId !== null) {
2960
+ if (data.executionId != null) {
3323
2961
  contents.executionId = __expectString(data.executionId);
3324
2962
  }
3325
- return [2, Promise.resolve(contents)];
2963
+ return [2, contents];
3326
2964
  }
3327
2965
  });
3328
2966
  }); };
3329
2967
  var deserializeAws_restJson1StartBatchJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3330
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2968
+ var parsedOutput, _a, errorCode, _b, parsedBody;
3331
2969
  var _c;
3332
2970
  return __generator(this, function (_d) {
3333
2971
  switch (_d.label) {
@@ -3368,14 +3006,14 @@ var deserializeAws_restJson1StartBatchJobCommandError = function (output, contex
3368
3006
  case 13: throw _d.sent();
3369
3007
  case 14:
3370
3008
  parsedBody = parsedOutput.body;
3371
- $metadata = deserializeMetadata(output);
3372
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3373
- response = new __BaseException({
3374
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3375
- $fault: "client",
3376
- $metadata: $metadata,
3009
+ throwDefaultError({
3010
+ output: output,
3011
+ parsedBody: parsedBody,
3012
+ exceptionCtor: __BaseException,
3013
+ errorCode: errorCode,
3377
3014
  });
3378
- throw __decorateServiceException(response, parsedBody);
3015
+ _d.label = 15;
3016
+ case 15: return [2];
3379
3017
  }
3380
3018
  });
3381
3019
  }); };
@@ -3387,18 +3025,18 @@ export var deserializeAws_restJson1StopApplicationCommand = function (output, co
3387
3025
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3388
3026
  return [2, deserializeAws_restJson1StopApplicationCommandError(output, context)];
3389
3027
  }
3390
- contents = {
3028
+ contents = map({
3391
3029
  $metadata: deserializeMetadata(output),
3392
- };
3030
+ });
3393
3031
  return [4, collectBody(output.body, context)];
3394
3032
  case 1:
3395
3033
  _a.sent();
3396
- return [2, Promise.resolve(contents)];
3034
+ return [2, contents];
3397
3035
  }
3398
3036
  });
3399
3037
  }); };
3400
3038
  var deserializeAws_restJson1StopApplicationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3401
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3039
+ var parsedOutput, _a, errorCode, _b, parsedBody;
3402
3040
  var _c;
3403
3041
  return __generator(this, function (_d) {
3404
3042
  switch (_d.label) {
@@ -3439,14 +3077,14 @@ var deserializeAws_restJson1StopApplicationCommandError = function (output, cont
3439
3077
  case 13: throw _d.sent();
3440
3078
  case 14:
3441
3079
  parsedBody = parsedOutput.body;
3442
- $metadata = deserializeMetadata(output);
3443
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3444
- response = new __BaseException({
3445
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3446
- $fault: "client",
3447
- $metadata: $metadata,
3080
+ throwDefaultError({
3081
+ output: output,
3082
+ parsedBody: parsedBody,
3083
+ exceptionCtor: __BaseException,
3084
+ errorCode: errorCode,
3448
3085
  });
3449
- throw __decorateServiceException(response, parsedBody);
3086
+ _d.label = 15;
3087
+ case 15: return [2];
3450
3088
  }
3451
3089
  });
3452
3090
  }); };
@@ -3458,18 +3096,18 @@ export var deserializeAws_restJson1TagResourceCommand = function (output, contex
3458
3096
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3459
3097
  return [2, deserializeAws_restJson1TagResourceCommandError(output, context)];
3460
3098
  }
3461
- contents = {
3099
+ contents = map({
3462
3100
  $metadata: deserializeMetadata(output),
3463
- };
3101
+ });
3464
3102
  return [4, collectBody(output.body, context)];
3465
3103
  case 1:
3466
3104
  _a.sent();
3467
- return [2, Promise.resolve(contents)];
3105
+ return [2, contents];
3468
3106
  }
3469
3107
  });
3470
3108
  }); };
3471
3109
  var deserializeAws_restJson1TagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3472
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3110
+ var parsedOutput, _a, errorCode, _b, parsedBody;
3473
3111
  var _c;
3474
3112
  return __generator(this, function (_d) {
3475
3113
  switch (_d.label) {
@@ -3510,14 +3148,14 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
3510
3148
  case 13: throw _d.sent();
3511
3149
  case 14:
3512
3150
  parsedBody = parsedOutput.body;
3513
- $metadata = deserializeMetadata(output);
3514
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3515
- response = new __BaseException({
3516
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3517
- $fault: "client",
3518
- $metadata: $metadata,
3151
+ throwDefaultError({
3152
+ output: output,
3153
+ parsedBody: parsedBody,
3154
+ exceptionCtor: __BaseException,
3155
+ errorCode: errorCode,
3519
3156
  });
3520
- throw __decorateServiceException(response, parsedBody);
3157
+ _d.label = 15;
3158
+ case 15: return [2];
3521
3159
  }
3522
3160
  });
3523
3161
  }); };
@@ -3529,18 +3167,18 @@ export var deserializeAws_restJson1UntagResourceCommand = function (output, cont
3529
3167
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3530
3168
  return [2, deserializeAws_restJson1UntagResourceCommandError(output, context)];
3531
3169
  }
3532
- contents = {
3170
+ contents = map({
3533
3171
  $metadata: deserializeMetadata(output),
3534
- };
3172
+ });
3535
3173
  return [4, collectBody(output.body, context)];
3536
3174
  case 1:
3537
3175
  _a.sent();
3538
- return [2, Promise.resolve(contents)];
3176
+ return [2, contents];
3539
3177
  }
3540
3178
  });
3541
3179
  }); };
3542
3180
  var deserializeAws_restJson1UntagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3543
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3181
+ var parsedOutput, _a, errorCode, _b, parsedBody;
3544
3182
  var _c;
3545
3183
  return __generator(this, function (_d) {
3546
3184
  switch (_d.label) {
@@ -3577,14 +3215,14 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
3577
3215
  case 11: throw _d.sent();
3578
3216
  case 12:
3579
3217
  parsedBody = parsedOutput.body;
3580
- $metadata = deserializeMetadata(output);
3581
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3582
- response = new __BaseException({
3583
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3584
- $fault: "client",
3585
- $metadata: $metadata,
3218
+ throwDefaultError({
3219
+ output: output,
3220
+ parsedBody: parsedBody,
3221
+ exceptionCtor: __BaseException,
3222
+ errorCode: errorCode,
3586
3223
  });
3587
- throw __decorateServiceException(response, parsedBody);
3224
+ _d.label = 13;
3225
+ case 13: return [2];
3588
3226
  }
3589
3227
  });
3590
3228
  }); };
@@ -3596,24 +3234,23 @@ export var deserializeAws_restJson1UpdateApplicationCommand = function (output,
3596
3234
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3597
3235
  return [2, deserializeAws_restJson1UpdateApplicationCommandError(output, context)];
3598
3236
  }
3599
- contents = {
3237
+ contents = map({
3600
3238
  $metadata: deserializeMetadata(output),
3601
- applicationVersion: undefined,
3602
- };
3239
+ });
3603
3240
  _a = __expectNonNull;
3604
3241
  _b = __expectObject;
3605
3242
  return [4, parseBody(output.body, context)];
3606
3243
  case 1:
3607
3244
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3608
- if (data.applicationVersion !== undefined && data.applicationVersion !== null) {
3245
+ if (data.applicationVersion != null) {
3609
3246
  contents.applicationVersion = __expectInt32(data.applicationVersion);
3610
3247
  }
3611
- return [2, Promise.resolve(contents)];
3248
+ return [2, contents];
3612
3249
  }
3613
3250
  });
3614
3251
  }); };
3615
3252
  var deserializeAws_restJson1UpdateApplicationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3616
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3253
+ var parsedOutput, _a, errorCode, _b, parsedBody;
3617
3254
  var _c;
3618
3255
  return __generator(this, function (_d) {
3619
3256
  switch (_d.label) {
@@ -3654,14 +3291,14 @@ var deserializeAws_restJson1UpdateApplicationCommandError = function (output, co
3654
3291
  case 13: throw _d.sent();
3655
3292
  case 14:
3656
3293
  parsedBody = parsedOutput.body;
3657
- $metadata = deserializeMetadata(output);
3658
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3659
- response = new __BaseException({
3660
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3661
- $fault: "client",
3662
- $metadata: $metadata,
3294
+ throwDefaultError({
3295
+ output: output,
3296
+ parsedBody: parsedBody,
3297
+ exceptionCtor: __BaseException,
3298
+ errorCode: errorCode,
3663
3299
  });
3664
- throw __decorateServiceException(response, parsedBody);
3300
+ _d.label = 15;
3301
+ case 15: return [2];
3665
3302
  }
3666
3303
  });
3667
3304
  }); };
@@ -3673,24 +3310,23 @@ export var deserializeAws_restJson1UpdateEnvironmentCommand = function (output,
3673
3310
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3674
3311
  return [2, deserializeAws_restJson1UpdateEnvironmentCommandError(output, context)];
3675
3312
  }
3676
- contents = {
3313
+ contents = map({
3677
3314
  $metadata: deserializeMetadata(output),
3678
- environmentId: undefined,
3679
- };
3315
+ });
3680
3316
  _a = __expectNonNull;
3681
3317
  _b = __expectObject;
3682
3318
  return [4, parseBody(output.body, context)];
3683
3319
  case 1:
3684
3320
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3685
- if (data.environmentId !== undefined && data.environmentId !== null) {
3321
+ if (data.environmentId != null) {
3686
3322
  contents.environmentId = __expectString(data.environmentId);
3687
3323
  }
3688
- return [2, Promise.resolve(contents)];
3324
+ return [2, contents];
3689
3325
  }
3690
3326
  });
3691
3327
  }); };
3692
3328
  var deserializeAws_restJson1UpdateEnvironmentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3693
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3329
+ var parsedOutput, _a, errorCode, _b, parsedBody;
3694
3330
  var _c;
3695
3331
  return __generator(this, function (_d) {
3696
3332
  switch (_d.label) {
@@ -3735,23 +3371,24 @@ var deserializeAws_restJson1UpdateEnvironmentCommandError = function (output, co
3735
3371
  case 15: throw _d.sent();
3736
3372
  case 16:
3737
3373
  parsedBody = parsedOutput.body;
3738
- $metadata = deserializeMetadata(output);
3739
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3740
- response = new __BaseException({
3741
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3742
- $fault: "client",
3743
- $metadata: $metadata,
3374
+ throwDefaultError({
3375
+ output: output,
3376
+ parsedBody: parsedBody,
3377
+ exceptionCtor: __BaseException,
3378
+ errorCode: errorCode,
3744
3379
  });
3745
- throw __decorateServiceException(response, parsedBody);
3380
+ _d.label = 17;
3381
+ case 17: return [2];
3746
3382
  }
3747
3383
  });
3748
3384
  }); };
3385
+ var map = __map;
3749
3386
  var deserializeAws_restJson1AccessDeniedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
3750
3387
  var contents, data, exception;
3751
3388
  return __generator(this, function (_a) {
3752
- contents = {};
3389
+ contents = map({});
3753
3390
  data = parsedOutput.body;
3754
- if (data.message !== undefined && data.message !== null) {
3391
+ if (data.message != null) {
3755
3392
  contents.message = __expectString(data.message);
3756
3393
  }
3757
3394
  exception = new AccessDeniedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -3761,15 +3398,15 @@ var deserializeAws_restJson1AccessDeniedExceptionResponse = function (parsedOutp
3761
3398
  var deserializeAws_restJson1ConflictExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
3762
3399
  var contents, data, exception;
3763
3400
  return __generator(this, function (_a) {
3764
- contents = {};
3401
+ contents = map({});
3765
3402
  data = parsedOutput.body;
3766
- if (data.message !== undefined && data.message !== null) {
3403
+ if (data.message != null) {
3767
3404
  contents.message = __expectString(data.message);
3768
3405
  }
3769
- if (data.resourceId !== undefined && data.resourceId !== null) {
3406
+ if (data.resourceId != null) {
3770
3407
  contents.resourceId = __expectString(data.resourceId);
3771
3408
  }
3772
- if (data.resourceType !== undefined && data.resourceType !== null) {
3409
+ if (data.resourceType != null) {
3773
3410
  contents.resourceType = __expectString(data.resourceType);
3774
3411
  }
3775
3412
  exception = new ConflictException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -3779,12 +3416,14 @@ var deserializeAws_restJson1ConflictExceptionResponse = function (parsedOutput,
3779
3416
  var deserializeAws_restJson1InternalServerExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
3780
3417
  var contents, data, exception;
3781
3418
  return __generator(this, function (_a) {
3782
- contents = {};
3783
- if (parsedOutput.headers["retry-after"] !== undefined) {
3784
- contents.retryAfterSeconds = __strictParseInt32(parsedOutput.headers["retry-after"]);
3785
- }
3419
+ contents = map({
3420
+ retryAfterSeconds: [
3421
+ function () { return void 0 !== parsedOutput.headers["retry-after"]; },
3422
+ function () { return __strictParseInt32(parsedOutput.headers["retry-after"]); },
3423
+ ],
3424
+ });
3786
3425
  data = parsedOutput.body;
3787
- if (data.message !== undefined && data.message !== null) {
3426
+ if (data.message != null) {
3788
3427
  contents.message = __expectString(data.message);
3789
3428
  }
3790
3429
  exception = new InternalServerException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -3794,15 +3433,15 @@ var deserializeAws_restJson1InternalServerExceptionResponse = function (parsedOu
3794
3433
  var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
3795
3434
  var contents, data, exception;
3796
3435
  return __generator(this, function (_a) {
3797
- contents = {};
3436
+ contents = map({});
3798
3437
  data = parsedOutput.body;
3799
- if (data.message !== undefined && data.message !== null) {
3438
+ if (data.message != null) {
3800
3439
  contents.message = __expectString(data.message);
3801
3440
  }
3802
- if (data.resourceId !== undefined && data.resourceId !== null) {
3441
+ if (data.resourceId != null) {
3803
3442
  contents.resourceId = __expectString(data.resourceId);
3804
3443
  }
3805
- if (data.resourceType !== undefined && data.resourceType !== null) {
3444
+ if (data.resourceType != null) {
3806
3445
  contents.resourceType = __expectString(data.resourceType);
3807
3446
  }
3808
3447
  exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -3812,21 +3451,21 @@ var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsed
3812
3451
  var deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
3813
3452
  var contents, data, exception;
3814
3453
  return __generator(this, function (_a) {
3815
- contents = {};
3454
+ contents = map({});
3816
3455
  data = parsedOutput.body;
3817
- if (data.message !== undefined && data.message !== null) {
3456
+ if (data.message != null) {
3818
3457
  contents.message = __expectString(data.message);
3819
3458
  }
3820
- if (data.quotaCode !== undefined && data.quotaCode !== null) {
3459
+ if (data.quotaCode != null) {
3821
3460
  contents.quotaCode = __expectString(data.quotaCode);
3822
3461
  }
3823
- if (data.resourceId !== undefined && data.resourceId !== null) {
3462
+ if (data.resourceId != null) {
3824
3463
  contents.resourceId = __expectString(data.resourceId);
3825
3464
  }
3826
- if (data.resourceType !== undefined && data.resourceType !== null) {
3465
+ if (data.resourceType != null) {
3827
3466
  contents.resourceType = __expectString(data.resourceType);
3828
3467
  }
3829
- if (data.serviceCode !== undefined && data.serviceCode !== null) {
3468
+ if (data.serviceCode != null) {
3830
3469
  contents.serviceCode = __expectString(data.serviceCode);
3831
3470
  }
3832
3471
  exception = new ServiceQuotaExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -3836,18 +3475,20 @@ var deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = function (pa
3836
3475
  var deserializeAws_restJson1ThrottlingExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
3837
3476
  var contents, data, exception;
3838
3477
  return __generator(this, function (_a) {
3839
- contents = {};
3840
- if (parsedOutput.headers["retry-after"] !== undefined) {
3841
- contents.retryAfterSeconds = __strictParseInt32(parsedOutput.headers["retry-after"]);
3842
- }
3478
+ contents = map({
3479
+ retryAfterSeconds: [
3480
+ function () { return void 0 !== parsedOutput.headers["retry-after"]; },
3481
+ function () { return __strictParseInt32(parsedOutput.headers["retry-after"]); },
3482
+ ],
3483
+ });
3843
3484
  data = parsedOutput.body;
3844
- if (data.message !== undefined && data.message !== null) {
3485
+ if (data.message != null) {
3845
3486
  contents.message = __expectString(data.message);
3846
3487
  }
3847
- if (data.quotaCode !== undefined && data.quotaCode !== null) {
3488
+ if (data.quotaCode != null) {
3848
3489
  contents.quotaCode = __expectString(data.quotaCode);
3849
3490
  }
3850
- if (data.serviceCode !== undefined && data.serviceCode !== null) {
3491
+ if (data.serviceCode != null) {
3851
3492
  contents.serviceCode = __expectString(data.serviceCode);
3852
3493
  }
3853
3494
  exception = new ThrottlingException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -3857,15 +3498,15 @@ var deserializeAws_restJson1ThrottlingExceptionResponse = function (parsedOutput
3857
3498
  var deserializeAws_restJson1ValidationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
3858
3499
  var contents, data, exception;
3859
3500
  return __generator(this, function (_a) {
3860
- contents = {};
3501
+ contents = map({});
3861
3502
  data = parsedOutput.body;
3862
- if (data.fieldList !== undefined && data.fieldList !== null) {
3503
+ if (data.fieldList != null) {
3863
3504
  contents.fieldList = deserializeAws_restJson1ValidationExceptionFieldList(data.fieldList, context);
3864
3505
  }
3865
- if (data.message !== undefined && data.message !== null) {
3506
+ if (data.message != null) {
3866
3507
  contents.message = __expectString(data.message);
3867
3508
  }
3868
- if (data.reason !== undefined && data.reason !== null) {
3509
+ if (data.reason != null) {
3869
3510
  contents.reason = __expectString(data.reason);
3870
3511
  }
3871
3512
  exception = new ValidationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -3879,9 +3520,6 @@ var serializeAws_restJson1AlternateKeyList = function (input, context) {
3879
3520
  return input
3880
3521
  .filter(function (e) { return e != null; })
3881
3522
  .map(function (entry) {
3882
- if (entry === null) {
3883
- return null;
3884
- }
3885
3523
  return serializeAws_restJson1AlternateKey(entry, context);
3886
3524
  });
3887
3525
  };
@@ -3929,9 +3567,6 @@ var serializeAws_restJson1DataSetImportList = function (input, context) {
3929
3567
  return input
3930
3568
  .filter(function (e) { return e != null; })
3931
3569
  .map(function (entry) {
3932
- if (entry === null) {
3933
- return null;
3934
- }
3935
3570
  return serializeAws_restJson1DataSetImportItem(entry, context);
3936
3571
  });
3937
3572
  };
@@ -3990,9 +3625,6 @@ var serializeAws_restJson1StorageConfigurationList = function (input, context) {
3990
3625
  return input
3991
3626
  .filter(function (e) { return e != null; })
3992
3627
  .map(function (entry) {
3993
- if (entry === null) {
3994
- return null;
3995
- }
3996
3628
  return serializeAws_restJson1StorageConfiguration(entry, context);
3997
3629
  });
3998
3630
  };
@@ -4000,9 +3632,6 @@ var serializeAws_restJson1String50List = function (input, context) {
4000
3632
  return input
4001
3633
  .filter(function (e) { return e != null; })
4002
3634
  .map(function (entry) {
4003
- if (entry === null) {
4004
- return null;
4005
- }
4006
3635
  return entry;
4007
3636
  });
4008
3637
  };
@@ -4104,12 +3733,12 @@ var deserializeAws_restJson1ArnList = function (output, context) {
4104
3733
  return retVal;
4105
3734
  };
4106
3735
  var deserializeAws_restJson1BatchJobDefinition = function (output, context) {
4107
- if (output.fileBatchJobDefinition !== undefined && output.fileBatchJobDefinition !== null) {
3736
+ if (output.fileBatchJobDefinition != null) {
4108
3737
  return {
4109
3738
  fileBatchJobDefinition: deserializeAws_restJson1FileBatchJobDefinition(output.fileBatchJobDefinition, context),
4110
3739
  };
4111
3740
  }
4112
- if (output.scriptBatchJobDefinition !== undefined && output.scriptBatchJobDefinition !== null) {
3741
+ if (output.scriptBatchJobDefinition != null) {
4113
3742
  return {
4114
3743
  scriptBatchJobDefinition: deserializeAws_restJson1ScriptBatchJobDefinition(output.scriptBatchJobDefinition, context),
4115
3744
  };
@@ -4151,12 +3780,12 @@ var deserializeAws_restJson1BatchJobExecutionSummaryList = function (output, con
4151
3780
  return retVal;
4152
3781
  };
4153
3782
  var deserializeAws_restJson1DatasetDetailOrgAttributes = function (output, context) {
4154
- if (output.gdg !== undefined && output.gdg !== null) {
3783
+ if (output.gdg != null) {
4155
3784
  return {
4156
3785
  gdg: deserializeAws_restJson1GdgDetailAttributes(output.gdg, context),
4157
3786
  };
4158
3787
  }
4159
- if (output.vsam !== undefined && output.vsam !== null) {
3788
+ if (output.vsam != null) {
4160
3789
  return {
4161
3790
  vsam: deserializeAws_restJson1VsamDetailAttributes(output.vsam, context),
4162
3791
  };
@@ -4372,12 +4001,12 @@ var deserializeAws_restJson1ScriptBatchJobDefinition = function (output, context
4372
4001
  };
4373
4002
  };
4374
4003
  var deserializeAws_restJson1StorageConfiguration = function (output, context) {
4375
- if (output.efs !== undefined && output.efs !== null) {
4004
+ if (output.efs != null) {
4376
4005
  return {
4377
4006
  efs: deserializeAws_restJson1EfsStorageConfiguration(output.efs, context),
4378
4007
  };
4379
4008
  }
4380
- if (output.fsx !== undefined && output.fsx !== null) {
4009
+ if (output.fsx != null) {
4381
4010
  return {
4382
4011
  fsx: deserializeAws_restJson1FsxStorageConfiguration(output.fsx, context),
4383
4012
  };