@aws-sdk/client-emr-containers 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, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, expectUnion as __expectUnion, extendedEncodeURIComponent as __extendedEncodeURIComponent, parseRfc3339DateTime as __parseRfc3339DateTime, } from "@aws-sdk/smithy-client";
3
+ import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, expectUnion as __expectUnion, map as __map, parseRfc3339DateTime as __parseRfc3339DateTime, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
4
4
  import { v4 as generateIdempotencyToken } from "uuid";
5
5
  import { EMRContainersServiceException as __BaseException } from "../models/EMRContainersServiceException";
6
6
  import { ContainerInfo, InternalServerException, ResourceNotFoundException, ValidationException, } from "../models/models_0";
7
7
  export var serializeAws_restJson1CancelJobRunCommand = 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_restJson1CancelJobRunCommand = function (input, context)
14
14
  headers = {};
15
15
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
16
16
  "/virtualclusters/{virtualClusterId}/jobruns/{id}";
17
- if (input.id !== undefined) {
18
- labelValue = input.id;
19
- if (labelValue.length <= 0) {
20
- throw new Error("Empty value provided for input HTTP label: id.");
21
- }
22
- resolvedPath = resolvedPath.replace("{id}", __extendedEncodeURIComponent(labelValue));
23
- }
24
- else {
25
- throw new Error("No value provided for input HTTP label: id.");
26
- }
27
- if (input.virtualClusterId !== undefined) {
28
- labelValue = input.virtualClusterId;
29
- if (labelValue.length <= 0) {
30
- throw new Error("Empty value provided for input HTTP label: virtualClusterId.");
31
- }
32
- resolvedPath = resolvedPath.replace("{virtualClusterId}", __extendedEncodeURIComponent(labelValue));
33
- }
34
- else {
35
- throw new Error("No value provided for input HTTP label: virtualClusterId.");
36
- }
17
+ resolvedPath = __resolvedPath(resolvedPath, input, "id", function () { return input.id; }, "{id}", false);
18
+ resolvedPath = __resolvedPath(resolvedPath, input, "virtualClusterId", function () { return input.virtualClusterId; }, "{virtualClusterId}", false);
37
19
  return [2, new __HttpRequest({
38
20
  protocol: protocol,
39
21
  hostname: hostname,
@@ -47,7 +29,7 @@ export var serializeAws_restJson1CancelJobRunCommand = function (input, context)
47
29
  });
48
30
  }); };
49
31
  export var serializeAws_restJson1CreateManagedEndpointCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
50
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
32
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
51
33
  var _c;
52
34
  return __generator(this, function (_d) {
53
35
  switch (_d.label) {
@@ -59,16 +41,7 @@ export var serializeAws_restJson1CreateManagedEndpointCommand = function (input,
59
41
  };
60
42
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
61
43
  "/virtualclusters/{virtualClusterId}/endpoints";
62
- if (input.virtualClusterId !== undefined) {
63
- labelValue = input.virtualClusterId;
64
- if (labelValue.length <= 0) {
65
- throw new Error("Empty value provided for input HTTP label: virtualClusterId.");
66
- }
67
- resolvedPath = resolvedPath.replace("{virtualClusterId}", __extendedEncodeURIComponent(labelValue));
68
- }
69
- else {
70
- throw new Error("No value provided for input HTTP label: virtualClusterId.");
71
- }
44
+ resolvedPath = __resolvedPath(resolvedPath, input, "virtualClusterId", function () { return input.virtualClusterId; }, "{virtualClusterId}", false);
72
45
  body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.certificateArn != null && { certificateArn: input.certificateArn })), { clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }), (input.configurationOverrides != null && {
73
46
  configurationOverrides: serializeAws_restJson1ConfigurationOverrides(input.configurationOverrides, context),
74
47
  })), (input.executionRoleArn != null && { executionRoleArn: input.executionRoleArn })), (input.name != null && { name: input.name })), (input.releaseLabel != null && { releaseLabel: input.releaseLabel })), (input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) })), (input.type != null && { type: input.type })));
@@ -112,7 +85,7 @@ export var serializeAws_restJson1CreateVirtualClusterCommand = function (input,
112
85
  });
113
86
  }); };
114
87
  export var serializeAws_restJson1DeleteManagedEndpointCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
