@aws-sdk/client-braket 3.312.0 → 3.315.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,5 +1,5 @@
1
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
- import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, LazyJsonString as __LazyJsonString, map as __map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
2
+ import { _json, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, LazyJsonString as __LazyJsonString, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, take, withBaseException, } from "@aws-sdk/smithy-client";
3
3
  import { v4 as generateIdempotencyToken } from "uuid";
4
4
  import { BraketServiceException as __BaseException } from "../models/BraketServiceException";
5
5
  import { AccessDeniedException, ConflictException, DeviceOfflineException, DeviceRetiredException, InternalServiceException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
@@ -27,9 +27,9 @@ export const se_CancelQuantumTaskCommand = async (input, context) => {
27
27
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/quantum-task/{quantumTaskArn}/cancel";
28
28
  resolvedPath = __resolvedPath(resolvedPath, input, "quantumTaskArn", () => input.quantumTaskArn, "{quantumTaskArn}", false);
29
29
  let body;
30
- body = JSON.stringify({
31
- clientToken: input.clientToken ?? generateIdempotencyToken(),
32
- });
30
+ body = JSON.stringify(take(input, {
31
+ clientToken: (_) => _ ?? generateIdempotencyToken(),
32
+ }));
33
33
  return new __HttpRequest({
34
34
  protocol,
35
35
  hostname,
@@ -47,28 +47,20 @@ export const se_CreateJobCommand = async (input, context) => {
47
47
  };
48
48
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/job";
49
49
  let body;
50
- body = JSON.stringify({
51
- ...(input.algorithmSpecification != null && {
52
- algorithmSpecification: se_AlgorithmSpecification(input.algorithmSpecification, context),
53
- }),
54
- ...(input.checkpointConfig != null && {
55
- checkpointConfig: se_JobCheckpointConfig(input.checkpointConfig, context),
56
- }),
57
- clientToken: input.clientToken ?? generateIdempotencyToken(),
58
- ...(input.deviceConfig != null && { deviceConfig: se_DeviceConfig(input.deviceConfig, context) }),
59
- ...(input.hyperParameters != null && { hyperParameters: se_HyperParameters(input.hyperParameters, context) }),
60
- ...(input.inputDataConfig != null && { inputDataConfig: se_InputConfigList(input.inputDataConfig, context) }),
61
- ...(input.instanceConfig != null && { instanceConfig: se_InstanceConfig(input.instanceConfig, context) }),
62
- ...(input.jobName != null && { jobName: input.jobName }),
63
- ...(input.outputDataConfig != null && {
64
- outputDataConfig: se_JobOutputDataConfig(input.outputDataConfig, context),
65
- }),
66
- ...(input.roleArn != null && { roleArn: input.roleArn }),
67
- ...(input.stoppingCondition != null && {
68
- stoppingCondition: se_JobStoppingCondition(input.stoppingCondition, context),
69
- }),
70
- ...(input.tags != null && { tags: se_TagsMap(input.tags, context) }),
71
- });
50
+ body = JSON.stringify(take(input, {
51
+ algorithmSpecification: (_) => _json(_),
52
+ checkpointConfig: (_) => _json(_),
53
+ clientToken: (_) => _ ?? generateIdempotencyToken(),
54
+ deviceConfig: (_) => _json(_),
55
+ hyperParameters: (_) => _json(_),
56
+ inputDataConfig: (_) => _json(_),
57
+ instanceConfig: (_) => _json(_),
58
+ jobName: [],
59
+ outputDataConfig: (_) => _json(_),
60
+ roleArn: [],
61
+ stoppingCondition: (_) => _json(_),
62
+ tags: (_) => _json(_),
63
+ }));
72
64
  return new __HttpRequest({
73
65
  protocol,
74
66
  hostname,
@@ -86,17 +78,17 @@ export const se_CreateQuantumTaskCommand = async (input, context) => {
86
78
  };
87
79
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/quantum-task";
88
80
  let body;
89
- body = JSON.stringify({
90
- ...(input.action != null && { action: __LazyJsonString.fromObject(input.action) }),
91
- clientToken: input.clientToken ?? generateIdempotencyToken(),
92
- ...(input.deviceArn != null && { deviceArn: input.deviceArn }),
93
- ...(input.deviceParameters != null && { deviceParameters: __LazyJsonString.fromObject(input.deviceParameters) }),
94
- ...(input.jobToken != null && { jobToken: input.jobToken }),
95
- ...(input.outputS3Bucket != null && { outputS3Bucket: input.outputS3Bucket }),
96
- ...(input.outputS3KeyPrefix != null && { outputS3KeyPrefix: input.outputS3KeyPrefix }),
97
- ...(input.shots != null && { shots: input.shots }),
98
- ...(input.tags != null && { tags: se_TagsMap(input.tags, context) }),
99
- });
81
+ body = JSON.stringify(take(input, {
82
+ action: (_) => __LazyJsonString.fromObject(_),
83
+ clientToken: (_) => _ ?? generateIdempotencyToken(),
84
+ deviceArn: [],
85
+ deviceParameters: (_) => __LazyJsonString.fromObject(_),
86
+ jobToken: [],
87
+ outputS3Bucket: [],
88
+ outputS3KeyPrefix: [],
89
+ shots: [],
90
+ tags: (_) => _json(_),
91
+ }));
100
92
  return new __HttpRequest({
101
93
  protocol,
102
94
  hostname,
@@ -178,11 +170,11 @@ export const se_SearchDevicesCommand = async (input, context) => {
178
170
  };
179
171
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/devices";
180
172
  let body;
181
- body = JSON.stringify({
182
- ...(input.filters != null && { filters: se_SearchDevicesFilterList(input.filters, context) }),
183
- ...(input.maxResults != null && { maxResults: input.maxResults }),
184
- ...(input.nextToken != null && { nextToken: input.nextToken }),
185
- });
173
+ body = JSON.stringify(take(input, {
174
+ filters: (_) => _json(_),
175
+ maxResults: [],
176
+ nextToken: [],
177
+ }));
186
178
  return new __HttpRequest({
187
179
  protocol,
188
180
  hostname,
@@ -200,11 +192,11 @@ export const se_SearchJobsCommand = async (input, context) => {
200
192
  };
201
193
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/jobs";
202
194
  let body;
203
- body = JSON.stringify({
204
- ...(input.filters != null && { filters: se_SearchJobsFilterList(input.filters, context) }),
205
- ...(input.maxResults != null && { maxResults: input.maxResults }),
206
- ...(input.nextToken != null && { nextToken: input.nextToken }),
207
- });
195
+ body = JSON.stringify(take(input, {
196
+ filters: (_) => _json(_),
197
+ maxResults: [],
198
+ nextToken: [],
199
+ }));
208
200
  return new __HttpRequest({
209
201
  protocol,
210
202
  hostname,
@@ -222,11 +214,11 @@ export const se_SearchQuantumTasksCommand = async (input, context) => {
222
214
  };
223
215
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/quantum-tasks";
224
216
  let body;
225
- body = JSON.stringify({
226
- ...(input.filters != null && { filters: se_SearchQuantumTasksFilterList(input.filters, context) }),
227
- ...(input.maxResults != null && { maxResults: input.maxResults }),
228
- ...(input.nextToken != null && { nextToken: input.nextToken }),
229
- });
217
+ body = JSON.stringify(take(input, {
218
+ filters: (_) => _json(_),
219
+ maxResults: [],
220
+ nextToken: [],
221
+ }));
230
222
  return new __HttpRequest({
231
223
  protocol,
232
224
  hostname,
@@ -245,9 +237,9 @@ export const se_TagResourceCommand = async (input, context) => {
245
237
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
246
238
  resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
247
239
  let body;
248
- body = JSON.stringify({
249
- ...(input.tags != null && { tags: se_TagsMap(input.tags, context) }),
250
- });
240
+ body = JSON.stringify(take(input, {
241
+ tags: (_) => _json(_),
242
+ }));
251
243
  return new __HttpRequest({
252
244
  protocol,
253
245
  hostname,
@@ -289,12 +281,11 @@ export const de_CancelJobCommand = async (output, context) => {
289
281
  $metadata: deserializeMetadata(output),
290
282
  });
291
283
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
292
- if (data.cancellationStatus != null) {
293
- contents.cancellationStatus = __expectString(data.cancellationStatus);
294
- }
295
- if (data.jobArn != null) {
296
- contents.jobArn = __expectString(data.jobArn);
297
- }
284
+ const doc = take(data, {
285
+ cancellationStatus: __expectString,
286
+ jobArn: __expectString,
287
+ });
288
+ Object.assign(contents, doc);
298
289
  return contents;
299
290
  };
300
291
  const de_CancelJobCommandError = async (output, context) => {
@@ -324,10 +315,9 @@ const de_CancelJobCommandError = async (output, context) => {
324
315
  throw await de_ValidationExceptionRes(parsedOutput, context);
325
316
  default:
326
317
  const parsedBody = parsedOutput.body;
327
- throwDefaultError({
318
+ return throwDefaultError({
328
319
  output,
329
320
  parsedBody,
330
- exceptionCtor: __BaseException,
331
321
  errorCode,
332
322
  });
333
323
  }
@@ -340,12 +330,11 @@ export const de_CancelQuantumTaskCommand = async (output, context) => {
340
330
  $metadata: deserializeMetadata(output),
341
331
  });
342
332
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
343
- if (data.cancellationStatus != null) {
344
- contents.cancellationStatus = __expectString(data.cancellationStatus);
345
- }
346
- if (data.quantumTaskArn != null) {
347
- contents.quantumTaskArn = __expectString(data.quantumTaskArn);
348
- }
333
+ const doc = take(data, {
334
+ cancellationStatus: __expectString,
335
+ quantumTaskArn: __expectString,
336
+ });
337
+ Object.assign(contents, doc);
349
338
  return contents;
350
339
  };
351
340
  const de_CancelQuantumTaskCommandError = async (output, context) => {
@@ -375,10 +364,9 @@ const de_CancelQuantumTaskCommandError = async (output, context) => {
375
364
  throw await de_ValidationExceptionRes(parsedOutput, context);
376
365
  default:
377
366
  const parsedBody = parsedOutput.body;
378
- throwDefaultError({
367
+ return throwDefaultError({
379
368
  output,
380
369
  parsedBody,
381
- exceptionCtor: __BaseException,
382
370
  errorCode,
383
371
  });
384
372
  }
@@ -391,9 +379,10 @@ export const de_CreateJobCommand = async (output, context) => {
391
379
  $metadata: deserializeMetadata(output),
392
380
  });
393
381
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
394
- if (data.jobArn != null) {
395
- contents.jobArn = __expectString(data.jobArn);
396
- }
382
+ const doc = take(data, {
383
+ jobArn: __expectString,
384
+ });
385
+ Object.assign(contents, doc);
397
386
  return contents;
398
387
  };
399
388
  const de_CreateJobCommandError = async (output, context) => {
@@ -426,10 +415,9 @@ const de_CreateJobCommandError = async (output, context) => {
426
415
  throw await de_ValidationExceptionRes(parsedOutput, context);
427
416
  default:
428
417
  const parsedBody = parsedOutput.body;
429
- throwDefaultError({
418
+ return throwDefaultError({
430
419
  output,
431
420
  parsedBody,
432
- exceptionCtor: __BaseException,
433
421
  errorCode,
434
422
  });
435
423
  }
@@ -442,9 +430,10 @@ export const de_CreateQuantumTaskCommand = async (output, context) => {
442
430
  $metadata: deserializeMetadata(output),
443
431
  });
444
432
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
445
- if (data.quantumTaskArn != null) {
446
- contents.quantumTaskArn = __expectString(data.quantumTaskArn);
447
- }
433
+ const doc = take(data, {
434
+ quantumTaskArn: __expectString,
435
+ });
436
+ Object.assign(contents, doc);
448
437
  return contents;
449
438
  };
450
439
  const de_CreateQuantumTaskCommandError = async (output, context) => {
@@ -477,10 +466,9 @@ const de_CreateQuantumTaskCommandError = async (output, context) => {
477
466
  throw await de_ValidationExceptionRes(parsedOutput, context);
478
467
  default:
479
468
  const parsedBody = parsedOutput.body;
480
- throwDefaultError({
469
+ return throwDefaultError({
481
470
  output,
482
471
  parsedBody,
483
- exceptionCtor: __BaseException,
484
472
  errorCode,
485
473
  });
486
474
  }
@@ -493,24 +481,15 @@ export const de_GetDeviceCommand = async (output, context) => {
493
481
  $metadata: deserializeMetadata(output),
494
482
  });
495
483
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
496
- if (data.deviceArn != null) {
497
- contents.deviceArn = __expectString(data.deviceArn);
498
- }
499
- if (data.deviceCapabilities != null) {
500
- contents.deviceCapabilities = new __LazyJsonString(data.deviceCapabilities);
501
- }
502
- if (data.deviceName != null) {
503
- contents.deviceName = __expectString(data.deviceName);
504
- }
505
- if (data.deviceStatus != null) {
506
- contents.deviceStatus = __expectString(data.deviceStatus);
507
- }
508
- if (data.deviceType != null) {
509
- contents.deviceType = __expectString(data.deviceType);
510
- }
511
- if (data.providerName != null) {
512
- contents.providerName = __expectString(data.providerName);
513
- }
484
+ const doc = take(data, {
485
+ deviceArn: __expectString,
486
+ deviceCapabilities: (_) => new __LazyJsonString(_),
487
+ deviceName: __expectString,
488
+ deviceStatus: __expectString,
489
+ deviceType: __expectString,
490
+ providerName: __expectString,
491
+ });
492
+ Object.assign(contents, doc);
514
493
  return contents;
515
494
  };
516
495
  const de_GetDeviceCommandError = async (output, context) => {
@@ -537,10 +516,9 @@ const de_GetDeviceCommandError = async (output, context) => {
537
516
  throw await de_ValidationExceptionRes(parsedOutput, context);
538
517
  default:
539
518
  const parsedBody = parsedOutput.body;
540
- throwDefaultError({
519
+ return throwDefaultError({
541
520
  output,
542
521
  parsedBody,
543
- exceptionCtor: __BaseException,
544
522
  errorCode,
545
523
  });
546
524
  }
@@ -553,63 +531,28 @@ export const de_GetJobCommand = async (output, context) => {
553
531
  $metadata: deserializeMetadata(output),
554
532
  });
555
533
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
556
- if (data.algorithmSpecification != null) {
557
- contents.algorithmSpecification = de_AlgorithmSpecification(data.algorithmSpecification, context);
558
- }
559
- if (data.billableDuration != null) {
560
- contents.billableDuration = __expectInt32(data.billableDuration);
561
- }
562
- if (data.checkpointConfig != null) {
563
- contents.checkpointConfig = de_JobCheckpointConfig(data.checkpointConfig, context);
564
- }
565
- if (data.createdAt != null) {
566
- contents.createdAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.createdAt));
567
- }
568
- if (data.deviceConfig != null) {
569
- contents.deviceConfig = de_DeviceConfig(data.deviceConfig, context);
570
- }
571
- if (data.endedAt != null) {
572
- contents.endedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.endedAt));
573
- }
574
- if (data.events != null) {
575
- contents.events = de_JobEvents(data.events, context);
576
- }
577
- if (data.failureReason != null) {
578
- contents.failureReason = __expectString(data.failureReason);
579
- }
580
- if (data.hyperParameters != null) {
581
- contents.hyperParameters = de_HyperParameters(data.hyperParameters, context);
582
- }
583
- if (data.inputDataConfig != null) {
584
- contents.inputDataConfig = de_InputConfigList(data.inputDataConfig, context);
585
- }
586
- if (data.instanceConfig != null) {
587
- contents.instanceConfig = de_InstanceConfig(data.instanceConfig, context);
588
- }
589
- if (data.jobArn != null) {
590
- contents.jobArn = __expectString(data.jobArn);
591
- }
592
- if (data.jobName != null) {
593
- contents.jobName = __expectString(data.jobName);
594
- }
595
- if (data.outputDataConfig != null) {
596
- contents.outputDataConfig = de_JobOutputDataConfig(data.outputDataConfig, context);
597
- }
598
- if (data.roleArn != null) {
599
- contents.roleArn = __expectString(data.roleArn);
600
- }
601
- if (data.startedAt != null) {
602
- contents.startedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.startedAt));
603
- }
604
- if (data.status != null) {
605
- contents.status = __expectString(data.status);
606
- }
607
- if (data.stoppingCondition != null) {
608
- contents.stoppingCondition = de_JobStoppingCondition(data.stoppingCondition, context);
609
- }
610
- if (data.tags != null) {
611
- contents.tags = de_TagsMap(data.tags, context);
612
- }
534
+ const doc = take(data, {
535
+ algorithmSpecification: _json,
536
+ billableDuration: __expectInt32,
537
+ checkpointConfig: _json,
538
+ createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
539
+ deviceConfig: _json,
540
+ endedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
541
+ events: (_) => de_JobEvents(_, context),
542
+ failureReason: __expectString,
543
+ hyperParameters: _json,
544
+ inputDataConfig: _json,
545
+ instanceConfig: _json,
546
+ jobArn: __expectString,
547
+ jobName: __expectString,
548
+ outputDataConfig: _json,
549
+ roleArn: __expectString,
550
+ startedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
551
+ status: __expectString,
552
+ stoppingCondition: _json,
553
+ tags: _json,
554
+ });
555
+ Object.assign(contents, doc);
613
556
  return contents;
614
557
  };
615
558
  const de_GetJobCommandError = async (output, context) => {
@@ -636,10 +579,9 @@ const de_GetJobCommandError = async (output, context) => {
636
579
  throw await de_ValidationExceptionRes(parsedOutput, context);
637
580
  default:
638
581
  const parsedBody = parsedOutput.body;
639
- throwDefaultError({
582
+ return throwDefaultError({
640
583
  output,
641
584
  parsedBody,
642
- exceptionCtor: __BaseException,
643
585
  errorCode,
644
586
  });
645
587
  }
@@ -652,42 +594,21 @@ export const de_GetQuantumTaskCommand = async (output, context) => {
652
594
  $metadata: deserializeMetadata(output),
653
595
  });
654
596
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
655
- if (data.createdAt != null) {
656
- contents.createdAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.createdAt));
657
- }
658
- if (data.deviceArn != null) {
659
- contents.deviceArn = __expectString(data.deviceArn);
660
- }
661
- if (data.deviceParameters != null) {
662
- contents.deviceParameters = new __LazyJsonString(data.deviceParameters);
663
- }
664
- if (data.endedAt != null) {
665
- contents.endedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.endedAt));
666
- }
667
- if (data.failureReason != null) {
668
- contents.failureReason = __expectString(data.failureReason);
669
- }
670
- if (data.jobArn != null) {
671
- contents.jobArn = __expectString(data.jobArn);
672
- }
673
- if (data.outputS3Bucket != null) {
674
- contents.outputS3Bucket = __expectString(data.outputS3Bucket);
675
- }
676
- if (data.outputS3Directory != null) {
677
- contents.outputS3Directory = __expectString(data.outputS3Directory);
678
- }
679
- if (data.quantumTaskArn != null) {
680
- contents.quantumTaskArn = __expectString(data.quantumTaskArn);
681
- }
682
- if (data.shots != null) {
683
- contents.shots = __expectLong(data.shots);
684
- }
685
- if (data.status != null) {
686
- contents.status = __expectString(data.status);
687
- }
688
- if (data.tags != null) {
689
- contents.tags = de_TagsMap(data.tags, context);
690
- }
597
+ const doc = take(data, {
598
+ createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
599
+ deviceArn: __expectString,
600
+ deviceParameters: (_) => new __LazyJsonString(_),
601
+ endedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
602
+ failureReason: __expectString,
603
+ jobArn: __expectString,
604
+ outputS3Bucket: __expectString,
605
+ outputS3Directory: __expectString,
606
+ quantumTaskArn: __expectString,
607
+ shots: __expectLong,
608
+ status: __expectString,
609
+ tags: _json,
610
+ });
611
+ Object.assign(contents, doc);
691
612
  return contents;
692
613
  };
693
614
  const de_GetQuantumTaskCommandError = async (output, context) => {
@@ -714,10 +635,9 @@ const de_GetQuantumTaskCommandError = async (output, context) => {
714
635
  throw await de_ValidationExceptionRes(parsedOutput, context);
715
636
  default:
716
637
  const parsedBody = parsedOutput.body;
717
- throwDefaultError({
638
+ return throwDefaultError({
718
639
  output,
719
640
  parsedBody,
720
- exceptionCtor: __BaseException,
721
641
  errorCode,
722
642
  });
723
643
  }
@@ -730,9 +650,10 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
730
650
  $metadata: deserializeMetadata(output),
731
651
  });
732
652
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
733
- if (data.tags != null) {
734
- contents.tags = de_TagsMap(data.tags, context);
735
- }
653
+ const doc = take(data, {
654
+ tags: _json,
655
+ });
656
+ Object.assign(contents, doc);
736
657
  return contents;
737
658
  };
738
659
  const de_ListTagsForResourceCommandError = async (output, context) => {
@@ -753,10 +674,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
753
674
  throw await de_ValidationExceptionRes(parsedOutput, context);
754
675
  default:
755
676
  const parsedBody = parsedOutput.body;
756
- throwDefaultError({
677
+ return throwDefaultError({
757
678
  output,
758
679
  parsedBody,
759
- exceptionCtor: __BaseException,
760
680
  errorCode,
761
681
  });
762
682
  }
@@ -769,12 +689,11 @@ export const de_SearchDevicesCommand = async (output, context) => {
769
689
  $metadata: deserializeMetadata(output),
770
690
  });
771
691
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
772
- if (data.devices != null) {
773
- contents.devices = de_DeviceSummaryList(data.devices, context);
774
- }
775
- if (data.nextToken != null) {
776
- contents.nextToken = __expectString(data.nextToken);
777
- }
692
+ const doc = take(data, {
693
+ devices: _json,
694
+ nextToken: __expectString,
695
+ });
696
+ Object.assign(contents, doc);
778
697
  return contents;
779
698
  };
780
699
  const de_SearchDevicesCommandError = async (output, context) => {
@@ -798,10 +717,9 @@ const de_SearchDevicesCommandError = async (output, context) => {
798
717
  throw await de_ValidationExceptionRes(parsedOutput, context);
799
718
  default:
800
719
  const parsedBody = parsedOutput.body;
801
- throwDefaultError({
720
+ return throwDefaultError({
802
721
  output,
803
722
  parsedBody,
804
- exceptionCtor: __BaseException,
805
723
  errorCode,
806
724
  });
807
725
  }
@@ -814,12 +732,11 @@ export const de_SearchJobsCommand = async (output, context) => {
814
732
  $metadata: deserializeMetadata(output),
815
733
  });
816
734
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
817
- if (data.jobs != null) {
818
- contents.jobs = de_JobSummaryList(data.jobs, context);
819
- }
820
- if (data.nextToken != null) {
821
- contents.nextToken = __expectString(data.nextToken);
822
- }
735
+ const doc = take(data, {
736
+ jobs: (_) => de_JobSummaryList(_, context),
737
+ nextToken: __expectString,
738
+ });
739
+ Object.assign(contents, doc);
823
740
  return contents;
824
741
  };
825
742
  const de_SearchJobsCommandError = async (output, context) => {
@@ -843,10 +760,9 @@ const de_SearchJobsCommandError = async (output, context) => {
843
760
  throw await de_ValidationExceptionRes(parsedOutput, context);
844
761
  default:
845
762
  const parsedBody = parsedOutput.body;
846
- throwDefaultError({
763
+ return throwDefaultError({
847
764
  output,
848
765
  parsedBody,
849
- exceptionCtor: __BaseException,
850
766
  errorCode,
851
767
  });
852
768
  }
@@ -859,12 +775,11 @@ export const de_SearchQuantumTasksCommand = async (output, context) => {
859
775
  $metadata: deserializeMetadata(output),
860
776
  });
861
777
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
862
- if (data.nextToken != null) {
863
- contents.nextToken = __expectString(data.nextToken);
864
- }
865
- if (data.quantumTasks != null) {
866
- contents.quantumTasks = de_QuantumTaskSummaryList(data.quantumTasks, context);
867
- }
778
+ const doc = take(data, {
779
+ nextToken: __expectString,
780
+ quantumTasks: (_) => de_QuantumTaskSummaryList(_, context),
781
+ });
782
+ Object.assign(contents, doc);
868
783
  return contents;
869
784
  };
870
785
  const de_SearchQuantumTasksCommandError = async (output, context) => {
@@ -888,10 +803,9 @@ const de_SearchQuantumTasksCommandError = async (output, context) => {
888
803
  throw await de_ValidationExceptionRes(parsedOutput, context);
889
804
  default:
890
805
  const parsedBody = parsedOutput.body;
891
- throwDefaultError({
806
+ return throwDefaultError({
892
807
  output,
893
808
  parsedBody,
894
- exceptionCtor: __BaseException,
895
809
  errorCode,
896
810
  });
897
811
  }
@@ -924,10 +838,9 @@ const de_TagResourceCommandError = async (output, context) => {
924
838
  throw await de_ValidationExceptionRes(parsedOutput, context);
925
839
  default:
926
840
  const parsedBody = parsedOutput.body;
927
- throwDefaultError({
841
+ return throwDefaultError({
928
842
  output,
929
843
  parsedBody,
930
- exceptionCtor: __BaseException,
931
844
  errorCode,
932
845
  });
933
846
  }
@@ -960,21 +873,21 @@ const de_UntagResourceCommandError = async (output, context) => {
960
873
  throw await de_ValidationExceptionRes(parsedOutput, context);
961
874
  default:
962
875
  const parsedBody = parsedOutput.body;
963
- throwDefaultError({
876
+ return throwDefaultError({
964
877
  output,
965
878
  parsedBody,
966
- exceptionCtor: __BaseException,
967
879
  errorCode,
968
880
  });
969
881
  }
970
882
  };
971
- const map = __map;
883
+ const throwDefaultError = withBaseException(__BaseException);
972
884
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
973
885
  const contents = map({});
974
886
  const data = parsedOutput.body;
975
- if (data.message != null) {
976
- contents.message = __expectString(data.message);
977
- }
887
+ const doc = take(data, {
888
+ message: __expectString,
889
+ });
890
+ Object.assign(contents, doc);
978
891
  const exception = new AccessDeniedException({
979
892
  $metadata: deserializeMetadata(parsedOutput),
980
893
  ...contents,
@@ -984,9 +897,10 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
984
897
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
985
898
  const contents = map({});
986
899
  const data = parsedOutput.body;
987
- if (data.message != null) {
988
- contents.message = __expectString(data.message);
989
- }
900
+ const doc = take(data, {
901
+ message: __expectString,
902
+ });
903
+ Object.assign(contents, doc);
990
904
  const exception = new ConflictException({
991
905
  $metadata: deserializeMetadata(parsedOutput),
992
906
  ...contents,
@@ -996,9 +910,10 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
996
910
  const de_DeviceOfflineExceptionRes = async (parsedOutput, context) => {
997
911
  const contents = map({});
998
912
  const data = parsedOutput.body;
999
- if (data.message != null) {
1000
- contents.message = __expectString(data.message);
1001
- }
913
+ const doc = take(data, {
914
+ message: __expectString,
915
+ });
916
+ Object.assign(contents, doc);
1002
917
  const exception = new DeviceOfflineException({
1003
918
  $metadata: deserializeMetadata(parsedOutput),
1004
919
  ...contents,
@@ -1008,9 +923,10 @@ const de_DeviceOfflineExceptionRes = async (parsedOutput, context) => {
1008
923
  const de_DeviceRetiredExceptionRes = async (parsedOutput, context) => {
1009
924
  const contents = map({});
1010
925
  const data = parsedOutput.body;
1011
- if (data.message != null) {
1012
- contents.message = __expectString(data.message);
1013
- }
926
+ const doc = take(data, {
927
+ message: __expectString,
928
+ });
929
+ Object.assign(contents, doc);
1014
930
  const exception = new DeviceRetiredException({
1015
931
  $metadata: deserializeMetadata(parsedOutput),
1016
932
  ...contents,
@@ -1020,9 +936,10 @@ const de_DeviceRetiredExceptionRes = async (parsedOutput, context) => {
1020
936
  const de_InternalServiceExceptionRes = async (parsedOutput, context) => {
1021
937
  const contents = map({});
1022
938
  const data = parsedOutput.body;
1023
- if (data.message != null) {
1024
- contents.message = __expectString(data.message);
1025
- }
939
+ const doc = take(data, {
940
+ message: __expectString,
941
+ });
942
+ Object.assign(contents, doc);
1026
943
  const exception = new InternalServiceException({
1027
944
  $metadata: deserializeMetadata(parsedOutput),
1028
945
  ...contents,
@@ -1032,9 +949,10 @@ const de_InternalServiceExceptionRes = async (parsedOutput, context) => {
1032
949
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1033
950
  const contents = map({});
1034
951
  const data = parsedOutput.body;
1035
- if (data.message != null) {
1036
- contents.message = __expectString(data.message);
1037
- }
952
+ const doc = take(data, {
953
+ message: __expectString,
954
+ });
955
+ Object.assign(contents, doc);
1038
956
  const exception = new ResourceNotFoundException({
1039
957
  $metadata: deserializeMetadata(parsedOutput),
1040
958
  ...contents,
@@ -1044,9 +962,10 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1044
962
  const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1045
963
  const contents = map({});
1046
964
  const data = parsedOutput.body;
1047
- if (data.message != null) {
1048
- contents.message = __expectString(data.message);
1049
- }
965
+ const doc = take(data, {
966
+ message: __expectString,
967
+ });
968
+ Object.assign(contents, doc);
1050
969
  const exception = new ServiceQuotaExceededException({
1051
970
  $metadata: deserializeMetadata(parsedOutput),
1052
971
  ...contents,
@@ -1056,9 +975,10 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1056
975
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1057
976
  const contents = map({});
1058
977
  const data = parsedOutput.body;
1059
- if (data.message != null) {
1060
- contents.message = __expectString(data.message);
1061
- }
978
+ const doc = take(data, {
979
+ message: __expectString,
980
+ });
981
+ Object.assign(contents, doc);
1062
982
  const exception = new ThrottlingException({
1063
983
  $metadata: deserializeMetadata(parsedOutput),
1064
984
  ...contents,
@@ -1068,330 +988,72 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1068
988
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
1069
989
  const contents = map({});
1070
990
  const data = parsedOutput.body;
1071
- if (data.message != null) {
1072
- contents.message = __expectString(data.message);
1073
- }
991
+ const doc = take(data, {
992
+ message: __expectString,
993
+ });
994
+ Object.assign(contents, doc);
1074
995
  const exception = new ValidationException({
1075
996
  $metadata: deserializeMetadata(parsedOutput),
1076
997
  ...contents,
1077
998
  });
1078
999
  return __decorateServiceException(exception, parsedOutput.body);
1079
1000
  };
1080
- const se_AlgorithmSpecification = (input, context) => {
1081
- return {
1082
- ...(input.containerImage != null && { containerImage: se_ContainerImage(input.containerImage, context) }),
1083
- ...(input.scriptModeConfig != null && { scriptModeConfig: se_ScriptModeConfig(input.scriptModeConfig, context) }),
1084
- };
1085
- };
1086
- const se_ContainerImage = (input, context) => {
1087
- return {
1088
- ...(input.uri != null && { uri: input.uri }),
1089
- };
1090
- };
1091
- const se_DataSource = (input, context) => {
1092
- return {
1093
- ...(input.s3DataSource != null && { s3DataSource: se_S3DataSource(input.s3DataSource, context) }),
1094
- };
1095
- };
1096
- const se_DeviceConfig = (input, context) => {
1097
- return {
1098
- ...(input.device != null && { device: input.device }),
1099
- };
1100
- };
1101
- const se_HyperParameters = (input, context) => {
1102
- return Object.entries(input).reduce((acc, [key, value]) => {
1103
- if (value === null) {
1104
- return acc;
1105
- }
1106
- acc[key] = value;
1107
- return acc;
1108
- }, {});
1109
- };
1110
- const se_InputConfigList = (input, context) => {
1111
- return input
1112
- .filter((e) => e != null)
1113
- .map((entry) => {
1114
- return se_InputFileConfig(entry, context);
1115
- });
1116
- };
1117
- const se_InputFileConfig = (input, context) => {
1118
- return {
1119
- ...(input.channelName != null && { channelName: input.channelName }),
1120
- ...(input.contentType != null && { contentType: input.contentType }),
1121
- ...(input.dataSource != null && { dataSource: se_DataSource(input.dataSource, context) }),
1122
- };
1123
- };
1124
- const se_InstanceConfig = (input, context) => {
1125
- return {
1126
- ...(input.instanceCount != null && { instanceCount: input.instanceCount }),
1127
- ...(input.instanceType != null && { instanceType: input.instanceType }),
1128
- ...(input.volumeSizeInGb != null && { volumeSizeInGb: input.volumeSizeInGb }),
1129
- };
1130
- };
1131
- const se_JobCheckpointConfig = (input, context) => {
1132
- return {
1133
- ...(input.localPath != null && { localPath: input.localPath }),
1134
- ...(input.s3Uri != null && { s3Uri: input.s3Uri }),
1135
- };
1136
- };
1137
- const se_JobOutputDataConfig = (input, context) => {
1138
- return {
1139
- ...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }),
1140
- ...(input.s3Path != null && { s3Path: input.s3Path }),
1141
- };
1142
- };
1143
- const se_JobStoppingCondition = (input, context) => {
1144
- return {
1145
- ...(input.maxRuntimeInSeconds != null && { maxRuntimeInSeconds: input.maxRuntimeInSeconds }),
1146
- };
1147
- };
1148
- const se_S3DataSource = (input, context) => {
1149
- return {
1150
- ...(input.s3Uri != null && { s3Uri: input.s3Uri }),
1151
- };
1152
- };
1153
- const se_ScriptModeConfig = (input, context) => {
1154
- return {
1155
- ...(input.compressionType != null && { compressionType: input.compressionType }),
1156
- ...(input.entryPoint != null && { entryPoint: input.entryPoint }),
1157
- ...(input.s3Uri != null && { s3Uri: input.s3Uri }),
1158
- };
1159
- };
1160
- const se_SearchDevicesFilter = (input, context) => {
1161
- return {
1162
- ...(input.name != null && { name: input.name }),
1163
- ...(input.values != null && { values: se_String256List(input.values, context) }),
1164
- };
1165
- };
1166
- const se_SearchDevicesFilterList = (input, context) => {
1167
- return input
1168
- .filter((e) => e != null)
1169
- .map((entry) => {
1170
- return se_SearchDevicesFilter(entry, context);
1171
- });
1172
- };
1173
- const se_SearchJobsFilter = (input, context) => {
1174
- return {
1175
- ...(input.name != null && { name: input.name }),
1176
- ...(input.operator != null && { operator: input.operator }),
1177
- ...(input.values != null && { values: se_String256List(input.values, context) }),
1178
- };
1179
- };
1180
- const se_SearchJobsFilterList = (input, context) => {
1181
- return input
1182
- .filter((e) => e != null)
1183
- .map((entry) => {
1184
- return se_SearchJobsFilter(entry, context);
1185
- });
1186
- };
1187
- const se_SearchQuantumTasksFilter = (input, context) => {
1188
- return {
1189
- ...(input.name != null && { name: input.name }),
1190
- ...(input.operator != null && { operator: input.operator }),
1191
- ...(input.values != null && { values: se_String256List(input.values, context) }),
1192
- };
1193
- };
1194
- const se_SearchQuantumTasksFilterList = (input, context) => {
1195
- return input
1196
- .filter((e) => e != null)
1197
- .map((entry) => {
1198
- return se_SearchQuantumTasksFilter(entry, context);
1199
- });
1200
- };
1201
- const se_String256List = (input, context) => {
1202
- return input
1203
- .filter((e) => e != null)
1204
- .map((entry) => {
1205
- return entry;
1206
- });
1207
- };
1208
- const se_TagsMap = (input, context) => {
1209
- return Object.entries(input).reduce((acc, [key, value]) => {
1210
- if (value === null) {
1211
- return acc;
1212
- }
1213
- acc[key] = value;
1214
- return acc;
1215
- }, {});
1216
- };
1217
- const de_AlgorithmSpecification = (output, context) => {
1218
- return {
1219
- containerImage: output.containerImage != null ? de_ContainerImage(output.containerImage, context) : undefined,
1220
- scriptModeConfig: output.scriptModeConfig != null ? de_ScriptModeConfig(output.scriptModeConfig, context) : undefined,
1221
- };
1222
- };
1223
- const de_ContainerImage = (output, context) => {
1224
- return {
1225
- uri: __expectString(output.uri),
1226
- };
1227
- };
1228
- const de_DataSource = (output, context) => {
1229
- return {
1230
- s3DataSource: output.s3DataSource != null ? de_S3DataSource(output.s3DataSource, context) : undefined,
1231
- };
1232
- };
1233
- const de_DeviceConfig = (output, context) => {
1234
- return {
1235
- device: __expectString(output.device),
1236
- };
1237
- };
1238
- const de_DeviceSummary = (output, context) => {
1239
- return {
1240
- deviceArn: __expectString(output.deviceArn),
1241
- deviceName: __expectString(output.deviceName),
1242
- deviceStatus: __expectString(output.deviceStatus),
1243
- deviceType: __expectString(output.deviceType),
1244
- providerName: __expectString(output.providerName),
1245
- };
1246
- };
1247
- const de_DeviceSummaryList = (output, context) => {
1248
- const retVal = (output || [])
1249
- .filter((e) => e != null)
1250
- .map((entry) => {
1251
- if (entry === null) {
1252
- return null;
1253
- }
1254
- return de_DeviceSummary(entry, context);
1255
- });
1256
- return retVal;
1257
- };
1258
- const de_HyperParameters = (output, context) => {
1259
- return Object.entries(output).reduce((acc, [key, value]) => {
1260
- if (value === null) {
1261
- return acc;
1262
- }
1263
- acc[key] = __expectString(value);
1264
- return acc;
1265
- }, {});
1266
- };
1267
- const de_InputConfigList = (output, context) => {
1268
- const retVal = (output || [])
1269
- .filter((e) => e != null)
1270
- .map((entry) => {
1271
- if (entry === null) {
1272
- return null;
1273
- }
1274
- return de_InputFileConfig(entry, context);
1275
- });
1276
- return retVal;
1277
- };
1278
- const de_InputFileConfig = (output, context) => {
1279
- return {
1280
- channelName: __expectString(output.channelName),
1281
- contentType: __expectString(output.contentType),
1282
- dataSource: output.dataSource != null ? de_DataSource(output.dataSource, context) : undefined,
1283
- };
1284
- };
1285
- const de_InstanceConfig = (output, context) => {
1286
- return {
1287
- instanceCount: __expectInt32(output.instanceCount),
1288
- instanceType: __expectString(output.instanceType),
1289
- volumeSizeInGb: __expectInt32(output.volumeSizeInGb),
1290
- };
1291
- };
1292
- const de_JobCheckpointConfig = (output, context) => {
1293
- return {
1294
- localPath: __expectString(output.localPath),
1295
- s3Uri: __expectString(output.s3Uri),
1296
- };
1297
- };
1298
1001
  const de_JobEventDetails = (output, context) => {
1299
- return {
1300
- eventType: __expectString(output.eventType),
1301
- message: __expectString(output.message),
1302
- timeOfEvent: output.timeOfEvent != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.timeOfEvent)) : undefined,
1303
- };
1002
+ return take(output, {
1003
+ eventType: __expectString,
1004
+ message: __expectString,
1005
+ timeOfEvent: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1006
+ });
1304
1007
  };
1305
1008
  const de_JobEvents = (output, context) => {
1306
1009
  const retVal = (output || [])
1307
1010
  .filter((e) => e != null)
1308
1011
  .map((entry) => {
1309
- if (entry === null) {
1310
- return null;
1311
- }
1312
1012
  return de_JobEventDetails(entry, context);
1313
1013
  });
1314
1014
  return retVal;
1315
1015
  };
1316
- const de_JobOutputDataConfig = (output, context) => {
1317
- return {
1318
- kmsKeyId: __expectString(output.kmsKeyId),
1319
- s3Path: __expectString(output.s3Path),
1320
- };
1321
- };
1322
- const de_JobStoppingCondition = (output, context) => {
1323
- return {
1324
- maxRuntimeInSeconds: __expectInt32(output.maxRuntimeInSeconds),
1325
- };
1326
- };
1327
1016
  const de_JobSummary = (output, context) => {
1328
- return {
1329
- createdAt: output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined,
1330
- device: __expectString(output.device),
1331
- endedAt: output.endedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.endedAt)) : undefined,
1332
- jobArn: __expectString(output.jobArn),
1333
- jobName: __expectString(output.jobName),
1334
- startedAt: output.startedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.startedAt)) : undefined,
1335
- status: __expectString(output.status),
1336
- tags: output.tags != null ? de_TagsMap(output.tags, context) : undefined,
1337
- };
1017
+ return take(output, {
1018
+ createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1019
+ device: __expectString,
1020
+ endedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1021
+ jobArn: __expectString,
1022
+ jobName: __expectString,
1023
+ startedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1024
+ status: __expectString,
1025
+ tags: _json,
1026
+ });
1338
1027
  };
1339
1028
  const de_JobSummaryList = (output, context) => {
1340
1029
  const retVal = (output || [])
1341
1030
  .filter((e) => e != null)
1342
1031
  .map((entry) => {
1343
- if (entry === null) {
1344
- return null;
1345
- }
1346
1032
  return de_JobSummary(entry, context);
1347
1033
  });
1348
1034
  return retVal;
1349
1035
  };
1350
1036
  const de_QuantumTaskSummary = (output, context) => {
1351
- return {
1352
- createdAt: output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined,
1353
- deviceArn: __expectString(output.deviceArn),
1354
- endedAt: output.endedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.endedAt)) : undefined,
1355
- outputS3Bucket: __expectString(output.outputS3Bucket),
1356
- outputS3Directory: __expectString(output.outputS3Directory),
1357
- quantumTaskArn: __expectString(output.quantumTaskArn),
1358
- shots: __expectLong(output.shots),
1359
- status: __expectString(output.status),
1360
- tags: output.tags != null ? de_TagsMap(output.tags, context) : undefined,
1361
- };
1037
+ return take(output, {
1038
+ createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1039
+ deviceArn: __expectString,
1040
+ endedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1041
+ outputS3Bucket: __expectString,
1042
+ outputS3Directory: __expectString,
1043
+ quantumTaskArn: __expectString,
1044
+ shots: __expectLong,
1045
+ status: __expectString,
1046
+ tags: _json,
1047
+ });
1362
1048
  };
1363
1049
  const de_QuantumTaskSummaryList = (output, context) => {
1364
1050
  const retVal = (output || [])
1365
1051
  .filter((e) => e != null)
1366
1052
  .map((entry) => {
1367
- if (entry === null) {
1368
- return null;
1369
- }
1370
1053
  return de_QuantumTaskSummary(entry, context);
1371
1054
  });
1372
1055
  return retVal;
1373
1056
  };
1374
- const de_S3DataSource = (output, context) => {
1375
- return {
1376
- s3Uri: __expectString(output.s3Uri),
1377
- };
1378
- };
1379
- const de_ScriptModeConfig = (output, context) => {
1380
- return {
1381
- compressionType: __expectString(output.compressionType),
1382
- entryPoint: __expectString(output.entryPoint),
1383
- s3Uri: __expectString(output.s3Uri),
1384
- };
1385
- };
1386
- const de_TagsMap = (output, context) => {
1387
- return Object.entries(output).reduce((acc, [key, value]) => {
1388
- if (value === null) {
1389
- return acc;
1390
- }
1391
- acc[key] = __expectString(value);
1392
- return acc;
1393
- }, {});
1394
- };
1395
1057
  const deserializeMetadata = (output) => ({
1396
1058
  httpStatusCode: output.statusCode,
1397
1059
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],