@aws-sdk/client-snowball 3.312.0 → 3.316.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,161 +1,161 @@
1
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
- import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, throwDefaultError, } from "@aws-sdk/smithy-client";
2
+ import { _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@aws-sdk/smithy-client";
3
3
  import { ClusterLimitExceededException, ConflictException, Ec2RequestFailedException, InvalidAddressException, InvalidInputCombinationException, InvalidJobStateException, InvalidNextTokenException, InvalidResourceException, KMSRequestFailedException, ReturnShippingLabelAlreadyExistsException, UnsupportedAddressException, } from "../models/models_0";
4
4
  import { SnowballServiceException as __BaseException } from "../models/SnowballServiceException";
5
5
  export const se_CancelClusterCommand = async (input, context) => {
6
6
  const headers = sharedHeaders("CancelCluster");
7
7
  let body;
8
- body = JSON.stringify(se_CancelClusterRequest(input, context));
8
+ body = JSON.stringify(_json(input));
9
9
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
10
10
  };
11
11
  export const se_CancelJobCommand = async (input, context) => {
12
12
  const headers = sharedHeaders("CancelJob");
13
13
  let body;
14
- body = JSON.stringify(se_CancelJobRequest(input, context));
14
+ body = JSON.stringify(_json(input));
15
15
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
16
16
  };
17
17
  export const se_CreateAddressCommand = async (input, context) => {
18
18
  const headers = sharedHeaders("CreateAddress");
19
19
  let body;
20
- body = JSON.stringify(se_CreateAddressRequest(input, context));
20
+ body = JSON.stringify(_json(input));
21
21
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
22
22
  };
23
23
  export const se_CreateClusterCommand = async (input, context) => {
24
24
  const headers = sharedHeaders("CreateCluster");
25
25
  let body;
26
- body = JSON.stringify(se_CreateClusterRequest(input, context));
26
+ body = JSON.stringify(_json(input));
27
27
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
28
28
  };
29
29
  export const se_CreateJobCommand = async (input, context) => {
30
30
  const headers = sharedHeaders("CreateJob");
31
31
  let body;
32
- body = JSON.stringify(se_CreateJobRequest(input, context));
32
+ body = JSON.stringify(_json(input));
33
33
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
34
34
  };
35
35
  export const se_CreateLongTermPricingCommand = async (input, context) => {
36
36
  const headers = sharedHeaders("CreateLongTermPricing");
37
37
  let body;
38
- body = JSON.stringify(se_CreateLongTermPricingRequest(input, context));
38
+ body = JSON.stringify(_json(input));
39
39
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
40
40
  };
41
41
  export const se_CreateReturnShippingLabelCommand = async (input, context) => {
42
42
  const headers = sharedHeaders("CreateReturnShippingLabel");
43
43
  let body;
44
- body = JSON.stringify(se_CreateReturnShippingLabelRequest(input, context));
44
+ body = JSON.stringify(_json(input));
45
45
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
46
46
  };
47
47
  export const se_DescribeAddressCommand = async (input, context) => {
48
48
  const headers = sharedHeaders("DescribeAddress");
49
49
  let body;
50
- body = JSON.stringify(se_DescribeAddressRequest(input, context));
50
+ body = JSON.stringify(_json(input));
51
51
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
52
52
  };
53
53
  export const se_DescribeAddressesCommand = async (input, context) => {
54
54
  const headers = sharedHeaders("DescribeAddresses");
55
55
  let body;
56
- body = JSON.stringify(se_DescribeAddressesRequest(input, context));
56
+ body = JSON.stringify(_json(input));
57
57
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
58
58
  };
59
59
  export const se_DescribeClusterCommand = async (input, context) => {
60
60
  const headers = sharedHeaders("DescribeCluster");
61
61
  let body;
62
- body = JSON.stringify(se_DescribeClusterRequest(input, context));
62
+ body = JSON.stringify(_json(input));
63
63
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
64
64
  };
65
65
  export const se_DescribeJobCommand = async (input, context) => {
66
66
  const headers = sharedHeaders("DescribeJob");
67
67
  let body;
68
- body = JSON.stringify(se_DescribeJobRequest(input, context));
68
+ body = JSON.stringify(_json(input));
69
69
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
70
70
  };
71
71
  export const se_DescribeReturnShippingLabelCommand = async (input, context) => {
72
72
  const headers = sharedHeaders("DescribeReturnShippingLabel");
73
73
  let body;
74
- body = JSON.stringify(se_DescribeReturnShippingLabelRequest(input, context));
74
+ body = JSON.stringify(_json(input));
75
75
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
76
76
  };
77
77
  export const se_GetJobManifestCommand = async (input, context) => {
78
78
  const headers = sharedHeaders("GetJobManifest");
79
79
  let body;
80
- body = JSON.stringify(se_GetJobManifestRequest(input, context));
80
+ body = JSON.stringify(_json(input));
81
81
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
82
82
  };
83
83
  export const se_GetJobUnlockCodeCommand = async (input, context) => {
84
84
  const headers = sharedHeaders("GetJobUnlockCode");
85
85
  let body;
86
- body = JSON.stringify(se_GetJobUnlockCodeRequest(input, context));
86
+ body = JSON.stringify(_json(input));
87
87
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
88
88
  };
89
89
  export const se_GetSnowballUsageCommand = async (input, context) => {
90
90
  const headers = sharedHeaders("GetSnowballUsage");
91
91
  let body;
92
- body = JSON.stringify(se_GetSnowballUsageRequest(input, context));
92
+ body = JSON.stringify(_json(input));
93
93
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
94
94
  };
95
95
  export const se_GetSoftwareUpdatesCommand = async (input, context) => {
96
96
  const headers = sharedHeaders("GetSoftwareUpdates");
97
97
  let body;
98
- body = JSON.stringify(se_GetSoftwareUpdatesRequest(input, context));
98
+ body = JSON.stringify(_json(input));
99
99
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
100
100
  };
101
101
  export const se_ListClusterJobsCommand = async (input, context) => {
102
102
  const headers = sharedHeaders("ListClusterJobs");
103
103
  let body;
104
- body = JSON.stringify(se_ListClusterJobsRequest(input, context));
104
+ body = JSON.stringify(_json(input));
105
105
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
106
106
  };
107
107
  export const se_ListClustersCommand = async (input, context) => {
108
108
  const headers = sharedHeaders("ListClusters");
109
109
  let body;
110
- body = JSON.stringify(se_ListClustersRequest(input, context));
110
+ body = JSON.stringify(_json(input));
111
111
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
112
112
  };
113
113
  export const se_ListCompatibleImagesCommand = async (input, context) => {
114
114
  const headers = sharedHeaders("ListCompatibleImages");
115
115
  let body;
116
- body = JSON.stringify(se_ListCompatibleImagesRequest(input, context));
116
+ body = JSON.stringify(_json(input));
117
117
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
118
118
  };
119
119
  export const se_ListJobsCommand = async (input, context) => {
120
120
  const headers = sharedHeaders("ListJobs");
121
121
  let body;
122
- body = JSON.stringify(se_ListJobsRequest(input, context));
122
+ body = JSON.stringify(_json(input));
123
123
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
124
124
  };
125
125
  export const se_ListLongTermPricingCommand = async (input, context) => {
126
126
  const headers = sharedHeaders("ListLongTermPricing");
127
127
  let body;
128
- body = JSON.stringify(se_ListLongTermPricingRequest(input, context));
128
+ body = JSON.stringify(_json(input));
129
129
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
130
130
  };
131
131
  export const se_ListServiceVersionsCommand = async (input, context) => {
132
132
  const headers = sharedHeaders("ListServiceVersions");
133
133
  let body;
134
- body = JSON.stringify(se_ListServiceVersionsRequest(input, context));
134
+ body = JSON.stringify(_json(input));
135
135
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
136
136
  };
137
137
  export const se_UpdateClusterCommand = async (input, context) => {
138
138
  const headers = sharedHeaders("UpdateCluster");
139
139
  let body;
140
- body = JSON.stringify(se_UpdateClusterRequest(input, context));
140
+ body = JSON.stringify(_json(input));
141
141
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
142
142
  };
143
143
  export const se_UpdateJobCommand = async (input, context) => {
144
144
  const headers = sharedHeaders("UpdateJob");
145
145
  let body;
146
- body = JSON.stringify(se_UpdateJobRequest(input, context));
146
+ body = JSON.stringify(_json(input));
147
147
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
148
148
  };
149
149
  export const se_UpdateJobShipmentStateCommand = async (input, context) => {
150
150
  const headers = sharedHeaders("UpdateJobShipmentState");
151
151
  let body;
152
- body = JSON.stringify(se_UpdateJobShipmentStateRequest(input, context));
152
+ body = JSON.stringify(_json(input));
153
153
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
154
154
  };
155
155
  export const se_UpdateLongTermPricingCommand = async (input, context) => {
156
156
  const headers = sharedHeaders("UpdateLongTermPricing");
157
157
  let body;
158
- body = JSON.stringify(se_UpdateLongTermPricingRequest(input, context));
158
+ body = JSON.stringify(_json(input));
159
159
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
160
160
  };
161
161
  export const de_CancelClusterCommand = async (output, context) => {
@@ -164,12 +164,12 @@ export const de_CancelClusterCommand = async (output, context) => {
164
164
  }
165
165
  const data = await parseBody(output.body, context);
166
166
  let contents = {};
167
- contents = de_CancelClusterResult(data, context);
167
+ contents = _json(data);
168
168
  const response = {
169
169
  $metadata: deserializeMetadata(output),
170
170
  ...contents,
171
171
  };
172
- return Promise.resolve(response);
172
+ return response;
173
173
  };
174
174
  const de_CancelClusterCommandError = async (output, context) => {
175
175
  const parsedOutput = {
@@ -189,10 +189,9 @@ const de_CancelClusterCommandError = async (output, context) => {
189
189
  throw await de_KMSRequestFailedExceptionRes(parsedOutput, context);
190
190
  default:
191
191
  const parsedBody = parsedOutput.body;
192
- throwDefaultError({
192
+ return throwDefaultError({
193
193
  output,
194
194
  parsedBody,
195
- exceptionCtor: __BaseException,
196
195
  errorCode,
197
196
  });
198
197
  }
@@ -203,12 +202,12 @@ export const de_CancelJobCommand = async (output, context) => {
203
202
  }
204
203
  const data = await parseBody(output.body, context);
205
204
  let contents = {};
206
- contents = de_CancelJobResult(data, context);
205
+ contents = _json(data);
207
206
  const response = {
208
207
  $metadata: deserializeMetadata(output),
209
208
  ...contents,
210
209
  };
211
- return Promise.resolve(response);
210
+ return response;
212
211
  };
213
212
  const de_CancelJobCommandError = async (output, context) => {
214
213
  const parsedOutput = {
@@ -228,10 +227,9 @@ const de_CancelJobCommandError = async (output, context) => {
228
227
  throw await de_KMSRequestFailedExceptionRes(parsedOutput, context);
229
228
  default:
230
229
  const parsedBody = parsedOutput.body;
231
- throwDefaultError({
230
+ return throwDefaultError({
232
231
  output,
233
232
  parsedBody,
234
- exceptionCtor: __BaseException,
235
233
  errorCode,
236
234
  });
237
235
  }
@@ -242,12 +240,12 @@ export const de_CreateAddressCommand = async (output, context) => {
242
240
  }
243
241
  const data = await parseBody(output.body, context);
244
242
  let contents = {};
245
- contents = de_CreateAddressResult(data, context);
243
+ contents = _json(data);
246
244
  const response = {
247
245
  $metadata: deserializeMetadata(output),
248
246
  ...contents,
249
247
  };
250
- return Promise.resolve(response);
248
+ return response;
251
249
  };
252
250
  const de_CreateAddressCommandError = async (output, context) => {
253
251
  const parsedOutput = {
@@ -264,10 +262,9 @@ const de_CreateAddressCommandError = async (output, context) => {
264
262
  throw await de_UnsupportedAddressExceptionRes(parsedOutput, context);
265
263
  default:
266
264
  const parsedBody = parsedOutput.body;
267
- throwDefaultError({
265
+ return throwDefaultError({
268
266
  output,
269
267
  parsedBody,
270
- exceptionCtor: __BaseException,
271
268
  errorCode,
272
269
  });
273
270
  }
@@ -278,12 +275,12 @@ export const de_CreateClusterCommand = async (output, context) => {
278
275
  }
279
276
  const data = await parseBody(output.body, context);
280
277
  let contents = {};
281
- contents = de_CreateClusterResult(data, context);
278
+ contents = _json(data);
282
279
  const response = {
283
280
  $metadata: deserializeMetadata(output),
284
281
  ...contents,
285
282
  };
286
- return Promise.resolve(response);
283
+ return response;
287
284
  };
288
285
  const de_CreateClusterCommandError = async (output, context) => {
289
286
  const parsedOutput = {
@@ -306,10 +303,9 @@ const de_CreateClusterCommandError = async (output, context) => {
306
303
  throw await de_KMSRequestFailedExceptionRes(parsedOutput, context);
307
304
  default:
308
305
  const parsedBody = parsedOutput.body;
309
- throwDefaultError({
306
+ return throwDefaultError({
310
307
  output,
311
308
  parsedBody,
312
- exceptionCtor: __BaseException,
313
309
  errorCode,
314
310
  });
315
311
  }
@@ -320,12 +316,12 @@ export const de_CreateJobCommand = async (output, context) => {
320
316
  }
321
317
  const data = await parseBody(output.body, context);
322
318
  let contents = {};
323
- contents = de_CreateJobResult(data, context);
319
+ contents = _json(data);
324
320
  const response = {
325
321
  $metadata: deserializeMetadata(output),
326
322
  ...contents,
327
323
  };
328
- return Promise.resolve(response);
324
+ return response;
329
325
  };
330
326
  const de_CreateJobCommandError = async (output, context) => {
331
327
  const parsedOutput = {
@@ -351,10 +347,9 @@ const de_CreateJobCommandError = async (output, context) => {
351
347
  throw await de_KMSRequestFailedExceptionRes(parsedOutput, context);
352
348
  default:
353
349
  const parsedBody = parsedOutput.body;
354
- throwDefaultError({
350
+ return throwDefaultError({
355
351
  output,
356
352
  parsedBody,
357
- exceptionCtor: __BaseException,
358
353
  errorCode,
359
354
  });
360
355
  }
@@ -365,12 +360,12 @@ export const de_CreateLongTermPricingCommand = async (output, context) => {
365
360
  }
366
361
  const data = await parseBody(output.body, context);
367
362
  let contents = {};
368
- contents = de_CreateLongTermPricingResult(data, context);
363
+ contents = _json(data);
369
364
  const response = {
370
365
  $metadata: deserializeMetadata(output),
371
366
  ...contents,
372
367
  };
373
- return Promise.resolve(response);
368
+ return response;
374
369
  };
375
370
  const de_CreateLongTermPricingCommandError = async (output, context) => {
376
371
  const parsedOutput = {
@@ -384,10 +379,9 @@ const de_CreateLongTermPricingCommandError = async (output, context) => {
384
379
  throw await de_InvalidResourceExceptionRes(parsedOutput, context);
385
380
  default:
386
381
  const parsedBody = parsedOutput.body;
387
- throwDefaultError({
382
+ return throwDefaultError({
388
383
  output,
389
384
  parsedBody,
390
- exceptionCtor: __BaseException,
391
385
  errorCode,
392
386
  });
393
387
  }
@@ -398,12 +392,12 @@ export const de_CreateReturnShippingLabelCommand = async (output, context) => {
398
392
  }
399
393
  const data = await parseBody(output.body, context);
400
394
  let contents = {};
401
- contents = de_CreateReturnShippingLabelResult(data, context);
395
+ contents = _json(data);
402
396
  const response = {
403
397
  $metadata: deserializeMetadata(output),
404
398
  ...contents,
405
399
  };
406
- return Promise.resolve(response);
400
+ return response;
407
401
  };
408
402
  const de_CreateReturnShippingLabelCommandError = async (output, context) => {
409
403
  const parsedOutput = {
@@ -429,10 +423,9 @@ const de_CreateReturnShippingLabelCommandError = async (output, context) => {
429
423
  throw await de_ReturnShippingLabelAlreadyExistsExceptionRes(parsedOutput, context);
430
424
  default:
431
425
  const parsedBody = parsedOutput.body;
432
- throwDefaultError({
426
+ return throwDefaultError({
433
427
  output,
434
428
  parsedBody,
435
- exceptionCtor: __BaseException,
436
429
  errorCode,
437
430
  });
438
431
  }
@@ -443,12 +436,12 @@ export const de_DescribeAddressCommand = async (output, context) => {
443
436
  }
444
437
  const data = await parseBody(output.body, context);
445
438
  let contents = {};
446
- contents = de_DescribeAddressResult(data, context);
439
+ contents = _json(data);
447
440
  const response = {
448
441
  $metadata: deserializeMetadata(output),
449
442
  ...contents,
450
443
  };
451
- return Promise.resolve(response);
444
+ return response;
452
445
  };
453
446
  const de_DescribeAddressCommandError = async (output, context) => {
454
447
  const parsedOutput = {
@@ -462,10 +455,9 @@ const de_DescribeAddressCommandError = async (output, context) => {
462
455
  throw await de_InvalidResourceExceptionRes(parsedOutput, context);
463
456
  default:
464
457
  const parsedBody = parsedOutput.body;
465
- throwDefaultError({
458
+ return throwDefaultError({
466
459
  output,
467
460
  parsedBody,
468
- exceptionCtor: __BaseException,
469
461
  errorCode,
470
462
  });
471
463
  }
@@ -476,12 +468,12 @@ export const de_DescribeAddressesCommand = async (output, context) => {
476
468
  }
477
469
  const data = await parseBody(output.body, context);
478
470
  let contents = {};
479
- contents = de_DescribeAddressesResult(data, context);
471
+ contents = _json(data);
480
472
  const response = {
481
473
  $metadata: deserializeMetadata(output),
482
474
  ...contents,
483
475
  };
484
- return Promise.resolve(response);
476
+ return response;
485
477
  };
486
478
  const de_DescribeAddressesCommandError = async (output, context) => {
487
479
  const parsedOutput = {
@@ -498,10 +490,9 @@ const de_DescribeAddressesCommandError = async (output, context) => {
498
490
  throw await de_InvalidResourceExceptionRes(parsedOutput, context);
499
491
  default:
500
492
  const parsedBody = parsedOutput.body;
501
- throwDefaultError({
493
+ return throwDefaultError({
502
494
  output,
503
495
  parsedBody,
504
- exceptionCtor: __BaseException,
505
496
  errorCode,
506
497
  });
507
498
  }
@@ -517,7 +508,7 @@ export const de_DescribeClusterCommand = async (output, context) => {
517
508
  $metadata: deserializeMetadata(output),
518
509
  ...contents,
519
510
  };
520
- return Promise.resolve(response);
511
+ return response;
521
512
  };
522
513
  const de_DescribeClusterCommandError = async (output, context) => {
523
514
  const parsedOutput = {
@@ -531,10 +522,9 @@ const de_DescribeClusterCommandError = async (output, context) => {
531
522
  throw await de_InvalidResourceExceptionRes(parsedOutput, context);
532
523
  default:
533
524
  const parsedBody = parsedOutput.body;
534
- throwDefaultError({
525
+ return throwDefaultError({
535
526
  output,
536
527
  parsedBody,
537
- exceptionCtor: __BaseException,
538
528
  errorCode,
539
529
  });
540
530
  }
@@ -550,7 +540,7 @@ export const de_DescribeJobCommand = async (output, context) => {
550
540
  $metadata: deserializeMetadata(output),
551
541
  ...contents,
552
542
  };
553
- return Promise.resolve(response);
543
+ return response;
554
544
  };
555
545
  const de_DescribeJobCommandError = async (output, context) => {
556
546
  const parsedOutput = {
@@ -564,10 +554,9 @@ const de_DescribeJobCommandError = async (output, context) => {
564
554
  throw await de_InvalidResourceExceptionRes(parsedOutput, context);
565
555
  default:
566
556
  const parsedBody = parsedOutput.body;
567
- throwDefaultError({
557
+ return throwDefaultError({
568
558
  output,
569
559
  parsedBody,
570
- exceptionCtor: __BaseException,
571
560
  errorCode,
572
561
  });
573
562
  }
@@ -583,7 +572,7 @@ export const de_DescribeReturnShippingLabelCommand = async (output, context) =>
583
572
  $metadata: deserializeMetadata(output),
584
573
  ...contents,
585
574
  };
586
- return Promise.resolve(response);
575
+ return response;
587
576
  };
588
577
  const de_DescribeReturnShippingLabelCommandError = async (output, context) => {
589
578
  const parsedOutput = {
@@ -603,10 +592,9 @@ const de_DescribeReturnShippingLabelCommandError = async (output, context) => {
603
592
  throw await de_InvalidResourceExceptionRes(parsedOutput, context);
604
593
  default:
605
594
  const parsedBody = parsedOutput.body;
606
- throwDefaultError({
595
+ return throwDefaultError({
607
596
  output,
608
597
  parsedBody,
609
- exceptionCtor: __BaseException,
610
598
  errorCode,
611
599
  });
612
600
  }
@@ -617,12 +605,12 @@ export const de_GetJobManifestCommand = async (output, context) => {
617
605
  }
618
606
  const data = await parseBody(output.body, context);
619
607
  let contents = {};
620
- contents = de_GetJobManifestResult(data, context);
608
+ contents = _json(data);
621
609
  const response = {
622
610
  $metadata: deserializeMetadata(output),
623
611
  ...contents,
624
612
  };
625
- return Promise.resolve(response);
613
+ return response;
626
614
  };
627
615
  const de_GetJobManifestCommandError = async (output, context) => {
628
616
  const parsedOutput = {
@@ -639,10 +627,9 @@ const de_GetJobManifestCommandError = async (output, context) => {
639
627
  throw await de_InvalidResourceExceptionRes(parsedOutput, context);
640
628
  default:
641
629
  const parsedBody = parsedOutput.body;
642
- throwDefaultError({
630
+ return throwDefaultError({
643
631
  output,
644
632
  parsedBody,
645
- exceptionCtor: __BaseException,
646
633
  errorCode,
647
634
  });
648
635
  }
@@ -653,12 +640,12 @@ export const de_GetJobUnlockCodeCommand = async (output, context) => {
653
640
  }
654
641
  const data = await parseBody(output.body, context);
655
642
  let contents = {};
656
- contents = de_GetJobUnlockCodeResult(data, context);
643
+ contents = _json(data);
657
644
  const response = {
658
645
  $metadata: deserializeMetadata(output),
659
646
  ...contents,
660
647
  };
661
- return Promise.resolve(response);
648
+ return response;
662
649
  };
663
650
  const de_GetJobUnlockCodeCommandError = async (output, context) => {
664
651
  const parsedOutput = {
@@ -675,10 +662,9 @@ const de_GetJobUnlockCodeCommandError = async (output, context) => {
675
662
  throw await de_InvalidResourceExceptionRes(parsedOutput, context);
676
663
  default:
677
664
  const parsedBody = parsedOutput.body;
678
- throwDefaultError({
665
+ return throwDefaultError({
679
666
  output,
680
667
  parsedBody,
681
- exceptionCtor: __BaseException,
682
668
  errorCode,
683
669
  });
684
670
  }
@@ -689,12 +675,12 @@ export const de_GetSnowballUsageCommand = async (output, context) => {
689
675
  }
690
676
  const data = await parseBody(output.body, context);
691
677
  let contents = {};
692
- contents = de_GetSnowballUsageResult(data, context);
678
+ contents = _json(data);
693
679
  const response = {
694
680
  $metadata: deserializeMetadata(output),
695
681
  ...contents,
696
682
  };
697
- return Promise.resolve(response);
683
+ return response;
698
684
  };
699
685
  const de_GetSnowballUsageCommandError = async (output, context) => {
700
686
  const parsedOutput = {
@@ -703,10 +689,9 @@ const de_GetSnowballUsageCommandError = async (output, context) => {
703
689
  };
704
690
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
705
691
  const parsedBody = parsedOutput.body;
706
- throwDefaultError({
692
+ return throwDefaultError({
707
693
  output,
708
694
  parsedBody,
709
- exceptionCtor: __BaseException,
710
695
  errorCode,
711
696
  });
712
697
  };
@@ -716,12 +701,12 @@ export const de_GetSoftwareUpdatesCommand = async (output, context) => {
716
701
  }
717
702
  const data = await parseBody(output.body, context);
718
703
  let contents = {};
719
- contents = de_GetSoftwareUpdatesResult(data, context);
704
+ contents = _json(data);
720
705
  const response = {
721
706
  $metadata: deserializeMetadata(output),
722
707
  ...contents,
723
708
  };
724
- return Promise.resolve(response);
709
+ return response;
725
710
  };
726
711
  const de_GetSoftwareUpdatesCommandError = async (output, context) => {
727
712
  const parsedOutput = {
@@ -738,10 +723,9 @@ const de_GetSoftwareUpdatesCommandError = async (output, context) => {
738
723
  throw await de_InvalidResourceExceptionRes(parsedOutput, context);
739
724
  default:
740
725
  const parsedBody = parsedOutput.body;
741
- throwDefaultError({
726
+ return throwDefaultError({
742
727
  output,
743
728
  parsedBody,
744
- exceptionCtor: __BaseException,
745
729
  errorCode,
746
730
  });
747
731
  }
@@ -757,7 +741,7 @@ export const de_ListClusterJobsCommand = async (output, context) => {
757
741
  $metadata: deserializeMetadata(output),
758
742
  ...contents,
759
743
  };
760
- return Promise.resolve(response);
744
+ return response;
761
745
  };
762
746
  const de_ListClusterJobsCommandError = async (output, context) => {
763
747
  const parsedOutput = {
@@ -774,10 +758,9 @@ const de_ListClusterJobsCommandError = async (output, context) => {
774
758
  throw await de_InvalidResourceExceptionRes(parsedOutput, context);
775
759
  default:
776
760
  const parsedBody = parsedOutput.body;
777
- throwDefaultError({
761
+ return throwDefaultError({
778
762
  output,
779
763
  parsedBody,
780
- exceptionCtor: __BaseException,
781
764
  errorCode,
782
765
  });
783
766
  }
@@ -793,7 +776,7 @@ export const de_ListClustersCommand = async (output, context) => {
793
776
  $metadata: deserializeMetadata(output),
794
777
  ...contents,
795
778
  };
796
- return Promise.resolve(response);
779
+ return response;
797
780
  };
798
781
  const de_ListClustersCommandError = async (output, context) => {
799
782
  const parsedOutput = {
@@ -807,10 +790,9 @@ const de_ListClustersCommandError = async (output, context) => {
807
790
  throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
808
791
  default:
809
792
  const parsedBody = parsedOutput.body;
810
- throwDefaultError({
793
+ return throwDefaultError({
811
794
  output,
812
795
  parsedBody,
813
- exceptionCtor: __BaseException,
814
796
  errorCode,
815
797
  });
816
798
  }
@@ -821,12 +803,12 @@ export const de_ListCompatibleImagesCommand = async (output, context) => {
821
803
  }
822
804
  const data = await parseBody(output.body, context);
823
805
  let contents = {};
824
- contents = de_ListCompatibleImagesResult(data, context);
806
+ contents = _json(data);
825
807
  const response = {
826
808
  $metadata: deserializeMetadata(output),
827
809
  ...contents,
828
810
  };
829
- return Promise.resolve(response);
811
+ return response;
830
812
  };
831
813
  const de_ListCompatibleImagesCommandError = async (output, context) => {
832
814
  const parsedOutput = {
@@ -843,10 +825,9 @@ const de_ListCompatibleImagesCommandError = async (output, context) => {
843
825
  throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
844
826
  default:
845
827
  const parsedBody = parsedOutput.body;
846
- throwDefaultError({
828
+ return throwDefaultError({
847
829
  output,
848
830
  parsedBody,
849
- exceptionCtor: __BaseException,
850
831
  errorCode,
851
832
  });
852
833
  }
@@ -862,7 +843,7 @@ export const de_ListJobsCommand = async (output, context) => {
862
843
  $metadata: deserializeMetadata(output),
863
844
  ...contents,
864
845
  };
865
- return Promise.resolve(response);
846
+ return response;
866
847
  };
867
848
  const de_ListJobsCommandError = async (output, context) => {
868
849
  const parsedOutput = {
@@ -876,10 +857,9 @@ const de_ListJobsCommandError = async (output, context) => {
876
857
  throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
877
858
  default:
878
859
  const parsedBody = parsedOutput.body;
879
- throwDefaultError({
860
+ return throwDefaultError({
880
861
  output,
881
862
  parsedBody,
882
- exceptionCtor: __BaseException,
883
863
  errorCode,
884
864
  });
885
865
  }
@@ -895,7 +875,7 @@ export const de_ListLongTermPricingCommand = async (output, context) => {
895
875
  $metadata: deserializeMetadata(output),
896
876
  ...contents,
897
877
  };
898
- return Promise.resolve(response);
878
+ return response;
899
879
  };
900
880
  const de_ListLongTermPricingCommandError = async (output, context) => {
901
881
  const parsedOutput = {
@@ -912,10 +892,9 @@ const de_ListLongTermPricingCommandError = async (output, context) => {
912
892
  throw await de_InvalidResourceExceptionRes(parsedOutput, context);
913
893
  default:
914
894
  const parsedBody = parsedOutput.body;
915
- throwDefaultError({
895
+ return throwDefaultError({
916
896
  output,
917
897
  parsedBody,
918
- exceptionCtor: __BaseException,
919
898
  errorCode,
920
899
  });
921
900
  }
@@ -926,12 +905,12 @@ export const de_ListServiceVersionsCommand = async (output, context) => {
926
905
  }
927
906
  const data = await parseBody(output.body, context);
928
907
  let contents = {};
929
- contents = de_ListServiceVersionsResult(data, context);
908
+ contents = _json(data);
930
909
  const response = {
931
910
  $metadata: deserializeMetadata(output),
932
911
  ...contents,
933
912
  };
934
- return Promise.resolve(response);
913
+ return response;
935
914
  };
936
915
  const de_ListServiceVersionsCommandError = async (output, context) => {
937
916
  const parsedOutput = {
@@ -948,10 +927,9 @@ const de_ListServiceVersionsCommandError = async (output, context) => {
948
927
  throw await de_InvalidResourceExceptionRes(parsedOutput, context);
949
928
  default:
950
929
  const parsedBody = parsedOutput.body;
951
- throwDefaultError({
930
+ return throwDefaultError({
952
931
  output,
953
932
  parsedBody,
954
- exceptionCtor: __BaseException,
955
933
  errorCode,
956
934
  });
957
935
  }
@@ -962,12 +940,12 @@ export const de_UpdateClusterCommand = async (output, context) => {
962
940
  }
963
941
  const data = await parseBody(output.body, context);
964
942
  let contents = {};
965
- contents = de_UpdateClusterResult(data, context);
943
+ contents = _json(data);
966
944
  const response = {
967
945
  $metadata: deserializeMetadata(output),
968
946
  ...contents,
969
947
  };
970
- return Promise.resolve(response);
948
+ return response;
971
949
  };
972
950
  const de_UpdateClusterCommandError = async (output, context) => {
973
951
  const parsedOutput = {
@@ -993,10 +971,9 @@ const de_UpdateClusterCommandError = async (output, context) => {
993
971
  throw await de_KMSRequestFailedExceptionRes(parsedOutput, context);
994
972
  default:
995
973
  const parsedBody = parsedOutput.body;
996
- throwDefaultError({
974
+ return throwDefaultError({
997
975
  output,
998
976
  parsedBody,
999
- exceptionCtor: __BaseException,
1000
977
  errorCode,
1001
978
  });
1002
979
  }
@@ -1007,12 +984,12 @@ export const de_UpdateJobCommand = async (output, context) => {
1007
984
  }
1008
985
  const data = await parseBody(output.body, context);
1009
986
  let contents = {};
1010
- contents = de_UpdateJobResult(data, context);
987
+ contents = _json(data);
1011
988
  const response = {
1012
989
  $metadata: deserializeMetadata(output),
1013
990
  ...contents,
1014
991
  };
1015
- return Promise.resolve(response);
992
+ return response;
1016
993
  };
1017
994
  const de_UpdateJobCommandError = async (output, context) => {
1018
995
  const parsedOutput = {
@@ -1041,10 +1018,9 @@ const de_UpdateJobCommandError = async (output, context) => {
1041
1018
  throw await de_KMSRequestFailedExceptionRes(parsedOutput, context);
1042
1019
  default:
1043
1020
  const parsedBody = parsedOutput.body;
1044
- throwDefaultError({
1021
+ return throwDefaultError({
1045
1022
  output,
1046
1023
  parsedBody,
1047
- exceptionCtor: __BaseException,
1048
1024
  errorCode,
1049
1025
  });
1050
1026
  }
@@ -1055,12 +1031,12 @@ export const de_UpdateJobShipmentStateCommand = async (output, context) => {
1055
1031
  }
1056
1032
  const data = await parseBody(output.body, context);
1057
1033
  let contents = {};
1058
- contents = de_UpdateJobShipmentStateResult(data, context);
1034
+ contents = _json(data);
1059
1035
  const response = {
1060
1036
  $metadata: deserializeMetadata(output),
1061
1037
  ...contents,
1062
1038
  };
1063
- return Promise.resolve(response);
1039
+ return response;
1064
1040
  };
1065
1041
  const de_UpdateJobShipmentStateCommandError = async (output, context) => {
1066
1042
  const parsedOutput = {
@@ -1077,10 +1053,9 @@ const de_UpdateJobShipmentStateCommandError = async (output, context) => {
1077
1053
  throw await de_InvalidResourceExceptionRes(parsedOutput, context);
1078
1054
  default:
1079
1055
  const parsedBody = parsedOutput.body;
1080
- throwDefaultError({
1056
+ return throwDefaultError({
1081
1057
  output,
1082
1058
  parsedBody,
1083
- exceptionCtor: __BaseException,
1084
1059
  errorCode,
1085
1060
  });
1086
1061
  }
@@ -1091,12 +1066,12 @@ export const de_UpdateLongTermPricingCommand = async (output, context) => {
1091
1066
  }
1092
1067
  const data = await parseBody(output.body, context);
1093
1068
  let contents = {};
1094
- contents = de_UpdateLongTermPricingResult(data, context);
1069
+ contents = _json(data);
1095
1070
  const response = {
1096
1071
  $metadata: deserializeMetadata(output),
1097
1072
  ...contents,
1098
1073
  };
1099
- return Promise.resolve(response);
1074
+ return response;
1100
1075
  };
1101
1076
  const de_UpdateLongTermPricingCommandError = async (output, context) => {
1102
1077
  const parsedOutput = {
@@ -1110,17 +1085,16 @@ const de_UpdateLongTermPricingCommandError = async (output, context) => {
1110
1085
  throw await de_InvalidResourceExceptionRes(parsedOutput, context);
1111
1086
  default:
1112
1087
  const parsedBody = parsedOutput.body;
1113
- throwDefaultError({
1088
+ return throwDefaultError({
1114
1089
  output,
1115
1090
  parsedBody,
1116
- exceptionCtor: __BaseException,
1117
1091
  errorCode,
1118
1092
  });
1119
1093
  }
1120
1094
  };
1121
1095
  const de_ClusterLimitExceededExceptionRes = async (parsedOutput, context) => {
1122
1096
  const body = parsedOutput.body;
1123
- const deserialized = de_ClusterLimitExceededException(body, context);
1097
+ const deserialized = _json(body);
1124
1098
  const exception = new ClusterLimitExceededException({
1125
1099
  $metadata: deserializeMetadata(parsedOutput),
1126
1100
  ...deserialized,
@@ -1129,7 +1103,7 @@ const de_ClusterLimitExceededExceptionRes = async (parsedOutput, context) => {
1129
1103
  };
1130
1104
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
1131
1105
  const body = parsedOutput.body;
1132
- const deserialized = de_ConflictException(body, context);
1106
+ const deserialized = _json(body);
1133
1107
  const exception = new ConflictException({
1134
1108
  $metadata: deserializeMetadata(parsedOutput),
1135
1109
  ...deserialized,
@@ -1138,7 +1112,7 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
1138
1112
  };
1139
1113
  const de_Ec2RequestFailedExceptionRes = async (parsedOutput, context) => {
1140
1114
  const body = parsedOutput.body;
1141
- const deserialized = de_Ec2RequestFailedException(body, context);
1115
+ const deserialized = _json(body);
1142
1116
  const exception = new Ec2RequestFailedException({
1143
1117
  $metadata: deserializeMetadata(parsedOutput),
1144
1118
  ...deserialized,
@@ -1147,7 +1121,7 @@ const de_Ec2RequestFailedExceptionRes = async (parsedOutput, context) => {
1147
1121
  };
1148
1122
  const de_InvalidAddressExceptionRes = async (parsedOutput, context) => {
1149
1123
  const body = parsedOutput.body;
1150
- const deserialized = de_InvalidAddressException(body, context);
1124
+ const deserialized = _json(body);
1151
1125
  const exception = new InvalidAddressException({
1152
1126
  $metadata: deserializeMetadata(parsedOutput),
1153
1127
  ...deserialized,
@@ -1156,7 +1130,7 @@ const de_InvalidAddressExceptionRes = async (parsedOutput, context) => {
1156
1130
  };
1157
1131
  const de_InvalidInputCombinationExceptionRes = async (parsedOutput, context) => {
1158
1132
  const body = parsedOutput.body;
1159
- const deserialized = de_InvalidInputCombinationException(body, context);
1133
+ const deserialized = _json(body);
1160
1134
  const exception = new InvalidInputCombinationException({
1161
1135
  $metadata: deserializeMetadata(parsedOutput),
1162
1136
  ...deserialized,
@@ -1165,7 +1139,7 @@ const de_InvalidInputCombinationExceptionRes = async (parsedOutput, context) =>
1165
1139
  };
1166
1140
  const de_InvalidJobStateExceptionRes = async (parsedOutput, context) => {
1167
1141
  const body = parsedOutput.body;
1168
- const deserialized = de_InvalidJobStateException(body, context);
1142
+ const deserialized = _json(body);
1169
1143
  const exception = new InvalidJobStateException({
1170
1144
  $metadata: deserializeMetadata(parsedOutput),
1171
1145
  ...deserialized,
@@ -1174,7 +1148,7 @@ const de_InvalidJobStateExceptionRes = async (parsedOutput, context) => {
1174
1148
  };
1175
1149
  const de_InvalidNextTokenExceptionRes = async (parsedOutput, context) => {
1176
1150
  const body = parsedOutput.body;
1177
- const deserialized = de_InvalidNextTokenException(body, context);
1151
+ const deserialized = _json(body);
1178
1152
  const exception = new InvalidNextTokenException({
1179
1153
  $metadata: deserializeMetadata(parsedOutput),
1180
1154
  ...deserialized,
@@ -1183,7 +1157,7 @@ const de_InvalidNextTokenExceptionRes = async (parsedOutput, context) => {
1183
1157
  };
1184
1158
  const de_InvalidResourceExceptionRes = async (parsedOutput, context) => {
1185
1159
  const body = parsedOutput.body;
1186
- const deserialized = de_InvalidResourceException(body, context);
1160
+ const deserialized = _json(body);
1187
1161
  const exception = new InvalidResourceException({
1188
1162
  $metadata: deserializeMetadata(parsedOutput),
1189
1163
  ...deserialized,
@@ -1192,7 +1166,7 @@ const de_InvalidResourceExceptionRes = async (parsedOutput, context) => {
1192
1166
  };
1193
1167
  const de_KMSRequestFailedExceptionRes = async (parsedOutput, context) => {
1194
1168
  const body = parsedOutput.body;
1195
- const deserialized = de_KMSRequestFailedException(body, context);
1169
+ const deserialized = _json(body);
1196
1170
  const exception = new KMSRequestFailedException({
1197
1171
  $metadata: deserializeMetadata(parsedOutput),
1198
1172
  ...deserialized,
@@ -1201,7 +1175,7 @@ const de_KMSRequestFailedExceptionRes = async (parsedOutput, context) => {
1201
1175
  };
1202
1176
  const de_ReturnShippingLabelAlreadyExistsExceptionRes = async (parsedOutput, context) => {
1203
1177
  const body = parsedOutput.body;
1204
- const deserialized = de_ReturnShippingLabelAlreadyExistsException(body, context);
1178
+ const deserialized = _json(body);
1205
1179
  const exception = new ReturnShippingLabelAlreadyExistsException({
1206
1180
  $metadata: deserializeMetadata(parsedOutput),
1207
1181
  ...deserialized,
@@ -1210,1027 +1184,164 @@ const de_ReturnShippingLabelAlreadyExistsExceptionRes = async (parsedOutput, con
1210
1184
  };
1211
1185
  const de_UnsupportedAddressExceptionRes = async (parsedOutput, context) => {
1212
1186
  const body = parsedOutput.body;
1213
- const deserialized = de_UnsupportedAddressException(body, context);
1187
+ const deserialized = _json(body);
1214
1188
  const exception = new UnsupportedAddressException({
1215
1189
  $metadata: deserializeMetadata(parsedOutput),
1216
1190
  ...deserialized,
1217
1191
  });
1218
1192
  return __decorateServiceException(exception, body);
1219
1193
  };
1220
- const se_Address = (input, context) => {
1221
- return {
1222
- ...(input.AddressId != null && { AddressId: input.AddressId }),
1223
- ...(input.City != null && { City: input.City }),
1224
- ...(input.Company != null && { Company: input.Company }),
1225
- ...(input.Country != null && { Country: input.Country }),
1226
- ...(input.IsRestricted != null && { IsRestricted: input.IsRestricted }),
1227
- ...(input.Landmark != null && { Landmark: input.Landmark }),
1228
- ...(input.Name != null && { Name: input.Name }),
1229
- ...(input.PhoneNumber != null && { PhoneNumber: input.PhoneNumber }),
1230
- ...(input.PostalCode != null && { PostalCode: input.PostalCode }),
1231
- ...(input.PrefectureOrDistrict != null && { PrefectureOrDistrict: input.PrefectureOrDistrict }),
1232
- ...(input.StateOrProvince != null && { StateOrProvince: input.StateOrProvince }),
1233
- ...(input.Street1 != null && { Street1: input.Street1 }),
1234
- ...(input.Street2 != null && { Street2: input.Street2 }),
1235
- ...(input.Street3 != null && { Street3: input.Street3 }),
1236
- };
1237
- };
1238
- const se_CancelClusterRequest = (input, context) => {
1239
- return {
1240
- ...(input.ClusterId != null && { ClusterId: input.ClusterId }),
1241
- };
1242
- };
1243
- const se_CancelJobRequest = (input, context) => {
1244
- return {
1245
- ...(input.JobId != null && { JobId: input.JobId }),
1246
- };
1247
- };
1248
- const se_CreateAddressRequest = (input, context) => {
1249
- return {
1250
- ...(input.Address != null && { Address: se_Address(input.Address, context) }),
1251
- };
1252
- };
1253
- const se_CreateClusterRequest = (input, context) => {
1254
- return {
1255
- ...(input.AddressId != null && { AddressId: input.AddressId }),
1256
- ...(input.Description != null && { Description: input.Description }),
1257
- ...(input.ForwardingAddressId != null && { ForwardingAddressId: input.ForwardingAddressId }),
1258
- ...(input.JobType != null && { JobType: input.JobType }),
1259
- ...(input.KmsKeyARN != null && { KmsKeyARN: input.KmsKeyARN }),
1260
- ...(input.Notification != null && { Notification: se_Notification(input.Notification, context) }),
1261
- ...(input.OnDeviceServiceConfiguration != null && {
1262
- OnDeviceServiceConfiguration: se_OnDeviceServiceConfiguration(input.OnDeviceServiceConfiguration, context),
1263
- }),
1264
- ...(input.RemoteManagement != null && { RemoteManagement: input.RemoteManagement }),
1265
- ...(input.Resources != null && { Resources: se_JobResource(input.Resources, context) }),
1266
- ...(input.RoleARN != null && { RoleARN: input.RoleARN }),
1267
- ...(input.ShippingOption != null && { ShippingOption: input.ShippingOption }),
1268
- ...(input.SnowballType != null && { SnowballType: input.SnowballType }),
1269
- ...(input.TaxDocuments != null && { TaxDocuments: se_TaxDocuments(input.TaxDocuments, context) }),
1270
- };
1271
- };
1272
- const se_CreateJobRequest = (input, context) => {
1273
- return {
1274
- ...(input.AddressId != null && { AddressId: input.AddressId }),
1275
- ...(input.ClusterId != null && { ClusterId: input.ClusterId }),
1276
- ...(input.Description != null && { Description: input.Description }),
1277
- ...(input.DeviceConfiguration != null && {
1278
- DeviceConfiguration: se_DeviceConfiguration(input.DeviceConfiguration, context),
1279
- }),
1280
- ...(input.ForwardingAddressId != null && { ForwardingAddressId: input.ForwardingAddressId }),
1281
- ...(input.JobType != null && { JobType: input.JobType }),
1282
- ...(input.KmsKeyARN != null && { KmsKeyARN: input.KmsKeyARN }),
1283
- ...(input.LongTermPricingId != null && { LongTermPricingId: input.LongTermPricingId }),
1284
- ...(input.Notification != null && { Notification: se_Notification(input.Notification, context) }),
1285
- ...(input.OnDeviceServiceConfiguration != null && {
1286
- OnDeviceServiceConfiguration: se_OnDeviceServiceConfiguration(input.OnDeviceServiceConfiguration, context),
1287
- }),
1288
- ...(input.RemoteManagement != null && { RemoteManagement: input.RemoteManagement }),
1289
- ...(input.Resources != null && { Resources: se_JobResource(input.Resources, context) }),
1290
- ...(input.RoleARN != null && { RoleARN: input.RoleARN }),
1291
- ...(input.ShippingOption != null && { ShippingOption: input.ShippingOption }),
1292
- ...(input.SnowballCapacityPreference != null && { SnowballCapacityPreference: input.SnowballCapacityPreference }),
1293
- ...(input.SnowballType != null && { SnowballType: input.SnowballType }),
1294
- ...(input.TaxDocuments != null && { TaxDocuments: se_TaxDocuments(input.TaxDocuments, context) }),
1295
- };
1296
- };
1297
- const se_CreateLongTermPricingRequest = (input, context) => {
1298
- return {
1299
- ...(input.IsLongTermPricingAutoRenew != null && { IsLongTermPricingAutoRenew: input.IsLongTermPricingAutoRenew }),
1300
- ...(input.LongTermPricingType != null && { LongTermPricingType: input.LongTermPricingType }),
1301
- ...(input.SnowballType != null && { SnowballType: input.SnowballType }),
1302
- };
1303
- };
1304
- const se_CreateReturnShippingLabelRequest = (input, context) => {
1305
- return {
1306
- ...(input.JobId != null && { JobId: input.JobId }),
1307
- ...(input.ShippingOption != null && { ShippingOption: input.ShippingOption }),
1308
- };
1309
- };
1310
- const se_DependentService = (input, context) => {
1311
- return {
1312
- ...(input.ServiceName != null && { ServiceName: input.ServiceName }),
1313
- ...(input.ServiceVersion != null && { ServiceVersion: se_ServiceVersion(input.ServiceVersion, context) }),
1314
- };
1315
- };
1316
- const se_DependentServiceList = (input, context) => {
1317
- return input
1318
- .filter((e) => e != null)
1319
- .map((entry) => {
1320
- return se_DependentService(entry, context);
1321
- });
1322
- };
1323
- const se_DescribeAddressesRequest = (input, context) => {
1324
- return {
1325
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1326
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1327
- };
1328
- };
1329
- const se_DescribeAddressRequest = (input, context) => {
1330
- return {
1331
- ...(input.AddressId != null && { AddressId: input.AddressId }),
1332
- };
1333
- };
1334
- const se_DescribeClusterRequest = (input, context) => {
1335
- return {
1336
- ...(input.ClusterId != null && { ClusterId: input.ClusterId }),
1337
- };
1338
- };
1339
- const se_DescribeJobRequest = (input, context) => {
1340
- return {
1341
- ...(input.JobId != null && { JobId: input.JobId }),
1342
- };
1343
- };
1344
- const se_DescribeReturnShippingLabelRequest = (input, context) => {
1345
- return {
1346
- ...(input.JobId != null && { JobId: input.JobId }),
1347
- };
1348
- };
1349
- const se_DeviceConfiguration = (input, context) => {
1350
- return {
1351
- ...(input.SnowconeDeviceConfiguration != null && {
1352
- SnowconeDeviceConfiguration: se_SnowconeDeviceConfiguration(input.SnowconeDeviceConfiguration, context),
1353
- }),
1354
- };
1355
- };
1356
- const se_Ec2AmiResource = (input, context) => {
1357
- return {
1358
- ...(input.AmiId != null && { AmiId: input.AmiId }),
1359
- ...(input.SnowballAmiId != null && { SnowballAmiId: input.SnowballAmiId }),
1360
- };
1361
- };
1362
- const se_Ec2AmiResourceList = (input, context) => {
1363
- return input
1364
- .filter((e) => e != null)
1365
- .map((entry) => {
1366
- return se_Ec2AmiResource(entry, context);
1367
- });
1368
- };
1369
- const se_EKSOnDeviceServiceConfiguration = (input, context) => {
1370
- return {
1371
- ...(input.EKSAnywhereVersion != null && { EKSAnywhereVersion: input.EKSAnywhereVersion }),
1372
- ...(input.KubernetesVersion != null && { KubernetesVersion: input.KubernetesVersion }),
1373
- };
1374
- };
1375
- const se_EventTriggerDefinition = (input, context) => {
1376
- return {
1377
- ...(input.EventResourceARN != null && { EventResourceARN: input.EventResourceARN }),
1378
- };
1379
- };
1380
- const se_EventTriggerDefinitionList = (input, context) => {
1381
- return input
1382
- .filter((e) => e != null)
1383
- .map((entry) => {
1384
- return se_EventTriggerDefinition(entry, context);
1385
- });
1386
- };
1387
- const se_GetJobManifestRequest = (input, context) => {
1388
- return {
1389
- ...(input.JobId != null && { JobId: input.JobId }),
1390
- };
1391
- };
1392
- const se_GetJobUnlockCodeRequest = (input, context) => {
1393
- return {
1394
- ...(input.JobId != null && { JobId: input.JobId }),
1395
- };
1396
- };
1397
- const se_GetSnowballUsageRequest = (input, context) => {
1398
- return {};
1399
- };
1400
- const se_GetSoftwareUpdatesRequest = (input, context) => {
1401
- return {
1402
- ...(input.JobId != null && { JobId: input.JobId }),
1403
- };
1404
- };
1405
- const se_INDTaxDocuments = (input, context) => {
1406
- return {
1407
- ...(input.GSTIN != null && { GSTIN: input.GSTIN }),
1408
- };
1409
- };
1410
- const se_JobResource = (input, context) => {
1411
- return {
1412
- ...(input.Ec2AmiResources != null && { Ec2AmiResources: se_Ec2AmiResourceList(input.Ec2AmiResources, context) }),
1413
- ...(input.LambdaResources != null && { LambdaResources: se_LambdaResourceList(input.LambdaResources, context) }),
1414
- ...(input.S3Resources != null && { S3Resources: se_S3ResourceList(input.S3Resources, context) }),
1415
- };
1416
- };
1417
- const se_JobStateList = (input, context) => {
1418
- return input
1419
- .filter((e) => e != null)
1420
- .map((entry) => {
1421
- return entry;
1422
- });
1423
- };
1424
- const se_KeyRange = (input, context) => {
1425
- return {
1426
- ...(input.BeginMarker != null && { BeginMarker: input.BeginMarker }),
1427
- ...(input.EndMarker != null && { EndMarker: input.EndMarker }),
1428
- };
1429
- };
1430
- const se_LambdaResource = (input, context) => {
1431
- return {
1432
- ...(input.EventTriggers != null && { EventTriggers: se_EventTriggerDefinitionList(input.EventTriggers, context) }),
1433
- ...(input.LambdaArn != null && { LambdaArn: input.LambdaArn }),
1434
- };
1435
- };
1436
- const se_LambdaResourceList = (input, context) => {
1437
- return input
1438
- .filter((e) => e != null)
1439
- .map((entry) => {
1440
- return se_LambdaResource(entry, context);
1441
- });
1442
- };
1443
- const se_ListClusterJobsRequest = (input, context) => {
1444
- return {
1445
- ...(input.ClusterId != null && { ClusterId: input.ClusterId }),
1446
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1447
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1448
- };
1449
- };
1450
- const se_ListClustersRequest = (input, context) => {
1451
- return {
1452
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1453
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1454
- };
1455
- };
1456
- const se_ListCompatibleImagesRequest = (input, context) => {
1457
- return {
1458
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1459
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1460
- };
1461
- };
1462
- const se_ListJobsRequest = (input, context) => {
1463
- return {
1464
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1465
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1466
- };
1467
- };
1468
- const se_ListLongTermPricingRequest = (input, context) => {
1469
- return {
1470
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1471
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1472
- };
1473
- };
1474
- const se_ListServiceVersionsRequest = (input, context) => {
1475
- return {
1476
- ...(input.DependentServices != null && {
1477
- DependentServices: se_DependentServiceList(input.DependentServices, context),
1478
- }),
1479
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1480
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1481
- ...(input.ServiceName != null && { ServiceName: input.ServiceName }),
1482
- };
1483
- };
1484
- const se_NFSOnDeviceServiceConfiguration = (input, context) => {
1485
- return {
1486
- ...(input.StorageLimit != null && { StorageLimit: input.StorageLimit }),
1487
- ...(input.StorageUnit != null && { StorageUnit: input.StorageUnit }),
1488
- };
1489
- };
1490
- const se_Notification = (input, context) => {
1491
- return {
1492
- ...(input.JobStatesToNotify != null && { JobStatesToNotify: se_JobStateList(input.JobStatesToNotify, context) }),
1493
- ...(input.NotifyAll != null && { NotifyAll: input.NotifyAll }),
1494
- ...(input.SnsTopicARN != null && { SnsTopicARN: input.SnsTopicARN }),
1495
- };
1496
- };
1497
- const se_OnDeviceServiceConfiguration = (input, context) => {
1498
- return {
1499
- ...(input.EKSOnDeviceService != null && {
1500
- EKSOnDeviceService: se_EKSOnDeviceServiceConfiguration(input.EKSOnDeviceService, context),
1501
- }),
1502
- ...(input.NFSOnDeviceService != null && {
1503
- NFSOnDeviceService: se_NFSOnDeviceServiceConfiguration(input.NFSOnDeviceService, context),
1504
- }),
1505
- ...(input.TGWOnDeviceService != null && {
1506
- TGWOnDeviceService: se_TGWOnDeviceServiceConfiguration(input.TGWOnDeviceService, context),
1507
- }),
1508
- };
1509
- };
1510
- const se_S3Resource = (input, context) => {
1511
- return {
1512
- ...(input.BucketArn != null && { BucketArn: input.BucketArn }),
1513
- ...(input.KeyRange != null && { KeyRange: se_KeyRange(input.KeyRange, context) }),
1514
- ...(input.TargetOnDeviceServices != null && {
1515
- TargetOnDeviceServices: se_TargetOnDeviceServiceList(input.TargetOnDeviceServices, context),
1516
- }),
1517
- };
1518
- };
1519
- const se_S3ResourceList = (input, context) => {
1520
- return input
1521
- .filter((e) => e != null)
1522
- .map((entry) => {
1523
- return se_S3Resource(entry, context);
1524
- });
1525
- };
1526
- const se_ServiceVersion = (input, context) => {
1527
- return {
1528
- ...(input.Version != null && { Version: input.Version }),
1529
- };
1530
- };
1531
- const se_SnowconeDeviceConfiguration = (input, context) => {
1532
- return {
1533
- ...(input.WirelessConnection != null && {
1534
- WirelessConnection: se_WirelessConnection(input.WirelessConnection, context),
1535
- }),
1536
- };
1537
- };
1538
- const se_TargetOnDeviceService = (input, context) => {
1539
- return {
1540
- ...(input.ServiceName != null && { ServiceName: input.ServiceName }),
1541
- ...(input.TransferOption != null && { TransferOption: input.TransferOption }),
1542
- };
1543
- };
1544
- const se_TargetOnDeviceServiceList = (input, context) => {
1545
- return input
1546
- .filter((e) => e != null)
1547
- .map((entry) => {
1548
- return se_TargetOnDeviceService(entry, context);
1549
- });
1550
- };
1551
- const se_TaxDocuments = (input, context) => {
1552
- return {
1553
- ...(input.IND != null && { IND: se_INDTaxDocuments(input.IND, context) }),
1554
- };
1555
- };
1556
- const se_TGWOnDeviceServiceConfiguration = (input, context) => {
1557
- return {
1558
- ...(input.StorageLimit != null && { StorageLimit: input.StorageLimit }),
1559
- ...(input.StorageUnit != null && { StorageUnit: input.StorageUnit }),
1560
- };
1561
- };
1562
- const se_UpdateClusterRequest = (input, context) => {
1563
- return {
1564
- ...(input.AddressId != null && { AddressId: input.AddressId }),
1565
- ...(input.ClusterId != null && { ClusterId: input.ClusterId }),
1566
- ...(input.Description != null && { Description: input.Description }),
1567
- ...(input.ForwardingAddressId != null && { ForwardingAddressId: input.ForwardingAddressId }),
1568
- ...(input.Notification != null && { Notification: se_Notification(input.Notification, context) }),
1569
- ...(input.OnDeviceServiceConfiguration != null && {
1570
- OnDeviceServiceConfiguration: se_OnDeviceServiceConfiguration(input.OnDeviceServiceConfiguration, context),
1571
- }),
1572
- ...(input.Resources != null && { Resources: se_JobResource(input.Resources, context) }),
1573
- ...(input.RoleARN != null && { RoleARN: input.RoleARN }),
1574
- ...(input.ShippingOption != null && { ShippingOption: input.ShippingOption }),
1575
- };
1576
- };
1577
- const se_UpdateJobRequest = (input, context) => {
1578
- return {
1579
- ...(input.AddressId != null && { AddressId: input.AddressId }),
1580
- ...(input.Description != null && { Description: input.Description }),
1581
- ...(input.ForwardingAddressId != null && { ForwardingAddressId: input.ForwardingAddressId }),
1582
- ...(input.JobId != null && { JobId: input.JobId }),
1583
- ...(input.Notification != null && { Notification: se_Notification(input.Notification, context) }),
1584
- ...(input.OnDeviceServiceConfiguration != null && {
1585
- OnDeviceServiceConfiguration: se_OnDeviceServiceConfiguration(input.OnDeviceServiceConfiguration, context),
1586
- }),
1587
- ...(input.Resources != null && { Resources: se_JobResource(input.Resources, context) }),
1588
- ...(input.RoleARN != null && { RoleARN: input.RoleARN }),
1589
- ...(input.ShippingOption != null && { ShippingOption: input.ShippingOption }),
1590
- ...(input.SnowballCapacityPreference != null && { SnowballCapacityPreference: input.SnowballCapacityPreference }),
1591
- };
1592
- };
1593
- const se_UpdateJobShipmentStateRequest = (input, context) => {
1594
- return {
1595
- ...(input.JobId != null && { JobId: input.JobId }),
1596
- ...(input.ShipmentState != null && { ShipmentState: input.ShipmentState }),
1597
- };
1598
- };
1599
- const se_UpdateLongTermPricingRequest = (input, context) => {
1600
- return {
1601
- ...(input.IsLongTermPricingAutoRenew != null && { IsLongTermPricingAutoRenew: input.IsLongTermPricingAutoRenew }),
1602
- ...(input.LongTermPricingId != null && { LongTermPricingId: input.LongTermPricingId }),
1603
- ...(input.ReplacementJob != null && { ReplacementJob: input.ReplacementJob }),
1604
- };
1605
- };
1606
- const se_WirelessConnection = (input, context) => {
1607
- return {
1608
- ...(input.IsWifiEnabled != null && { IsWifiEnabled: input.IsWifiEnabled }),
1609
- };
1610
- };
1611
- const de_Address = (output, context) => {
1612
- return {
1613
- AddressId: __expectString(output.AddressId),
1614
- City: __expectString(output.City),
1615
- Company: __expectString(output.Company),
1616
- Country: __expectString(output.Country),
1617
- IsRestricted: __expectBoolean(output.IsRestricted),
1618
- Landmark: __expectString(output.Landmark),
1619
- Name: __expectString(output.Name),
1620
- PhoneNumber: __expectString(output.PhoneNumber),
1621
- PostalCode: __expectString(output.PostalCode),
1622
- PrefectureOrDistrict: __expectString(output.PrefectureOrDistrict),
1623
- StateOrProvince: __expectString(output.StateOrProvince),
1624
- Street1: __expectString(output.Street1),
1625
- Street2: __expectString(output.Street2),
1626
- Street3: __expectString(output.Street3),
1627
- };
1628
- };
1629
- const de_AddressList = (output, context) => {
1630
- const retVal = (output || [])
1631
- .filter((e) => e != null)
1632
- .map((entry) => {
1633
- if (entry === null) {
1634
- return null;
1635
- }
1636
- return de_Address(entry, context);
1637
- });
1638
- return retVal;
1639
- };
1640
- const de_CancelClusterResult = (output, context) => {
1641
- return {};
1642
- };
1643
- const de_CancelJobResult = (output, context) => {
1644
- return {};
1645
- };
1646
- const de_ClusterLimitExceededException = (output, context) => {
1647
- return {
1648
- Message: __expectString(output.Message),
1649
- };
1650
- };
1651
1194
  const de_ClusterListEntry = (output, context) => {
1652
- return {
1653
- ClusterId: __expectString(output.ClusterId),
1654
- ClusterState: __expectString(output.ClusterState),
1655
- CreationDate: output.CreationDate != null
1656
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDate)))
1657
- : undefined,
1658
- Description: __expectString(output.Description),
1659
- };
1195
+ return take(output, {
1196
+ ClusterId: __expectString,
1197
+ ClusterState: __expectString,
1198
+ CreationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1199
+ Description: __expectString,
1200
+ });
1660
1201
  };
1661
1202
  const de_ClusterListEntryList = (output, context) => {
1662
1203
  const retVal = (output || [])
1663
1204
  .filter((e) => e != null)
1664
1205
  .map((entry) => {
1665
- if (entry === null) {
1666
- return null;
1667
- }
1668
1206
  return de_ClusterListEntry(entry, context);
1669
1207
  });
1670
1208
  return retVal;
1671
1209
  };
1672
1210
  const de_ClusterMetadata = (output, context) => {
1673
- return {
1674
- AddressId: __expectString(output.AddressId),
1675
- ClusterId: __expectString(output.ClusterId),
1676
- ClusterState: __expectString(output.ClusterState),
1677
- CreationDate: output.CreationDate != null
1678
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDate)))
1679
- : undefined,
1680
- Description: __expectString(output.Description),
1681
- ForwardingAddressId: __expectString(output.ForwardingAddressId),
1682
- JobType: __expectString(output.JobType),
1683
- KmsKeyARN: __expectString(output.KmsKeyARN),
1684
- Notification: output.Notification != null ? de_Notification(output.Notification, context) : undefined,
1685
- OnDeviceServiceConfiguration: output.OnDeviceServiceConfiguration != null
1686
- ? de_OnDeviceServiceConfiguration(output.OnDeviceServiceConfiguration, context)
1687
- : undefined,
1688
- Resources: output.Resources != null ? de_JobResource(output.Resources, context) : undefined,
1689
- RoleARN: __expectString(output.RoleARN),
1690
- ShippingOption: __expectString(output.ShippingOption),
1691
- SnowballType: __expectString(output.SnowballType),
1692
- TaxDocuments: output.TaxDocuments != null ? de_TaxDocuments(output.TaxDocuments, context) : undefined,
1693
- };
1694
- };
1695
- const de_CompatibleImage = (output, context) => {
1696
- return {
1697
- AmiId: __expectString(output.AmiId),
1698
- Name: __expectString(output.Name),
1699
- };
1700
- };
1701
- const de_CompatibleImageList = (output, context) => {
1702
- const retVal = (output || [])
1703
- .filter((e) => e != null)
1704
- .map((entry) => {
1705
- if (entry === null) {
1706
- return null;
1707
- }
1708
- return de_CompatibleImage(entry, context);
1211
+ return take(output, {
1212
+ AddressId: __expectString,
1213
+ ClusterId: __expectString,
1214
+ ClusterState: __expectString,
1215
+ CreationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1216
+ Description: __expectString,
1217
+ ForwardingAddressId: __expectString,
1218
+ JobType: __expectString,
1219
+ KmsKeyARN: __expectString,
1220
+ Notification: _json,
1221
+ OnDeviceServiceConfiguration: _json,
1222
+ Resources: _json,
1223
+ RoleARN: __expectString,
1224
+ ShippingOption: __expectString,
1225
+ SnowballType: __expectString,
1226
+ TaxDocuments: _json,
1709
1227
  });
1710
- return retVal;
1711
- };
1712
- const de_ConflictException = (output, context) => {
1713
- return {
1714
- ConflictResource: __expectString(output.ConflictResource),
1715
- Message: __expectString(output.Message),
1716
- };
1717
- };
1718
- const de_CreateAddressResult = (output, context) => {
1719
- return {
1720
- AddressId: __expectString(output.AddressId),
1721
- };
1722
- };
1723
- const de_CreateClusterResult = (output, context) => {
1724
- return {
1725
- ClusterId: __expectString(output.ClusterId),
1726
- };
1727
- };
1728
- const de_CreateJobResult = (output, context) => {
1729
- return {
1730
- JobId: __expectString(output.JobId),
1731
- };
1732
- };
1733
- const de_CreateLongTermPricingResult = (output, context) => {
1734
- return {
1735
- LongTermPricingId: __expectString(output.LongTermPricingId),
1736
- };
1737
- };
1738
- const de_CreateReturnShippingLabelResult = (output, context) => {
1739
- return {
1740
- Status: __expectString(output.Status),
1741
- };
1742
- };
1743
- const de_DataTransfer = (output, context) => {
1744
- return {
1745
- BytesTransferred: __expectLong(output.BytesTransferred),
1746
- ObjectsTransferred: __expectLong(output.ObjectsTransferred),
1747
- TotalBytes: __expectLong(output.TotalBytes),
1748
- TotalObjects: __expectLong(output.TotalObjects),
1749
- };
1750
- };
1751
- const de_DependentService = (output, context) => {
1752
- return {
1753
- ServiceName: __expectString(output.ServiceName),
1754
- ServiceVersion: output.ServiceVersion != null ? de_ServiceVersion(output.ServiceVersion, context) : undefined,
1755
- };
1756
- };
1757
- const de_DependentServiceList = (output, context) => {
1758
- const retVal = (output || [])
1759
- .filter((e) => e != null)
1760
- .map((entry) => {
1761
- if (entry === null) {
1762
- return null;
1763
- }
1764
- return de_DependentService(entry, context);
1765
- });
1766
- return retVal;
1767
- };
1768
- const de_DescribeAddressesResult = (output, context) => {
1769
- return {
1770
- Addresses: output.Addresses != null ? de_AddressList(output.Addresses, context) : undefined,
1771
- NextToken: __expectString(output.NextToken),
1772
- };
1773
- };
1774
- const de_DescribeAddressResult = (output, context) => {
1775
- return {
1776
- Address: output.Address != null ? de_Address(output.Address, context) : undefined,
1777
- };
1778
1228
  };
1779
1229
  const de_DescribeClusterResult = (output, context) => {
1780
- return {
1781
- ClusterMetadata: output.ClusterMetadata != null ? de_ClusterMetadata(output.ClusterMetadata, context) : undefined,
1782
- };
1230
+ return take(output, {
1231
+ ClusterMetadata: (_) => de_ClusterMetadata(_, context),
1232
+ });
1783
1233
  };
1784
1234
  const de_DescribeJobResult = (output, context) => {
1785
- return {
1786
- JobMetadata: output.JobMetadata != null ? de_JobMetadata(output.JobMetadata, context) : undefined,
1787
- SubJobMetadata: output.SubJobMetadata != null ? de_JobMetadataList(output.SubJobMetadata, context) : undefined,
1788
- };
1789
- };
1790
- const de_DescribeReturnShippingLabelResult = (output, context) => {
1791
- return {
1792
- ExpirationDate: output.ExpirationDate != null
1793
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ExpirationDate)))
1794
- : undefined,
1795
- ReturnShippingLabelURI: __expectString(output.ReturnShippingLabelURI),
1796
- Status: __expectString(output.Status),
1797
- };
1798
- };
1799
- const de_DeviceConfiguration = (output, context) => {
1800
- return {
1801
- SnowconeDeviceConfiguration: output.SnowconeDeviceConfiguration != null
1802
- ? de_SnowconeDeviceConfiguration(output.SnowconeDeviceConfiguration, context)
1803
- : undefined,
1804
- };
1805
- };
1806
- const de_Ec2AmiResource = (output, context) => {
1807
- return {
1808
- AmiId: __expectString(output.AmiId),
1809
- SnowballAmiId: __expectString(output.SnowballAmiId),
1810
- };
1811
- };
1812
- const de_Ec2AmiResourceList = (output, context) => {
1813
- const retVal = (output || [])
1814
- .filter((e) => e != null)
1815
- .map((entry) => {
1816
- if (entry === null) {
1817
- return null;
1818
- }
1819
- return de_Ec2AmiResource(entry, context);
1235
+ return take(output, {
1236
+ JobMetadata: (_) => de_JobMetadata(_, context),
1237
+ SubJobMetadata: (_) => de_JobMetadataList(_, context),
1820
1238
  });
1821
- return retVal;
1822
- };
1823
- const de_Ec2RequestFailedException = (output, context) => {
1824
- return {
1825
- Message: __expectString(output.Message),
1826
- };
1827
1239
  };
1828
- const de_EKSOnDeviceServiceConfiguration = (output, context) => {
1829
- return {
1830
- EKSAnywhereVersion: __expectString(output.EKSAnywhereVersion),
1831
- KubernetesVersion: __expectString(output.KubernetesVersion),
1832
- };
1833
- };
1834
- const de_EventTriggerDefinition = (output, context) => {
1835
- return {
1836
- EventResourceARN: __expectString(output.EventResourceARN),
1837
- };
1838
- };
1839
- const de_EventTriggerDefinitionList = (output, context) => {
1840
- const retVal = (output || [])
1841
- .filter((e) => e != null)
1842
- .map((entry) => {
1843
- if (entry === null) {
1844
- return null;
1845
- }
1846
- return de_EventTriggerDefinition(entry, context);
1240
+ const de_DescribeReturnShippingLabelResult = (output, context) => {
1241
+ return take(output, {
1242
+ ExpirationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1243
+ ReturnShippingLabelURI: __expectString,
1244
+ Status: __expectString,
1847
1245
  });
1848
- return retVal;
1849
- };
1850
- const de_GetJobManifestResult = (output, context) => {
1851
- return {
1852
- ManifestURI: __expectString(output.ManifestURI),
1853
- };
1854
- };
1855
- const de_GetJobUnlockCodeResult = (output, context) => {
1856
- return {
1857
- UnlockCode: __expectString(output.UnlockCode),
1858
- };
1859
- };
1860
- const de_GetSnowballUsageResult = (output, context) => {
1861
- return {
1862
- SnowballLimit: __expectInt32(output.SnowballLimit),
1863
- SnowballsInUse: __expectInt32(output.SnowballsInUse),
1864
- };
1865
- };
1866
- const de_GetSoftwareUpdatesResult = (output, context) => {
1867
- return {
1868
- UpdatesURI: __expectString(output.UpdatesURI),
1869
- };
1870
- };
1871
- const de_INDTaxDocuments = (output, context) => {
1872
- return {
1873
- GSTIN: __expectString(output.GSTIN),
1874
- };
1875
- };
1876
- const de_InvalidAddressException = (output, context) => {
1877
- return {
1878
- Message: __expectString(output.Message),
1879
- };
1880
- };
1881
- const de_InvalidInputCombinationException = (output, context) => {
1882
- return {
1883
- Message: __expectString(output.Message),
1884
- };
1885
- };
1886
- const de_InvalidJobStateException = (output, context) => {
1887
- return {
1888
- Message: __expectString(output.Message),
1889
- };
1890
- };
1891
- const de_InvalidNextTokenException = (output, context) => {
1892
- return {
1893
- Message: __expectString(output.Message),
1894
- };
1895
- };
1896
- const de_InvalidResourceException = (output, context) => {
1897
- return {
1898
- Message: __expectString(output.Message),
1899
- ResourceType: __expectString(output.ResourceType),
1900
- };
1901
1246
  };
1902
1247
  const de_JobListEntry = (output, context) => {
1903
- return {
1904
- CreationDate: output.CreationDate != null
1905
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDate)))
1906
- : undefined,
1907
- Description: __expectString(output.Description),
1908
- IsMaster: __expectBoolean(output.IsMaster),
1909
- JobId: __expectString(output.JobId),
1910
- JobState: __expectString(output.JobState),
1911
- JobType: __expectString(output.JobType),
1912
- SnowballType: __expectString(output.SnowballType),
1913
- };
1248
+ return take(output, {
1249
+ CreationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1250
+ Description: __expectString,
1251
+ IsMaster: __expectBoolean,
1252
+ JobId: __expectString,
1253
+ JobState: __expectString,
1254
+ JobType: __expectString,
1255
+ SnowballType: __expectString,
1256
+ });
1914
1257
  };
1915
1258
  const de_JobListEntryList = (output, context) => {
1916
1259
  const retVal = (output || [])
1917
1260
  .filter((e) => e != null)
1918
1261
  .map((entry) => {
1919
- if (entry === null) {
1920
- return null;
1921
- }
1922
1262
  return de_JobListEntry(entry, context);
1923
1263
  });
1924
1264
  return retVal;
1925
1265
  };
1926
- const de_JobLogs = (output, context) => {
1927
- return {
1928
- JobCompletionReportURI: __expectString(output.JobCompletionReportURI),
1929
- JobFailureLogURI: __expectString(output.JobFailureLogURI),
1930
- JobSuccessLogURI: __expectString(output.JobSuccessLogURI),
1931
- };
1932
- };
1933
1266
  const de_JobMetadata = (output, context) => {
1934
- return {
1935
- AddressId: __expectString(output.AddressId),
1936
- ClusterId: __expectString(output.ClusterId),
1937
- CreationDate: output.CreationDate != null
1938
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDate)))
1939
- : undefined,
1940
- DataTransferProgress: output.DataTransferProgress != null ? de_DataTransfer(output.DataTransferProgress, context) : undefined,
1941
- Description: __expectString(output.Description),
1942
- DeviceConfiguration: output.DeviceConfiguration != null ? de_DeviceConfiguration(output.DeviceConfiguration, context) : undefined,
1943
- ForwardingAddressId: __expectString(output.ForwardingAddressId),
1944
- JobId: __expectString(output.JobId),
1945
- JobLogInfo: output.JobLogInfo != null ? de_JobLogs(output.JobLogInfo, context) : undefined,
1946
- JobState: __expectString(output.JobState),
1947
- JobType: __expectString(output.JobType),
1948
- KmsKeyARN: __expectString(output.KmsKeyARN),
1949
- LongTermPricingId: __expectString(output.LongTermPricingId),
1950
- Notification: output.Notification != null ? de_Notification(output.Notification, context) : undefined,
1951
- OnDeviceServiceConfiguration: output.OnDeviceServiceConfiguration != null
1952
- ? de_OnDeviceServiceConfiguration(output.OnDeviceServiceConfiguration, context)
1953
- : undefined,
1954
- RemoteManagement: __expectString(output.RemoteManagement),
1955
- Resources: output.Resources != null ? de_JobResource(output.Resources, context) : undefined,
1956
- RoleARN: __expectString(output.RoleARN),
1957
- ShippingDetails: output.ShippingDetails != null ? de_ShippingDetails(output.ShippingDetails, context) : undefined,
1958
- SnowballCapacityPreference: __expectString(output.SnowballCapacityPreference),
1959
- SnowballType: __expectString(output.SnowballType),
1960
- TaxDocuments: output.TaxDocuments != null ? de_TaxDocuments(output.TaxDocuments, context) : undefined,
1961
- };
1267
+ return take(output, {
1268
+ AddressId: __expectString,
1269
+ ClusterId: __expectString,
1270
+ CreationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1271
+ DataTransferProgress: _json,
1272
+ Description: __expectString,
1273
+ DeviceConfiguration: _json,
1274
+ ForwardingAddressId: __expectString,
1275
+ JobId: __expectString,
1276
+ JobLogInfo: _json,
1277
+ JobState: __expectString,
1278
+ JobType: __expectString,
1279
+ KmsKeyARN: __expectString,
1280
+ LongTermPricingId: __expectString,
1281
+ Notification: _json,
1282
+ OnDeviceServiceConfiguration: _json,
1283
+ RemoteManagement: __expectString,
1284
+ Resources: _json,
1285
+ RoleARN: __expectString,
1286
+ ShippingDetails: _json,
1287
+ SnowballCapacityPreference: __expectString,
1288
+ SnowballType: __expectString,
1289
+ TaxDocuments: _json,
1290
+ });
1962
1291
  };
1963
1292
  const de_JobMetadataList = (output, context) => {
1964
1293
  const retVal = (output || [])
1965
1294
  .filter((e) => e != null)
1966
1295
  .map((entry) => {
1967
- if (entry === null) {
1968
- return null;
1969
- }
1970
1296
  return de_JobMetadata(entry, context);
1971
1297
  });
1972
1298
  return retVal;
1973
1299
  };
1974
- const de_JobResource = (output, context) => {
1975
- return {
1976
- Ec2AmiResources: output.Ec2AmiResources != null ? de_Ec2AmiResourceList(output.Ec2AmiResources, context) : undefined,
1977
- LambdaResources: output.LambdaResources != null ? de_LambdaResourceList(output.LambdaResources, context) : undefined,
1978
- S3Resources: output.S3Resources != null ? de_S3ResourceList(output.S3Resources, context) : undefined,
1979
- };
1980
- };
1981
- const de_JobStateList = (output, context) => {
1982
- const retVal = (output || [])
1983
- .filter((e) => e != null)
1984
- .map((entry) => {
1985
- if (entry === null) {
1986
- return null;
1987
- }
1988
- return __expectString(entry);
1989
- });
1990
- return retVal;
1991
- };
1992
- const de_KeyRange = (output, context) => {
1993
- return {
1994
- BeginMarker: __expectString(output.BeginMarker),
1995
- EndMarker: __expectString(output.EndMarker),
1996
- };
1997
- };
1998
- const de_KMSRequestFailedException = (output, context) => {
1999
- return {
2000
- Message: __expectString(output.Message),
2001
- };
2002
- };
2003
- const de_LambdaResource = (output, context) => {
2004
- return {
2005
- EventTriggers: output.EventTriggers != null ? de_EventTriggerDefinitionList(output.EventTriggers, context) : undefined,
2006
- LambdaArn: __expectString(output.LambdaArn),
2007
- };
2008
- };
2009
- const de_LambdaResourceList = (output, context) => {
2010
- const retVal = (output || [])
2011
- .filter((e) => e != null)
2012
- .map((entry) => {
2013
- if (entry === null) {
2014
- return null;
2015
- }
2016
- return de_LambdaResource(entry, context);
2017
- });
2018
- return retVal;
2019
- };
2020
1300
  const de_ListClusterJobsResult = (output, context) => {
2021
- return {
2022
- JobListEntries: output.JobListEntries != null ? de_JobListEntryList(output.JobListEntries, context) : undefined,
2023
- NextToken: __expectString(output.NextToken),
2024
- };
1301
+ return take(output, {
1302
+ JobListEntries: (_) => de_JobListEntryList(_, context),
1303
+ NextToken: __expectString,
1304
+ });
2025
1305
  };
2026
1306
  const de_ListClustersResult = (output, context) => {
2027
- return {
2028
- ClusterListEntries: output.ClusterListEntries != null ? de_ClusterListEntryList(output.ClusterListEntries, context) : undefined,
2029
- NextToken: __expectString(output.NextToken),
2030
- };
2031
- };
2032
- const de_ListCompatibleImagesResult = (output, context) => {
2033
- return {
2034
- CompatibleImages: output.CompatibleImages != null ? de_CompatibleImageList(output.CompatibleImages, context) : undefined,
2035
- NextToken: __expectString(output.NextToken),
2036
- };
1307
+ return take(output, {
1308
+ ClusterListEntries: (_) => de_ClusterListEntryList(_, context),
1309
+ NextToken: __expectString,
1310
+ });
2037
1311
  };
2038
1312
  const de_ListJobsResult = (output, context) => {
2039
- return {
2040
- JobListEntries: output.JobListEntries != null ? de_JobListEntryList(output.JobListEntries, context) : undefined,
2041
- NextToken: __expectString(output.NextToken),
2042
- };
1313
+ return take(output, {
1314
+ JobListEntries: (_) => de_JobListEntryList(_, context),
1315
+ NextToken: __expectString,
1316
+ });
2043
1317
  };
2044
1318
  const de_ListLongTermPricingResult = (output, context) => {
2045
- return {
2046
- LongTermPricingEntries: output.LongTermPricingEntries != null
2047
- ? de_LongTermPricingEntryList(output.LongTermPricingEntries, context)
2048
- : undefined,
2049
- NextToken: __expectString(output.NextToken),
2050
- };
2051
- };
2052
- const de_ListServiceVersionsResult = (output, context) => {
2053
- return {
2054
- DependentServices: output.DependentServices != null ? de_DependentServiceList(output.DependentServices, context) : undefined,
2055
- NextToken: __expectString(output.NextToken),
2056
- ServiceName: __expectString(output.ServiceName),
2057
- ServiceVersions: output.ServiceVersions != null ? de_ServiceVersionList(output.ServiceVersions, context) : undefined,
2058
- };
2059
- };
2060
- const de_LongTermPricingAssociatedJobIdList = (output, context) => {
2061
- const retVal = (output || [])
2062
- .filter((e) => e != null)
2063
- .map((entry) => {
2064
- if (entry === null) {
2065
- return null;
2066
- }
2067
- return __expectString(entry);
1319
+ return take(output, {
1320
+ LongTermPricingEntries: (_) => de_LongTermPricingEntryList(_, context),
1321
+ NextToken: __expectString,
2068
1322
  });
2069
- return retVal;
2070
1323
  };
2071
1324
  const de_LongTermPricingEntryList = (output, context) => {
2072
1325
  const retVal = (output || [])
2073
1326
  .filter((e) => e != null)
2074
1327
  .map((entry) => {
2075
- if (entry === null) {
2076
- return null;
2077
- }
2078
1328
  return de_LongTermPricingListEntry(entry, context);
2079
1329
  });
2080
1330
  return retVal;
2081
1331
  };
2082
1332
  const de_LongTermPricingListEntry = (output, context) => {
2083
- return {
2084
- CurrentActiveJob: __expectString(output.CurrentActiveJob),
2085
- IsLongTermPricingAutoRenew: __expectBoolean(output.IsLongTermPricingAutoRenew),
2086
- JobIds: output.JobIds != null ? de_LongTermPricingAssociatedJobIdList(output.JobIds, context) : undefined,
2087
- LongTermPricingEndDate: output.LongTermPricingEndDate != null
2088
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LongTermPricingEndDate)))
2089
- : undefined,
2090
- LongTermPricingId: __expectString(output.LongTermPricingId),
2091
- LongTermPricingStartDate: output.LongTermPricingStartDate != null
2092
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LongTermPricingStartDate)))
2093
- : undefined,
2094
- LongTermPricingStatus: __expectString(output.LongTermPricingStatus),
2095
- LongTermPricingType: __expectString(output.LongTermPricingType),
2096
- ReplacementJob: __expectString(output.ReplacementJob),
2097
- SnowballType: __expectString(output.SnowballType),
2098
- };
2099
- };
2100
- const de_NFSOnDeviceServiceConfiguration = (output, context) => {
2101
- return {
2102
- StorageLimit: __expectInt32(output.StorageLimit),
2103
- StorageUnit: __expectString(output.StorageUnit),
2104
- };
2105
- };
2106
- const de_Notification = (output, context) => {
2107
- return {
2108
- JobStatesToNotify: output.JobStatesToNotify != null ? de_JobStateList(output.JobStatesToNotify, context) : undefined,
2109
- NotifyAll: __expectBoolean(output.NotifyAll),
2110
- SnsTopicARN: __expectString(output.SnsTopicARN),
2111
- };
2112
- };
2113
- const de_OnDeviceServiceConfiguration = (output, context) => {
2114
- return {
2115
- EKSOnDeviceService: output.EKSOnDeviceService != null
2116
- ? de_EKSOnDeviceServiceConfiguration(output.EKSOnDeviceService, context)
2117
- : undefined,
2118
- NFSOnDeviceService: output.NFSOnDeviceService != null
2119
- ? de_NFSOnDeviceServiceConfiguration(output.NFSOnDeviceService, context)
2120
- : undefined,
2121
- TGWOnDeviceService: output.TGWOnDeviceService != null
2122
- ? de_TGWOnDeviceServiceConfiguration(output.TGWOnDeviceService, context)
2123
- : undefined,
2124
- };
2125
- };
2126
- const de_ReturnShippingLabelAlreadyExistsException = (output, context) => {
2127
- return {
2128
- Message: __expectString(output.Message),
2129
- };
2130
- };
2131
- const de_S3Resource = (output, context) => {
2132
- return {
2133
- BucketArn: __expectString(output.BucketArn),
2134
- KeyRange: output.KeyRange != null ? de_KeyRange(output.KeyRange, context) : undefined,
2135
- TargetOnDeviceServices: output.TargetOnDeviceServices != null
2136
- ? de_TargetOnDeviceServiceList(output.TargetOnDeviceServices, context)
2137
- : undefined,
2138
- };
2139
- };
2140
- const de_S3ResourceList = (output, context) => {
2141
- const retVal = (output || [])
2142
- .filter((e) => e != null)
2143
- .map((entry) => {
2144
- if (entry === null) {
2145
- return null;
2146
- }
2147
- return de_S3Resource(entry, context);
2148
- });
2149
- return retVal;
2150
- };
2151
- const de_ServiceVersion = (output, context) => {
2152
- return {
2153
- Version: __expectString(output.Version),
2154
- };
2155
- };
2156
- const de_ServiceVersionList = (output, context) => {
2157
- const retVal = (output || [])
2158
- .filter((e) => e != null)
2159
- .map((entry) => {
2160
- if (entry === null) {
2161
- return null;
2162
- }
2163
- return de_ServiceVersion(entry, context);
2164
- });
2165
- return retVal;
2166
- };
2167
- const de_Shipment = (output, context) => {
2168
- return {
2169
- Status: __expectString(output.Status),
2170
- TrackingNumber: __expectString(output.TrackingNumber),
2171
- };
2172
- };
2173
- const de_ShippingDetails = (output, context) => {
2174
- return {
2175
- InboundShipment: output.InboundShipment != null ? de_Shipment(output.InboundShipment, context) : undefined,
2176
- OutboundShipment: output.OutboundShipment != null ? de_Shipment(output.OutboundShipment, context) : undefined,
2177
- ShippingOption: __expectString(output.ShippingOption),
2178
- };
2179
- };
2180
- const de_SnowconeDeviceConfiguration = (output, context) => {
2181
- return {
2182
- WirelessConnection: output.WirelessConnection != null ? de_WirelessConnection(output.WirelessConnection, context) : undefined,
2183
- };
2184
- };
2185
- const de_TargetOnDeviceService = (output, context) => {
2186
- return {
2187
- ServiceName: __expectString(output.ServiceName),
2188
- TransferOption: __expectString(output.TransferOption),
2189
- };
2190
- };
2191
- const de_TargetOnDeviceServiceList = (output, context) => {
2192
- const retVal = (output || [])
2193
- .filter((e) => e != null)
2194
- .map((entry) => {
2195
- if (entry === null) {
2196
- return null;
2197
- }
2198
- return de_TargetOnDeviceService(entry, context);
1333
+ return take(output, {
1334
+ CurrentActiveJob: __expectString,
1335
+ IsLongTermPricingAutoRenew: __expectBoolean,
1336
+ JobIds: _json,
1337
+ LongTermPricingEndDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1338
+ LongTermPricingId: __expectString,
1339
+ LongTermPricingStartDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1340
+ LongTermPricingStatus: __expectString,
1341
+ LongTermPricingType: __expectString,
1342
+ ReplacementJob: __expectString,
1343
+ SnowballType: __expectString,
2199
1344
  });
2200
- return retVal;
2201
- };
2202
- const de_TaxDocuments = (output, context) => {
2203
- return {
2204
- IND: output.IND != null ? de_INDTaxDocuments(output.IND, context) : undefined,
2205
- };
2206
- };
2207
- const de_TGWOnDeviceServiceConfiguration = (output, context) => {
2208
- return {
2209
- StorageLimit: __expectInt32(output.StorageLimit),
2210
- StorageUnit: __expectString(output.StorageUnit),
2211
- };
2212
- };
2213
- const de_UnsupportedAddressException = (output, context) => {
2214
- return {
2215
- Message: __expectString(output.Message),
2216
- };
2217
- };
2218
- const de_UpdateClusterResult = (output, context) => {
2219
- return {};
2220
- };
2221
- const de_UpdateJobResult = (output, context) => {
2222
- return {};
2223
- };
2224
- const de_UpdateJobShipmentStateResult = (output, context) => {
2225
- return {};
2226
- };
2227
- const de_UpdateLongTermPricingResult = (output, context) => {
2228
- return {};
2229
- };
2230
- const de_WirelessConnection = (output, context) => {
2231
- return {
2232
- IsWifiEnabled: __expectBoolean(output.IsWifiEnabled),
2233
- };
2234
1345
  };
2235
1346
  const deserializeMetadata = (output) => ({
2236
1347
  httpStatusCode: output.statusCode,
@@ -2245,6 +1356,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
2245
1356
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
2246
1357
  };
2247
1358
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1359
+ const throwDefaultError = withBaseException(__BaseException);
2248
1360
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
2249
1361
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2250
1362
  const contents = {