115
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
88
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
116
89
  return __generator(this, function (_c) {
117
90
  switch (_c.label) {
118
91
  case 0: return [4, context.endpoint()];
@@ -121,26 +94,8 @@ export var serializeAws_restJson1DeleteManagedEndpointCommand = function (input,
121
94
  headers = {};
122
95
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
123
96
  "/virtualclusters/{virtualClusterId}/endpoints/{id}";
124
- if (input.id !== undefined) {
125
- labelValue = input.id;
126
- if (labelValue.length <= 0) {
127
- throw new Error("Empty value provided for input HTTP label: id.");
128
- }
129
- resolvedPath = resolvedPath.replace("{id}", __extendedEncodeURIComponent(labelValue));
130
- }
131
- else {
132
- throw new Error("No value provided for input HTTP label: id.");
133
- }
134
- if (input.virtualClusterId !== undefined) {
135
- labelValue = input.virtualClusterId;
136
- if (labelValue.length <= 0) {
137
- throw new Error("Empty value provided for input HTTP label: virtualClusterId.");
138
- }
139
- resolvedPath = resolvedPath.replace("{virtualClusterId}", __extendedEncodeURIComponent(labelValue));
140
- }
141
- else {
142
- throw new Error("No value provided for input HTTP label: virtualClusterId.");
143
- }
97
+ resolvedPath = __resolvedPath(resolvedPath, input, "id", function () { return input.id; }, "{id}", false);
98
+ resolvedPath = __resolvedPath(resolvedPath, input, "virtualClusterId", function () { return input.virtualClusterId; }, "{virtualClusterId}", false);
144
99
  return [2, new __HttpRequest({
145
100
  protocol: protocol,
146
101
  hostname: hostname,
@@ -154,7 +109,7 @@ export var serializeAws_restJson1DeleteManagedEndpointCommand = function (input,
154
109
  });
155
110
  }); };
156
111
  export var serializeAws_restJson1DeleteVirtualClusterCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
157
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
112
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
158
113
  return __generator(this, function (_c) {
159
114
  switch (_c.label) {
160
115
  case 0: return [4, context.endpoint()];
@@ -162,16 +117,7 @@ export var serializeAws_restJson1DeleteVirtualClusterCommand = function (input,
162
117
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
163
118
  headers = {};
164
119
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/virtualclusters/{id}";
165
- if (input.id !== undefined) {
166
- labelValue = input.id;
167
- if (labelValue.length <= 0) {
168
- throw new Error("Empty value provided for input HTTP label: id.");
169
- }
170
- resolvedPath = resolvedPath.replace("{id}", __extendedEncodeURIComponent(labelValue));
171
- }
172
- else {
173
- throw new Error("No value provided for input HTTP label: id.");
174
- }
120
+ resolvedPath = __resolvedPath(resolvedPath, input, "id", function () { return input.id; }, "{id}", false);
175
121
  return [2, new __HttpRequest({
176
122
  protocol: protocol,
177
123
  hostname: hostname,
@@ -185,7 +131,7 @@ export var serializeAws_restJson1DeleteVirtualClusterCommand = function (input,
185
131
  });
186
132
  }); };
187
133
  export var serializeAws_restJson1DescribeJobRunCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
188
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
134
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
189
135
  return __generator(this, function (_c) {
190
136
  switch (_c.label) {
191
137
  case 0: return [4, context.endpoint()];
@@ -194,26 +140,8 @@ export var serializeAws_restJson1DescribeJobRunCommand = function (input, contex
194
140
  headers = {};
195
141
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
196
142
  "/virtualclusters/{virtualClusterId}/jobruns/{id}";
197
- if (input.id !== undefined) {
198
- labelValue = input.id;
199
- if (labelValue.length <= 0) {
200
- throw new Error("Empty value provided for input HTTP label: id.");
201
- }
202
- resolvedPath = resolvedPath.replace("{id}", __extendedEncodeURIComponent(labelValue));
203
- }
204
- else {
205
- throw new Error("No value provided for input HTTP label: id.");
206
- }
207
- if (input.virtualClusterId !== undefined) {
208
- labelValue = input.virtualClusterId;
209
- if (labelValue.length <= 0) {
210
- throw new Error("Empty value provided for input HTTP label: virtualClusterId.");
211
- }
212
- resolvedPath = resolvedPath.replace("{virtualClusterId}", __extendedEncodeURIComponent(labelValue));
213
- }
214
- else {
215
- throw new Error("No value provided for input HTTP label: virtualClusterId.");
216
- }
143
+ resolvedPath = __resolvedPath(resolvedPath, input, "id", function () { return input.id; }, "{id}", false);
144
+ resolvedPath = __resolvedPath(resolvedPath, input, "virtualClusterId", function () { return input.virtualClusterId; }, "{virtualClusterId}", false);
217
145
  return [2, new __HttpRequest({
218
146
  protocol: protocol,
219
147
  hostname: hostname,
@@ -227,7 +155,7 @@ export var serializeAws_restJson1DescribeJobRunCommand = function (input, contex
227
155
  });
228
156
  }); };
229
157
  export var serializeAws_restJson1DescribeManagedEndpointCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
230
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
158
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
231
159
  return __generator(this, function (_c) {
232
160
  switch (_c.label) {
233
161
  case 0: return [4, context.endpoint()];
@@ -236,26 +164,8 @@ export var serializeAws_restJson1DescribeManagedEndpointCommand = function (inpu
236
164
  headers = {};
237
165
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
238
166
  "/virtualclusters/{virtualClusterId}/endpoints/{id}";
239
- if (input.id !== undefined) {
240
- labelValue = input.id;
241
- if (labelValue.length <= 0) {
242
- throw new Error("Empty value provided for input HTTP label: id.");
243
- }
244
- resolvedPath = resolvedPath.replace("{id}", __extendedEncodeURIComponent(labelValue));
245
- }
246
- else {
247
- throw new Error("No value provided for input HTTP label: id.");
248
- }
249
- if (input.virtualClusterId !== undefined) {
250
- labelValue = input.virtualClusterId;
251
- if (labelValue.length <= 0) {
252
- throw new Error("Empty value provided for input HTTP label: virtualClusterId.");
253
- }
254
- resolvedPath = resolvedPath.replace("{virtualClusterId}", __extendedEncodeURIComponent(labelValue));
255
- }
256
- else {
257
- throw new Error("No value provided for input HTTP label: virtualClusterId.");
258
- }
167
+ resolvedPath = __resolvedPath(resolvedPath, input, "id", function () { return input.id; }, "{id}", false);
168
+ resolvedPath = __resolvedPath(resolvedPath, input, "virtualClusterId", function () { return input.virtualClusterId; }, "{virtualClusterId}", false);
259
169
  return [2, new __HttpRequest({
260
170
  protocol: protocol,
261
171
  hostname: hostname,
@@ -269,7 +179,7 @@ export var serializeAws_restJson1DescribeManagedEndpointCommand = function (inpu
269
179
  });
270
180
  }); };
271
181
  export var serializeAws_restJson1DescribeVirtualClusterCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
272
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
182
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
273
183
  return __generator(this, function (_c) {
274
184
  switch (_c.label) {
275
185
  case 0: return [4, context.endpoint()];
@@ -277,16 +187,7 @@ export var serializeAws_restJson1DescribeVirtualClusterCommand = function (input
277
187
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
278
188
  headers = {};
279
189
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/virtualclusters/{id}";
280
- if (input.id !== undefined) {
281
- labelValue = input.id;
282
- if (labelValue.length <= 0) {
283
- throw new Error("Empty value provided for input HTTP label: id.");
284
- }
285
- resolvedPath = resolvedPath.replace("{id}", __extendedEncodeURIComponent(labelValue));
286
- }
287
- else {
288
- throw new Error("No value provided for input HTTP label: id.");
289
- }
190
+ resolvedPath = __resolvedPath(resolvedPath, input, "id", function () { return input.id; }, "{id}", false);
290
191
  return [2, new __HttpRequest({
291
192
  protocol: protocol,
292
193
  hostname: hostname,
@@ -300,7 +201,7 @@ export var serializeAws_restJson1DescribeVirtualClusterCommand = function (input
300
201
  });
301
202
  }); };
302
203
  export var serializeAws_restJson1ListJobRunsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
303
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
204
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
304
205
  return __generator(this, function (_c) {
305
206
  switch (_c.label) {
306
207
  case 0: return [4, context.endpoint()];
@@ -309,21 +210,21 @@ export var serializeAws_restJson1ListJobRunsCommand = function (input, context)
309
210
  headers = {};
310
211
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
311
212
  "/virtualclusters/{virtualClusterId}/jobruns";
312
- if (input.virtualClusterId !== undefined) {
313
- labelValue = input.virtualClusterId;
314
- if (labelValue.length <= 0) {
315
- throw new Error("Empty value provided for input HTTP label: virtualClusterId.");
316
- }
317
- resolvedPath = resolvedPath.replace("{virtualClusterId}", __extendedEncodeURIComponent(labelValue));
318
- }
319
- else {
320
- throw new Error("No value provided for input HTTP label: virtualClusterId.");
321
- }
322
- query = __assign(__assign(__assign(__assign(__assign(__assign({}, (input.createdBefore !== undefined && {
323
- createdBefore: (input.createdBefore.toISOString().split(".")[0] + "Z").toString(),
324
- })), (input.createdAfter !== undefined && {
325
- createdAfter: (input.createdAfter.toISOString().split(".")[0] + "Z").toString(),
326
- })), (input.name !== undefined && { name: input.name })), (input.states !== undefined && { states: (input.states || []).map(function (_entry) { return _entry; }) })), (input.maxResults !== undefined && { maxResults: input.maxResults.toString() })), (input.nextToken !== undefined && { nextToken: input.nextToken }));
213
+ resolvedPath = __resolvedPath(resolvedPath, input, "virtualClusterId", function () { return input.virtualClusterId; }, "{virtualClusterId}", false);
214
+ query = map({
215
+ createdBefore: [
216
+ function () { return input.createdBefore !== void 0; },
217
+ function () { return (input.createdBefore.toISOString().split(".")[0] + "Z").toString(); },
218
+ ],
219
+ createdAfter: [
220
+ function () { return input.createdAfter !== void 0; },
221
+ function () { return (input.createdAfter.toISOString().split(".")[0] + "Z").toString(); },
222
+ ],
223
+ name: [, input.name],
224
+ states: [function () { return input.states !== void 0; }, function () { return (input.states || []).map(function (_entry) { return _entry; }); }],
225
+ maxResults: [function () { return input.maxResults !== void 0; }, function () { return input.maxResults.toString(); }],
226
+ nextToken: [, input.nextToken],
227
+ });
327
228
  return [2, new __HttpRequest({
328
229
  protocol: protocol,
329
230
  hostname: hostname,
@@ -338,7 +239,7 @@ export var serializeAws_restJson1ListJobRunsCommand = function (input, context)
338
239
  });
339
240
  }); };
340
241
  export var serializeAws_restJson1ListManagedEndpointsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
341
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
242
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
342
243
  return __generator(this, function (_c) {
343
244
  switch (_c.label) {
344
245
  case 0: return [4, context.endpoint()];
@@ -347,21 +248,21 @@ export var serializeAws_restJson1ListManagedEndpointsCommand = function (input,
347
248
  headers = {};
348
249
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
349
250
  "/virtualclusters/{virtualClusterId}/endpoints";
350
- if (input.virtualClusterId !== undefined) {
351
- labelValue = input.virtualClusterId;
352
- if (labelValue.length <= 0) {
353
- throw new Error("Empty value provided for input HTTP label: virtualClusterId.");
354
- }
355
- resolvedPath = resolvedPath.replace("{virtualClusterId}", __extendedEncodeURIComponent(labelValue));
356
- }
357
- else {
358
- throw new Error("No value provided for input HTTP label: virtualClusterId.");
359
- }
360
- query = __assign(__assign(__assign(__assign(__assign(__assign({}, (input.createdBefore !== undefined && {
361
- createdBefore: (input.createdBefore.toISOString().split(".")[0] + "Z").toString(),
362
- })), (input.createdAfter !== undefined && {
363
- createdAfter: (input.createdAfter.toISOString().split(".")[0] + "Z").toString(),
364
- })), (input.types !== undefined && { types: (input.types || []).map(function (_entry) { return _entry; }) })), (input.states !== undefined && { states: (input.states || []).map(function (_entry) { return _entry; }) })), (input.maxResults !== undefined && { maxResults: input.maxResults.toString() })), (input.nextToken !== undefined && { nextToken: input.nextToken }));
251
+ resolvedPath = __resolvedPath(resolvedPath, input, "virtualClusterId", function () { return input.virtualClusterId; }, "{virtualClusterId}", false);
252
+ query = map({
253
+ createdBefore: [
254
+ function () { return input.createdBefore !== void 0; },
255
+ function () { return (input.createdBefore.toISOString().split(".")[0] + "Z").toString(); },
256
+ ],
257
+ createdAfter: [
258
+ function () { return input.createdAfter !== void 0; },
259
+ function () { return (input.createdAfter.toISOString().split(".")[0] + "Z").toString(); },
260
+ ],
261
+ types: [function () { return input.types !== void 0; }, function () { return (input.types || []).map(function (_entry) { return _entry; }); }],
262
+ states: [function () { return input.states !== void 0; }, function () { return (input.states || []).map(function (_entry) { return _entry; }); }],
263
+ maxResults: [function () { return input.maxResults !== void 0; }, function () { return input.maxResults.toString(); }],
264
+ nextToken: [, input.nextToken],
265
+ });
365
266
  return [2, new __HttpRequest({
366
267
  protocol: protocol,
367
268
  hostname: hostname,
@@ -376,7 +277,7 @@ export var serializeAws_restJson1ListManagedEndpointsCommand = function (input,
376
277
  });
377
278
  }); };
378
279
  export var serializeAws_restJson1ListTagsForResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
379
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
280
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
380
281
  return __generator(this, function (_c) {
381
282
  switch (_c.label) {
382
283
  case 0: return [4, context.endpoint()];
@@ -384,16 +285,7 @@ export var serializeAws_restJson1ListTagsForResourceCommand = function (input, c
384
285
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
385
286
  headers = {};
386
287
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{resourceArn}";
387
- if (input.resourceArn !== undefined) {
388
- labelValue = input.resourceArn;
389
- if (labelValue.length <= 0) {
390
- throw new Error("Empty value provided for input HTTP label: resourceArn.");
391
- }
392
- resolvedPath = resolvedPath.replace("{resourceArn}", __extendedEncodeURIComponent(labelValue));
393
- }
394
- else {
395
- throw new Error("No value provided for input HTTP label: resourceArn.");
396
- }
288
+ resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", function () { return input.resourceArn; }, "{resourceArn}", false);
397
289
  return [2, new __HttpRequest({
398
290
  protocol: protocol,
399
291
  hostname: hostname,
@@ -415,11 +307,21 @@ export var serializeAws_restJson1ListVirtualClustersCommand = function (input, c
415
307
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
416
308
  headers = {};
417
309
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/virtualclusters";
418
- query = __assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.containerProviderId !== undefined && { containerProviderId: input.containerProviderId })), (input.containerProviderType !== undefined && { containerProviderType: input.containerProviderType })), (input.createdAfter !== undefined && {
419
- createdAfter: (input.createdAfter.toISOString().split(".")[0] + "Z").toString(),
420
- })), (input.createdBefore !== undefined && {
421
- createdBefore: (input.createdBefore.toISOString().split(".")[0] + "Z").toString(),
422
- })), (input.states !== undefined && { states: (input.states || []).map(function (_entry) { return _entry; }) })), (input.maxResults !== undefined && { maxResults: input.maxResults.toString() })), (input.nextToken !== undefined && { nextToken: input.nextToken }));
310
+ query = map({
311
+ containerProviderId: [, input.containerProviderId],
312
+ containerProviderType: [, input.containerProviderType],
313
+ createdAfter: [
314
+ function () { return input.createdAfter !== void 0; },
315
+ function () { return (input.createdAfter.toISOString().split(".")[0] + "Z").toString(); },
316
+ ],
317
+ createdBefore: [
318
+ function () { return input.createdBefore !== void 0; },
319
+ function () { return (input.createdBefore.toISOString().split(".")[0] + "Z").toString(); },
320
+ ],
321
+ states: [function () { return input.states !== void 0; }, function () { return (input.states || []).map(function (_entry) { return _entry; }); }],
322
+ maxResults: [function () { return input.maxResults !== void 0; }, function () { return input.maxResults.toString(); }],
323
+ nextToken: [, input.nextToken],
324
+ });
423
325
  return [2, new __HttpRequest({
424
326
  protocol: protocol,
425
327
  hostname: hostname,
@@ -434,7 +336,7 @@ export var serializeAws_restJson1ListVirtualClustersCommand = function (input, c
434
336
  });
435
337
  }); };
436
338
  export var serializeAws_restJson1StartJobRunCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
437
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
339
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
438
340
  var _c;
439
341
  return __generator(this, function (_d) {
440
342
  switch (_d.label) {
@@ -446,16 +348,7 @@ export var serializeAws_restJson1StartJobRunCommand = function (input, context)
446
348
  };
447
349
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
448
350
  "/virtualclusters/{virtualClusterId}/jobruns";
449
- if (input.virtualClusterId !== undefined) {
450
- labelValue = input.virtualClusterId;
451
- if (labelValue.length <= 0) {
452
- throw new Error("Empty value provided for input HTTP label: virtualClusterId.");
453
- }
454
- resolvedPath = resolvedPath.replace("{virtualClusterId}", __extendedEncodeURIComponent(labelValue));
455
- }
456
- else {
457
- throw new Error("No value provided for input HTTP label: virtualClusterId.");
458
- }
351
+ resolvedPath = __resolvedPath(resolvedPath, input, "virtualClusterId", function () { return input.virtualClusterId; }, "{virtualClusterId}", false);
459
352
  body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign({ clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.configurationOverrides != null && {
460
353
  configurationOverrides: serializeAws_restJson1ConfigurationOverrides(input.configurationOverrides, context),
461
354
  })), (input.executionRoleArn != null && { executionRoleArn: input.executionRoleArn })), (input.jobDriver != null && { jobDriver: serializeAws_restJson1JobDriver(input.jobDriver, context) })), (input.name != null && { name: input.name })), (input.releaseLabel != null && { releaseLabel: input.releaseLabel })), (input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) })));
@@ -472,7 +365,7 @@ export var serializeAws_restJson1StartJobRunCommand = function (input, context)
472
365
  });
473
366
  }); };
474
367
  export var serializeAws_restJson1TagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
475
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
368
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
476
369
  return __generator(this, function (_c) {
477
370
  switch (_c.label) {
478
371
  case 0: return [4, context.endpoint()];
@@ -482,16 +375,7 @@ export var serializeAws_restJson1TagResourceCommand = function (input, context)
482
375
  "content-type": "application/json",
483
376
  };
484
377
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{resourceArn}";
485
- if (input.resourceArn !== undefined) {
486
- labelValue = input.resourceArn;
487
- if (labelValue.length <= 0) {
488
- throw new Error("Empty value provided for input HTTP label: resourceArn.");
489
- }
490
- resolvedPath = resolvedPath.replace("{resourceArn}", __extendedEncodeURIComponent(labelValue));
491
- }
492
- else {
493
- throw new Error("No value provided for input HTTP label: resourceArn.");
494
- }
378
+ resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", function () { return input.resourceArn; }, "{resourceArn}", false);
495
379
  body = JSON.stringify(__assign({}, (input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) })));
496
380
  return [2, new __HttpRequest({
497
381
  protocol: protocol,
@@ -506,7 +390,7 @@ export var serializeAws_restJson1TagResourceCommand = function (input, context)
506
390
  });
507
391
  }); };
508
392
  export var serializeAws_restJson1UntagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
509
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
393
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
510
394
  return __generator(this, function (_c) {
511
395
  switch (_c.label) {
512
396
  case 0: return [4, context.endpoint()];
@@ -514,17 +398,10 @@ export var serializeAws_restJson1UntagResourceCommand = function (input, context
514
398
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
515
399
  headers = {};
516
400
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{resourceArn}";
517
- if (input.resourceArn !== undefined) {
518
- labelValue = input.resourceArn;
519
- if (labelValue.length <= 0) {
520
- throw new Error("Empty value provided for input HTTP label: resourceArn.");
521
- }
522
- resolvedPath = resolvedPath.replace("{resourceArn}", __extendedEncodeURIComponent(labelValue));
523
- }
524
- else {
525
- throw new Error("No value provided for input HTTP label: resourceArn.");
526
- }
527
- query = __assign({}, (input.tagKeys !== undefined && { tagKeys: (input.tagKeys || []).map(function (_entry) { return _entry; }) }));
401
+ resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", function () { return input.resourceArn; }, "{resourceArn}", false);
402
+ query = map({
403
+ tagKeys: [function () { return input.tagKeys !== void 0; }, function () { return (input.tagKeys || []).map(function (_entry) { return _entry; }); }],
404
+ });
528
405
  return [2, new __HttpRequest({
529
406
  protocol: protocol,
530
407
  hostname: hostname,
@@ -546,28 +423,26 @@ export var deserializeAws_restJson1CancelJobRunCommand = function (output, conte
546
423
  if (output.statusCode !== 200 && output.statusCode >= 300) {
547
424
  return [2, deserializeAws_restJson1CancelJobRunCommandError(output, context)];
548
425
  }
549
- contents = {
426
+ contents = map({
550
427
  $metadata: deserializeMetadata(output),
551
- id: undefined,
552
- virtualClusterId: undefined,
553
- };
428
+ });
554
429
  _a = __expectNonNull;
555
430
  _b = __expectObject;
556
431
  return [4, parseBody(output.body, context)];
557
432
  case 1:
558
433
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
559
- if (data.id !== undefined && data.id !== null) {
434
+ if (data.id != null) {
560
435
  contents.id = __expectString(data.id);
561
436
  }
562
- if (data.virtualClusterId !== undefined && data.virtualClusterId !== null) {
437
+ if (data.virtualClusterId != null) {
563
438
  contents.virtualClusterId = __expectString(data.virtualClusterId);
564
439
  }
565
- return [2, Promise.resolve(contents)];
440
+ return [2, contents];
566
441
  }
567
442
  });
568
443
  }); };
569
444
  var deserializeAws_restJson1CancelJobRunCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
570
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
445
+ var parsedOutput, _a, errorCode, _b, parsedBody;
571
446
  var _c;
572
447
  return __generator(this, function (_d) {
573
448
  switch (_d.label) {
@@ -592,14 +467,14 @@ var deserializeAws_restJson1CancelJobRunCommandError = function (output, context
592
467
  case 5: throw _d.sent();
593
468
  case 6:
594
469
  parsedBody = parsedOutput.body;
595
- $metadata = deserializeMetadata(output);
596
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
597
- response = new __BaseException({
598
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
599
- $fault: "client",
600
- $metadata: $metadata,
470
+ throwDefaultError({
471
+ output: output,
472
+ parsedBody: parsedBody,
473
+ exceptionCtor: __BaseException,
474
+ errorCode: errorCode,
601
475
  });
602
- throw __decorateServiceException(response, parsedBody);
476
+ _d.label = 7;
477
+ case 7: return [2];
603
478
  }
604
479
  });
605
480
  }); };
@@ -611,36 +486,32 @@ export var deserializeAws_restJson1CreateManagedEndpointCommand = function (outp
611
486
  if (output.statusCode !== 200 && output.statusCode >= 300) {
612
487
  return [2, deserializeAws_restJson1CreateManagedEndpointCommandError(output, context)];
613
488
  }
614
- contents = {
489
+ contents = map({
615
490
  $metadata: deserializeMetadata(output),
616
- arn: undefined,
617
- id: undefined,
618
- name: undefined,
619
- virtualClusterId: undefined,
620
- };
491
+ });
621
492
  _a = __expectNonNull;
622
493
  _b = __expectObject;
623
494
  return [4, parseBody(output.body, context)];
624
495
  case 1:
625
496
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
626
- if (data.arn !== undefined && data.arn !== null) {
497
+ if (data.arn != null) {
627
498
  contents.arn = __expectString(data.arn);
628
499
  }
629
- if (data.id !== undefined && data.id !== null) {
500
+ if (data.id != null) {
630
501
  contents.id = __expectString(data.id);
631
502
  }
632
- if (data.name !== undefined && data.name !== null) {
503
+ if (data.name != null) {
633
504
  contents.name = __expectString(data.name);
634
505
  }
635
- if (data.virtualClusterId !== undefined && data.virtualClusterId !== null) {
506
+ if (data.virtualClusterId != null) {
636
507
  contents.virtualClusterId = __expectString(data.virtualClusterId);
637
508
  }
638
- return [2, Promise.resolve(contents)];
509
+ return [2, contents];
639
510
  }
640
511
  });
641
512
  }); };
642
513
  var deserializeAws_restJson1CreateManagedEndpointCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
643
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
514
+ var parsedOutput, _a, errorCode, _b, parsedBody;
644
515
  var _c;
645
516
  return __generator(this, function (_d) {
646
517
  switch (_d.label) {
@@ -669,14 +540,14 @@ var deserializeAws_restJson1CreateManagedEndpointCommandError = function (output
669
540
  case 7: throw _d.sent();
670
541
  case 8:
671
542
  parsedBody = parsedOutput.body;
672
- $metadata = deserializeMetadata(output);
673
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
674
- response = new __BaseException({
675
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
676
- $fault: "client",
677
- $metadata: $metadata,
543
+ throwDefaultError({
544
+ output: output,
545
+ parsedBody: parsedBody,
546
+ exceptionCtor: __BaseException,
547
+ errorCode: errorCode,
678
548
  });
679
- throw __decorateServiceException(response, parsedBody);
549
+ _d.label = 9;
550
+ case 9: return [2];
680
551
  }
681
552
  });
682
553
  }); };
@@ -688,32 +559,29 @@ export var deserializeAws_restJson1CreateVirtualClusterCommand = function (outpu
688
559
  if (output.statusCode !== 200 && output.statusCode >= 300) {
689
560
  return [2, deserializeAws_restJson1CreateVirtualClusterCommandError(output, context)];
690
561
  }
691
- contents = {
562
+ contents = map({
692
563
  $metadata: deserializeMetadata(output),
693
- arn: undefined,
694
- id: undefined,
695
- name: undefined,
696
- };
564
+ });
697
565
  _a = __expectNonNull;
698
566
  _b = __expectObject;
699
567
  return [4, parseBody(output.body, context)];
700
568
  case 1:
701
569
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
702
- if (data.arn !== undefined && data.arn !== null) {
570
+ if (data.arn != null) {
703
571
  contents.arn = __expectString(data.arn);
704
572
  }
705
- if (data.id !== undefined && data.id !== null) {
573
+ if (data.id != null) {
706
574
  contents.id = __expectString(data.id);
707
575
  }
708
- if (data.name !== undefined && data.name !== null) {
576
+ if (data.name != null) {
709
577
  contents.name = __expectString(data.name);
710
578
  }
711
- return [2, Promise.resolve(contents)];
579
+ return [2, contents];
712
580
  }
713
581
  });
714
582
  }); };
715
583
  var deserializeAws_restJson1CreateVirtualClusterCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
716
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
584
+ var parsedOutput, _a, errorCode, _b, parsedBody;
717
585
  var _c;
718
586
  return __generator(this, function (_d) {
719
587
  switch (_d.label) {
@@ -742,14 +610,14 @@ var deserializeAws_restJson1CreateVirtualClusterCommandError = function (output,
742
610
  case 7: throw _d.sent();
743
611
  case 8:
744
612
  parsedBody = parsedOutput.body;
745
- $metadata = deserializeMetadata(output);
746
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
747
- response = new __BaseException({
748
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
749
- $fault: "client",
750
- $metadata: $metadata,
613
+ throwDefaultError({
614
+ output: output,
615
+ parsedBody: parsedBody,
616
+ exceptionCtor: __BaseException,
617
+ errorCode: errorCode,
751
618
  });
752
- throw __decorateServiceException(response, parsedBody);
619
+ _d.label = 9;
620
+ case 9: return [2];
753
621
  }
754
622
  });
755
623
  }); };
@@ -761,28 +629,26 @@ export var deserializeAws_restJson1DeleteManagedEndpointCommand = function (outp
761
629
  if (output.statusCode !== 200 && output.statusCode >= 300) {
762
630
  return [2, deserializeAws_restJson1DeleteManagedEndpointCommandError(output, context)];
763
631
  }
764
- contents = {
632
+ contents = map({
765
633
  $metadata: deserializeMetadata(output),
766
- id: undefined,
767
- virtualClusterId: undefined,
768
- };
634
+ });
769
635
  _a = __expectNonNull;
770
636
  _b = __expectObject;
771
637
  return [4, parseBody(output.body, context)];
772
638
  case 1:
773
639
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
774
- if (data.id !== undefined && data.id !== null) {
640
+ if (data.id != null) {
775
641
  contents.id = __expectString(data.id);
776
642
  }
777
- if (data.virtualClusterId !== undefined && data.virtualClusterId !== null) {
643
+ if (data.virtualClusterId != null) {
778
644
  contents.virtualClusterId = __expectString(data.virtualClusterId);
779
645
  }
780
- return [2, Promise.resolve(contents)];
646
+ return [2, contents];
781
647
  }
782
648
  });
783
649
  }); };
784
650
  var deserializeAws_restJson1DeleteManagedEndpointCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
785
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
651
+ var parsedOutput, _a, errorCode, _b, parsedBody;
786
652
  var _c;
787
653
  return __generator(this, function (_d) {
788
654
  switch (_d.label) {
@@ -807,14 +673,14 @@ var deserializeAws_restJson1DeleteManagedEndpointCommandError = function (output
807
673
  case 5: throw _d.sent();
808
674
  case 6:
809
675
  parsedBody = parsedOutput.body;
810
- $metadata = deserializeMetadata(output);
811
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
812
- response = new __BaseException({
813
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
814
- $fault: "client",
815
- $metadata: $metadata,
676
+ throwDefaultError({
677
+ output: output,
678
+ parsedBody: parsedBody,
679
+ exceptionCtor: __BaseException,
680
+ errorCode: errorCode,
816
681
  });
817
- throw __decorateServiceException(response, parsedBody);
682
+ _d.label = 7;
683
+ case 7: return [2];
818
684
  }
819
685
  });
820
686
  }); };
@@ -826,24 +692,23 @@ export var deserializeAws_restJson1DeleteVirtualClusterCommand = function (outpu
826
692
  if (output.statusCode !== 200 && output.statusCode >= 300) {
827
693
  return [2, deserializeAws_restJson1DeleteVirtualClusterCommandError(output, context)];
828
694
  }
829
- contents = {
695
+ contents = map({
830
696
  $metadata: deserializeMetadata(output),
831
- id: undefined,
832
- };
697
+ });
833
698
  _a = __expectNonNull;
834
699
  _b = __expectObject;
835
700
  return [4, parseBody(output.body, context)];
836
701
  case 1:
837
702
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
838
- if (data.id !== undefined && data.id !== null) {
703
+ if (data.id != null) {
839
704
  contents.id = __expectString(data.id);
840
705
  }
841
- return [2, Promise.resolve(contents)];
706
+ return [2, contents];
842
707
  }
843
708
  });
844
709
  }); };
