@aws-sdk/client-service-catalog-appregistry 3.312.0 → 3.316.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -52,12 +52,12 @@ const se_CreateApplicationCommand = async (input, context) => {
52
52
  };
53
53
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications";
54
54
  let body;
55
- body = JSON.stringify({
56
- clientToken: input.clientToken ?? (0, uuid_1.v4)(),
57
- ...(input.description != null && { description: input.description }),
58
- ...(input.name != null && { name: input.name }),
59
- ...(input.tags != null && { tags: se_Tags(input.tags, context) }),
60
- });
55
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
56
+ clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
57
+ description: [],
58
+ name: [],
59
+ tags: (_) => (0, smithy_client_1._json)(_),
60
+ }));
61
61
  return new protocol_http_1.HttpRequest({
62
62
  protocol,
63
63
  hostname,
@@ -76,13 +76,13 @@ const se_CreateAttributeGroupCommand = async (input, context) => {
76
76
  };
77
77
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/attribute-groups";
78
78
  let body;
79
- body = JSON.stringify({
80
- ...(input.attributes != null && { attributes: input.attributes }),
81
- clientToken: input.clientToken ?? (0, uuid_1.v4)(),
82
- ...(input.description != null && { description: input.description }),
83
- ...(input.name != null && { name: input.name }),
84
- ...(input.tags != null && { tags: se_Tags(input.tags, context) }),
85
- });
79
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
80
+ attributes: [],
81
+ clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
82
+ description: [],
83
+ name: [],
84
+ tags: (_) => (0, smithy_client_1._json)(_),
85
+ }));
86
86
  return new protocol_http_1.HttpRequest({
87
87
  protocol,
88
88
  hostname,
@@ -244,7 +244,7 @@ const se_ListApplicationsCommand = async (input, context) => {
244
244
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
245
245
  const headers = {};
246
246
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications";
247
- const query = map({
247
+ const query = (0, smithy_client_1.map)({
248
248
  nextToken: [, input.nextToken],
249
249
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
250
250
  });
@@ -267,7 +267,7 @@ const se_ListAssociatedAttributeGroupsCommand = async (input, context) => {
267
267
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
268
268
  "/applications/{application}/attribute-groups";
269
269
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "application", () => input.application, "{application}", false);
270
- const query = map({
270
+ const query = (0, smithy_client_1.map)({
271
271
  nextToken: [, input.nextToken],
272
272
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
273
273
  });
@@ -289,7 +289,7 @@ const se_ListAssociatedResourcesCommand = async (input, context) => {
289
289
  const headers = {};
290
290
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{application}/resources";
291
291
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "application", () => input.application, "{application}", false);
292
- const query = map({
292
+ const query = (0, smithy_client_1.map)({
293
293
  nextToken: [, input.nextToken],
294
294
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
295
295
  });
@@ -310,7 +310,7 @@ const se_ListAttributeGroupsCommand = async (input, context) => {
310
310
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
311
311
  const headers = {};
312
312
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/attribute-groups";
313
- const query = map({
313
+ const query = (0, smithy_client_1.map)({
314
314
  nextToken: [, input.nextToken],
315
315
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
316
316
  });
@@ -333,7 +333,7 @@ const se_ListAttributeGroupsForApplicationCommand = async (input, context) => {
333
333
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
334
334
  "/applications/{application}/attribute-group-details";
335
335
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "application", () => input.application, "{application}", false);
336
- const query = map({
336
+ const query = (0, smithy_client_1.map)({
337
337
  nextToken: [, input.nextToken],
338
338
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
339
339
  });
@@ -374,9 +374,9 @@ const se_PutConfigurationCommand = async (input, context) => {
374
374
  };
375
375
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/configuration";
376
376
  let body;
377
- body = JSON.stringify({
378
- ...(input.configuration != null && { configuration: se_AppRegistryConfiguration(input.configuration, context) }),
379
- });
377
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
378
+ configuration: (_) => (0, smithy_client_1._json)(_),
379
+ }));
380
380
  return new protocol_http_1.HttpRequest({
381
381
  protocol,
382
382
  hostname,
@@ -414,9 +414,9 @@ const se_TagResourceCommand = async (input, context) => {
414
414
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
415
415
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
416
416
  let body;
417
- body = JSON.stringify({
418
- ...(input.tags != null && { tags: se_Tags(input.tags, context) }),
419
- });
417
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
418
+ tags: (_) => (0, smithy_client_1._json)(_),
419
+ }));
420
420
  return new protocol_http_1.HttpRequest({
421
421
  protocol,
422
422
  hostname,
@@ -433,7 +433,7 @@ const se_UntagResourceCommand = async (input, context) => {
433
433
  const headers = {};
434
434
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
435
435
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
436
- const query = map({
436
+ const query = (0, smithy_client_1.map)({
437
437
  tagKeys: [
438
438
  (0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
439
439
  () => (input.tagKeys || []).map((_entry) => _entry),
@@ -460,10 +460,10 @@ const se_UpdateApplicationCommand = async (input, context) => {
460
460
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{application}";
461
461
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "application", () => input.application, "{application}", false);
462
462
  let body;
463
- body = JSON.stringify({
464
- ...(input.description != null && { description: input.description }),
465
- ...(input.name != null && { name: input.name }),
466
- });
463
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
464
+ description: [],
465
+ name: [],
466
+ }));
467
467
  return new protocol_http_1.HttpRequest({
468
468
  protocol,
469
469
  hostname,
@@ -483,11 +483,11 @@ const se_UpdateAttributeGroupCommand = async (input, context) => {
483
483
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/attribute-groups/{attributeGroup}";
484
484
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "attributeGroup", () => input.attributeGroup, "{attributeGroup}", false);
485
485
  let body;
486
- body = JSON.stringify({
487
- ...(input.attributes != null && { attributes: input.attributes }),
488
- ...(input.description != null && { description: input.description }),
489
- ...(input.name != null && { name: input.name }),
490
- });
486
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
487
+ attributes: [],
488
+ description: [],
489
+ name: [],
490
+ }));
491
491
  return new protocol_http_1.HttpRequest({
492
492
  protocol,
493
493
  hostname,
@@ -503,16 +503,15 @@ const de_AssociateAttributeGroupCommand = async (output, context) => {
503
503
  if (output.statusCode !== 200 && output.statusCode >= 300) {
504
504
  return de_AssociateAttributeGroupCommandError(output, context);
505
505
  }
506
- const contents = map({
506
+ const contents = (0, smithy_client_1.map)({
507
507
  $metadata: deserializeMetadata(output),
508
508
  });
509
509
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
510
- if (data.applicationArn != null) {
511
- contents.applicationArn = (0, smithy_client_1.expectString)(data.applicationArn);
512
- }
513
- if (data.attributeGroupArn != null) {
514
- contents.attributeGroupArn = (0, smithy_client_1.expectString)(data.attributeGroupArn);
515
- }
510
+ const doc = (0, smithy_client_1.take)(data, {
511
+ applicationArn: smithy_client_1.expectString,
512
+ attributeGroupArn: smithy_client_1.expectString,
513
+ });
514
+ Object.assign(contents, doc);
516
515
  return contents;
517
516
  };
518
517
  exports.de_AssociateAttributeGroupCommand = de_AssociateAttributeGroupCommand;
@@ -540,10 +539,9 @@ const de_AssociateAttributeGroupCommandError = async (output, context) => {
540
539
  throw await de_ValidationExceptionRes(parsedOutput, context);
541
540
  default:
542
541
  const parsedBody = parsedOutput.body;
543
- (0, smithy_client_1.throwDefaultError)({
542
+ return throwDefaultError({
544
543
  output,
545
544
  parsedBody,
546
- exceptionCtor: ServiceCatalogAppRegistryServiceException_1.ServiceCatalogAppRegistryServiceException,
547
545
  errorCode,
548
546
  });
549
547
  }
@@ -552,16 +550,15 @@ const de_AssociateResourceCommand = async (output, context) => {
552
550
  if (output.statusCode !== 200 && output.statusCode >= 300) {
553
551
  return de_AssociateResourceCommandError(output, context);
554
552
  }
555
- const contents = map({
553
+ const contents = (0, smithy_client_1.map)({
556
554
  $metadata: deserializeMetadata(output),
557
555
  });
558
556
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
559
- if (data.applicationArn != null) {
560
- contents.applicationArn = (0, smithy_client_1.expectString)(data.applicationArn);
561
- }
562
- if (data.resourceArn != null) {
563
- contents.resourceArn = (0, smithy_client_1.expectString)(data.resourceArn);
564
- }
557
+ const doc = (0, smithy_client_1.take)(data, {
558
+ applicationArn: smithy_client_1.expectString,
559
+ resourceArn: smithy_client_1.expectString,
560
+ });
561
+ Object.assign(contents, doc);
565
562
  return contents;
566
563
  };
567
564
  exports.de_AssociateResourceCommand = de_AssociateResourceCommand;
@@ -592,10 +589,9 @@ const de_AssociateResourceCommandError = async (output, context) => {
592
589
  throw await de_ValidationExceptionRes(parsedOutput, context);
593
590
  default:
594
591
  const parsedBody = parsedOutput.body;
595
- (0, smithy_client_1.throwDefaultError)({
592
+ return throwDefaultError({
596
593
  output,
597
594
  parsedBody,
598
- exceptionCtor: ServiceCatalogAppRegistryServiceException_1.ServiceCatalogAppRegistryServiceException,
599
595
  errorCode,
600
596
  });
601
597
  }
@@ -604,13 +600,14 @@ const de_CreateApplicationCommand = async (output, context) => {
604
600
  if (output.statusCode !== 201 && output.statusCode >= 300) {
605
601
  return de_CreateApplicationCommandError(output, context);
606
602
  }
607
- const contents = map({
603
+ const contents = (0, smithy_client_1.map)({
608
604
  $metadata: deserializeMetadata(output),
609
605
  });
610
606
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
611
- if (data.application != null) {
612
- contents.application = de_Application(data.application, context);
613
- }
607
+ const doc = (0, smithy_client_1.take)(data, {
608
+ application: (_) => de_Application(_, context),
609
+ });
610
+ Object.assign(contents, doc);
614
611
  return contents;
615
612
  };
616
613
  exports.de_CreateApplicationCommand = de_CreateApplicationCommand;
@@ -638,10 +635,9 @@ const de_CreateApplicationCommandError = async (output, context) => {
638
635
  throw await de_ValidationExceptionRes(parsedOutput, context);
639
636
  default:
640
637
  const parsedBody = parsedOutput.body;
641
- (0, smithy_client_1.throwDefaultError)({
638
+ return throwDefaultError({
642
639
  output,
643
640
  parsedBody,
644
- exceptionCtor: ServiceCatalogAppRegistryServiceException_1.ServiceCatalogAppRegistryServiceException,
645
641
  errorCode,
646
642
  });
647
643
  }
@@ -650,13 +646,14 @@ const de_CreateAttributeGroupCommand = async (output, context) => {
650
646
  if (output.statusCode !== 201 && output.statusCode >= 300) {
651
647
  return de_CreateAttributeGroupCommandError(output, context);
652
648
  }
653
- const contents = map({
649
+ const contents = (0, smithy_client_1.map)({
654
650
  $metadata: deserializeMetadata(output),
655
651
  });
656
652
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
657
- if (data.attributeGroup != null) {
658
- contents.attributeGroup = de_AttributeGroup(data.attributeGroup, context);
659
- }
653
+ const doc = (0, smithy_client_1.take)(data, {
654
+ attributeGroup: (_) => de_AttributeGroup(_, context),
655
+ });
656
+ Object.assign(contents, doc);
660
657
  return contents;
661
658
  };
662
659
  exports.de_CreateAttributeGroupCommand = de_CreateAttributeGroupCommand;
@@ -681,10 +678,9 @@ const de_CreateAttributeGroupCommandError = async (output, context) => {
681
678
  throw await de_ValidationExceptionRes(parsedOutput, context);
682
679
  default:
683
680
  const parsedBody = parsedOutput.body;
684
- (0, smithy_client_1.throwDefaultError)({
681
+ return throwDefaultError({
685
682
  output,
686
683
  parsedBody,
687
- exceptionCtor: ServiceCatalogAppRegistryServiceException_1.ServiceCatalogAppRegistryServiceException,
688
684
  errorCode,
689
685
  });
690
686
  }
@@ -693,13 +689,14 @@ const de_DeleteApplicationCommand = async (output, context) => {
693
689
  if (output.statusCode !== 200 && output.statusCode >= 300) {
694
690
  return de_DeleteApplicationCommandError(output, context);
695
691
  }
696
- const contents = map({
692
+ const contents = (0, smithy_client_1.map)({
697
693
  $metadata: deserializeMetadata(output),
698
694
  });
699
695
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
700
- if (data.application != null) {
701
- contents.application = de_ApplicationSummary(data.application, context);
702
- }
696
+ const doc = (0, smithy_client_1.take)(data, {
697
+ application: (_) => de_ApplicationSummary(_, context),
698
+ });
699
+ Object.assign(contents, doc);
703
700
  return contents;
704
701
  };
705
702
  exports.de_DeleteApplicationCommand = de_DeleteApplicationCommand;
@@ -721,10 +718,9 @@ const de_DeleteApplicationCommandError = async (output, context) => {
721
718
  throw await de_ValidationExceptionRes(parsedOutput, context);
722
719
  default:
723
720
  const parsedBody = parsedOutput.body;
724
- (0, smithy_client_1.throwDefaultError)({
721
+ return throwDefaultError({
725
722
  output,
726
723
  parsedBody,
727
- exceptionCtor: ServiceCatalogAppRegistryServiceException_1.ServiceCatalogAppRegistryServiceException,
728
724
  errorCode,
729
725
  });
730
726
  }
@@ -733,13 +729,14 @@ const de_DeleteAttributeGroupCommand = async (output, context) => {
733
729
  if (output.statusCode !== 200 && output.statusCode >= 300) {
734
730
  return de_DeleteAttributeGroupCommandError(output, context);
735
731
  }
736
- const contents = map({
732
+ const contents = (0, smithy_client_1.map)({
737
733
  $metadata: deserializeMetadata(output),
738
734
  });
739
735
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
740
- if (data.attributeGroup != null) {
741
- contents.attributeGroup = de_AttributeGroupSummary(data.attributeGroup, context);
742
- }
736
+ const doc = (0, smithy_client_1.take)(data, {
737
+ attributeGroup: (_) => de_AttributeGroupSummary(_, context),
738
+ });
739
+ Object.assign(contents, doc);
743
740
  return contents;
744
741
  };
745
742
  exports.de_DeleteAttributeGroupCommand = de_DeleteAttributeGroupCommand;
@@ -761,10 +758,9 @@ const de_DeleteAttributeGroupCommandError = async (output, context) => {
761
758
  throw await de_ValidationExceptionRes(parsedOutput, context);
762
759
  default:
763
760
  const parsedBody = parsedOutput.body;
764
- (0, smithy_client_1.throwDefaultError)({
761
+ return throwDefaultError({
765
762
  output,
766
763
  parsedBody,
767
- exceptionCtor: ServiceCatalogAppRegistryServiceException_1.ServiceCatalogAppRegistryServiceException,
768
764
  errorCode,
769
765
  });
770
766
  }
@@ -773,16 +769,15 @@ const de_DisassociateAttributeGroupCommand = async (output, context) => {
773
769
  if (output.statusCode !== 200 && output.statusCode >= 300) {
774
770
  return de_DisassociateAttributeGroupCommandError(output, context);
775
771
  }
776
- const contents = map({
772
+ const contents = (0, smithy_client_1.map)({
777
773
  $metadata: deserializeMetadata(output),
778
774
  });
779
775
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
780
- if (data.applicationArn != null) {
781
- contents.applicationArn = (0, smithy_client_1.expectString)(data.applicationArn);
782
- }
783
- if (data.attributeGroupArn != null) {
784
- contents.attributeGroupArn = (0, smithy_client_1.expectString)(data.attributeGroupArn);
785
- }
776
+ const doc = (0, smithy_client_1.take)(data, {
777
+ applicationArn: smithy_client_1.expectString,
778
+ attributeGroupArn: smithy_client_1.expectString,
779
+ });
780
+ Object.assign(contents, doc);
786
781
  return contents;
787
782
  };
788
783
  exports.de_DisassociateAttributeGroupCommand = de_DisassociateAttributeGroupCommand;
@@ -804,10 +799,9 @@ const de_DisassociateAttributeGroupCommandError = async (output, context) => {
804
799
  throw await de_ValidationExceptionRes(parsedOutput, context);
805
800
  default:
806
801
  const parsedBody = parsedOutput.body;
807
- (0, smithy_client_1.throwDefaultError)({
802
+ return throwDefaultError({
808
803
  output,
809
804
  parsedBody,
810
- exceptionCtor: ServiceCatalogAppRegistryServiceException_1.ServiceCatalogAppRegistryServiceException,
811
805
  errorCode,
812
806
  });
813
807
  }
@@ -816,16 +810,15 @@ const de_DisassociateResourceCommand = async (output, context) => {
816
810
  if (output.statusCode !== 200 && output.statusCode >= 300) {
817
811
  return de_DisassociateResourceCommandError(output, context);
818
812
  }
819
- const contents = map({
813
+ const contents = (0, smithy_client_1.map)({
820
814
  $metadata: deserializeMetadata(output),
821
815
  });
822
816
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
823
- if (data.applicationArn != null) {
824
- contents.applicationArn = (0, smithy_client_1.expectString)(data.applicationArn);
825
- }
826
- if (data.resourceArn != null) {
827
- contents.resourceArn = (0, smithy_client_1.expectString)(data.resourceArn);
828
- }
817
+ const doc = (0, smithy_client_1.take)(data, {
818
+ applicationArn: smithy_client_1.expectString,
819
+ resourceArn: smithy_client_1.expectString,
820
+ });
821
+ Object.assign(contents, doc);
829
822
  return contents;
830
823
  };
831
824
  exports.de_DisassociateResourceCommand = de_DisassociateResourceCommand;
@@ -850,10 +843,9 @@ const de_DisassociateResourceCommandError = async (output, context) => {
850
843
  throw await de_ValidationExceptionRes(parsedOutput, context);
851
844
  default:
852
845
  const parsedBody = parsedOutput.body;
853
- (0, smithy_client_1.throwDefaultError)({
846
+ return throwDefaultError({
854
847
  output,
855
848
  parsedBody,
856
- exceptionCtor: ServiceCatalogAppRegistryServiceException_1.ServiceCatalogAppRegistryServiceException,
857
849
  errorCode,
858
850
  });
859
851
  }
@@ -862,37 +854,22 @@ const de_GetApplicationCommand = async (output, context) => {
862
854
  if (output.statusCode !== 200 && output.statusCode >= 300) {
863
855
  return de_GetApplicationCommandError(output, context);
864
856
  }
865
- const contents = map({
857
+ const contents = (0, smithy_client_1.map)({
866
858
  $metadata: deserializeMetadata(output),
867
859
  });
868
860
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
869
- if (data.arn != null) {
870
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
871
- }
872
- if (data.associatedResourceCount != null) {
873
- contents.associatedResourceCount = (0, smithy_client_1.expectInt32)(data.associatedResourceCount);
874
- }
875
- if (data.creationTime != null) {
876
- contents.creationTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.creationTime));
877
- }
878
- if (data.description != null) {
879
- contents.description = (0, smithy_client_1.expectString)(data.description);
880
- }
881
- if (data.id != null) {
882
- contents.id = (0, smithy_client_1.expectString)(data.id);
883
- }
884
- if (data.integrations != null) {
885
- contents.integrations = de_Integrations(data.integrations, context);
886
- }
887
- if (data.lastUpdateTime != null) {
888
- contents.lastUpdateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.lastUpdateTime));
889
- }
890
- if (data.name != null) {
891
- contents.name = (0, smithy_client_1.expectString)(data.name);
892
- }
893
- if (data.tags != null) {
894
- contents.tags = de_Tags(data.tags, context);
895
- }
861
+ const doc = (0, smithy_client_1.take)(data, {
862
+ arn: smithy_client_1.expectString,
863
+ associatedResourceCount: smithy_client_1.expectInt32,
864
+ creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
865
+ description: smithy_client_1.expectString,
866
+ id: smithy_client_1.expectString,
867
+ integrations: smithy_client_1._json,
868
+ lastUpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
869
+ name: smithy_client_1.expectString,
870
+ tags: smithy_client_1._json,
871
+ });
872
+ Object.assign(contents, doc);
896
873
  return contents;
897
874
  };
898
875
  exports.de_GetApplicationCommand = de_GetApplicationCommand;
@@ -917,10 +894,9 @@ const de_GetApplicationCommandError = async (output, context) => {
917
894
  throw await de_ValidationExceptionRes(parsedOutput, context);
918
895
  default:
919
896
  const parsedBody = parsedOutput.body;
920
- (0, smithy_client_1.throwDefaultError)({
897
+ return throwDefaultError({
921
898
  output,
922
899
  parsedBody,
923
- exceptionCtor: ServiceCatalogAppRegistryServiceException_1.ServiceCatalogAppRegistryServiceException,
924
900
  errorCode,
925
901
  });
926
902
  }
@@ -929,13 +905,14 @@ const de_GetAssociatedResourceCommand = async (output, context) => {
929
905
  if (output.statusCode !== 200 && output.statusCode >= 300) {
930
906
  return de_GetAssociatedResourceCommandError(output, context);
931
907
  }
932
- const contents = map({
908
+ const contents = (0, smithy_client_1.map)({
933
909
  $metadata: deserializeMetadata(output),
934
910
  });
935
911
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
936
- if (data.resource != null) {
937
- contents.resource = de_Resource(data.resource, context);
938
- }
912
+ const doc = (0, smithy_client_1.take)(data, {
913
+ resource: (_) => de_Resource(_, context),
914
+ });
915
+ Object.assign(contents, doc);
939
916
  return contents;
940
917
  };
941
918
  exports.de_GetAssociatedResourceCommand = de_GetAssociatedResourceCommand;
@@ -957,10 +934,9 @@ const de_GetAssociatedResourceCommandError = async (output, context) => {
957
934
  throw await de_ValidationExceptionRes(parsedOutput, context);
958
935
  default:
959
936
  const parsedBody = parsedOutput.body;
960
- (0, smithy_client_1.throwDefaultError)({
937
+ return throwDefaultError({
961
938
  output,
962
939
  parsedBody,
963
- exceptionCtor: ServiceCatalogAppRegistryServiceException_1.ServiceCatalogAppRegistryServiceException,
964
940
  errorCode,
965
941
  });
966
942
  }
@@ -969,37 +945,22 @@ const de_GetAttributeGroupCommand = async (output, context) => {
969
945
  if (output.statusCode !== 200 && output.statusCode >= 300) {
970
946
  return de_GetAttributeGroupCommandError(output, context);
971
947
  }
972
- const contents = map({
948
+ const contents = (0, smithy_client_1.map)({
973
949
  $metadata: deserializeMetadata(output),
974
950
  });
975
951
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
976
- if (data.arn != null) {
977
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
978
- }
979
- if (data.attributes != null) {
980
- contents.attributes = (0, smithy_client_1.expectString)(data.attributes);
981
- }
982
- if (data.createdBy != null) {
983
- contents.createdBy = (0, smithy_client_1.expectString)(data.createdBy);
984
- }
985
- if (data.creationTime != null) {
986
- contents.creationTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.creationTime));
987
- }
988
- if (data.description != null) {
989
- contents.description = (0, smithy_client_1.expectString)(data.description);
990
- }
991
- if (data.id != null) {
992
- contents.id = (0, smithy_client_1.expectString)(data.id);
993
- }
994
- if (data.lastUpdateTime != null) {
995
- contents.lastUpdateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.lastUpdateTime));
996
- }
997
- if (data.name != null) {
998
- contents.name = (0, smithy_client_1.expectString)(data.name);
999
- }
1000
- if (data.tags != null) {
1001
- contents.tags = de_Tags(data.tags, context);
1002
- }
952
+ const doc = (0, smithy_client_1.take)(data, {
953
+ arn: smithy_client_1.expectString,
954
+ attributes: smithy_client_1.expectString,
955
+ createdBy: smithy_client_1.expectString,
956
+ creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
957
+ description: smithy_client_1.expectString,
958
+ id: smithy_client_1.expectString,
959
+ lastUpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
960
+ name: smithy_client_1.expectString,
961
+ tags: smithy_client_1._json,
962
+ });
963
+ Object.assign(contents, doc);
1003
964
  return contents;
1004
965
  };
1005
966
  exports.de_GetAttributeGroupCommand = de_GetAttributeGroupCommand;
@@ -1024,10 +985,9 @@ const de_GetAttributeGroupCommandError = async (output, context) => {
1024
985
  throw await de_ValidationExceptionRes(parsedOutput, context);
1025
986
  default:
1026
987
  const parsedBody = parsedOutput.body;
1027
- (0, smithy_client_1.throwDefaultError)({
988
+ return throwDefaultError({
1028
989
  output,
1029
990
  parsedBody,
1030
- exceptionCtor: ServiceCatalogAppRegistryServiceException_1.ServiceCatalogAppRegistryServiceException,
1031
991
  errorCode,
1032
992
  });
1033
993
  }
@@ -1036,13 +996,14 @@ const de_GetConfigurationCommand = async (output, context) => {
1036
996
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1037
997
  return de_GetConfigurationCommandError(output, context);
1038
998
  }
1039
- const contents = map({
999
+ const contents = (0, smithy_client_1.map)({
1040
1000
  $metadata: deserializeMetadata(output),
1041
1001
  });
1042
1002
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1043
- if (data.configuration != null) {
1044
- contents.configuration = de_AppRegistryConfiguration(data.configuration, context);
1045
- }
1003
+ const doc = (0, smithy_client_1.take)(data, {
1004
+ configuration: smithy_client_1._json,
1005
+ });
1006
+ Object.assign(contents, doc);
1046
1007
  return contents;
1047
1008
  };
1048
1009
  exports.de_GetConfigurationCommand = de_GetConfigurationCommand;
@@ -1058,10 +1019,9 @@ const de_GetConfigurationCommandError = async (output, context) => {
1058
1019
  throw await de_InternalServerExceptionRes(parsedOutput, context);
1059
1020
  default:
1060
1021
  const parsedBody = parsedOutput.body;
1061
- (0, smithy_client_1.throwDefaultError)({
1022
+ return throwDefaultError({
1062
1023
  output,
1063
1024
  parsedBody,
1064
- exceptionCtor: ServiceCatalogAppRegistryServiceException_1.ServiceCatalogAppRegistryServiceException,
1065
1025
  errorCode,
1066
1026
  });
1067
1027
  }
@@ -1070,16 +1030,15 @@ const de_ListApplicationsCommand = async (output, context) => {
1070
1030
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1071
1031
  return de_ListApplicationsCommandError(output, context);
1072
1032
  }
1073
- const contents = map({
1033
+ const contents = (0, smithy_client_1.map)({
1074
1034
  $metadata: deserializeMetadata(output),
1075
1035
  });
1076
1036
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1077
- if (data.applications != null) {
1078
- contents.applications = de_ApplicationSummaries(data.applications, context);
1079
- }
1080
- if (data.nextToken != null) {
1081
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1082
- }
1037
+ const doc = (0, smithy_client_1.take)(data, {
1038
+ applications: (_) => de_ApplicationSummaries(_, context),
1039
+ nextToken: smithy_client_1.expectString,
1040
+ });
1041
+ Object.assign(contents, doc);
1083
1042
  return contents;
1084
1043
  };
1085
1044
  exports.de_ListApplicationsCommand = de_ListApplicationsCommand;
@@ -1098,10 +1057,9 @@ const de_ListApplicationsCommandError = async (output, context) => {
1098
1057
  throw await de_ValidationExceptionRes(parsedOutput, context);
1099
1058
  default:
1100
1059
  const parsedBody = parsedOutput.body;
1101
- (0, smithy_client_1.throwDefaultError)({
1060
+ return throwDefaultError({
1102
1061
  output,
1103
1062
  parsedBody,
1104
- exceptionCtor: ServiceCatalogAppRegistryServiceException_1.ServiceCatalogAppRegistryServiceException,
1105
1063
  errorCode,
1106
1064
  });
1107
1065
  }
@@ -1110,16 +1068,15 @@ const de_ListAssociatedAttributeGroupsCommand = async (output, context) => {
1110
1068
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1111
1069
  return de_ListAssociatedAttributeGroupsCommandError(output, context);
1112
1070
  }
1113
- const contents = map({
1071
+ const contents = (0, smithy_client_1.map)({
1114
1072
  $metadata: deserializeMetadata(output),
1115
1073
  });
1116
1074
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1117
- if (data.attributeGroups != null) {
1118
- contents.attributeGroups = de_AttributeGroupIds(data.attributeGroups, context);
1119
- }
1120
- if (data.nextToken != null) {
1121
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1122
- }
1075
+ const doc = (0, smithy_client_1.take)(data, {
1076
+ attributeGroups: smithy_client_1._json,
1077
+ nextToken: smithy_client_1.expectString,
1078
+ });
1079
+ Object.assign(contents, doc);
1123
1080
  return contents;
1124
1081
  };
1125
1082
  exports.de_ListAssociatedAttributeGroupsCommand = de_ListAssociatedAttributeGroupsCommand;
@@ -1141,10 +1098,9 @@ const de_ListAssociatedAttributeGroupsCommandError = async (output, context) =>
1141
1098
  throw await de_ValidationExceptionRes(parsedOutput, context);
1142
1099
  default:
1143
1100
  const parsedBody = parsedOutput.body;
1144
- (0, smithy_client_1.throwDefaultError)({
1101
+ return throwDefaultError({
1145
1102
  output,
1146
1103
  parsedBody,
1147
- exceptionCtor: ServiceCatalogAppRegistryServiceException_1.ServiceCatalogAppRegistryServiceException,
1148
1104
  errorCode,
1149
1105
  });
1150
1106
  }
@@ -1153,16 +1109,15 @@ const de_ListAssociatedResourcesCommand = async (output, context) => {
1153
1109
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1154
1110
  return de_ListAssociatedResourcesCommandError(output, context);
1155
1111
  }
1156
- const contents = map({
1112
+ const contents = (0, smithy_client_1.map)({
1157
1113
  $metadata: deserializeMetadata(output),
1158
1114
  });
1159
1115
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1160
- if (data.nextToken != null) {
1161
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1162
- }
1163
- if (data.resources != null) {
1164
- contents.resources = de_Resources(data.resources, context);
1165
- }
1116
+ const doc = (0, smithy_client_1.take)(data, {
1117
+ nextToken: smithy_client_1.expectString,
1118
+ resources: smithy_client_1._json,
1119
+ });
1120
+ Object.assign(contents, doc);
1166
1121
  return contents;
1167
1122
  };
1168
1123
  exports.de_ListAssociatedResourcesCommand = de_ListAssociatedResourcesCommand;
@@ -1184,10 +1139,9 @@ const de_ListAssociatedResourcesCommandError = async (output, context) => {
1184
1139
  throw await de_ValidationExceptionRes(parsedOutput, context);
1185
1140
  default:
1186
1141
  const parsedBody = parsedOutput.body;
1187
- (0, smithy_client_1.throwDefaultError)({
1142
+ return throwDefaultError({
1188
1143
  output,
1189
1144
  parsedBody,
1190
- exceptionCtor: ServiceCatalogAppRegistryServiceException_1.ServiceCatalogAppRegistryServiceException,
1191
1145
  errorCode,
1192
1146
  });
1193
1147
  }
@@ -1196,16 +1150,15 @@ const de_ListAttributeGroupsCommand = async (output, context) => {
1196
1150
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1197
1151
  return de_ListAttributeGroupsCommandError(output, context);
1198
1152
  }
1199
- const contents = map({
1153
+ const contents = (0, smithy_client_1.map)({
1200
1154
  $metadata: deserializeMetadata(output),
1201
1155
  });
1202
1156
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1203
- if (data.attributeGroups != null) {
1204
- contents.attributeGroups = de_AttributeGroupSummaries(data.attributeGroups, context);
1205
- }
1206
- if (data.nextToken != null) {
1207
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1208
- }
1157
+ const doc = (0, smithy_client_1.take)(data, {
1158
+ attributeGroups: (_) => de_AttributeGroupSummaries(_, context),
1159
+ nextToken: smithy_client_1.expectString,
1160
+ });
1161
+ Object.assign(contents, doc);
1209
1162
  return contents;
1210
1163
  };
1211
1164
  exports.de_ListAttributeGroupsCommand = de_ListAttributeGroupsCommand;
@@ -1224,10 +1177,9 @@ const de_ListAttributeGroupsCommandError = async (output, context) => {
1224
1177
  throw await de_ValidationExceptionRes(parsedOutput, context);
1225
1178
  default:
1226
1179
  const parsedBody = parsedOutput.body;
1227
- (0, smithy_client_1.throwDefaultError)({
1180
+ return throwDefaultError({
1228
1181
  output,
1229
1182
  parsedBody,
1230
- exceptionCtor: ServiceCatalogAppRegistryServiceException_1.ServiceCatalogAppRegistryServiceException,
1231
1183
  errorCode,
1232
1184
  });
1233
1185
  }
@@ -1236,16 +1188,15 @@ const de_ListAttributeGroupsForApplicationCommand = async (output, context) => {
1236
1188
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1237
1189
  return de_ListAttributeGroupsForApplicationCommandError(output, context);
1238
1190
  }
1239
- const contents = map({
1191
+ const contents = (0, smithy_client_1.map)({
1240
1192
  $metadata: deserializeMetadata(output),
1241
1193
  });
1242
1194
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1243
- if (data.attributeGroupsDetails != null) {
1244
- contents.attributeGroupsDetails = de_AttributeGroupDetailsList(data.attributeGroupsDetails, context);
1245
- }
1246
- if (data.nextToken != null) {
1247
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1248
- }
1195
+ const doc = (0, smithy_client_1.take)(data, {
1196
+ attributeGroupsDetails: smithy_client_1._json,
1197
+ nextToken: smithy_client_1.expectString,
1198
+ });
1199
+ Object.assign(contents, doc);
1249
1200
  return contents;
1250
1201
  };
1251
1202
  exports.de_ListAttributeGroupsForApplicationCommand = de_ListAttributeGroupsForApplicationCommand;
@@ -1267,10 +1218,9 @@ const de_ListAttributeGroupsForApplicationCommandError = async (output, context)
1267
1218
  throw await de_ValidationExceptionRes(parsedOutput, context);
1268
1219
  default:
1269
1220
  const parsedBody = parsedOutput.body;
1270
- (0, smithy_client_1.throwDefaultError)({
1221
+ return throwDefaultError({
1271
1222
  output,
1272
1223
  parsedBody,
1273
- exceptionCtor: ServiceCatalogAppRegistryServiceException_1.ServiceCatalogAppRegistryServiceException,
1274
1224
  errorCode,
1275
1225
  });
1276
1226
  }
@@ -1279,13 +1229,14 @@ const de_ListTagsForResourceCommand = async (output, context) => {
1279
1229
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1280
1230
  return de_ListTagsForResourceCommandError(output, context);
1281
1231
  }
1282
- const contents = map({
1232
+ const contents = (0, smithy_client_1.map)({
1283
1233
  $metadata: deserializeMetadata(output),
1284
1234
  });
1285
1235
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1286
- if (data.tags != null) {
1287
- contents.tags = de_Tags(data.tags, context);
1288
- }
1236
+ const doc = (0, smithy_client_1.take)(data, {
1237
+ tags: smithy_client_1._json,
1238
+ });
1239
+ Object.assign(contents, doc);
1289
1240
  return contents;
1290
1241
  };
1291
1242
  exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
@@ -1307,10 +1258,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
1307
1258
  throw await de_ValidationExceptionRes(parsedOutput, context);
1308
1259
  default:
1309
1260
  const parsedBody = parsedOutput.body;
1310
- (0, smithy_client_1.throwDefaultError)({
1261
+ return throwDefaultError({
1311
1262
  output,
1312
1263
  parsedBody,
1313
- exceptionCtor: ServiceCatalogAppRegistryServiceException_1.ServiceCatalogAppRegistryServiceException,
1314
1264
  errorCode,
1315
1265
  });
1316
1266
  }
@@ -1319,7 +1269,7 @@ const de_PutConfigurationCommand = async (output, context) => {
1319
1269
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1320
1270
  return de_PutConfigurationCommandError(output, context);
1321
1271
  }
1322
- const contents = map({
1272
+ const contents = (0, smithy_client_1.map)({
1323
1273
  $metadata: deserializeMetadata(output),
1324
1274
  });
1325
1275
  await collectBody(output.body, context);
@@ -1344,10 +1294,9 @@ const de_PutConfigurationCommandError = async (output, context) => {
1344
1294
  throw await de_ValidationExceptionRes(parsedOutput, context);
1345
1295
  default:
1346
1296
  const parsedBody = parsedOutput.body;
1347
- (0, smithy_client_1.throwDefaultError)({
1297
+ return throwDefaultError({
1348
1298
  output,
1349
1299
  parsedBody,
1350
- exceptionCtor: ServiceCatalogAppRegistryServiceException_1.ServiceCatalogAppRegistryServiceException,
1351
1300
  errorCode,
1352
1301
  });
1353
1302
  }
@@ -1356,19 +1305,16 @@ const de_SyncResourceCommand = async (output, context) => {
1356
1305
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1357
1306
  return de_SyncResourceCommandError(output, context);
1358
1307
  }
1359
- const contents = map({
1308
+ const contents = (0, smithy_client_1.map)({
1360
1309
  $metadata: deserializeMetadata(output),
1361
1310
  });
1362
1311
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1363
- if (data.actionTaken != null) {
1364
- contents.actionTaken = (0, smithy_client_1.expectString)(data.actionTaken);
1365
- }
1366
- if (data.applicationArn != null) {
1367
- contents.applicationArn = (0, smithy_client_1.expectString)(data.applicationArn);
1368
- }
1369
- if (data.resourceArn != null) {
1370
- contents.resourceArn = (0, smithy_client_1.expectString)(data.resourceArn);
1371
- }
1312
+ const doc = (0, smithy_client_1.take)(data, {
1313
+ actionTaken: smithy_client_1.expectString,
1314
+ applicationArn: smithy_client_1.expectString,
1315
+ resourceArn: smithy_client_1.expectString,
1316
+ });
1317
+ Object.assign(contents, doc);
1372
1318
  return contents;
1373
1319
  };
1374
1320
  exports.de_SyncResourceCommand = de_SyncResourceCommand;
@@ -1396,10 +1342,9 @@ const de_SyncResourceCommandError = async (output, context) => {
1396
1342
  throw await de_ValidationExceptionRes(parsedOutput, context);
1397
1343
  default:
1398
1344
  const parsedBody = parsedOutput.body;
1399
- (0, smithy_client_1.throwDefaultError)({
1345
+ return throwDefaultError({
1400
1346
  output,
1401
1347
  parsedBody,
1402
- exceptionCtor: ServiceCatalogAppRegistryServiceException_1.ServiceCatalogAppRegistryServiceException,
1403
1348
  errorCode,
1404
1349
  });
1405
1350
  }
@@ -1408,7 +1353,7 @@ const de_TagResourceCommand = async (output, context) => {
1408
1353
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1409
1354
  return de_TagResourceCommandError(output, context);
1410
1355
  }
1411
- const contents = map({
1356
+ const contents = (0, smithy_client_1.map)({
1412
1357
  $metadata: deserializeMetadata(output),
1413
1358
  });
1414
1359
  await collectBody(output.body, context);
@@ -1433,10 +1378,9 @@ const de_TagResourceCommandError = async (output, context) => {
1433
1378
  throw await de_ValidationExceptionRes(parsedOutput, context);
1434
1379
  default:
1435
1380
  const parsedBody = parsedOutput.body;
1436
- (0, smithy_client_1.throwDefaultError)({
1381
+ return throwDefaultError({
1437
1382
  output,
1438
1383
  parsedBody,
1439
- exceptionCtor: ServiceCatalogAppRegistryServiceException_1.ServiceCatalogAppRegistryServiceException,
1440
1384
  errorCode,
1441
1385
  });
1442
1386
  }
@@ -1445,7 +1389,7 @@ const de_UntagResourceCommand = async (output, context) => {
1445
1389
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1446
1390
  return de_UntagResourceCommandError(output, context);
1447
1391
  }
1448
- const contents = map({
1392
+ const contents = (0, smithy_client_1.map)({
1449
1393
  $metadata: deserializeMetadata(output),
1450
1394
  });
1451
1395
  await collectBody(output.body, context);
@@ -1470,10 +1414,9 @@ const de_UntagResourceCommandError = async (output, context) => {
1470
1414
  throw await de_ValidationExceptionRes(parsedOutput, context);
1471
1415
  default:
1472
1416
  const parsedBody = parsedOutput.body;
1473
- (0, smithy_client_1.throwDefaultError)({
1417
+ return throwDefaultError({
1474
1418
  output,
1475
1419
  parsedBody,
1476
- exceptionCtor: ServiceCatalogAppRegistryServiceException_1.ServiceCatalogAppRegistryServiceException,
1477
1420
  errorCode,
1478
1421
  });
1479
1422
  }
@@ -1482,13 +1425,14 @@ const de_UpdateApplicationCommand = async (output, context) => {
1482
1425
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1483
1426
  return de_UpdateApplicationCommandError(output, context);
1484
1427
  }
1485
- const contents = map({
1428
+ const contents = (0, smithy_client_1.map)({
1486
1429
  $metadata: deserializeMetadata(output),
1487
1430
  });
1488
1431
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1489
- if (data.application != null) {
1490
- contents.application = de_Application(data.application, context);
1491
- }
1432
+ const doc = (0, smithy_client_1.take)(data, {
1433
+ application: (_) => de_Application(_, context),
1434
+ });
1435
+ Object.assign(contents, doc);
1492
1436
  return contents;
1493
1437
  };
1494
1438
  exports.de_UpdateApplicationCommand = de_UpdateApplicationCommand;
@@ -1516,10 +1460,9 @@ const de_UpdateApplicationCommandError = async (output, context) => {
1516
1460
  throw await de_ValidationExceptionRes(parsedOutput, context);
1517
1461
  default:
1518
1462
  const parsedBody = parsedOutput.body;
1519
- (0, smithy_client_1.throwDefaultError)({
1463
+ return throwDefaultError({
1520
1464
  output,
1521
1465
  parsedBody,
1522
- exceptionCtor: ServiceCatalogAppRegistryServiceException_1.ServiceCatalogAppRegistryServiceException,
1523
1466
  errorCode,
1524
1467
  });
1525
1468
  }
@@ -1528,13 +1471,14 @@ const de_UpdateAttributeGroupCommand = async (output, context) => {
1528
1471
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1529
1472
  return de_UpdateAttributeGroupCommandError(output, context);
1530
1473
  }
1531
- const contents = map({
1474
+ const contents = (0, smithy_client_1.map)({
1532
1475
  $metadata: deserializeMetadata(output),
1533
1476
  });
1534
1477
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1535
- if (data.attributeGroup != null) {
1536
- contents.attributeGroup = de_AttributeGroup(data.attributeGroup, context);
1537
- }
1478
+ const doc = (0, smithy_client_1.take)(data, {
1479
+ attributeGroup: (_) => de_AttributeGroup(_, context),
1480
+ });
1481
+ Object.assign(contents, doc);
1538
1482
  return contents;
1539
1483
  };
1540
1484
  exports.de_UpdateAttributeGroupCommand = de_UpdateAttributeGroupCommand;
@@ -1559,21 +1503,21 @@ const de_UpdateAttributeGroupCommandError = async (output, context) => {
1559
1503
  throw await de_ValidationExceptionRes(parsedOutput, context);
1560
1504
  default:
1561
1505
  const parsedBody = parsedOutput.body;
1562
- (0, smithy_client_1.throwDefaultError)({
1506
+ return throwDefaultError({
1563
1507
  output,
1564
1508
  parsedBody,
1565
- exceptionCtor: ServiceCatalogAppRegistryServiceException_1.ServiceCatalogAppRegistryServiceException,
1566
1509
  errorCode,
1567
1510
  });
1568
1511
  }
1569
1512
  };
1570
- const map = smithy_client_1.map;
1513
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(ServiceCatalogAppRegistryServiceException_1.ServiceCatalogAppRegistryServiceException);
1571
1514
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
1572
- const contents = map({});
1515
+ const contents = (0, smithy_client_1.map)({});
1573
1516
  const data = parsedOutput.body;
1574
- if (data.message != null) {
1575
- contents.message = (0, smithy_client_1.expectString)(data.message);
1576
- }
1517
+ const doc = (0, smithy_client_1.take)(data, {
1518
+ message: smithy_client_1.expectString,
1519
+ });
1520
+ Object.assign(contents, doc);
1577
1521
  const exception = new models_0_1.ConflictException({
1578
1522
  $metadata: deserializeMetadata(parsedOutput),
1579
1523
  ...contents,
@@ -1581,11 +1525,12 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
1581
1525
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1582
1526
  };
1583
1527
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1584
- const contents = map({});
1528
+ const contents = (0, smithy_client_1.map)({});
1585
1529
  const data = parsedOutput.body;
1586
- if (data.message != null) {
1587
- contents.message = (0, smithy_client_1.expectString)(data.message);
1588
- }
1530
+ const doc = (0, smithy_client_1.take)(data, {
1531
+ message: smithy_client_1.expectString,
1532
+ });
1533
+ Object.assign(contents, doc);
1589
1534
  const exception = new models_0_1.InternalServerException({
1590
1535
  $metadata: deserializeMetadata(parsedOutput),
1591
1536
  ...contents,
@@ -1593,11 +1538,12 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1593
1538
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1594
1539
  };
1595
1540
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1596
- const contents = map({});
1541
+ const contents = (0, smithy_client_1.map)({});
1597
1542
  const data = parsedOutput.body;
1598
- if (data.message != null) {
1599
- contents.message = (0, smithy_client_1.expectString)(data.message);
1600
- }
1543
+ const doc = (0, smithy_client_1.take)(data, {
1544
+ message: smithy_client_1.expectString,
1545
+ });
1546
+ Object.assign(contents, doc);
1601
1547
  const exception = new models_0_1.ResourceNotFoundException({
1602
1548
  $metadata: deserializeMetadata(parsedOutput),
1603
1549
  ...contents,
@@ -1605,11 +1551,12 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1605
1551
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1606
1552
  };
1607
1553
  const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1608
- const contents = map({});
1554
+ const contents = (0, smithy_client_1.map)({});
1609
1555
  const data = parsedOutput.body;
1610
- if (data.message != null) {
1611
- contents.message = (0, smithy_client_1.expectString)(data.message);
1612
- }
1556
+ const doc = (0, smithy_client_1.take)(data, {
1557
+ message: smithy_client_1.expectString,
1558
+ });
1559
+ Object.assign(contents, doc);
1613
1560
  const exception = new models_0_1.ServiceQuotaExceededException({
1614
1561
  $metadata: deserializeMetadata(parsedOutput),
1615
1562
  ...contents,
@@ -1617,14 +1564,13 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1617
1564
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1618
1565
  };
1619
1566
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1620
- const contents = map({});
1567
+ const contents = (0, smithy_client_1.map)({});
1621
1568
  const data = parsedOutput.body;
1622
- if (data.message != null) {
1623
- contents.message = (0, smithy_client_1.expectString)(data.message);
1624
- }
1625
- if (data.serviceCode != null) {
1626
- contents.serviceCode = (0, smithy_client_1.expectString)(data.serviceCode);
1627
- }
1569
+ const doc = (0, smithy_client_1.take)(data, {
1570
+ message: smithy_client_1.expectString,
1571
+ serviceCode: smithy_client_1.expectString,
1572
+ });
1573
+ Object.assign(contents, doc);
1628
1574
  const exception = new models_0_1.ThrottlingException({
1629
1575
  $metadata: deserializeMetadata(parsedOutput),
1630
1576
  ...contents,
@@ -1632,212 +1578,84 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1632
1578
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1633
1579
  };
1634
1580
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
1635
- const contents = map({});
1581
+ const contents = (0, smithy_client_1.map)({});
1636
1582
  const data = parsedOutput.body;
1637
- if (data.message != null) {
1638
- contents.message = (0, smithy_client_1.expectString)(data.message);
1639
- }
1583
+ const doc = (0, smithy_client_1.take)(data, {
1584
+ message: smithy_client_1.expectString,
1585
+ });
1586
+ Object.assign(contents, doc);
1640
1587
  const exception = new models_0_1.ValidationException({
1641
1588
  $metadata: deserializeMetadata(parsedOutput),
1642
1589
  ...contents,
1643
1590
  });
1644
1591
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1645
1592
  };
1646
- const se_AppRegistryConfiguration = (input, context) => {
1647
- return {
1648
- ...(input.tagQueryConfiguration != null && {
1649
- tagQueryConfiguration: se_TagQueryConfiguration(input.tagQueryConfiguration, context),
1650
- }),
1651
- };
1652
- };
1653
- const se_TagQueryConfiguration = (input, context) => {
1654
- return {
1655
- ...(input.tagKey != null && { tagKey: input.tagKey }),
1656
- };
1657
- };
1658
- const se_Tags = (input, context) => {
1659
- return Object.entries(input).reduce((acc, [key, value]) => {
1660
- if (value === null) {
1661
- return acc;
1662
- }
1663
- acc[key] = value;
1664
- return acc;
1665
- }, {});
1666
- };
1667
1593
  const de_Application = (output, context) => {
1668
- return {
1669
- arn: (0, smithy_client_1.expectString)(output.arn),
1670
- creationTime: output.creationTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.creationTime)) : undefined,
1671
- description: (0, smithy_client_1.expectString)(output.description),
1672
- id: (0, smithy_client_1.expectString)(output.id),
1673
- lastUpdateTime: output.lastUpdateTime != null
1674
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.lastUpdateTime))
1675
- : undefined,
1676
- name: (0, smithy_client_1.expectString)(output.name),
1677
- tags: output.tags != null ? de_Tags(output.tags, context) : undefined,
1678
- };
1594
+ return (0, smithy_client_1.take)(output, {
1595
+ arn: smithy_client_1.expectString,
1596
+ creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1597
+ description: smithy_client_1.expectString,
1598
+ id: smithy_client_1.expectString,
1599
+ lastUpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1600
+ name: smithy_client_1.expectString,
1601
+ tags: smithy_client_1._json,
1602
+ });
1679
1603
  };
1680
1604
  const de_ApplicationSummaries = (output, context) => {
1681
1605
  const retVal = (output || [])
1682
1606
  .filter((e) => e != null)
1683
1607
  .map((entry) => {
1684
- if (entry === null) {
1685
- return null;
1686
- }
1687
1608
  return de_ApplicationSummary(entry, context);
1688
1609
  });
1689
1610
  return retVal;
1690
1611
  };
1691
1612
  const de_ApplicationSummary = (output, context) => {
1692
- return {
1693
- arn: (0, smithy_client_1.expectString)(output.arn),
1694
- creationTime: output.creationTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.creationTime)) : undefined,
1695
- description: (0, smithy_client_1.expectString)(output.description),
1696
- id: (0, smithy_client_1.expectString)(output.id),
1697
- lastUpdateTime: output.lastUpdateTime != null
1698
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.lastUpdateTime))
1699
- : undefined,
1700
- name: (0, smithy_client_1.expectString)(output.name),
1701
- };
1702
- };
1703
- const de_AppRegistryConfiguration = (output, context) => {
1704
- return {
1705
- tagQueryConfiguration: output.tagQueryConfiguration != null
1706
- ? de_TagQueryConfiguration(output.tagQueryConfiguration, context)
1707
- : undefined,
1708
- };
1709
- };
1710
- const de_AttributeGroup = (output, context) => {
1711
- return {
1712
- arn: (0, smithy_client_1.expectString)(output.arn),
1713
- creationTime: output.creationTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.creationTime)) : undefined,
1714
- description: (0, smithy_client_1.expectString)(output.description),
1715
- id: (0, smithy_client_1.expectString)(output.id),
1716
- lastUpdateTime: output.lastUpdateTime != null
1717
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.lastUpdateTime))
1718
- : undefined,
1719
- name: (0, smithy_client_1.expectString)(output.name),
1720
- tags: output.tags != null ? de_Tags(output.tags, context) : undefined,
1721
- };
1722
- };
1723
- const de_AttributeGroupDetails = (output, context) => {
1724
- return {
1725
- arn: (0, smithy_client_1.expectString)(output.arn),
1726
- createdBy: (0, smithy_client_1.expectString)(output.createdBy),
1727
- id: (0, smithy_client_1.expectString)(output.id),
1728
- name: (0, smithy_client_1.expectString)(output.name),
1729
- };
1730
- };
1731
- const de_AttributeGroupDetailsList = (output, context) => {
1732
- const retVal = (output || [])
1733
- .filter((e) => e != null)
1734
- .map((entry) => {
1735
- if (entry === null) {
1736
- return null;
1737
- }
1738
- return de_AttributeGroupDetails(entry, context);
1613
+ return (0, smithy_client_1.take)(output, {
1614
+ arn: smithy_client_1.expectString,
1615
+ creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1616
+ description: smithy_client_1.expectString,
1617
+ id: smithy_client_1.expectString,
1618
+ lastUpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1619
+ name: smithy_client_1.expectString,
1739
1620
  });
1740
- return retVal;
1741
1621
  };
1742
- const de_AttributeGroupIds = (output, context) => {
1743
- const retVal = (output || [])
1744
- .filter((e) => e != null)
1745
- .map((entry) => {
1746
- if (entry === null) {
1747
- return null;
1748
- }
1749
- return (0, smithy_client_1.expectString)(entry);
1622
+ const de_AttributeGroup = (output, context) => {
1623
+ return (0, smithy_client_1.take)(output, {
1624
+ arn: smithy_client_1.expectString,
1625
+ creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1626
+ description: smithy_client_1.expectString,
1627
+ id: smithy_client_1.expectString,
1628
+ lastUpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1629
+ name: smithy_client_1.expectString,
1630
+ tags: smithy_client_1._json,
1750
1631
  });
1751
- return retVal;
1752
1632
  };
1753
1633
  const de_AttributeGroupSummaries = (output, context) => {
1754
1634
  const retVal = (output || [])
1755
1635
  .filter((e) => e != null)
1756
1636
  .map((entry) => {
1757
- if (entry === null) {
1758
- return null;
1759
- }
1760
1637
  return de_AttributeGroupSummary(entry, context);
1761
1638
  });
1762
1639
  return retVal;
1763
1640
  };
1764
1641
  const de_AttributeGroupSummary = (output, context) => {
1765
- return {
1766
- arn: (0, smithy_client_1.expectString)(output.arn),
1767
- createdBy: (0, smithy_client_1.expectString)(output.createdBy),
1768
- creationTime: output.creationTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.creationTime)) : undefined,
1769
- description: (0, smithy_client_1.expectString)(output.description),
1770
- id: (0, smithy_client_1.expectString)(output.id),
1771
- lastUpdateTime: output.lastUpdateTime != null
1772
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.lastUpdateTime))
1773
- : undefined,
1774
- name: (0, smithy_client_1.expectString)(output.name),
1775
- };
1776
- };
1777
- const de_Integrations = (output, context) => {
1778
- return {
1779
- resourceGroup: output.resourceGroup != null ? de_ResourceGroup(output.resourceGroup, context) : undefined,
1780
- };
1642
+ return (0, smithy_client_1.take)(output, {
1643
+ arn: smithy_client_1.expectString,
1644
+ createdBy: smithy_client_1.expectString,
1645
+ creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1646
+ description: smithy_client_1.expectString,
1647
+ id: smithy_client_1.expectString,
1648
+ lastUpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1649
+ name: smithy_client_1.expectString,
1650
+ });
1781
1651
  };
1782
1652
  const de_Resource = (output, context) => {
1783
- return {
1784
- arn: (0, smithy_client_1.expectString)(output.arn),
1785
- associationTime: output.associationTime != null
1786
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.associationTime))
1787
- : undefined,
1788
- integrations: output.integrations != null ? de_ResourceIntegrations(output.integrations, context) : undefined,
1789
- name: (0, smithy_client_1.expectString)(output.name),
1790
- };
1791
- };
1792
- const de_ResourceDetails = (output, context) => {
1793
- return {
1794
- tagValue: (0, smithy_client_1.expectString)(output.tagValue),
1795
- };
1796
- };
1797
- const de_ResourceGroup = (output, context) => {
1798
- return {
1799
- arn: (0, smithy_client_1.expectString)(output.arn),
1800
- errorMessage: (0, smithy_client_1.expectString)(output.errorMessage),
1801
- state: (0, smithy_client_1.expectString)(output.state),
1802
- };
1803
- };
1804
- const de_ResourceInfo = (output, context) => {
1805
- return {
1806
- arn: (0, smithy_client_1.expectString)(output.arn),
1807
- name: (0, smithy_client_1.expectString)(output.name),
1808
- resourceDetails: output.resourceDetails != null ? de_ResourceDetails(output.resourceDetails, context) : undefined,
1809
- resourceType: (0, smithy_client_1.expectString)(output.resourceType),
1810
- };
1811
- };
1812
- const de_ResourceIntegrations = (output, context) => {
1813
- return {
1814
- resourceGroup: output.resourceGroup != null ? de_ResourceGroup(output.resourceGroup, context) : undefined,
1815
- };
1816
- };
1817
- const de_Resources = (output, context) => {
1818
- const retVal = (output || [])
1819
- .filter((e) => e != null)
1820
- .map((entry) => {
1821
- if (entry === null) {
1822
- return null;
1823
- }
1824
- return de_ResourceInfo(entry, context);
1653
+ return (0, smithy_client_1.take)(output, {
1654
+ arn: smithy_client_1.expectString,
1655
+ associationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1656
+ integrations: smithy_client_1._json,
1657
+ name: smithy_client_1.expectString,
1825
1658
  });
1826
- return retVal;
1827
- };
1828
- const de_TagQueryConfiguration = (output, context) => {
1829
- return {
1830
- tagKey: (0, smithy_client_1.expectString)(output.tagKey),
1831
- };
1832
- };
1833
- const de_Tags = (output, context) => {
1834
- return Object.entries(output).reduce((acc, [key, value]) => {
1835
- if (value === null) {
1836
- return acc;
1837
- }
1838
- acc[key] = (0, smithy_client_1.expectString)(value);
1839
- return acc;
1840
- }, {});
1841
1659
  };
1842
1660
  const deserializeMetadata = (output) => ({
1843
1661
  httpStatusCode: output.statusCode,