@aws-sdk/client-signer 3.310.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, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map as __map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
2
+ import { _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, take, withBaseException, } from "@aws-sdk/smithy-client";
3
3
  import { v4 as generateIdempotencyToken } from "uuid";
4
4
  import { AccessDeniedException, BadRequestException, ConflictException, InternalServiceErrorException, NotFoundException, ResourceNotFoundException, ServiceLimitExceededException, ThrottlingException, TooManyRequestsException, ValidationException, } from "../models/models_0";
5
5
  import { SignerServiceException as __BaseException } from "../models/SignerServiceException";
@@ -12,13 +12,13 @@ export const se_AddProfilePermissionCommand = async (input, context) => {
12
12
  "/signing-profiles/{profileName}/permissions";
13
13
  resolvedPath = __resolvedPath(resolvedPath, input, "profileName", () => input.profileName, "{profileName}", false);
14
14
  let body;
15
- body = JSON.stringify({
16
- ...(input.action != null && { action: input.action }),
17
- ...(input.principal != null && { principal: input.principal }),
18
- ...(input.profileVersion != null && { profileVersion: input.profileVersion }),
19
- ...(input.revisionId != null && { revisionId: input.revisionId }),
20
- ...(input.statementId != null && { statementId: input.statementId }),
21
- });
15
+ body = JSON.stringify(take(input, {
16
+ action: [],
17
+ principal: [],
18
+ profileVersion: [],
19
+ revisionId: [],
20
+ statementId: [],
21
+ }));
22
22
  return new __HttpRequest({
23
23
  protocol,
24
24
  hostname,
@@ -221,18 +221,14 @@ export const se_PutSigningProfileCommand = async (input, context) => {
221
221
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/signing-profiles/{profileName}";
222
222
  resolvedPath = __resolvedPath(resolvedPath, input, "profileName", () => input.profileName, "{profileName}", false);
223
223
  let body;
224
- body = JSON.stringify({
225
- ...(input.overrides != null && { overrides: se_SigningPlatformOverrides(input.overrides, context) }),
226
- ...(input.platformId != null && { platformId: input.platformId }),
227
- ...(input.signatureValidityPeriod != null && {
228
- signatureValidityPeriod: se_SignatureValidityPeriod(input.signatureValidityPeriod, context),
229
- }),
230
- ...(input.signingMaterial != null && { signingMaterial: se_SigningMaterial(input.signingMaterial, context) }),
231
- ...(input.signingParameters != null && {
232
- signingParameters: se_SigningParameters(input.signingParameters, context),
233
- }),
234
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
235
- });
224
+ body = JSON.stringify(take(input, {
225
+ overrides: (_) => _json(_),
226
+ platformId: [],
227
+ signatureValidityPeriod: (_) => _json(_),
228
+ signingMaterial: (_) => _json(_),
229
+ signingParameters: (_) => _json(_),
230
+ tags: (_) => _json(_),
231
+ }));
236
232
  return new __HttpRequest({
237
233
  protocol,
238
234
  hostname,
@@ -273,10 +269,10 @@ export const se_RevokeSignatureCommand = async (input, context) => {
273
269
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/signing-jobs/{jobId}/revoke";
274
270
  resolvedPath = __resolvedPath(resolvedPath, input, "jobId", () => input.jobId, "{jobId}", false);
275
271
  let body;
276
- body = JSON.stringify({
277
- ...(input.jobOwner != null && { jobOwner: input.jobOwner }),
278
- ...(input.reason != null && { reason: input.reason }),
279
- });
272
+ body = JSON.stringify(take(input, {
273
+ jobOwner: [],
274
+ reason: [],
275
+ }));
280
276
  return new __HttpRequest({
281
277
  protocol,
282
278
  hostname,
@@ -295,11 +291,11 @@ export const se_RevokeSigningProfileCommand = async (input, context) => {
295
291
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/signing-profiles/{profileName}/revoke";
296
292
  resolvedPath = __resolvedPath(resolvedPath, input, "profileName", () => input.profileName, "{profileName}", false);
297
293
  let body;
298
- body = JSON.stringify({
299
- ...(input.effectiveTime != null && { effectiveTime: Math.round(input.effectiveTime.getTime() / 1000) }),
300
- ...(input.profileVersion != null && { profileVersion: input.profileVersion }),
301
- ...(input.reason != null && { reason: input.reason }),
302
- });
294
+ body = JSON.stringify(take(input, {
295
+ effectiveTime: (_) => Math.round(_.getTime() / 1000),
296
+ profileVersion: [],
297
+ reason: [],
298
+ }));
303
299
  return new __HttpRequest({
304
300
  protocol,
305
301
  hostname,
@@ -317,13 +313,13 @@ export const se_StartSigningJobCommand = async (input, context) => {
317
313
  };
318
314
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/signing-jobs";
319
315
  let body;
320
- body = JSON.stringify({
321
- clientRequestToken: input.clientRequestToken ?? generateIdempotencyToken(),
322
- ...(input.destination != null && { destination: se_Destination(input.destination, context) }),
323
- ...(input.profileName != null && { profileName: input.profileName }),
324
- ...(input.profileOwner != null && { profileOwner: input.profileOwner }),
325
- ...(input.source != null && { source: se_Source(input.source, context) }),
326
- });
316
+ body = JSON.stringify(take(input, {
317
+ clientRequestToken: (_) => _ ?? generateIdempotencyToken(),
318
+ destination: (_) => _json(_),
319
+ profileName: [],
320
+ profileOwner: [],
321
+ source: (_) => _json(_),
322
+ }));
327
323
  return new __HttpRequest({
328
324
  protocol,
329
325
  hostname,
@@ -342,9 +338,9 @@ export const se_TagResourceCommand = async (input, context) => {
342
338
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
343
339
  resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
344
340
  let body;
345
- body = JSON.stringify({
346
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
347
- });
341
+ body = JSON.stringify(take(input, {
342
+ tags: (_) => _json(_),
343
+ }));
348
344
  return new __HttpRequest({
349
345
  protocol,
350
346
  hostname,
@@ -386,9 +382,10 @@ export const de_AddProfilePermissionCommand = async (output, context) => {
386
382
  $metadata: deserializeMetadata(output),
387
383
  });
388
384
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
389
- if (data.revisionId != null) {
390
- contents.revisionId = __expectString(data.revisionId);
391
- }
385
+ const doc = take(data, {
386
+ revisionId: __expectString,
387
+ });
388
+ Object.assign(contents, doc);
392
389
  return contents;
393
390
  };
394
391
  const de_AddProfilePermissionCommandError = async (output, context) => {
@@ -421,10 +418,9 @@ const de_AddProfilePermissionCommandError = async (output, context) => {
421
418
  throw await de_ValidationExceptionRes(parsedOutput, context);
422
419
  default:
423
420
  const parsedBody = parsedOutput.body;
424
- throwDefaultError({
421
+ return throwDefaultError({
425
422
  output,
426
423
  parsedBody,
427
- exceptionCtor: __BaseException,
428
424
  errorCode,
429
425
  });
430
426
  }
@@ -460,10 +456,9 @@ const de_CancelSigningProfileCommandError = async (output, context) => {
460
456
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
461
457
  default:
462
458
  const parsedBody = parsedOutput.body;
463
- throwDefaultError({
459
+ return throwDefaultError({
464
460
  output,
465
461
  parsedBody,
466
- exceptionCtor: __BaseException,
467
462
  errorCode,
468
463
  });
469
464
  }
@@ -476,63 +471,28 @@ export const de_DescribeSigningJobCommand = async (output, context) => {
476
471
  $metadata: deserializeMetadata(output),
477
472
  });
478
473
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
479
- if (data.completedAt != null) {
480
- contents.completedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.completedAt)));
481
- }
482
- if (data.createdAt != null) {
483
- contents.createdAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdAt)));
484
- }
485
- if (data.jobId != null) {
486
- contents.jobId = __expectString(data.jobId);
487
- }
488
- if (data.jobInvoker != null) {
489
- contents.jobInvoker = __expectString(data.jobInvoker);
490
- }
491
- if (data.jobOwner != null) {
492
- contents.jobOwner = __expectString(data.jobOwner);
493
- }
494
- if (data.overrides != null) {
495
- contents.overrides = de_SigningPlatformOverrides(data.overrides, context);
496
- }
497
- if (data.platformDisplayName != null) {
498
- contents.platformDisplayName = __expectString(data.platformDisplayName);
499
- }
500
- if (data.platformId != null) {
501
- contents.platformId = __expectString(data.platformId);
502
- }
503
- if (data.profileName != null) {
504
- contents.profileName = __expectString(data.profileName);
505
- }
506
- if (data.profileVersion != null) {
507
- contents.profileVersion = __expectString(data.profileVersion);
508
- }
509
- if (data.requestedBy != null) {
510
- contents.requestedBy = __expectString(data.requestedBy);
511
- }
512
- if (data.revocationRecord != null) {
513
- contents.revocationRecord = de_SigningJobRevocationRecord(data.revocationRecord, context);
514
- }
515
- if (data.signatureExpiresAt != null) {
516
- contents.signatureExpiresAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.signatureExpiresAt)));
517
- }
518
- if (data.signedObject != null) {
519
- contents.signedObject = de_SignedObject(data.signedObject, context);
520
- }
521
- if (data.signingMaterial != null) {
522
- contents.signingMaterial = de_SigningMaterial(data.signingMaterial, context);
523
- }
524
- if (data.signingParameters != null) {
525
- contents.signingParameters = de_SigningParameters(data.signingParameters, context);
526
- }
527
- if (data.source != null) {
528
- contents.source = de_Source(data.source, context);
529
- }
530
- if (data.status != null) {
531
- contents.status = __expectString(data.status);
532
- }
533
- if (data.statusReason != null) {
534
- contents.statusReason = __expectString(data.statusReason);
535
- }
474
+ const doc = take(data, {
475
+ completedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
476
+ createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
477
+ jobId: __expectString,
478
+ jobInvoker: __expectString,
479
+ jobOwner: __expectString,
480
+ overrides: _json,
481
+ platformDisplayName: __expectString,
482
+ platformId: __expectString,
483
+ profileName: __expectString,
484
+ profileVersion: __expectString,
485
+ requestedBy: __expectString,
486
+ revocationRecord: (_) => de_SigningJobRevocationRecord(_, context),
487
+ signatureExpiresAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
488
+ signedObject: _json,
489
+ signingMaterial: _json,
490
+ signingParameters: _json,
491
+ source: _json,
492
+ status: __expectString,
493
+ statusReason: __expectString,
494
+ });
495
+ Object.assign(contents, doc);
536
496
  return contents;
537
497
  };
538
498
  const de_DescribeSigningJobCommandError = async (output, context) => {
@@ -556,10 +516,9 @@ const de_DescribeSigningJobCommandError = async (output, context) => {
556
516
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
557
517
  default:
558
518
  const parsedBody = parsedOutput.body;
559
- throwDefaultError({
519
+ return throwDefaultError({
560
520
  output,
561
521
  parsedBody,
562
- exceptionCtor: __BaseException,
563
522
  errorCode,
564
523
  });
565
524
  }
@@ -572,33 +531,18 @@ export const de_GetSigningPlatformCommand = async (output, context) => {
572
531
  $metadata: deserializeMetadata(output),
573
532
  });
574
533
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
575
- if (data.category != null) {
576
- contents.category = __expectString(data.category);
577
- }
578
- if (data.displayName != null) {
579
- contents.displayName = __expectString(data.displayName);
580
- }
581
- if (data.maxSizeInMB != null) {
582
- contents.maxSizeInMB = __expectInt32(data.maxSizeInMB);
583
- }
584
- if (data.partner != null) {
585
- contents.partner = __expectString(data.partner);
586
- }
587
- if (data.platformId != null) {
588
- contents.platformId = __expectString(data.platformId);
589
- }
590
- if (data.revocationSupported != null) {
591
- contents.revocationSupported = __expectBoolean(data.revocationSupported);
592
- }
593
- if (data.signingConfiguration != null) {
594
- contents.signingConfiguration = de_SigningConfiguration(data.signingConfiguration, context);
595
- }
596
- if (data.signingImageFormat != null) {
597
- contents.signingImageFormat = de_SigningImageFormat(data.signingImageFormat, context);
598
- }
599
- if (data.target != null) {
600
- contents.target = __expectString(data.target);
601
- }
534
+ const doc = take(data, {
535
+ category: __expectString,
536
+ displayName: __expectString,
537
+ maxSizeInMB: __expectInt32,
538
+ partner: __expectString,
539
+ platformId: __expectString,
540
+ revocationSupported: __expectBoolean,
541
+ signingConfiguration: _json,
542
+ signingImageFormat: _json,
543
+ target: __expectString,
544
+ });
545
+ Object.assign(contents, doc);
602
546
  return contents;
603
547
  };
604
548
  const de_GetSigningPlatformCommandError = async (output, context) => {
@@ -622,10 +566,9 @@ const de_GetSigningPlatformCommandError = async (output, context) => {
622
566
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
623
567
  default:
624
568
  const parsedBody = parsedOutput.body;
625
- throwDefaultError({
569
+ return throwDefaultError({
626
570
  output,
627
571
  parsedBody,
628
- exceptionCtor: __BaseException,
629
572
  errorCode,
630
573
  });
631
574
  }
@@ -638,48 +581,23 @@ export const de_GetSigningProfileCommand = async (output, context) => {
638
581
  $metadata: deserializeMetadata(output),
639
582
  });
640
583
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
641
- if (data.arn != null) {
642
- contents.arn = __expectString(data.arn);
643
- }
644
- if (data.overrides != null) {
645
- contents.overrides = de_SigningPlatformOverrides(data.overrides, context);
646
- }
647
- if (data.platformDisplayName != null) {
648
- contents.platformDisplayName = __expectString(data.platformDisplayName);
649
- }
650
- if (data.platformId != null) {
651
- contents.platformId = __expectString(data.platformId);
652
- }
653
- if (data.profileName != null) {
654
- contents.profileName = __expectString(data.profileName);
655
- }
656
- if (data.profileVersion != null) {
657
- contents.profileVersion = __expectString(data.profileVersion);
658
- }
659
- if (data.profileVersionArn != null) {
660
- contents.profileVersionArn = __expectString(data.profileVersionArn);
661
- }
662
- if (data.revocationRecord != null) {
663
- contents.revocationRecord = de_SigningProfileRevocationRecord(data.revocationRecord, context);
664
- }
665
- if (data.signatureValidityPeriod != null) {
666
- contents.signatureValidityPeriod = de_SignatureValidityPeriod(data.signatureValidityPeriod, context);
667
- }
668
- if (data.signingMaterial != null) {
669
- contents.signingMaterial = de_SigningMaterial(data.signingMaterial, context);
670
- }
671
- if (data.signingParameters != null) {
672
- contents.signingParameters = de_SigningParameters(data.signingParameters, context);
673
- }
674
- if (data.status != null) {
675
- contents.status = __expectString(data.status);
676
- }
677
- if (data.statusReason != null) {
678
- contents.statusReason = __expectString(data.statusReason);
679
- }
680
- if (data.tags != null) {
681
- contents.tags = de_TagMap(data.tags, context);
682
- }
584
+ const doc = take(data, {
585
+ arn: __expectString,
586
+ overrides: _json,
587
+ platformDisplayName: __expectString,
588
+ platformId: __expectString,
589
+ profileName: __expectString,
590
+ profileVersion: __expectString,
591
+ profileVersionArn: __expectString,
592
+ revocationRecord: (_) => de_SigningProfileRevocationRecord(_, context),
593
+ signatureValidityPeriod: _json,
594
+ signingMaterial: _json,
595
+ signingParameters: _json,
596
+ status: __expectString,
597
+ statusReason: __expectString,
598
+ tags: _json,
599
+ });
600
+ Object.assign(contents, doc);
683
601
  return contents;
684
602
  };
685
603
  const de_GetSigningProfileCommandError = async (output, context) => {
@@ -703,10 +621,9 @@ const de_GetSigningProfileCommandError = async (output, context) => {
703
621
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
704
622
  default:
705
623
  const parsedBody = parsedOutput.body;
706
- throwDefaultError({
624
+ return throwDefaultError({
707
625
  output,
708
626
  parsedBody,
709
- exceptionCtor: __BaseException,
710
627
  errorCode,
711
628
  });
712
629
  }
@@ -719,18 +636,13 @@ export const de_ListProfilePermissionsCommand = async (output, context) => {
719
636
  $metadata: deserializeMetadata(output),
720
637
  });
721
638
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
722
- if (data.nextToken != null) {
723
- contents.nextToken = __expectString(data.nextToken);
724
- }
725
- if (data.permissions != null) {
726
- contents.permissions = de_Permissions(data.permissions, context);
727
- }
728
- if (data.policySizeBytes != null) {
729
- contents.policySizeBytes = __expectInt32(data.policySizeBytes);
730
- }
731
- if (data.revisionId != null) {
732
- contents.revisionId = __expectString(data.revisionId);
733
- }
639
+ const doc = take(data, {
640
+ nextToken: __expectString,
641
+ permissions: _json,
642
+ policySizeBytes: __expectInt32,
643
+ revisionId: __expectString,
644
+ });
645
+ Object.assign(contents, doc);
734
646
  return contents;
735
647
  };
736
648
  const de_ListProfilePermissionsCommandError = async (output, context) => {
@@ -757,10 +669,9 @@ const de_ListProfilePermissionsCommandError = async (output, context) => {
757
669
  throw await de_ValidationExceptionRes(parsedOutput, context);
758
670
  default:
759
671
  const parsedBody = parsedOutput.body;
760
- throwDefaultError({
672
+ return throwDefaultError({
761
673
  output,
762
674
  parsedBody,
763
- exceptionCtor: __BaseException,
764
675
  errorCode,
765
676
  });
766
677
  }
@@ -773,12 +684,11 @@ export const de_ListSigningJobsCommand = async (output, context) => {
773
684
  $metadata: deserializeMetadata(output),
774
685
  });
775
686
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
776
- if (data.jobs != null) {
777
- contents.jobs = de_SigningJobs(data.jobs, context);
778
- }
779
- if (data.nextToken != null) {
780
- contents.nextToken = __expectString(data.nextToken);
781
- }
687
+ const doc = take(data, {
688
+ jobs: (_) => de_SigningJobs(_, context),
689
+ nextToken: __expectString,
690
+ });
691
+ Object.assign(contents, doc);
782
692
  return contents;
783
693
  };
784
694
  const de_ListSigningJobsCommandError = async (output, context) => {
@@ -802,10 +712,9 @@ const de_ListSigningJobsCommandError = async (output, context) => {
802
712
  throw await de_ValidationExceptionRes(parsedOutput, context);
803
713
  default:
804
714
  const parsedBody = parsedOutput.body;
805
- throwDefaultError({
715
+ return throwDefaultError({
806
716
  output,
807
717
  parsedBody,
808
- exceptionCtor: __BaseException,
809
718
  errorCode,
810
719
  });
811
720
  }
@@ -818,12 +727,11 @@ export const de_ListSigningPlatformsCommand = async (output, context) => {
818
727
  $metadata: deserializeMetadata(output),
819
728
  });
820
729
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
821
- if (data.nextToken != null) {
822
- contents.nextToken = __expectString(data.nextToken);
823
- }
824
- if (data.platforms != null) {
825
- contents.platforms = de_SigningPlatforms(data.platforms, context);
826
- }
730
+ const doc = take(data, {
731
+ nextToken: __expectString,
732
+ platforms: _json,
733
+ });
734
+ Object.assign(contents, doc);
827
735
  return contents;
828
736
  };
829
737
  const de_ListSigningPlatformsCommandError = async (output, context) => {
@@ -847,10 +755,9 @@ const de_ListSigningPlatformsCommandError = async (output, context) => {
847
755
  throw await de_ValidationExceptionRes(parsedOutput, context);
848
756
  default:
849
757
  const parsedBody = parsedOutput.body;
850
- throwDefaultError({
758
+ return throwDefaultError({
851
759
  output,
852
760
  parsedBody,
853
- exceptionCtor: __BaseException,
854
761
  errorCode,
855
762
  });
856
763
  }
@@ -863,12 +770,11 @@ export const de_ListSigningProfilesCommand = async (output, context) => {
863
770
  $metadata: deserializeMetadata(output),
864
771
  });
865
772
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
866
- if (data.nextToken != null) {
867
- contents.nextToken = __expectString(data.nextToken);
868
- }
869
- if (data.profiles != null) {
870
- contents.profiles = de_SigningProfiles(data.profiles, context);
871
- }
773
+ const doc = take(data, {
774
+ nextToken: __expectString,
775
+ profiles: _json,
776
+ });
777
+ Object.assign(contents, doc);
872
778
  return contents;
873
779
  };
874
780
  const de_ListSigningProfilesCommandError = async (output, context) => {
@@ -889,10 +795,9 @@ const de_ListSigningProfilesCommandError = async (output, context) => {
889
795
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
890
796
  default:
891
797
  const parsedBody = parsedOutput.body;
892
- throwDefaultError({
798
+ return throwDefaultError({
893
799
  output,
894
800
  parsedBody,
895
- exceptionCtor: __BaseException,
896
801
  errorCode,
897
802
  });
898
803
  }
@@ -905,9 +810,10 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
905
810
  $metadata: deserializeMetadata(output),
906
811
  });
907
812
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
908
- if (data.tags != null) {
909
- contents.tags = de_TagMap(data.tags, context);
910
- }
813
+ const doc = take(data, {
814
+ tags: _json,
815
+ });
816
+ Object.assign(contents, doc);
911
817
  return contents;
912
818
  };
913
819
  const de_ListTagsForResourceCommandError = async (output, context) => {
@@ -931,10 +837,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
931
837
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
932
838
  default:
933
839
  const parsedBody = parsedOutput.body;
934
- throwDefaultError({
840
+ return throwDefaultError({
935
841
  output,
936
842
  parsedBody,
937
- exceptionCtor: __BaseException,
938
843
  errorCode,
939
844
  });
940
845
  }
@@ -947,15 +852,12 @@ export const de_PutSigningProfileCommand = async (output, context) => {
947
852
  $metadata: deserializeMetadata(output),
948
853
  });
949
854
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
950
- if (data.arn != null) {
951
- contents.arn = __expectString(data.arn);
952
- }
953
- if (data.profileVersion != null) {
954
- contents.profileVersion = __expectString(data.profileVersion);
955
- }
956
- if (data.profileVersionArn != null) {
957
- contents.profileVersionArn = __expectString(data.profileVersionArn);
958
- }
855
+ const doc = take(data, {
856
+ arn: __expectString,
857
+ profileVersion: __expectString,
858
+ profileVersionArn: __expectString,
859
+ });
860
+ Object.assign(contents, doc);
959
861
  return contents;
960
862
  };
961
863
  const de_PutSigningProfileCommandError = async (output, context) => {
@@ -982,10 +884,9 @@ const de_PutSigningProfileCommandError = async (output, context) => {
982
884
  throw await de_ValidationExceptionRes(parsedOutput, context);
983
885
  default:
984
886
  const parsedBody = parsedOutput.body;
985
- throwDefaultError({
887
+ return throwDefaultError({
986
888
  output,
987
889
  parsedBody,
988
- exceptionCtor: __BaseException,
989
890
  errorCode,
990
891
  });
991
892
  }
@@ -998,9 +899,10 @@ export const de_RemoveProfilePermissionCommand = async (output, context) => {
998
899
  $metadata: deserializeMetadata(output),
999
900
  });
1000
901
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1001
- if (data.revisionId != null) {
1002
- contents.revisionId = __expectString(data.revisionId);
1003
- }
902
+ const doc = take(data, {
903
+ revisionId: __expectString,
904
+ });
905
+ Object.assign(contents, doc);
1004
906
  return contents;
1005
907
  };
1006
908
  const de_RemoveProfilePermissionCommandError = async (output, context) => {
@@ -1030,10 +932,9 @@ const de_RemoveProfilePermissionCommandError = async (output, context) => {
1030
932
  throw await de_ValidationExceptionRes(parsedOutput, context);
1031
933
  default:
1032
934
  const parsedBody = parsedOutput.body;
1033
- throwDefaultError({
935
+ return throwDefaultError({
1034
936
  output,
1035
937
  parsedBody,
1036
- exceptionCtor: __BaseException,
1037
938
  errorCode,
1038
939
  });
1039
940
  }
@@ -1072,10 +973,9 @@ const de_RevokeSignatureCommandError = async (output, context) => {
1072
973
  throw await de_ValidationExceptionRes(parsedOutput, context);
1073
974
  default:
1074
975
  const parsedBody = parsedOutput.body;
1075
- throwDefaultError({
976
+ return throwDefaultError({
1076
977
  output,
1077
978
  parsedBody,
1078
- exceptionCtor: __BaseException,
1079
979
  errorCode,
1080
980
  });
1081
981
  }
@@ -1114,10 +1014,9 @@ const de_RevokeSigningProfileCommandError = async (output, context) => {
1114
1014
  throw await de_ValidationExceptionRes(parsedOutput, context);
1115
1015
  default:
1116
1016
  const parsedBody = parsedOutput.body;
1117
- throwDefaultError({
1017
+ return throwDefaultError({
1118
1018
  output,
1119
1019
  parsedBody,
1120
- exceptionCtor: __BaseException,
1121
1020
  errorCode,
1122
1021
  });
1123
1022
  }
@@ -1130,12 +1029,11 @@ export const de_StartSigningJobCommand = async (output, context) => {
1130
1029
  $metadata: deserializeMetadata(output),
1131
1030
  });
1132
1031
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1133
- if (data.jobId != null) {
1134
- contents.jobId = __expectString(data.jobId);
1135
- }
1136
- if (data.jobOwner != null) {
1137
- contents.jobOwner = __expectString(data.jobOwner);
1138
- }
1032
+ const doc = take(data, {
1033
+ jobId: __expectString,
1034
+ jobOwner: __expectString,
1035
+ });
1036
+ Object.assign(contents, doc);
1139
1037
  return contents;
1140
1038
  };
1141
1039
  const de_StartSigningJobCommandError = async (output, context) => {
@@ -1165,10 +1063,9 @@ const de_StartSigningJobCommandError = async (output, context) => {
1165
1063
  throw await de_ValidationExceptionRes(parsedOutput, context);
1166
1064
  default:
1167
1065
  const parsedBody = parsedOutput.body;
1168
- throwDefaultError({
1066
+ return throwDefaultError({
1169
1067
  output,
1170
1068
  parsedBody,
1171
- exceptionCtor: __BaseException,
1172
1069
  errorCode,
1173
1070
  });
1174
1071
  }
@@ -1204,10 +1101,9 @@ const de_TagResourceCommandError = async (output, context) => {
1204
1101
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1205
1102
  default:
1206
1103
  const parsedBody = parsedOutput.body;
1207
- throwDefaultError({
1104
+ return throwDefaultError({
1208
1105
  output,
1209
1106
  parsedBody,
1210
- exceptionCtor: __BaseException,
1211
1107
  errorCode,
1212
1108
  });
1213
1109
  }
@@ -1243,24 +1139,22 @@ const de_UntagResourceCommandError = async (output, context) => {
1243
1139
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1244
1140
  default:
1245
1141
  const parsedBody = parsedOutput.body;
1246
- throwDefaultError({
1142
+ return throwDefaultError({
1247
1143
  output,
1248
1144
  parsedBody,
1249
- exceptionCtor: __BaseException,
1250
1145
  errorCode,
1251
1146
  });
1252
1147
  }
1253
1148
  };
1254
- const map = __map;
1149
+ const throwDefaultError = withBaseException(__BaseException);
1255
1150
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1256
1151
  const contents = map({});
1257
1152
  const data = parsedOutput.body;
1258
- if (data.code != null) {
1259
- contents.code = __expectString(data.code);
1260
- }
1261
- if (data.message != null) {
1262
- contents.message = __expectString(data.message);
1263
- }
1153
+ const doc = take(data, {
1154
+ code: __expectString,
1155
+ message: __expectString,
1156
+ });
1157
+ Object.assign(contents, doc);
1264
1158
  const exception = new AccessDeniedException({
1265
1159
  $metadata: deserializeMetadata(parsedOutput),
1266
1160
  ...contents,
@@ -1270,12 +1164,11 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1270
1164
  const de_BadRequestExceptionRes = async (parsedOutput, context) => {
1271
1165
  const contents = map({});
1272
1166
  const data = parsedOutput.body;
1273
- if (data.code != null) {
1274
- contents.code = __expectString(data.code);
1275
- }
1276
- if (data.message != null) {
1277
- contents.message = __expectString(data.message);
1278
- }
1167
+ const doc = take(data, {
1168
+ code: __expectString,
1169
+ message: __expectString,
1170
+ });
1171
+ Object.assign(contents, doc);
1279
1172
  const exception = new BadRequestException({
1280
1173
  $metadata: deserializeMetadata(parsedOutput),
1281
1174
  ...contents,
@@ -1285,12 +1178,11 @@ const de_BadRequestExceptionRes = async (parsedOutput, context) => {
1285
1178
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
1286
1179
  const contents = map({});
1287
1180
  const data = parsedOutput.body;
1288
- if (data.code != null) {
1289
- contents.code = __expectString(data.code);
1290
- }
1291
- if (data.message != null) {
1292
- contents.message = __expectString(data.message);
1293
- }
1181
+ const doc = take(data, {
1182
+ code: __expectString,
1183
+ message: __expectString,
1184
+ });
1185
+ Object.assign(contents, doc);
1294
1186
  const exception = new ConflictException({
1295
1187
  $metadata: deserializeMetadata(parsedOutput),
1296
1188
  ...contents,
@@ -1300,12 +1192,11 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
1300
1192
  const de_InternalServiceErrorExceptionRes = async (parsedOutput, context) => {
1301
1193
  const contents = map({});
1302
1194
  const data = parsedOutput.body;
1303
- if (data.code != null) {
1304
- contents.code = __expectString(data.code);
1305
- }
1306
- if (data.message != null) {
1307
- contents.message = __expectString(data.message);
1308
- }
1195
+ const doc = take(data, {
1196
+ code: __expectString,
1197
+ message: __expectString,
1198
+ });
1199
+ Object.assign(contents, doc);
1309
1200
  const exception = new InternalServiceErrorException({
1310
1201
  $metadata: deserializeMetadata(parsedOutput),
1311
1202
  ...contents,
@@ -1315,12 +1206,11 @@ const de_InternalServiceErrorExceptionRes = async (parsedOutput, context) => {
1315
1206
  const de_NotFoundExceptionRes = async (parsedOutput, context) => {
1316
1207
  const contents = map({});
1317
1208
  const data = parsedOutput.body;
1318
- if (data.code != null) {
1319
- contents.code = __expectString(data.code);
1320
- }
1321
- if (data.message != null) {
1322
- contents.message = __expectString(data.message);
1323
- }
1209
+ const doc = take(data, {
1210
+ code: __expectString,
1211
+ message: __expectString,
1212
+ });
1213
+ Object.assign(contents, doc);
1324
1214
  const exception = new NotFoundException({
1325
1215
  $metadata: deserializeMetadata(parsedOutput),
1326
1216
  ...contents,
@@ -1330,12 +1220,11 @@ const de_NotFoundExceptionRes = async (parsedOutput, context) => {
1330
1220
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1331
1221
  const contents = map({});
1332
1222
  const data = parsedOutput.body;
1333
- if (data.code != null) {
1334
- contents.code = __expectString(data.code);
1335
- }
1336
- if (data.message != null) {
1337
- contents.message = __expectString(data.message);
1338
- }
1223
+ const doc = take(data, {
1224
+ code: __expectString,
1225
+ message: __expectString,
1226
+ });
1227
+ Object.assign(contents, doc);
1339
1228
  const exception = new ResourceNotFoundException({
1340
1229
  $metadata: deserializeMetadata(parsedOutput),
1341
1230
  ...contents,
@@ -1345,12 +1234,11 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1345
1234
  const de_ServiceLimitExceededExceptionRes = async (parsedOutput, context) => {
1346
1235
  const contents = map({});
1347
1236
  const data = parsedOutput.body;
1348
- if (data.code != null) {
1349
- contents.code = __expectString(data.code);
1350
- }
1351
- if (data.message != null) {
1352
- contents.message = __expectString(data.message);
1353
- }
1237
+ const doc = take(data, {
1238
+ code: __expectString,
1239
+ message: __expectString,
1240
+ });
1241
+ Object.assign(contents, doc);
1354
1242
  const exception = new ServiceLimitExceededException({
1355
1243
  $metadata: deserializeMetadata(parsedOutput),
1356
1244
  ...contents,
@@ -1360,12 +1248,11 @@ const de_ServiceLimitExceededExceptionRes = async (parsedOutput, context) => {
1360
1248
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1361
1249
  const contents = map({});
1362
1250
  const data = parsedOutput.body;
1363
- if (data.code != null) {
1364
- contents.code = __expectString(data.code);
1365
- }
1366
- if (data.message != null) {
1367
- contents.message = __expectString(data.message);
1368
- }
1251
+ const doc = take(data, {
1252
+ code: __expectString,
1253
+ message: __expectString,
1254
+ });
1255
+ Object.assign(contents, doc);
1369
1256
  const exception = new ThrottlingException({
1370
1257
  $metadata: deserializeMetadata(parsedOutput),
1371
1258
  ...contents,
@@ -1375,12 +1262,11 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1375
1262
  const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
1376
1263
  const contents = map({});
1377
1264
  const data = parsedOutput.body;
1378
- if (data.code != null) {
1379
- contents.code = __expectString(data.code);
1380
- }
1381
- if (data.message != null) {
1382
- contents.message = __expectString(data.message);
1383
- }
1265
+ const doc = take(data, {
1266
+ code: __expectString,
1267
+ message: __expectString,
1268
+ });
1269
+ Object.assign(contents, doc);
1384
1270
  const exception = new TooManyRequestsException({
1385
1271
  $metadata: deserializeMetadata(parsedOutput),
1386
1272
  ...contents,
@@ -1390,326 +1276,56 @@ const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
1390
1276
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
1391
1277
  const contents = map({});
1392
1278
  const data = parsedOutput.body;
1393
- if (data.code != null) {
1394
- contents.code = __expectString(data.code);
1395
- }
1396
- if (data.message != null) {
1397
- contents.message = __expectString(data.message);
1398
- }
1279
+ const doc = take(data, {
1280
+ code: __expectString,
1281
+ message: __expectString,
1282
+ });
1283
+ Object.assign(contents, doc);
1399
1284
  const exception = new ValidationException({
1400
1285
  $metadata: deserializeMetadata(parsedOutput),
1401
1286
  ...contents,
1402
1287
  });
1403
1288
  return __decorateServiceException(exception, parsedOutput.body);
1404
1289
  };
1405
- const se_Destination = (input, context) => {
1406
- return {
1407
- ...(input.s3 != null && { s3: se_S3Destination(input.s3, context) }),
1408
- };
1409
- };
1410
- const se_S3Destination = (input, context) => {
1411
- return {
1412
- ...(input.bucketName != null && { bucketName: input.bucketName }),
1413
- ...(input.prefix != null && { prefix: input.prefix }),
1414
- };
1415
- };
1416
- const se_S3Source = (input, context) => {
1417
- return {
1418
- ...(input.bucketName != null && { bucketName: input.bucketName }),
1419
- ...(input.key != null && { key: input.key }),
1420
- ...(input.version != null && { version: input.version }),
1421
- };
1422
- };
1423
- const se_SignatureValidityPeriod = (input, context) => {
1424
- return {
1425
- ...(input.type != null && { type: input.type }),
1426
- ...(input.value != null && { value: input.value }),
1427
- };
1428
- };
1429
- const se_SigningConfigurationOverrides = (input, context) => {
1430
- return {
1431
- ...(input.encryptionAlgorithm != null && { encryptionAlgorithm: input.encryptionAlgorithm }),
1432
- ...(input.hashAlgorithm != null && { hashAlgorithm: input.hashAlgorithm }),
1433
- };
1434
- };
1435
- const se_SigningMaterial = (input, context) => {
1436
- return {
1437
- ...(input.certificateArn != null && { certificateArn: input.certificateArn }),
1438
- };
1439
- };
1440
- const se_SigningParameters = (input, context) => {
1441
- return Object.entries(input).reduce((acc, [key, value]) => {
1442
- if (value === null) {
1443
- return acc;
1444
- }
1445
- acc[key] = value;
1446
- return acc;
1447
- }, {});
1448
- };
1449
- const se_SigningPlatformOverrides = (input, context) => {
1450
- return {
1451
- ...(input.signingConfiguration != null && {
1452
- signingConfiguration: se_SigningConfigurationOverrides(input.signingConfiguration, context),
1453
- }),
1454
- ...(input.signingImageFormat != null && { signingImageFormat: input.signingImageFormat }),
1455
- };
1456
- };
1457
- const se_Source = (input, context) => {
1458
- return {
1459
- ...(input.s3 != null && { s3: se_S3Source(input.s3, context) }),
1460
- };
1461
- };
1462
- const se_TagMap = (input, context) => {
1463
- return Object.entries(input).reduce((acc, [key, value]) => {
1464
- if (value === null) {
1465
- return acc;
1466
- }
1467
- acc[key] = value;
1468
- return acc;
1469
- }, {});
1470
- };
1471
- const de_EncryptionAlgorithmOptions = (output, context) => {
1472
- return {
1473
- allowedValues: output.allowedValues != null ? de_EncryptionAlgorithms(output.allowedValues, context) : undefined,
1474
- defaultValue: __expectString(output.defaultValue),
1475
- };
1476
- };
1477
- const de_EncryptionAlgorithms = (output, context) => {
1478
- const retVal = (output || [])
1479
- .filter((e) => e != null)
1480
- .map((entry) => {
1481
- if (entry === null) {
1482
- return null;
1483
- }
1484
- return __expectString(entry);
1485
- });
1486
- return retVal;
1487
- };
1488
- const de_HashAlgorithmOptions = (output, context) => {
1489
- return {
1490
- allowedValues: output.allowedValues != null ? de_HashAlgorithms(output.allowedValues, context) : undefined,
1491
- defaultValue: __expectString(output.defaultValue),
1492
- };
1493
- };
1494
- const de_HashAlgorithms = (output, context) => {
1495
- const retVal = (output || [])
1496
- .filter((e) => e != null)
1497
- .map((entry) => {
1498
- if (entry === null) {
1499
- return null;
1500
- }
1501
- return __expectString(entry);
1502
- });
1503
- return retVal;
1504
- };
1505
- const de_ImageFormats = (output, context) => {
1506
- const retVal = (output || [])
1507
- .filter((e) => e != null)
1508
- .map((entry) => {
1509
- if (entry === null) {
1510
- return null;
1511
- }
1512
- return __expectString(entry);
1513
- });
1514
- return retVal;
1515
- };
1516
- const de_Permission = (output, context) => {
1517
- return {
1518
- action: __expectString(output.action),
1519
- principal: __expectString(output.principal),
1520
- profileVersion: __expectString(output.profileVersion),
1521
- statementId: __expectString(output.statementId),
1522
- };
1523
- };
1524
- const de_Permissions = (output, context) => {
1525
- const retVal = (output || [])
1526
- .filter((e) => e != null)
1527
- .map((entry) => {
1528
- if (entry === null) {
1529
- return null;
1530
- }
1531
- return de_Permission(entry, context);
1532
- });
1533
- return retVal;
1534
- };
1535
- const de_S3SignedObject = (output, context) => {
1536
- return {
1537
- bucketName: __expectString(output.bucketName),
1538
- key: __expectString(output.key),
1539
- };
1540
- };
1541
- const de_S3Source = (output, context) => {
1542
- return {
1543
- bucketName: __expectString(output.bucketName),
1544
- key: __expectString(output.key),
1545
- version: __expectString(output.version),
1546
- };
1547
- };
1548
- const de_SignatureValidityPeriod = (output, context) => {
1549
- return {
1550
- type: __expectString(output.type),
1551
- value: __expectInt32(output.value),
1552
- };
1553
- };
1554
- const de_SignedObject = (output, context) => {
1555
- return {
1556
- s3: output.s3 != null ? de_S3SignedObject(output.s3, context) : undefined,
1557
- };
1558
- };
1559
- const de_SigningConfiguration = (output, context) => {
1560
- return {
1561
- encryptionAlgorithmOptions: output.encryptionAlgorithmOptions != null
1562
- ? de_EncryptionAlgorithmOptions(output.encryptionAlgorithmOptions, context)
1563
- : undefined,
1564
- hashAlgorithmOptions: output.hashAlgorithmOptions != null ? de_HashAlgorithmOptions(output.hashAlgorithmOptions, context) : undefined,
1565
- };
1566
- };
1567
- const de_SigningConfigurationOverrides = (output, context) => {
1568
- return {
1569
- encryptionAlgorithm: __expectString(output.encryptionAlgorithm),
1570
- hashAlgorithm: __expectString(output.hashAlgorithm),
1571
- };
1572
- };
1573
- const de_SigningImageFormat = (output, context) => {
1574
- return {
1575
- defaultFormat: __expectString(output.defaultFormat),
1576
- supportedFormats: output.supportedFormats != null ? de_ImageFormats(output.supportedFormats, context) : undefined,
1577
- };
1578
- };
1579
1290
  const de_SigningJob = (output, context) => {
1580
- return {
1581
- createdAt: output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined,
1582
- isRevoked: __expectBoolean(output.isRevoked),
1583
- jobId: __expectString(output.jobId),
1584
- jobInvoker: __expectString(output.jobInvoker),
1585
- jobOwner: __expectString(output.jobOwner),
1586
- platformDisplayName: __expectString(output.platformDisplayName),
1587
- platformId: __expectString(output.platformId),
1588
- profileName: __expectString(output.profileName),
1589
- profileVersion: __expectString(output.profileVersion),
1590
- signatureExpiresAt: output.signatureExpiresAt != null
1591
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.signatureExpiresAt)))
1592
- : undefined,
1593
- signedObject: output.signedObject != null ? de_SignedObject(output.signedObject, context) : undefined,
1594
- signingMaterial: output.signingMaterial != null ? de_SigningMaterial(output.signingMaterial, context) : undefined,
1595
- source: output.source != null ? de_Source(output.source, context) : undefined,
1596
- status: __expectString(output.status),
1597
- };
1291
+ return take(output, {
1292
+ createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1293
+ isRevoked: __expectBoolean,
1294
+ jobId: __expectString,
1295
+ jobInvoker: __expectString,
1296
+ jobOwner: __expectString,
1297
+ platformDisplayName: __expectString,
1298
+ platformId: __expectString,
1299
+ profileName: __expectString,
1300
+ profileVersion: __expectString,
1301
+ signatureExpiresAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1302
+ signedObject: _json,
1303
+ signingMaterial: _json,
1304
+ source: _json,
1305
+ status: __expectString,
1306
+ });
1598
1307
  };
1599
1308
  const de_SigningJobRevocationRecord = (output, context) => {
1600
- return {
1601
- reason: __expectString(output.reason),
1602
- revokedAt: output.revokedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.revokedAt))) : undefined,
1603
- revokedBy: __expectString(output.revokedBy),
1604
- };
1309
+ return take(output, {
1310
+ reason: __expectString,
1311
+ revokedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1312
+ revokedBy: __expectString,
1313
+ });
1605
1314
  };
1606
1315
  const de_SigningJobs = (output, context) => {
1607
1316
  const retVal = (output || [])
1608
1317
  .filter((e) => e != null)
1609
1318
  .map((entry) => {
1610
- if (entry === null) {
1611
- return null;
1612
- }
1613
1319
  return de_SigningJob(entry, context);
1614
1320
  });
1615
1321
  return retVal;
1616
1322
  };
1617
- const de_SigningMaterial = (output, context) => {
1618
- return {
1619
- certificateArn: __expectString(output.certificateArn),
1620
- };
1621
- };
1622
- const de_SigningParameters = (output, context) => {
1623
- return Object.entries(output).reduce((acc, [key, value]) => {
1624
- if (value === null) {
1625
- return acc;
1626
- }
1627
- acc[key] = __expectString(value);
1628
- return acc;
1629
- }, {});
1630
- };
1631
- const de_SigningPlatform = (output, context) => {
1632
- return {
1633
- category: __expectString(output.category),
1634
- displayName: __expectString(output.displayName),
1635
- maxSizeInMB: __expectInt32(output.maxSizeInMB),
1636
- partner: __expectString(output.partner),
1637
- platformId: __expectString(output.platformId),
1638
- revocationSupported: __expectBoolean(output.revocationSupported),
1639
- signingConfiguration: output.signingConfiguration != null ? de_SigningConfiguration(output.signingConfiguration, context) : undefined,
1640
- signingImageFormat: output.signingImageFormat != null ? de_SigningImageFormat(output.signingImageFormat, context) : undefined,
1641
- target: __expectString(output.target),
1642
- };
1643
- };
1644
- const de_SigningPlatformOverrides = (output, context) => {
1645
- return {
1646
- signingConfiguration: output.signingConfiguration != null
1647
- ? de_SigningConfigurationOverrides(output.signingConfiguration, context)
1648
- : undefined,
1649
- signingImageFormat: __expectString(output.signingImageFormat),
1650
- };
1651
- };
1652
- const de_SigningPlatforms = (output, context) => {
1653
- const retVal = (output || [])
1654
- .filter((e) => e != null)
1655
- .map((entry) => {
1656
- if (entry === null) {
1657
- return null;
1658
- }
1659
- return de_SigningPlatform(entry, context);
1660
- });
1661
- return retVal;
1662
- };
1663
- const de_SigningProfile = (output, context) => {
1664
- return {
1665
- arn: __expectString(output.arn),
1666
- platformDisplayName: __expectString(output.platformDisplayName),
1667
- platformId: __expectString(output.platformId),
1668
- profileName: __expectString(output.profileName),
1669
- profileVersion: __expectString(output.profileVersion),
1670
- profileVersionArn: __expectString(output.profileVersionArn),
1671
- signatureValidityPeriod: output.signatureValidityPeriod != null
1672
- ? de_SignatureValidityPeriod(output.signatureValidityPeriod, context)
1673
- : undefined,
1674
- signingMaterial: output.signingMaterial != null ? de_SigningMaterial(output.signingMaterial, context) : undefined,
1675
- signingParameters: output.signingParameters != null ? de_SigningParameters(output.signingParameters, context) : undefined,
1676
- status: __expectString(output.status),
1677
- tags: output.tags != null ? de_TagMap(output.tags, context) : undefined,
1678
- };
1679
- };
1680
1323
  const de_SigningProfileRevocationRecord = (output, context) => {
1681
- return {
1682
- revocationEffectiveFrom: output.revocationEffectiveFrom != null
1683
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.revocationEffectiveFrom)))
1684
- : undefined,
1685
- revokedAt: output.revokedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.revokedAt))) : undefined,
1686
- revokedBy: __expectString(output.revokedBy),
1687
- };
1688
- };
1689
- const de_SigningProfiles = (output, context) => {
1690
- const retVal = (output || [])
1691
- .filter((e) => e != null)
1692
- .map((entry) => {
1693
- if (entry === null) {
1694
- return null;
1695
- }
1696
- return de_SigningProfile(entry, context);
1324
+ return take(output, {
1325
+ revocationEffectiveFrom: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1326
+ revokedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1327
+ revokedBy: __expectString,
1697
1328
  });
1698
- return retVal;
1699
- };
1700
- const de_Source = (output, context) => {
1701
- return {
1702
- s3: output.s3 != null ? de_S3Source(output.s3, context) : undefined,
1703
- };
1704
- };
1705
- const de_TagMap = (output, context) => {
1706
- return Object.entries(output).reduce((acc, [key, value]) => {
1707
- if (value === null) {
1708
- return acc;
1709
- }
1710
- acc[key] = __expectString(value);
1711
- return acc;
1712
- }, {});
1713
1329
  };
1714
1330
  const deserializeMetadata = (output) => ({
1715
1331
  httpStatusCode: output.statusCode,