845
710
  var deserializeAws_restJson1DeleteVirtualClusterCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
846
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
711
+ var parsedOutput, _a, errorCode, _b, parsedBody;
847
712
  var _c;
848
713
  return __generator(this, function (_d) {
849
714
  switch (_d.label) {
@@ -868,14 +733,14 @@ var deserializeAws_restJson1DeleteVirtualClusterCommandError = function (output,
868
733
  case 5: throw _d.sent();
869
734
  case 6:
870
735
  parsedBody = parsedOutput.body;
871
- $metadata = deserializeMetadata(output);
872
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
873
- response = new __BaseException({
874
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
875
- $fault: "client",
876
- $metadata: $metadata,
736
+ throwDefaultError({
737
+ output: output,
738
+ parsedBody: parsedBody,
739
+ exceptionCtor: __BaseException,
740
+ errorCode: errorCode,
877
741
  });
878
- throw __decorateServiceException(response, parsedBody);
742
+ _d.label = 7;
743
+ case 7: return [2];
879
744
  }
880
745
  });
881
746
  }); };
@@ -887,24 +752,23 @@ export var deserializeAws_restJson1DescribeJobRunCommand = function (output, con
887
752
  if (output.statusCode !== 200 && output.statusCode >= 300) {
888
753
  return [2, deserializeAws_restJson1DescribeJobRunCommandError(output, context)];
889
754
  }
890
- contents = {
755
+ contents = map({
891
756
  $metadata: deserializeMetadata(output),
892
- jobRun: undefined,
893
- };
757
+ });
894
758
  _a = __expectNonNull;
895
759
  _b = __expectObject;
896
760
  return [4, parseBody(output.body, context)];
897
761
  case 1:
898
762
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
899
- if (data.jobRun !== undefined && data.jobRun !== null) {
763
+ if (data.jobRun != null) {
900
764
  contents.jobRun = deserializeAws_restJson1JobRun(data.jobRun, context);
901
765
  }
902
- return [2, Promise.resolve(contents)];
766
+ return [2, contents];
903
767
  }
904
768
  });
905
769
  }); };
906
770
  var deserializeAws_restJson1DescribeJobRunCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
907
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
771
+ var parsedOutput, _a, errorCode, _b, parsedBody;
908
772
  var _c;
909
773
  return __generator(this, function (_d) {
910
774
  switch (_d.label) {
@@ -933,14 +797,14 @@ var deserializeAws_restJson1DescribeJobRunCommandError = function (output, conte
933
797
  case 7: throw _d.sent();
934
798
  case 8:
935
799
  parsedBody = parsedOutput.body;
936
- $metadata = deserializeMetadata(output);
937
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
938
- response = new __BaseException({
939
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
940
- $fault: "client",
941
- $metadata: $metadata,
800
+ throwDefaultError({
801
+ output: output,
802
+ parsedBody: parsedBody,
803
+ exceptionCtor: __BaseException,
804
+ errorCode: errorCode,
942
805
  });
943
- throw __decorateServiceException(response, parsedBody);
806
+ _d.label = 9;
807
+ case 9: return [2];
944
808
  }
945
809
  });
946
810
  }); };
@@ -952,24 +816,23 @@ export var deserializeAws_restJson1DescribeManagedEndpointCommand = function (ou
952
816
  if (output.statusCode !== 200 && output.statusCode >= 300) {
953
817
  return [2, deserializeAws_restJson1DescribeManagedEndpointCommandError(output, context)];
954
818
  }
955
- contents = {
819
+ contents = map({
956
820
  $metadata: deserializeMetadata(output),
957
- endpoint: undefined,
958
- };
821
+ });
959
822
  _a = __expectNonNull;
960
823
  _b = __expectObject;
961
824
  return [4, parseBody(output.body, context)];
962
825
  case 1:
963
826
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
964
- if (data.endpoint !== undefined && data.endpoint !== null) {
827
+ if (data.endpoint != null) {
965
828
  contents.endpoint = deserializeAws_restJson1Endpoint(data.endpoint, context);
966
829
  }
967
- return [2, Promise.resolve(contents)];
830
+ return [2, contents];
968
831
  }
969
832
  });
970
833
  }); };
971
834
  var deserializeAws_restJson1DescribeManagedEndpointCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
972
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
835
+ var parsedOutput, _a, errorCode, _b, parsedBody;
973
836
  var _c;
974
837
  return __generator(this, function (_d) {
975
838
  switch (_d.label) {
@@ -998,14 +861,14 @@ var deserializeAws_restJson1DescribeManagedEndpointCommandError = function (outp
998
861
  case 7: throw _d.sent();
999
862
  case 8:
1000
863
  parsedBody = parsedOutput.body;
1001
- $metadata = deserializeMetadata(output);
1002
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1003
- response = new __BaseException({
1004
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1005
- $fault: "client",
1006
- $metadata: $metadata,
864
+ throwDefaultError({
865
+ output: output,
866
+ parsedBody: parsedBody,
867
+ exceptionCtor: __BaseException,
868
+ errorCode: errorCode,
1007
869
  });
1008
- throw __decorateServiceException(response, parsedBody);
870
+ _d.label = 9;
871
+ case 9: return [2];
1009
872
  }
1010
873
  });
1011
874
  }); };
@@ -1017,24 +880,23 @@ export var deserializeAws_restJson1DescribeVirtualClusterCommand = function (out
1017
880
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1018
881
  return [2, deserializeAws_restJson1DescribeVirtualClusterCommandError(output, context)];
1019
882
  }
1020
- contents = {
883
+ contents = map({
1021
884
  $metadata: deserializeMetadata(output),
1022
- virtualCluster: undefined,
1023
- };
885
+ });
1024
886
  _a = __expectNonNull;
1025
887
  _b = __expectObject;
1026
888
  return [4, parseBody(output.body, context)];
1027
889
  case 1:
1028
890
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1029
- if (data.virtualCluster !== undefined && data.virtualCluster !== null) {
891
+ if (data.virtualCluster != null) {
1030
892
  contents.virtualCluster = deserializeAws_restJson1VirtualCluster(data.virtualCluster, context);
1031
893
  }
1032
- return [2, Promise.resolve(contents)];
894
+ return [2, contents];
1033
895
  }
1034
896
  });
1035
897
  }); };
1036
898
  var deserializeAws_restJson1DescribeVirtualClusterCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1037
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
899
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1038
900
  var _c;
1039
901
  return __generator(this, function (_d) {
1040
902
  switch (_d.label) {
@@ -1063,14 +925,14 @@ var deserializeAws_restJson1DescribeVirtualClusterCommandError = function (outpu
1063
925
  case 7: throw _d.sent();
1064
926
  case 8:
1065
927
  parsedBody = parsedOutput.body;
1066
- $metadata = deserializeMetadata(output);
1067
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1068
- response = new __BaseException({
1069
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1070
- $fault: "client",
1071
- $metadata: $metadata,
928
+ throwDefaultError({
929
+ output: output,
930
+ parsedBody: parsedBody,
931
+ exceptionCtor: __BaseException,
932
+ errorCode: errorCode,
1072
933
  });
1073
- throw __decorateServiceException(response, parsedBody);
934
+ _d.label = 9;
935
+ case 9: return [2];
1074
936
  }
1075
937
  });
1076
938
  }); };
@@ -1082,28 +944,26 @@ export var deserializeAws_restJson1ListJobRunsCommand = function (output, contex
1082
944
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1083
945
  return [2, deserializeAws_restJson1ListJobRunsCommandError(output, context)];
1084
946
  }
1085
- contents = {
947
+ contents = map({
1086
948
  $metadata: deserializeMetadata(output),
1087
- jobRuns: undefined,
1088
- nextToken: undefined,
1089
- };
949
+ });
1090
950
  _a = __expectNonNull;
1091
951
  _b = __expectObject;
1092
952
  return [4, parseBody(output.body, context)];
1093
953
  case 1:
1094
954
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1095
- if (data.jobRuns !== undefined && data.jobRuns !== null) {
955
+ if (data.jobRuns != null) {
1096
956
  contents.jobRuns = deserializeAws_restJson1JobRuns(data.jobRuns, context);
1097
957
  }
1098
- if (data.nextToken !== undefined && data.nextToken !== null) {
958
+ if (data.nextToken != null) {
1099
959
  contents.nextToken = __expectString(data.nextToken);
1100
960
  }
1101
- return [2, Promise.resolve(contents)];
961
+ return [2, contents];
1102
962
  }
1103
963
  });
1104
964
  }); };
1105
965
  var deserializeAws_restJson1ListJobRunsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1106
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
966
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1107
967
  var _c;
1108
968
  return __generator(this, function (_d) {
1109
969
  switch (_d.label) {
@@ -1128,14 +988,14 @@ var deserializeAws_restJson1ListJobRunsCommandError = function (output, context)
1128
988
  case 5: throw _d.sent();
1129
989
  case 6:
1130
990
  parsedBody = parsedOutput.body;
1131
- $metadata = deserializeMetadata(output);
1132
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1133
- response = new __BaseException({
1134
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1135
- $fault: "client",
1136
- $metadata: $metadata,
991
+ throwDefaultError({
992
+ output: output,
993
+ parsedBody: parsedBody,
994
+ exceptionCtor: __BaseException,
995
+ errorCode: errorCode,
1137
996
  });
1138
- throw __decorateServiceException(response, parsedBody);
997
+ _d.label = 7;
998
+ case 7: return [2];
1139
999
  }
1140
1000
  });
1141
1001
  }); };
@@ -1147,28 +1007,26 @@ export var deserializeAws_restJson1ListManagedEndpointsCommand = function (outpu
1147
1007
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1148
1008
  return [2, deserializeAws_restJson1ListManagedEndpointsCommandError(output, context)];
1149
1009
  }
1150
- contents = {
1010
+ contents = map({
1151
1011
  $metadata: deserializeMetadata(output),
1152
- endpoints: undefined,
1153
- nextToken: undefined,
1154
- };
1012
+ });
1155
1013
  _a = __expectNonNull;
1156
1014
  _b = __expectObject;
1157
1015
  return [4, parseBody(output.body, context)];
1158
1016
  case 1:
1159
1017
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1160
- if (data.endpoints !== undefined && data.endpoints !== null) {
1018
+ if (data.endpoints != null) {
1161
1019
  contents.endpoints = deserializeAws_restJson1Endpoints(data.endpoints, context);
1162
1020
  }
1163
- if (data.nextToken !== undefined && data.nextToken !== null) {
1021
+ if (data.nextToken != null) {
1164
1022
  contents.nextToken = __expectString(data.nextToken);
1165
1023
  }
1166
- return [2, Promise.resolve(contents)];
1024
+ return [2, contents];
1167
1025
  }
1168
1026
  });
1169
1027
  }); };
1170
1028
  var deserializeAws_restJson1ListManagedEndpointsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1171
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1029
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1172
1030
  var _c;
1173
1031
  return __generator(this, function (_d) {
1174
1032
  switch (_d.label) {
@@ -1193,14 +1051,14 @@ var deserializeAws_restJson1ListManagedEndpointsCommandError = function (output,
1193
1051
  case 5: throw _d.sent();
1194
1052
  case 6:
1195
1053
  parsedBody = parsedOutput.body;
1196
- $metadata = deserializeMetadata(output);
1197
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1198
- response = new __BaseException({
1199
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1200
- $fault: "client",
1201
- $metadata: $metadata,
1054
+ throwDefaultError({
1055
+ output: output,
1056
+ parsedBody: parsedBody,
1057
+ exceptionCtor: __BaseException,
1058
+ errorCode: errorCode,
1202
1059
  });
1203
- throw __decorateServiceException(response, parsedBody);
1060
+ _d.label = 7;
1061
+ case 7: return [2];
1204
1062
  }
1205
1063
  });
1206
1064
  }); };
@@ -1212,24 +1070,23 @@ export var deserializeAws_restJson1ListTagsForResourceCommand = function (output
1212
1070
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1213
1071
  return [2, deserializeAws_restJson1ListTagsForResourceCommandError(output, context)];
1214
1072
  }
1215
- contents = {
1073
+ contents = map({
1216
1074
  $metadata: deserializeMetadata(output),
1217
- tags: undefined,
1218
- };
1075
+ });
1219
1076
  _a = __expectNonNull;
1220
1077
  _b = __expectObject;
1221
1078
  return [4, parseBody(output.body, context)];
1222
1079
  case 1:
1223
1080
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1224
- if (data.tags !== undefined && data.tags !== null) {
1081
+ if (data.tags != null) {
1225
1082
  contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
1226
1083
  }
1227
- return [2, Promise.resolve(contents)];
1084
+ return [2, contents];
1228
1085
  }
1229
1086
  });
1230
1087
  }); };
1231
1088
  var deserializeAws_restJson1ListTagsForResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1232
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1089
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1233
1090
  var _c;
1234
1091
  return __generator(this, function (_d) {
1235
1092
  switch (_d.label) {
@@ -1258,14 +1115,14 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
1258
1115
  case 7: throw _d.sent();
1259
1116
  case 8:
1260
1117
  parsedBody = parsedOutput.body;
1261
- $metadata = deserializeMetadata(output);
1262
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1263
- response = new __BaseException({
1264
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1265
- $fault: "client",
1266
- $metadata: $metadata,
1118
+ throwDefaultError({
1119
+ output: output,
1120
+ parsedBody: parsedBody,
1121
+ exceptionCtor: __BaseException,
1122
+ errorCode: errorCode,
1267
1123
  });
1268
- throw __decorateServiceException(response, parsedBody);
1124
+ _d.label = 9;
1125
+ case 9: return [2];
1269
1126
  }
1270
1127
  });
1271
1128
  }); };
@@ -1277,28 +1134,26 @@ export var deserializeAws_restJson1ListVirtualClustersCommand = function (output
1277
1134
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1278
1135
  return [2, deserializeAws_restJson1ListVirtualClustersCommandError(output, context)];
1279
1136
  }
1280
- contents = {
1137
+ contents = map({
1281
1138
  $metadata: deserializeMetadata(output),
1282
- nextToken: undefined,
1283
- virtualClusters: undefined,
1284
- };
1139
+ });
1285
1140
  _a = __expectNonNull;
1286
1141
  _b = __expectObject;
1287
1142
  return [4, parseBody(output.body, context)];
1288
1143
  case 1:
1289
1144
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1290
- if (data.nextToken !== undefined && data.nextToken !== null) {
1145
+ if (data.nextToken != null) {
1291
1146
  contents.nextToken = __expectString(data.nextToken);
1292
1147
  }
1293
- if (data.virtualClusters !== undefined && data.virtualClusters !== null) {
1148
+ if (data.virtualClusters != null) {
1294
1149
  contents.virtualClusters = deserializeAws_restJson1VirtualClusters(data.virtualClusters, context);
1295
1150
  }
1296
- return [2, Promise.resolve(contents)];
1151
+ return [2, contents];
1297
1152
  }
1298
1153
  });
1299
1154
  }); };
1300
1155
  var deserializeAws_restJson1ListVirtualClustersCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1301
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1156
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1302
1157
  var _c;
1303
1158
  return __generator(this, function (_d) {
1304
1159
  switch (_d.label) {
@@ -1323,14 +1178,14 @@ var deserializeAws_restJson1ListVirtualClustersCommandError = function (output,
1323
1178
  case 5: throw _d.sent();
1324
1179
  case 6:
1325
1180
  parsedBody = parsedOutput.body;
1326
- $metadata = deserializeMetadata(output);
1327
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1328
- response = new __BaseException({
1329
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1330
- $fault: "client",
1331
- $metadata: $metadata,
1181
+ throwDefaultError({
1182
+ output: output,
1183
+ parsedBody: parsedBody,
1184
+ exceptionCtor: __BaseException,
1185
+ errorCode: errorCode,
1332
1186
  });
1333
- throw __decorateServiceException(response, parsedBody);
1187
+ _d.label = 7;
1188
+ case 7: return [2];
1334
1189
  }
1335
1190
  });
1336
1191
  }); };
@@ -1342,36 +1197,32 @@ export var deserializeAws_restJson1StartJobRunCommand = function (output, contex
1342
1197
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1343
1198
  return [2, deserializeAws_restJson1StartJobRunCommandError(output, context)];
1344
1199
  }
1345
- contents = {
1200
+ contents = map({
1346
1201
  $metadata: deserializeMetadata(output),
1347
- arn: undefined,
1348
- id: undefined,
1349
- name: undefined,
1350
- virtualClusterId: undefined,
1351
- };
1202
+ });
1352
1203
  _a = __expectNonNull;
1353
1204
  _b = __expectObject;
1354
1205
  return [4, parseBody(output.body, context)];
1355
1206
  case 1:
1356
1207
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1357
- if (data.arn !== undefined && data.arn !== null) {
1208
+ if (data.arn != null) {
1358
1209
  contents.arn = __expectString(data.arn);
1359
1210
  }
1360
- if (data.id !== undefined && data.id !== null) {
1211
+ if (data.id != null) {
1361
1212
  contents.id = __expectString(data.id);
1362
1213
  }
1363
- if (data.name !== undefined && data.name !== null) {
1214
+ if (data.name != null) {
1364
1215
  contents.name = __expectString(data.name);
1365
1216
  }
1366
- if (data.virtualClusterId !== undefined && data.virtualClusterId !== null) {
1217
+ if (data.virtualClusterId != null) {
1367
1218
  contents.virtualClusterId = __expectString(data.virtualClusterId);
1368
1219
  }
1369
- return [2, Promise.resolve(contents)];
1220
+ return [2, contents];
1370
1221
  }
1371
1222
  });
1372
1223
  }); };
1373
1224
  var deserializeAws_restJson1StartJobRunCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1374
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1225
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1375
1226
  var _c;
1376
1227
  return __generator(this, function (_d) {
1377
1228
  switch (_d.label) {
@@ -1400,14 +1251,14 @@ var deserializeAws_restJson1StartJobRunCommandError = function (output, context)
1400
1251
  case 7: throw _d.sent();
1401
1252
  case 8:
1402
1253
  parsedBody = parsedOutput.body;
1403
- $metadata = deserializeMetadata(output);
1404
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1405
- response = new __BaseException({
1406
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1407
- $fault: "client",
1408
- $metadata: $metadata,
1254
+ throwDefaultError({
1255
+ output: output,
1256
+ parsedBody: parsedBody,
1257
+ exceptionCtor: __BaseException,
1258
+ errorCode: errorCode,
1409
1259
  });
1410
- throw __decorateServiceException(response, parsedBody);
1260
+ _d.label = 9;
1261
+ case 9: return [2];
1411
1262
  }
1412
1263
  });
1413
1264
  }); };
@@ -1419,18 +1270,18 @@ export var deserializeAws_restJson1TagResourceCommand = function (output, contex
1419
1270
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1420
1271
  return [2, deserializeAws_restJson1TagResourceCommandError(output, context)];
1421
1272
  }
1422
- contents = {
1273
+ contents = map({
1423
1274
  $metadata: deserializeMetadata(output),
1424
- };
1275
+ });
1425
1276
  return [4, collectBody(output.body, context)];
1426
1277
  case 1:
1427
1278
  _a.sent();
1428
- return [2, Promise.resolve(contents)];
1279
+ return [2, contents];
1429
1280
  }
1430
1281
  });
1431
1282
  }); };
1432
1283
  var deserializeAws_restJson1TagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1433
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1284
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1434
1285
  var _c;
1435
1286
  return __generator(this, function (_d) {
1436
1287
  switch (_d.label) {
@@ -1459,14 +1310,14 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
1459
1310
  case 7: throw _d.sent();
1460
1311
  case 8:
1461
1312
  parsedBody = parsedOutput.body;
1462
- $metadata = deserializeMetadata(output);
1463
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1464
- response = new __BaseException({
1465
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1466
- $fault: "client",
1467
- $metadata: $metadata,
1313
+ throwDefaultError({
1314
+ output: output,
1315
+ parsedBody: parsedBody,
1316
+ exceptionCtor: __BaseException,
1317
+ errorCode: errorCode,
1468
1318
  });
1469
- throw __decorateServiceException(response, parsedBody);
1319
+ _d.label = 9;
1320
+ case 9: return [2];
1470
1321
  }
1471
1322
  });
1472
1323
  }); };
@@ -1478,18 +1329,18 @@ export var deserializeAws_restJson1UntagResourceCommand = function (output, cont
1478
1329
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1479
1330
  return [2, deserializeAws_restJson1UntagResourceCommandError(output, context)];
1480
1331
  }
1481
- contents = {
1332
+ contents = map({
1482
1333
  $metadata: deserializeMetadata(output),
1483
- };
1334
+ });
1484
1335
  return [4, collectBody(output.body, context)];
1485
1336
  case 1:
1486
1337
  _a.sent();
1487
- return [2, Promise.resolve(contents)];
1338
+ return [2, contents];
1488
1339
  }
1489
1340
  });
1490
1341
  }); };
1491
1342
  var deserializeAws_restJson1UntagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1492
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1343
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1493
1344
  var _c;
1494
1345
  return __generator(this, function (_d) {
1495
1346
  switch (_d.label) {
@@ -1518,23 +1369,24 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
1518
1369
  case 7: throw _d.sent();
1519
1370
  case 8:
1520
1371
  parsedBody = parsedOutput.body;
1521
- $metadata = deserializeMetadata(output);
1522
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1523
- response = new __BaseException({
1524
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1525
- $fault: "client",
1526
- $metadata: $metadata,
1372
+ throwDefaultError({
1373
+ output: output,
1374
+ parsedBody: parsedBody,
1375
+ exceptionCtor: __BaseException,
1376
+ errorCode: errorCode,
1527
1377
  });
1528
- throw __decorateServiceException(response, parsedBody);
1378
+ _d.label = 9;
1379
+ case 9: return [2];
1529
1380
  }
1530
1381
  });
1531
1382
  }); };
1383
+ var map = __map;
1532
1384
  var deserializeAws_restJson1InternalServerExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1533
1385
  var contents, data, exception;
1534
1386
  return __generator(this, function (_a) {
1535
- contents = {};
1387
+ contents = map({});
1536
1388
  data = parsedOutput.body;
1537
- if (data.message !== undefined && data.message !== null) {
1389
+ if (data.message != null) {
1538
1390
  contents.message = __expectString(data.message);
1539
1391
  }
1540
1392
  exception = new InternalServerException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -1544,9 +1396,9 @@ var deserializeAws_restJson1InternalServerExceptionResponse = function (parsedOu
1544
1396
  var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1545
1397
  var contents, data, exception;
1546
1398
  return __generator(this, function (_a) {
1547
- contents = {};
1399
+ contents = map({});
1548
1400
  data = parsedOutput.body;
1549
- if (data.message !== undefined && data.message !== null) {
1401
+ if (data.message != null) {
1550
1402
  contents.message = __expectString(data.message);
1551
1403
  }
1552
1404
  exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -1556,9 +1408,9 @@ var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsed
1556
1408
  var deserializeAws_restJson1ValidationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1557
1409
  var contents, data, exception;
1558
1410
  return __generator(this, function (_a) {
1559
- contents = {};
1411
+ contents = map({});
1560
1412
  data = parsedOutput.body;
1561
- if (data.message !== undefined && data.message !== null) {
1413
+ if (data.message != null) {
1562
1414
  contents.message = __expectString(data.message);
1563
1415
  }
1564
1416
  exception = new ValidationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -1579,9 +1431,6 @@ var serializeAws_restJson1ConfigurationList = function (input, context) {
1579
1431
  return input
1580
1432
  .filter(function (e) { return e != null; })
1581
1433
  .map(function (entry) {
1582
- if (entry === null) {
1583
- return null;
1584
- }
1585
1434
  return serializeAws_restJson1Configuration(entry, context);
1586
1435
  });
1587
1436
  };
@@ -1608,9 +1457,6 @@ var serializeAws_restJson1EntryPointArguments = function (input, context) {
1608
1457
  return input
1609
1458
  .filter(function (e) { return e != null; })
1610
1459
  .map(function (entry) {
1611
- if (entry === null) {
1612
- return null;
1613
- }
1614
1460
  return entry;
1615
1461
  });
1616
1462
  };
@@ -1699,7 +1545,7 @@ var deserializeAws_restJson1ConfigurationOverrides = function (output, context)
1699
1545
  };
1700
1546
  };
1701
1547
  var deserializeAws_restJson1ContainerInfo = function (output, context) {
1702
- if (output.eksInfo !== undefined && output.eksInfo !== null) {
1548
+ if (output.eksInfo != null) {
1703
1549
  return {
1704
1550
  eksInfo: deserializeAws_restJson1EksInfo(output.eksInfo, context),
1705
1551
  };