@aws-sdk/client-iottwinmaker 3.312.0 → 3.315.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15,9 +15,9 @@ const se_BatchPutPropertyValuesCommand = async (input, context) => {
15
15
  "/workspaces/{workspaceId}/entity-properties";
16
16
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
17
17
  let body;
18
- body = JSON.stringify({
19
- ...(input.entries != null && { entries: se_Entries(input.entries, context) }),
20
- });
18
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
19
+ entries: (_) => se_Entries(_, context),
20
+ }));
21
21
  let { hostname: resolvedHostname } = await context.endpoint();
22
22
  if (context.disableHostPrefix !== true) {
23
23
  resolvedHostname = "data." + resolvedHostname;
@@ -46,18 +46,16 @@ const se_CreateComponentTypeCommand = async (input, context) => {
46
46
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
47
47
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "componentTypeId", () => input.componentTypeId, "{componentTypeId}", false);
48
48
  let body;
49
- body = JSON.stringify({
50
- ...(input.componentTypeName != null && { componentTypeName: input.componentTypeName }),
51
- ...(input.description != null && { description: input.description }),
52
- ...(input.extendsFrom != null && { extendsFrom: se_ExtendsFrom(input.extendsFrom, context) }),
53
- ...(input.functions != null && { functions: se_FunctionsRequest(input.functions, context) }),
54
- ...(input.isSingleton != null && { isSingleton: input.isSingleton }),
55
- ...(input.propertyDefinitions != null && {
56
- propertyDefinitions: se_PropertyDefinitionsRequest(input.propertyDefinitions, context),
57
- }),
58
- ...(input.propertyGroups != null && { propertyGroups: se_PropertyGroupsRequest(input.propertyGroups, context) }),
59
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
60
- });
49
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
50
+ componentTypeName: [],
51
+ description: [],
52
+ extendsFrom: (_) => (0, smithy_client_1._json)(_),
53
+ functions: (_) => (0, smithy_client_1._json)(_),
54
+ isSingleton: [],
55
+ propertyDefinitions: (_) => se_PropertyDefinitionsRequest(_, context),
56
+ propertyGroups: (_) => (0, smithy_client_1._json)(_),
57
+ tags: (_) => (0, smithy_client_1._json)(_),
58
+ }));
61
59
  let { hostname: resolvedHostname } = await context.endpoint();
62
60
  if (context.disableHostPrefix !== true) {
63
61
  resolvedHostname = "api." + resolvedHostname;
@@ -84,14 +82,14 @@ const se_CreateEntityCommand = async (input, context) => {
84
82
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/entities";
85
83
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
86
84
  let body;
87
- body = JSON.stringify({
88
- ...(input.components != null && { components: se_ComponentsMapRequest(input.components, context) }),
89
- ...(input.description != null && { description: input.description }),
90
- ...(input.entityId != null && { entityId: input.entityId }),
91
- ...(input.entityName != null && { entityName: input.entityName }),
92
- ...(input.parentEntityId != null && { parentEntityId: input.parentEntityId }),
93
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
94
- });
85
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
86
+ components: (_) => se_ComponentsMapRequest(_, context),
87
+ description: [],
88
+ entityId: [],
89
+ entityName: [],
90
+ parentEntityId: [],
91
+ tags: (_) => (0, smithy_client_1._json)(_),
92
+ }));
95
93
  let { hostname: resolvedHostname } = await context.endpoint();
96
94
  if (context.disableHostPrefix !== true) {
97
95
  resolvedHostname = "api." + resolvedHostname;
@@ -118,14 +116,14 @@ const se_CreateSceneCommand = async (input, context) => {
118
116
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/scenes";
119
117
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
120
118
  let body;
121
- body = JSON.stringify({
122
- ...(input.capabilities != null && { capabilities: se_SceneCapabilities(input.capabilities, context) }),
123
- ...(input.contentLocation != null && { contentLocation: input.contentLocation }),
124
- ...(input.description != null && { description: input.description }),
125
- ...(input.sceneId != null && { sceneId: input.sceneId }),
126
- ...(input.sceneMetadata != null && { sceneMetadata: se_SceneMetadataMap(input.sceneMetadata, context) }),
127
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
128
- });
119
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
120
+ capabilities: (_) => (0, smithy_client_1._json)(_),
121
+ contentLocation: [],
122
+ description: [],
123
+ sceneId: [],
124
+ sceneMetadata: (_) => (0, smithy_client_1._json)(_),
125
+ tags: (_) => (0, smithy_client_1._json)(_),
126
+ }));
129
127
  let { hostname: resolvedHostname } = await context.endpoint();
130
128
  if (context.disableHostPrefix !== true) {
131
129
  resolvedHostname = "api." + resolvedHostname;
@@ -154,10 +152,10 @@ const se_CreateSyncJobCommand = async (input, context) => {
154
152
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
155
153
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "syncSource", () => input.syncSource, "{syncSource}", false);
156
154
  let body;
157
- body = JSON.stringify({
158
- ...(input.syncRole != null && { syncRole: input.syncRole }),
159
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
160
- });
155
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
156
+ syncRole: [],
157
+ tags: (_) => (0, smithy_client_1._json)(_),
158
+ }));
161
159
  let { hostname: resolvedHostname } = await context.endpoint();
162
160
  if (context.disableHostPrefix !== true) {
163
161
  resolvedHostname = "api." + resolvedHostname;
@@ -184,12 +182,12 @@ const se_CreateWorkspaceCommand = async (input, context) => {
184
182
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}";
185
183
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
186
184
  let body;
187
- body = JSON.stringify({
188
- ...(input.description != null && { description: input.description }),
189
- ...(input.role != null && { role: input.role }),
190
- ...(input.s3Location != null && { s3Location: input.s3Location }),
191
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
192
- });
185
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
186
+ description: [],
187
+ role: [],
188
+ s3Location: [],
189
+ tags: (_) => (0, smithy_client_1._json)(_),
190
+ }));
193
191
  let { hostname: resolvedHostname } = await context.endpoint();
194
192
  if (context.disableHostPrefix !== true) {
195
193
  resolvedHostname = "api." + resolvedHostname;
@@ -241,7 +239,7 @@ const se_DeleteEntityCommand = async (input, context) => {
241
239
  "/workspaces/{workspaceId}/entities/{entityId}";
242
240
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
243
241
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "entityId", () => input.entityId, "{entityId}", false);
244
- const query = map({
242
+ const query = (0, smithy_client_1.map)({
245
243
  isRecursive: [() => input.isRecursive !== void 0, () => input.isRecursive.toString()],
246
244
  });
247
245
  let body;
@@ -347,12 +345,12 @@ const se_ExecuteQueryCommand = async (input, context) => {
347
345
  };
348
346
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/queries/execution";
349
347
  let body;
350
- body = JSON.stringify({
351
- ...(input.maxResults != null && { maxResults: input.maxResults }),
352
- ...(input.nextToken != null && { nextToken: input.nextToken }),
353
- ...(input.queryStatement != null && { queryStatement: input.queryStatement }),
354
- ...(input.workspaceId != null && { workspaceId: input.workspaceId }),
355
- });
348
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
349
+ maxResults: [],
350
+ nextToken: [],
351
+ queryStatement: [],
352
+ workspaceId: [],
353
+ }));
356
354
  let { hostname: resolvedHostname } = await context.endpoint();
357
355
  if (context.disableHostPrefix !== true) {
358
356
  resolvedHostname = "api." + resolvedHostname;
@@ -458,20 +456,16 @@ const se_GetPropertyValueCommand = async (input, context) => {
458
456
  "/workspaces/{workspaceId}/entity-properties/value";
459
457
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
460
458
  let body;
461
- body = JSON.stringify({
462
- ...(input.componentName != null && { componentName: input.componentName }),
463
- ...(input.componentTypeId != null && { componentTypeId: input.componentTypeId }),
464
- ...(input.entityId != null && { entityId: input.entityId }),
465
- ...(input.maxResults != null && { maxResults: input.maxResults }),
466
- ...(input.nextToken != null && { nextToken: input.nextToken }),
467
- ...(input.propertyGroupName != null && { propertyGroupName: input.propertyGroupName }),
468
- ...(input.selectedProperties != null && {
469
- selectedProperties: se_SelectedPropertyList(input.selectedProperties, context),
470
- }),
471
- ...(input.tabularConditions != null && {
472
- tabularConditions: se_TabularConditions(input.tabularConditions, context),
473
- }),
474
- });
459
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
460
+ componentName: [],
461
+ componentTypeId: [],
462
+ entityId: [],
463
+ maxResults: [],
464
+ nextToken: [],
465
+ propertyGroupName: [],
466
+ selectedProperties: (_) => (0, smithy_client_1._json)(_),
467
+ tabularConditions: (_) => se_TabularConditions(_, context),
468
+ }));
475
469
  let { hostname: resolvedHostname } = await context.endpoint();
476
470
  if (context.disableHostPrefix !== true) {
477
471
  resolvedHostname = "data." + resolvedHostname;
@@ -499,23 +493,21 @@ const se_GetPropertyValueHistoryCommand = async (input, context) => {
499
493
  "/workspaces/{workspaceId}/entity-properties/history";
500
494
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
501
495
  let body;
502
- body = JSON.stringify({
503
- ...(input.componentName != null && { componentName: input.componentName }),
504
- ...(input.componentTypeId != null && { componentTypeId: input.componentTypeId }),
505
- ...(input.endDateTime != null && { endDateTime: Math.round(input.endDateTime.getTime() / 1000) }),
506
- ...(input.endTime != null && { endTime: input.endTime }),
507
- ...(input.entityId != null && { entityId: input.entityId }),
508
- ...(input.interpolation != null && { interpolation: se_InterpolationParameters(input.interpolation, context) }),
509
- ...(input.maxResults != null && { maxResults: input.maxResults }),
510
- ...(input.nextToken != null && { nextToken: input.nextToken }),
511
- ...(input.orderByTime != null && { orderByTime: input.orderByTime }),
512
- ...(input.propertyFilters != null && { propertyFilters: se_PropertyFilters(input.propertyFilters, context) }),
513
- ...(input.selectedProperties != null && {
514
- selectedProperties: se_SelectedPropertyList(input.selectedProperties, context),
515
- }),
516
- ...(input.startDateTime != null && { startDateTime: Math.round(input.startDateTime.getTime() / 1000) }),
517
- ...(input.startTime != null && { startTime: input.startTime }),
518
- });
496
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
497
+ componentName: [],
498
+ componentTypeId: [],
499
+ endDateTime: (_) => Math.round(_.getTime() / 1000),
500
+ endTime: [],
501
+ entityId: [],
502
+ interpolation: (_) => (0, smithy_client_1._json)(_),
503
+ maxResults: [],
504
+ nextToken: [],
505
+ orderByTime: [],
506
+ propertyFilters: (_) => se_PropertyFilters(_, context),
507
+ selectedProperties: (_) => (0, smithy_client_1._json)(_),
508
+ startDateTime: (_) => Math.round(_.getTime() / 1000),
509
+ startTime: [],
510
+ }));
519
511
  let { hostname: resolvedHostname } = await context.endpoint();
520
512
  if (context.disableHostPrefix !== true) {
521
513
  resolvedHostname = "data." + resolvedHostname;
@@ -565,7 +557,7 @@ const se_GetSyncJobCommand = async (input, context) => {
565
557
  const headers = {};
566
558
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sync-jobs/{syncSource}";
567
559
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "syncSource", () => input.syncSource, "{syncSource}", false);
568
- const query = map({
560
+ const query = (0, smithy_client_1.map)({
569
561
  workspace: [, input.workspaceId],
570
562
  });
571
563
  let body;
@@ -621,11 +613,11 @@ const se_ListComponentTypesCommand = async (input, context) => {
621
613
  "/workspaces/{workspaceId}/component-types-list";
622
614
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
623
615
  let body;
624
- body = JSON.stringify({
625
- ...(input.filters != null && { filters: se_ListComponentTypesFilters(input.filters, context) }),
626
- ...(input.maxResults != null && { maxResults: input.maxResults }),
627
- ...(input.nextToken != null && { nextToken: input.nextToken }),
628
- });
616
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
617
+ filters: (_) => (0, smithy_client_1._json)(_),
618
+ maxResults: [],
619
+ nextToken: [],
620
+ }));
629
621
  let { hostname: resolvedHostname } = await context.endpoint();
630
622
  if (context.disableHostPrefix !== true) {
631
623
  resolvedHostname = "api." + resolvedHostname;
@@ -652,11 +644,11 @@ const se_ListEntitiesCommand = async (input, context) => {
652
644
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/entities-list";
653
645
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
654
646
  let body;
655
- body = JSON.stringify({
656
- ...(input.filters != null && { filters: se_ListEntitiesFilters(input.filters, context) }),
657
- ...(input.maxResults != null && { maxResults: input.maxResults }),
658
- ...(input.nextToken != null && { nextToken: input.nextToken }),
659
- });
647
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
648
+ filters: (_) => (0, smithy_client_1._json)(_),
649
+ maxResults: [],
650
+ nextToken: [],
651
+ }));
660
652
  let { hostname: resolvedHostname } = await context.endpoint();
661
653
  if (context.disableHostPrefix !== true) {
662
654
  resolvedHostname = "api." + resolvedHostname;
@@ -683,10 +675,10 @@ const se_ListScenesCommand = async (input, context) => {
683
675
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/scenes-list";
684
676
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
685
677
  let body;
686
- body = JSON.stringify({
687
- ...(input.maxResults != null && { maxResults: input.maxResults }),
688
- ...(input.nextToken != null && { nextToken: input.nextToken }),
689
- });
678
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
679
+ maxResults: [],
680
+ nextToken: [],
681
+ }));
690
682
  let { hostname: resolvedHostname } = await context.endpoint();
691
683
  if (context.disableHostPrefix !== true) {
692
684
  resolvedHostname = "api." + resolvedHostname;
@@ -713,10 +705,10 @@ const se_ListSyncJobsCommand = async (input, context) => {
713
705
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/sync-jobs-list";
714
706
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
715
707
  let body;
716
- body = JSON.stringify({
717
- ...(input.maxResults != null && { maxResults: input.maxResults }),
718
- ...(input.nextToken != null && { nextToken: input.nextToken }),
719
- });
708
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
709
+ maxResults: [],
710
+ nextToken: [],
711
+ }));
720
712
  let { hostname: resolvedHostname } = await context.endpoint();
721
713
  if (context.disableHostPrefix !== true) {
722
714
  resolvedHostname = "api." + resolvedHostname;
@@ -745,11 +737,11 @@ const se_ListSyncResourcesCommand = async (input, context) => {
745
737
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
746
738
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "syncSource", () => input.syncSource, "{syncSource}", false);
747
739
  let body;
748
- body = JSON.stringify({
749
- ...(input.filters != null && { filters: se_SyncResourceFilters(input.filters, context) }),
750
- ...(input.maxResults != null && { maxResults: input.maxResults }),
751
- ...(input.nextToken != null && { nextToken: input.nextToken }),
752
- });
740
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
741
+ filters: (_) => (0, smithy_client_1._json)(_),
742
+ maxResults: [],
743
+ nextToken: [],
744
+ }));
753
745
  let { hostname: resolvedHostname } = await context.endpoint();
754
746
  if (context.disableHostPrefix !== true) {
755
747
  resolvedHostname = "api." + resolvedHostname;
@@ -775,11 +767,11 @@ const se_ListTagsForResourceCommand = async (input, context) => {
775
767
  };
776
768
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags-list";
777
769
  let body;
778
- body = JSON.stringify({
779
- ...(input.maxResults != null && { maxResults: input.maxResults }),
780
- ...(input.nextToken != null && { nextToken: input.nextToken }),
781
- ...(input.resourceARN != null && { resourceARN: input.resourceARN }),
782
- });
770
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
771
+ maxResults: [],
772
+ nextToken: [],
773
+ resourceARN: [],
774
+ }));
783
775
  let { hostname: resolvedHostname } = await context.endpoint();
784
776
  if (context.disableHostPrefix !== true) {
785
777
  resolvedHostname = "api." + resolvedHostname;
@@ -805,10 +797,10 @@ const se_ListWorkspacesCommand = async (input, context) => {
805
797
  };
806
798
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces-list";
807
799
  let body;
808
- body = JSON.stringify({
809
- ...(input.maxResults != null && { maxResults: input.maxResults }),
810
- ...(input.nextToken != null && { nextToken: input.nextToken }),
811
- });
800
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
801
+ maxResults: [],
802
+ nextToken: [],
803
+ }));
812
804
  let { hostname: resolvedHostname } = await context.endpoint();
813
805
  if (context.disableHostPrefix !== true) {
814
806
  resolvedHostname = "api." + resolvedHostname;
@@ -834,10 +826,10 @@ const se_TagResourceCommand = async (input, context) => {
834
826
  };
835
827
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags";
836
828
  let body;
837
- body = JSON.stringify({
838
- ...(input.resourceARN != null && { resourceARN: input.resourceARN }),
839
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
840
- });
829
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
830
+ resourceARN: [],
831
+ tags: (_) => (0, smithy_client_1._json)(_),
832
+ }));
841
833
  let { hostname: resolvedHostname } = await context.endpoint();
842
834
  if (context.disableHostPrefix !== true) {
843
835
  resolvedHostname = "api." + resolvedHostname;
@@ -860,7 +852,7 @@ const se_UntagResourceCommand = async (input, context) => {
860
852
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
861
853
  const headers = {};
862
854
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags";
863
- const query = map({
855
+ const query = (0, smithy_client_1.map)({
864
856
  resourceARN: [, (0, smithy_client_1.expectNonNull)(input.resourceARN, `resourceARN`)],
865
857
  tagKeys: [
866
858
  (0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
@@ -897,17 +889,15 @@ const se_UpdateComponentTypeCommand = async (input, context) => {
897
889
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
898
890
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "componentTypeId", () => input.componentTypeId, "{componentTypeId}", false);
899
891
  let body;
900
- body = JSON.stringify({
901
- ...(input.componentTypeName != null && { componentTypeName: input.componentTypeName }),
902
- ...(input.description != null && { description: input.description }),
903
- ...(input.extendsFrom != null && { extendsFrom: se_ExtendsFrom(input.extendsFrom, context) }),
904
- ...(input.functions != null && { functions: se_FunctionsRequest(input.functions, context) }),
905
- ...(input.isSingleton != null && { isSingleton: input.isSingleton }),
906
- ...(input.propertyDefinitions != null && {
907
- propertyDefinitions: se_PropertyDefinitionsRequest(input.propertyDefinitions, context),
908
- }),
909
- ...(input.propertyGroups != null && { propertyGroups: se_PropertyGroupsRequest(input.propertyGroups, context) }),
910
- });
892
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
893
+ componentTypeName: [],
894
+ description: [],
895
+ extendsFrom: (_) => (0, smithy_client_1._json)(_),
896
+ functions: (_) => (0, smithy_client_1._json)(_),
897
+ isSingleton: [],
898
+ propertyDefinitions: (_) => se_PropertyDefinitionsRequest(_, context),
899
+ propertyGroups: (_) => (0, smithy_client_1._json)(_),
900
+ }));
911
901
  let { hostname: resolvedHostname } = await context.endpoint();
912
902
  if (context.disableHostPrefix !== true) {
913
903
  resolvedHostname = "api." + resolvedHostname;
@@ -936,16 +926,12 @@ const se_UpdateEntityCommand = async (input, context) => {
936
926
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
937
927
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "entityId", () => input.entityId, "{entityId}", false);
938
928
  let body;
939
- body = JSON.stringify({
940
- ...(input.componentUpdates != null && {
941
- componentUpdates: se_ComponentUpdatesMapRequest(input.componentUpdates, context),
942
- }),
943
- ...(input.description != null && { description: input.description }),
944
- ...(input.entityName != null && { entityName: input.entityName }),
945
- ...(input.parentEntityUpdate != null && {
946
- parentEntityUpdate: se_ParentEntityUpdateRequest(input.parentEntityUpdate, context),
947
- }),
948
- });
929
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
930
+ componentUpdates: (_) => se_ComponentUpdatesMapRequest(_, context),
931
+ description: [],
932
+ entityName: [],
933
+ parentEntityUpdate: (_) => (0, smithy_client_1._json)(_),
934
+ }));
949
935
  let { hostname: resolvedHostname } = await context.endpoint();
950
936
  if (context.disableHostPrefix !== true) {
951
937
  resolvedHostname = "api." + resolvedHostname;
@@ -971,10 +957,10 @@ const se_UpdatePricingPlanCommand = async (input, context) => {
971
957
  };
972
958
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/pricingplan";
973
959
  let body;
974
- body = JSON.stringify({
975
- ...(input.bundleNames != null && { bundleNames: se_PricingBundles(input.bundleNames, context) }),
976
- ...(input.pricingMode != null && { pricingMode: input.pricingMode }),
977
- });
960
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
961
+ bundleNames: (_) => (0, smithy_client_1._json)(_),
962
+ pricingMode: [],
963
+ }));
978
964
  let { hostname: resolvedHostname } = await context.endpoint();
979
965
  if (context.disableHostPrefix !== true) {
980
966
  resolvedHostname = "api." + resolvedHostname;
@@ -1003,12 +989,12 @@ const se_UpdateSceneCommand = async (input, context) => {
1003
989
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
1004
990
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "sceneId", () => input.sceneId, "{sceneId}", false);
1005
991
  let body;
1006
- body = JSON.stringify({
1007
- ...(input.capabilities != null && { capabilities: se_SceneCapabilities(input.capabilities, context) }),
1008
- ...(input.contentLocation != null && { contentLocation: input.contentLocation }),
1009
- ...(input.description != null && { description: input.description }),
1010
- ...(input.sceneMetadata != null && { sceneMetadata: se_SceneMetadataMap(input.sceneMetadata, context) }),
1011
- });
992
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
993
+ capabilities: (_) => (0, smithy_client_1._json)(_),
994
+ contentLocation: [],
995
+ description: [],
996
+ sceneMetadata: (_) => (0, smithy_client_1._json)(_),
997
+ }));
1012
998
  let { hostname: resolvedHostname } = await context.endpoint();
1013
999
  if (context.disableHostPrefix !== true) {
1014
1000
  resolvedHostname = "api." + resolvedHostname;
@@ -1035,10 +1021,10 @@ const se_UpdateWorkspaceCommand = async (input, context) => {
1035
1021
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}";
1036
1022
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
1037
1023
  let body;
1038
- body = JSON.stringify({
1039
- ...(input.description != null && { description: input.description }),
1040
- ...(input.role != null && { role: input.role }),
1041
- });
1024
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1025
+ description: [],
1026
+ role: [],
1027
+ }));
1042
1028
  let { hostname: resolvedHostname } = await context.endpoint();
1043
1029
  if (context.disableHostPrefix !== true) {
1044
1030
  resolvedHostname = "api." + resolvedHostname;
@@ -1061,13 +1047,14 @@ const de_BatchPutPropertyValuesCommand = async (output, context) => {
1061
1047
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1062
1048
  return de_BatchPutPropertyValuesCommandError(output, context);
1063
1049
  }
1064
- const contents = map({
1050
+ const contents = (0, smithy_client_1.map)({
1065
1051
  $metadata: deserializeMetadata(output),
1066
1052
  });
1067
1053
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1068
- if (data.errorEntries != null) {
1069
- contents.errorEntries = de_ErrorEntries(data.errorEntries, context);
1070
- }
1054
+ const doc = (0, smithy_client_1.take)(data, {
1055
+ errorEntries: (_) => de_ErrorEntries(_, context),
1056
+ });
1057
+ Object.assign(contents, doc);
1071
1058
  return contents;
1072
1059
  };
1073
1060
  exports.de_BatchPutPropertyValuesCommand = de_BatchPutPropertyValuesCommand;
@@ -1092,10 +1079,9 @@ const de_BatchPutPropertyValuesCommandError = async (output, context) => {
1092
1079
  throw await de_ValidationExceptionRes(parsedOutput, context);
1093
1080
  default:
1094
1081
  const parsedBody = parsedOutput.body;
1095
- (0, smithy_client_1.throwDefaultError)({
1082
+ return throwDefaultError({
1096
1083
  output,
1097
1084
  parsedBody,
1098
- exceptionCtor: IoTTwinMakerServiceException_1.IoTTwinMakerServiceException,
1099
1085
  errorCode,
1100
1086
  });
1101
1087
  }
@@ -1104,19 +1090,16 @@ const de_CreateComponentTypeCommand = async (output, context) => {
1104
1090
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1105
1091
  return de_CreateComponentTypeCommandError(output, context);
1106
1092
  }
1107
- const contents = map({
1093
+ const contents = (0, smithy_client_1.map)({
1108
1094
  $metadata: deserializeMetadata(output),
1109
1095
  });
1110
1096
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1111
- if (data.arn != null) {
1112
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
1113
- }
1114
- if (data.creationDateTime != null) {
1115
- contents.creationDateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.creationDateTime)));
1116
- }
1117
- if (data.state != null) {
1118
- contents.state = (0, smithy_client_1.expectString)(data.state);
1119
- }
1097
+ const doc = (0, smithy_client_1.take)(data, {
1098
+ arn: smithy_client_1.expectString,
1099
+ creationDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1100
+ state: smithy_client_1.expectString,
1101
+ });
1102
+ Object.assign(contents, doc);
1120
1103
  return contents;
1121
1104
  };
1122
1105
  exports.de_CreateComponentTypeCommand = de_CreateComponentTypeCommand;
@@ -1147,10 +1130,9 @@ const de_CreateComponentTypeCommandError = async (output, context) => {
1147
1130
  throw await de_ValidationExceptionRes(parsedOutput, context);
1148
1131
  default:
1149
1132
  const parsedBody = parsedOutput.body;
1150
- (0, smithy_client_1.throwDefaultError)({
1133
+ return throwDefaultError({
1151
1134
  output,
1152
1135
  parsedBody,
1153
- exceptionCtor: IoTTwinMakerServiceException_1.IoTTwinMakerServiceException,
1154
1136
  errorCode,
1155
1137
  });
1156
1138
  }
@@ -1159,22 +1141,17 @@ const de_CreateEntityCommand = async (output, context) => {
1159
1141
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1160
1142
  return de_CreateEntityCommandError(output, context);
1161
1143
  }
1162
- const contents = map({
1144
+ const contents = (0, smithy_client_1.map)({
1163
1145
  $metadata: deserializeMetadata(output),
1164
1146
  });
1165
1147
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1166
- if (data.arn != null) {
1167
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
1168
- }
1169
- if (data.creationDateTime != null) {
1170
- contents.creationDateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.creationDateTime)));
1171
- }
1172
- if (data.entityId != null) {
1173
- contents.entityId = (0, smithy_client_1.expectString)(data.entityId);
1174
- }
1175
- if (data.state != null) {
1176
- contents.state = (0, smithy_client_1.expectString)(data.state);
1177
- }
1148
+ const doc = (0, smithy_client_1.take)(data, {
1149
+ arn: smithy_client_1.expectString,
1150
+ creationDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1151
+ entityId: smithy_client_1.expectString,
1152
+ state: smithy_client_1.expectString,
1153
+ });
1154
+ Object.assign(contents, doc);
1178
1155
  return contents;
1179
1156
  };
1180
1157
  exports.de_CreateEntityCommand = de_CreateEntityCommand;
@@ -1205,10 +1182,9 @@ const de_CreateEntityCommandError = async (output, context) => {
1205
1182
  throw await de_ValidationExceptionRes(parsedOutput, context);
1206
1183
  default:
1207
1184
  const parsedBody = parsedOutput.body;
1208
- (0, smithy_client_1.throwDefaultError)({
1185
+ return throwDefaultError({
1209
1186
  output,
1210
1187
  parsedBody,
1211
- exceptionCtor: IoTTwinMakerServiceException_1.IoTTwinMakerServiceException,
1212
1188
  errorCode,
1213
1189
  });
1214
1190
  }
@@ -1217,16 +1193,15 @@ const de_CreateSceneCommand = async (output, context) => {
1217
1193
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1218
1194
  return de_CreateSceneCommandError(output, context);
1219
1195
  }
1220
- const contents = map({
1196
+ const contents = (0, smithy_client_1.map)({
1221
1197
  $metadata: deserializeMetadata(output),
1222
1198
  });
1223
1199
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1224
- if (data.arn != null) {
1225
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
1226
- }
1227
- if (data.creationDateTime != null) {
1228
- contents.creationDateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.creationDateTime)));
1229
- }
1200
+ const doc = (0, smithy_client_1.take)(data, {
1201
+ arn: smithy_client_1.expectString,
1202
+ creationDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1203
+ });
1204
+ Object.assign(contents, doc);
1230
1205
  return contents;
1231
1206
  };
1232
1207
  exports.de_CreateSceneCommand = de_CreateSceneCommand;
@@ -1257,10 +1232,9 @@ const de_CreateSceneCommandError = async (output, context) => {
1257
1232
  throw await de_ValidationExceptionRes(parsedOutput, context);
1258
1233
  default:
1259
1234
  const parsedBody = parsedOutput.body;
1260
- (0, smithy_client_1.throwDefaultError)({
1235
+ return throwDefaultError({
1261
1236
  output,
1262
1237
  parsedBody,
1263
- exceptionCtor: IoTTwinMakerServiceException_1.IoTTwinMakerServiceException,
1264
1238
  errorCode,
1265
1239
  });
1266
1240
  }
@@ -1269,19 +1243,16 @@ const de_CreateSyncJobCommand = async (output, context) => {
1269
1243
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1270
1244
  return de_CreateSyncJobCommandError(output, context);
1271
1245
  }
1272
- const contents = map({
1246
+ const contents = (0, smithy_client_1.map)({
1273
1247
  $metadata: deserializeMetadata(output),
1274
1248
  });
1275
1249
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1276
- if (data.arn != null) {
1277
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
1278
- }
1279
- if (data.creationDateTime != null) {
1280
- contents.creationDateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.creationDateTime)));
1281
- }
1282
- if (data.state != null) {
1283
- contents.state = (0, smithy_client_1.expectString)(data.state);
1284
- }
1250
+ const doc = (0, smithy_client_1.take)(data, {
1251
+ arn: smithy_client_1.expectString,
1252
+ creationDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1253
+ state: smithy_client_1.expectString,
1254
+ });
1255
+ Object.assign(contents, doc);
1285
1256
  return contents;
1286
1257
  };
1287
1258
  exports.de_CreateSyncJobCommand = de_CreateSyncJobCommand;
@@ -1312,10 +1283,9 @@ const de_CreateSyncJobCommandError = async (output, context) => {
1312
1283
  throw await de_ValidationExceptionRes(parsedOutput, context);
1313
1284
  default:
1314
1285
  const parsedBody = parsedOutput.body;
1315
- (0, smithy_client_1.throwDefaultError)({
1286
+ return throwDefaultError({
1316
1287
  output,
1317
1288
  parsedBody,
1318
- exceptionCtor: IoTTwinMakerServiceException_1.IoTTwinMakerServiceException,
1319
1289
  errorCode,
1320
1290
  });
1321
1291
  }
@@ -1324,16 +1294,15 @@ const de_CreateWorkspaceCommand = async (output, context) => {
1324
1294
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1325
1295
  return de_CreateWorkspaceCommandError(output, context);
1326
1296
  }
1327
- const contents = map({
1297
+ const contents = (0, smithy_client_1.map)({
1328
1298
  $metadata: deserializeMetadata(output),
1329
1299
  });
1330
1300
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1331
- if (data.arn != null) {
1332
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
1333
- }
1334
- if (data.creationDateTime != null) {
1335
- contents.creationDateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.creationDateTime)));
1336
- }
1301
+ const doc = (0, smithy_client_1.take)(data, {
1302
+ arn: smithy_client_1.expectString,
1303
+ creationDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1304
+ });
1305
+ Object.assign(contents, doc);
1337
1306
  return contents;
1338
1307
  };
1339
1308
  exports.de_CreateWorkspaceCommand = de_CreateWorkspaceCommand;
@@ -1364,10 +1333,9 @@ const de_CreateWorkspaceCommandError = async (output, context) => {
1364
1333
  throw await de_ValidationExceptionRes(parsedOutput, context);
1365
1334
  default:
1366
1335
  const parsedBody = parsedOutput.body;
1367
- (0, smithy_client_1.throwDefaultError)({
1336
+ return throwDefaultError({
1368
1337
  output,
1369
1338
  parsedBody,
1370
- exceptionCtor: IoTTwinMakerServiceException_1.IoTTwinMakerServiceException,
1371
1339
  errorCode,
1372
1340
  });
1373
1341
  }
@@ -1376,13 +1344,14 @@ const de_DeleteComponentTypeCommand = async (output, context) => {
1376
1344
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1377
1345
  return de_DeleteComponentTypeCommandError(output, context);
1378
1346
  }
1379
- const contents = map({
1347
+ const contents = (0, smithy_client_1.map)({
1380
1348
  $metadata: deserializeMetadata(output),
1381
1349
  });
1382
1350
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1383
- if (data.state != null) {
1384
- contents.state = (0, smithy_client_1.expectString)(data.state);
1385
- }
1351
+ const doc = (0, smithy_client_1.take)(data, {
1352
+ state: smithy_client_1.expectString,
1353
+ });
1354
+ Object.assign(contents, doc);
1386
1355
  return contents;
1387
1356
  };
1388
1357
  exports.de_DeleteComponentTypeCommand = de_DeleteComponentTypeCommand;
@@ -1410,10 +1379,9 @@ const de_DeleteComponentTypeCommandError = async (output, context) => {
1410
1379
  throw await de_ValidationExceptionRes(parsedOutput, context);
1411
1380
  default:
1412
1381
  const parsedBody = parsedOutput.body;
1413
- (0, smithy_client_1.throwDefaultError)({
1382
+ return throwDefaultError({
1414
1383
  output,
1415
1384
  parsedBody,
1416
- exceptionCtor: IoTTwinMakerServiceException_1.IoTTwinMakerServiceException,
1417
1385
  errorCode,
1418
1386
  });
1419
1387
  }
@@ -1422,13 +1390,14 @@ const de_DeleteEntityCommand = async (output, context) => {
1422
1390
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1423
1391
  return de_DeleteEntityCommandError(output, context);
1424
1392
  }
1425
- const contents = map({
1393
+ const contents = (0, smithy_client_1.map)({
1426
1394
  $metadata: deserializeMetadata(output),
1427
1395
  });
1428
1396
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1429
- if (data.state != null) {
1430
- contents.state = (0, smithy_client_1.expectString)(data.state);
1431
- }
1397
+ const doc = (0, smithy_client_1.take)(data, {
1398
+ state: smithy_client_1.expectString,
1399
+ });
1400
+ Object.assign(contents, doc);
1432
1401
  return contents;
1433
1402
  };
1434
1403
  exports.de_DeleteEntityCommand = de_DeleteEntityCommand;
@@ -1456,10 +1425,9 @@ const de_DeleteEntityCommandError = async (output, context) => {
1456
1425
  throw await de_ValidationExceptionRes(parsedOutput, context);
1457
1426
  default:
1458
1427
  const parsedBody = parsedOutput.body;
1459
- (0, smithy_client_1.throwDefaultError)({
1428
+ return throwDefaultError({
1460
1429
  output,
1461
1430
  parsedBody,
1462
- exceptionCtor: IoTTwinMakerServiceException_1.IoTTwinMakerServiceException,
1463
1431
  errorCode,
1464
1432
  });
1465
1433
  }
@@ -1468,7 +1436,7 @@ const de_DeleteSceneCommand = async (output, context) => {
1468
1436
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1469
1437
  return de_DeleteSceneCommandError(output, context);
1470
1438
  }
1471
- const contents = map({
1439
+ const contents = (0, smithy_client_1.map)({
1472
1440
  $metadata: deserializeMetadata(output),
1473
1441
  });
1474
1442
  await collectBody(output.body, context);
@@ -1499,10 +1467,9 @@ const de_DeleteSceneCommandError = async (output, context) => {
1499
1467
  throw await de_ValidationExceptionRes(parsedOutput, context);
1500
1468
  default:
1501
1469
  const parsedBody = parsedOutput.body;
1502
- (0, smithy_client_1.throwDefaultError)({
1470
+ return throwDefaultError({
1503
1471
  output,
1504
1472
  parsedBody,
1505
- exceptionCtor: IoTTwinMakerServiceException_1.IoTTwinMakerServiceException,
1506
1473
  errorCode,
1507
1474
  });
1508
1475
  }
@@ -1511,13 +1478,14 @@ const de_DeleteSyncJobCommand = async (output, context) => {
1511
1478
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1512
1479
  return de_DeleteSyncJobCommandError(output, context);
1513
1480
  }
1514
- const contents = map({
1481
+ const contents = (0, smithy_client_1.map)({
1515
1482
  $metadata: deserializeMetadata(output),
1516
1483
  });
1517
1484
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1518
- if (data.state != null) {
1519
- contents.state = (0, smithy_client_1.expectString)(data.state);
1520
- }
1485
+ const doc = (0, smithy_client_1.take)(data, {
1486
+ state: smithy_client_1.expectString,
1487
+ });
1488
+ Object.assign(contents, doc);
1521
1489
  return contents;
1522
1490
  };
1523
1491
  exports.de_DeleteSyncJobCommand = de_DeleteSyncJobCommand;
@@ -1548,10 +1516,9 @@ const de_DeleteSyncJobCommandError = async (output, context) => {
1548
1516
  throw await de_ValidationExceptionRes(parsedOutput, context);
1549
1517
  default:
1550
1518
  const parsedBody = parsedOutput.body;
1551
- (0, smithy_client_1.throwDefaultError)({
1519
+ return throwDefaultError({
1552
1520
  output,
1553
1521
  parsedBody,
1554
- exceptionCtor: IoTTwinMakerServiceException_1.IoTTwinMakerServiceException,
1555
1522
  errorCode,
1556
1523
  });
1557
1524
  }
@@ -1560,7 +1527,7 @@ const de_DeleteWorkspaceCommand = async (output, context) => {
1560
1527
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1561
1528
  return de_DeleteWorkspaceCommandError(output, context);
1562
1529
  }
1563
- const contents = map({
1530
+ const contents = (0, smithy_client_1.map)({
1564
1531
  $metadata: deserializeMetadata(output),
1565
1532
  });
1566
1533
  await collectBody(output.body, context);
@@ -1591,10 +1558,9 @@ const de_DeleteWorkspaceCommandError = async (output, context) => {
1591
1558
  throw await de_ValidationExceptionRes(parsedOutput, context);
1592
1559
  default:
1593
1560
  const parsedBody = parsedOutput.body;
1594
- (0, smithy_client_1.throwDefaultError)({
1561
+ return throwDefaultError({
1595
1562
  output,
1596
1563
  parsedBody,
1597
- exceptionCtor: IoTTwinMakerServiceException_1.IoTTwinMakerServiceException,
1598
1564
  errorCode,
1599
1565
  });
1600
1566
  }
@@ -1603,19 +1569,16 @@ const de_ExecuteQueryCommand = async (output, context) => {
1603
1569
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1604
1570
  return de_ExecuteQueryCommandError(output, context);
1605
1571
  }
1606
- const contents = map({
1572
+ const contents = (0, smithy_client_1.map)({
1607
1573
  $metadata: deserializeMetadata(output),
1608
1574
  });
1609
1575
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1610
- if (data.columnDescriptions != null) {
1611
- contents.columnDescriptions = de_ColumnDescriptions(data.columnDescriptions, context);
1612
- }
1613
- if (data.nextToken != null) {
1614
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1615
- }
1616
- if (data.rows != null) {
1617
- contents.rows = de_Rows(data.rows, context);
1618
- }
1576
+ const doc = (0, smithy_client_1.take)(data, {
1577
+ columnDescriptions: smithy_client_1._json,
1578
+ nextToken: smithy_client_1.expectString,
1579
+ rows: (_) => de_Rows(_, context),
1580
+ });
1581
+ Object.assign(contents, doc);
1619
1582
  return contents;
1620
1583
  };
1621
1584
  exports.de_ExecuteQueryCommand = de_ExecuteQueryCommand;
@@ -1646,10 +1609,9 @@ const de_ExecuteQueryCommandError = async (output, context) => {
1646
1609
  throw await de_ValidationExceptionRes(parsedOutput, context);
1647
1610
  default:
1648
1611
  const parsedBody = parsedOutput.body;
1649
- (0, smithy_client_1.throwDefaultError)({
1612
+ return throwDefaultError({
1650
1613
  output,
1651
1614
  parsedBody,
1652
- exceptionCtor: IoTTwinMakerServiceException_1.IoTTwinMakerServiceException,
1653
1615
  errorCode,
1654
1616
  });
1655
1617
  }
@@ -1658,58 +1620,29 @@ const de_GetComponentTypeCommand = async (output, context) => {
1658
1620
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1659
1621
  return de_GetComponentTypeCommandError(output, context);
1660
1622
  }
1661
- const contents = map({
1623
+ const contents = (0, smithy_client_1.map)({
1662
1624
  $metadata: deserializeMetadata(output),
1663
1625
  });
1664
1626
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1665
- if (data.arn != null) {
1666
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
1667
- }
1668
- if (data.componentTypeId != null) {
1669
- contents.componentTypeId = (0, smithy_client_1.expectString)(data.componentTypeId);
1670
- }
1671
- if (data.componentTypeName != null) {
1672
- contents.componentTypeName = (0, smithy_client_1.expectString)(data.componentTypeName);
1673
- }
1674
- if (data.creationDateTime != null) {
1675
- contents.creationDateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.creationDateTime)));
1676
- }
1677
- if (data.description != null) {
1678
- contents.description = (0, smithy_client_1.expectString)(data.description);
1679
- }
1680
- if (data.extendsFrom != null) {
1681
- contents.extendsFrom = de_ExtendsFrom(data.extendsFrom, context);
1682
- }
1683
- if (data.functions != null) {
1684
- contents.functions = de_FunctionsResponse(data.functions, context);
1685
- }
1686
- if (data.isAbstract != null) {
1687
- contents.isAbstract = (0, smithy_client_1.expectBoolean)(data.isAbstract);
1688
- }
1689
- if (data.isSchemaInitialized != null) {
1690
- contents.isSchemaInitialized = (0, smithy_client_1.expectBoolean)(data.isSchemaInitialized);
1691
- }
1692
- if (data.isSingleton != null) {
1693
- contents.isSingleton = (0, smithy_client_1.expectBoolean)(data.isSingleton);
1694
- }
1695
- if (data.propertyDefinitions != null) {
1696
- contents.propertyDefinitions = de_PropertyDefinitionsResponse(data.propertyDefinitions, context);
1697
- }
1698
- if (data.propertyGroups != null) {
1699
- contents.propertyGroups = de_PropertyGroupsResponse(data.propertyGroups, context);
1700
- }
1701
- if (data.status != null) {
1702
- contents.status = de_Status(data.status, context);
1703
- }
1704
- if (data.syncSource != null) {
1705
- contents.syncSource = (0, smithy_client_1.expectString)(data.syncSource);
1706
- }
1707
- if (data.updateDateTime != null) {
1708
- contents.updateDateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.updateDateTime)));
1709
- }
1710
- if (data.workspaceId != null) {
1711
- contents.workspaceId = (0, smithy_client_1.expectString)(data.workspaceId);
1712
- }
1627
+ const doc = (0, smithy_client_1.take)(data, {
1628
+ arn: smithy_client_1.expectString,
1629
+ componentTypeId: smithy_client_1.expectString,
1630
+ componentTypeName: smithy_client_1.expectString,
1631
+ creationDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1632
+ description: smithy_client_1.expectString,
1633
+ extendsFrom: smithy_client_1._json,
1634
+ functions: smithy_client_1._json,
1635
+ isAbstract: smithy_client_1.expectBoolean,
1636
+ isSchemaInitialized: smithy_client_1.expectBoolean,
1637
+ isSingleton: smithy_client_1.expectBoolean,
1638
+ propertyDefinitions: (_) => de_PropertyDefinitionsResponse(_, context),
1639
+ propertyGroups: smithy_client_1._json,
1640
+ status: smithy_client_1._json,
1641
+ syncSource: smithy_client_1.expectString,
1642
+ updateDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1643
+ workspaceId: smithy_client_1.expectString,
1644
+ });
1645
+ Object.assign(contents, doc);
1713
1646
  return contents;
1714
1647
  };
1715
1648
  exports.de_GetComponentTypeCommand = de_GetComponentTypeCommand;
@@ -1737,10 +1670,9 @@ const de_GetComponentTypeCommandError = async (output, context) => {
1737
1670
  throw await de_ValidationExceptionRes(parsedOutput, context);
1738
1671
  default:
1739
1672
  const parsedBody = parsedOutput.body;
1740
- (0, smithy_client_1.throwDefaultError)({
1673
+ return throwDefaultError({
1741
1674
  output,
1742
1675
  parsedBody,
1743
- exceptionCtor: IoTTwinMakerServiceException_1.IoTTwinMakerServiceException,
1744
1676
  errorCode,
1745
1677
  });
1746
1678
  }
@@ -1749,46 +1681,25 @@ const de_GetEntityCommand = async (output, context) => {
1749
1681
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1750
1682
  return de_GetEntityCommandError(output, context);
1751
1683
  }
1752
- const contents = map({
1684
+ const contents = (0, smithy_client_1.map)({
1753
1685
  $metadata: deserializeMetadata(output),
1754
1686
  });
1755
1687
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1756
- if (data.arn != null) {
1757
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
1758
- }
1759
- if (data.components != null) {
1760
- contents.components = de_ComponentsMap(data.components, context);
1761
- }
1762
- if (data.creationDateTime != null) {
1763
- contents.creationDateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.creationDateTime)));
1764
- }
1765
- if (data.description != null) {
1766
- contents.description = (0, smithy_client_1.expectString)(data.description);
1767
- }
1768
- if (data.entityId != null) {
1769
- contents.entityId = (0, smithy_client_1.expectString)(data.entityId);
1770
- }
1771
- if (data.entityName != null) {
1772
- contents.entityName = (0, smithy_client_1.expectString)(data.entityName);
1773
- }
1774
- if (data.hasChildEntities != null) {
1775
- contents.hasChildEntities = (0, smithy_client_1.expectBoolean)(data.hasChildEntities);
1776
- }
1777
- if (data.parentEntityId != null) {
1778
- contents.parentEntityId = (0, smithy_client_1.expectString)(data.parentEntityId);
1779
- }
1780
- if (data.status != null) {
1781
- contents.status = de_Status(data.status, context);
1782
- }
1783
- if (data.syncSource != null) {
1784
- contents.syncSource = (0, smithy_client_1.expectString)(data.syncSource);
1785
- }
1786
- if (data.updateDateTime != null) {
1787
- contents.updateDateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.updateDateTime)));
1788
- }
1789
- if (data.workspaceId != null) {
1790
- contents.workspaceId = (0, smithy_client_1.expectString)(data.workspaceId);
1791
- }
1688
+ const doc = (0, smithy_client_1.take)(data, {
1689
+ arn: smithy_client_1.expectString,
1690
+ components: (_) => de_ComponentsMap(_, context),
1691
+ creationDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1692
+ description: smithy_client_1.expectString,
1693
+ entityId: smithy_client_1.expectString,
1694
+ entityName: smithy_client_1.expectString,
1695
+ hasChildEntities: smithy_client_1.expectBoolean,
1696
+ parentEntityId: smithy_client_1.expectString,
1697
+ status: smithy_client_1._json,
1698
+ syncSource: smithy_client_1.expectString,
1699
+ updateDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1700
+ workspaceId: smithy_client_1.expectString,
1701
+ });
1702
+ Object.assign(contents, doc);
1792
1703
  return contents;
1793
1704
  };
1794
1705
  exports.de_GetEntityCommand = de_GetEntityCommand;
@@ -1816,10 +1727,9 @@ const de_GetEntityCommandError = async (output, context) => {
1816
1727
  throw await de_ValidationExceptionRes(parsedOutput, context);
1817
1728
  default:
1818
1729
  const parsedBody = parsedOutput.body;
1819
- (0, smithy_client_1.throwDefaultError)({
1730
+ return throwDefaultError({
1820
1731
  output,
1821
1732
  parsedBody,
1822
- exceptionCtor: IoTTwinMakerServiceException_1.IoTTwinMakerServiceException,
1823
1733
  errorCode,
1824
1734
  });
1825
1735
  }
@@ -1828,16 +1738,15 @@ const de_GetPricingPlanCommand = async (output, context) => {
1828
1738
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1829
1739
  return de_GetPricingPlanCommandError(output, context);
1830
1740
  }
1831
- const contents = map({
1741
+ const contents = (0, smithy_client_1.map)({
1832
1742
  $metadata: deserializeMetadata(output),
1833
1743
  });
1834
1744
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1835
- if (data.currentPricingPlan != null) {
1836
- contents.currentPricingPlan = de_PricingPlan(data.currentPricingPlan, context);
1837
- }
1838
- if (data.pendingPricingPlan != null) {
1839
- contents.pendingPricingPlan = de_PricingPlan(data.pendingPricingPlan, context);
1840
- }
1745
+ const doc = (0, smithy_client_1.take)(data, {
1746
+ currentPricingPlan: (_) => de_PricingPlan(_, context),
1747
+ pendingPricingPlan: (_) => de_PricingPlan(_, context),
1748
+ });
1749
+ Object.assign(contents, doc);
1841
1750
  return contents;
1842
1751
  };
1843
1752
  exports.de_GetPricingPlanCommand = de_GetPricingPlanCommand;
@@ -1862,10 +1771,9 @@ const de_GetPricingPlanCommandError = async (output, context) => {
1862
1771
  throw await de_ValidationExceptionRes(parsedOutput, context);
1863
1772
  default:
1864
1773
  const parsedBody = parsedOutput.body;
1865
- (0, smithy_client_1.throwDefaultError)({
1774
+ return throwDefaultError({
1866
1775
  output,
1867
1776
  parsedBody,
1868
- exceptionCtor: IoTTwinMakerServiceException_1.IoTTwinMakerServiceException,
1869
1777
  errorCode,
1870
1778
  });
1871
1779
  }
@@ -1874,19 +1782,16 @@ const de_GetPropertyValueCommand = async (output, context) => {
1874
1782
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1875
1783
  return de_GetPropertyValueCommandError(output, context);
1876
1784
  }
1877
- const contents = map({
1785
+ const contents = (0, smithy_client_1.map)({
1878
1786
  $metadata: deserializeMetadata(output),
1879
1787
  });
1880
1788
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1881
- if (data.nextToken != null) {
1882
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1883
- }
1884
- if (data.propertyValues != null) {
1885
- contents.propertyValues = de_PropertyLatestValueMap(data.propertyValues, context);
1886
- }
1887
- if (data.tabularPropertyValues != null) {
1888
- contents.tabularPropertyValues = de_TabularPropertyValues(data.tabularPropertyValues, context);
1889
- }
1789
+ const doc = (0, smithy_client_1.take)(data, {
1790
+ nextToken: smithy_client_1.expectString,
1791
+ propertyValues: (_) => de_PropertyLatestValueMap(_, context),
1792
+ tabularPropertyValues: (_) => de_TabularPropertyValues(_, context),
1793
+ });
1794
+ Object.assign(contents, doc);
1890
1795
  return contents;
1891
1796
  };
1892
1797
  exports.de_GetPropertyValueCommand = de_GetPropertyValueCommand;
@@ -1920,10 +1825,9 @@ const de_GetPropertyValueCommandError = async (output, context) => {
1920
1825
  throw await de_ValidationExceptionRes(parsedOutput, context);
1921
1826
  default:
1922
1827
  const parsedBody = parsedOutput.body;
1923
- (0, smithy_client_1.throwDefaultError)({
1828
+ return throwDefaultError({
1924
1829
  output,
1925
1830
  parsedBody,
1926
- exceptionCtor: IoTTwinMakerServiceException_1.IoTTwinMakerServiceException,
1927
1831
  errorCode,
1928
1832
  });
1929
1833
  }
@@ -1932,16 +1836,15 @@ const de_GetPropertyValueHistoryCommand = async (output, context) => {
1932
1836
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1933
1837
  return de_GetPropertyValueHistoryCommandError(output, context);
1934
1838
  }
1935
- const contents = map({
1839
+ const contents = (0, smithy_client_1.map)({
1936
1840
  $metadata: deserializeMetadata(output),
1937
1841
  });
1938
1842
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1939
- if (data.nextToken != null) {
1940
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1941
- }
1942
- if (data.propertyValues != null) {
1943
- contents.propertyValues = de_PropertyValueList(data.propertyValues, context);
1944
- }
1843
+ const doc = (0, smithy_client_1.take)(data, {
1844
+ nextToken: smithy_client_1.expectString,
1845
+ propertyValues: (_) => de_PropertyValueList(_, context),
1846
+ });
1847
+ Object.assign(contents, doc);
1945
1848
  return contents;
1946
1849
  };
1947
1850
  exports.de_GetPropertyValueHistoryCommand = de_GetPropertyValueHistoryCommand;
@@ -1975,10 +1878,9 @@ const de_GetPropertyValueHistoryCommandError = async (output, context) => {
1975
1878
  throw await de_ValidationExceptionRes(parsedOutput, context);
1976
1879
  default:
1977
1880
  const parsedBody = parsedOutput.body;
1978
- (0, smithy_client_1.throwDefaultError)({
1881
+ return throwDefaultError({
1979
1882
  output,
1980
1883
  parsedBody,
1981
- exceptionCtor: IoTTwinMakerServiceException_1.IoTTwinMakerServiceException,
1982
1884
  errorCode,
1983
1885
  });
1984
1886
  }
@@ -1987,40 +1889,23 @@ const de_GetSceneCommand = async (output, context) => {
1987
1889
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1988
1890
  return de_GetSceneCommandError(output, context);
1989
1891
  }
1990
- const contents = map({
1892
+ const contents = (0, smithy_client_1.map)({
1991
1893
  $metadata: deserializeMetadata(output),
1992
1894
  });
1993
1895
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1994
- if (data.arn != null) {
1995
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
1996
- }
1997
- if (data.capabilities != null) {
1998
- contents.capabilities = de_SceneCapabilities(data.capabilities, context);
1999
- }
2000
- if (data.contentLocation != null) {
2001
- contents.contentLocation = (0, smithy_client_1.expectString)(data.contentLocation);
2002
- }
2003
- if (data.creationDateTime != null) {
2004
- contents.creationDateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.creationDateTime)));
2005
- }
2006
- if (data.description != null) {
2007
- contents.description = (0, smithy_client_1.expectString)(data.description);
2008
- }
2009
- if (data.generatedSceneMetadata != null) {
2010
- contents.generatedSceneMetadata = de_GeneratedSceneMetadataMap(data.generatedSceneMetadata, context);
2011
- }
2012
- if (data.sceneId != null) {
2013
- contents.sceneId = (0, smithy_client_1.expectString)(data.sceneId);
2014
- }
2015
- if (data.sceneMetadata != null) {
2016
- contents.sceneMetadata = de_SceneMetadataMap(data.sceneMetadata, context);
2017
- }
2018
- if (data.updateDateTime != null) {
2019
- contents.updateDateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.updateDateTime)));
2020
- }
2021
- if (data.workspaceId != null) {
2022
- contents.workspaceId = (0, smithy_client_1.expectString)(data.workspaceId);
2023
- }
1896
+ const doc = (0, smithy_client_1.take)(data, {
1897
+ arn: smithy_client_1.expectString,
1898
+ capabilities: smithy_client_1._json,
1899
+ contentLocation: smithy_client_1.expectString,
1900
+ creationDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1901
+ description: smithy_client_1.expectString,
1902
+ generatedSceneMetadata: smithy_client_1._json,
1903
+ sceneId: smithy_client_1.expectString,
1904
+ sceneMetadata: smithy_client_1._json,
1905
+ updateDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1906
+ workspaceId: smithy_client_1.expectString,
1907
+ });
1908
+ Object.assign(contents, doc);
2024
1909
  return contents;
2025
1910
  };
2026
1911
  exports.de_GetSceneCommand = de_GetSceneCommand;
@@ -2048,10 +1933,9 @@ const de_GetSceneCommandError = async (output, context) => {
2048
1933
  throw await de_ValidationExceptionRes(parsedOutput, context);
2049
1934
  default:
2050
1935
  const parsedBody = parsedOutput.body;
2051
- (0, smithy_client_1.throwDefaultError)({
1936
+ return throwDefaultError({
2052
1937
  output,
2053
1938
  parsedBody,
2054
- exceptionCtor: IoTTwinMakerServiceException_1.IoTTwinMakerServiceException,
2055
1939
  errorCode,
2056
1940
  });
2057
1941
  }
@@ -2060,31 +1944,20 @@ const de_GetSyncJobCommand = async (output, context) => {
2060
1944
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2061
1945
  return de_GetSyncJobCommandError(output, context);
2062
1946
  }
2063
- const contents = map({
1947
+ const contents = (0, smithy_client_1.map)({
2064
1948
  $metadata: deserializeMetadata(output),
2065
1949
  });
2066
1950
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2067
- if (data.arn != null) {
2068
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
2069
- }
2070
- if (data.creationDateTime != null) {
2071
- contents.creationDateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.creationDateTime)));
2072
- }
2073
- if (data.status != null) {
2074
- contents.status = de_SyncJobStatus(data.status, context);
2075
- }
2076
- if (data.syncRole != null) {
2077
- contents.syncRole = (0, smithy_client_1.expectString)(data.syncRole);
2078
- }
2079
- if (data.syncSource != null) {
2080
- contents.syncSource = (0, smithy_client_1.expectString)(data.syncSource);
2081
- }
2082
- if (data.updateDateTime != null) {
2083
- contents.updateDateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.updateDateTime)));
2084
- }
2085
- if (data.workspaceId != null) {
2086
- contents.workspaceId = (0, smithy_client_1.expectString)(data.workspaceId);
2087
- }
1951
+ const doc = (0, smithy_client_1.take)(data, {
1952
+ arn: smithy_client_1.expectString,
1953
+ creationDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1954
+ status: smithy_client_1._json,
1955
+ syncRole: smithy_client_1.expectString,
1956
+ syncSource: smithy_client_1.expectString,
1957
+ updateDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1958
+ workspaceId: smithy_client_1.expectString,
1959
+ });
1960
+ Object.assign(contents, doc);
2088
1961
  return contents;
2089
1962
  };
2090
1963
  exports.de_GetSyncJobCommand = de_GetSyncJobCommand;
@@ -2115,10 +1988,9 @@ const de_GetSyncJobCommandError = async (output, context) => {
2115
1988
  throw await de_ValidationExceptionRes(parsedOutput, context);
2116
1989
  default:
2117
1990
  const parsedBody = parsedOutput.body;
2118
- (0, smithy_client_1.throwDefaultError)({
1991
+ return throwDefaultError({
2119
1992
  output,
2120
1993
  parsedBody,
2121
- exceptionCtor: IoTTwinMakerServiceException_1.IoTTwinMakerServiceException,
2122
1994
  errorCode,
2123
1995
  });
2124
1996
  }
@@ -2127,31 +1999,20 @@ const de_GetWorkspaceCommand = async (output, context) => {
2127
1999
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2128
2000
  return de_GetWorkspaceCommandError(output, context);
2129
2001
  }
2130
- const contents = map({
2002
+ const contents = (0, smithy_client_1.map)({
2131
2003
  $metadata: deserializeMetadata(output),
2132
2004
  });
2133
2005
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2134
- if (data.arn != null) {
2135
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
2136
- }
2137
- if (data.creationDateTime != null) {
2138
- contents.creationDateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.creationDateTime)));
2139
- }
2140
- if (data.description != null) {
2141
- contents.description = (0, smithy_client_1.expectString)(data.description);
2142
- }
2143
- if (data.role != null) {
2144
- contents.role = (0, smithy_client_1.expectString)(data.role);
2145
- }
2146
- if (data.s3Location != null) {
2147
- contents.s3Location = (0, smithy_client_1.expectString)(data.s3Location);
2148
- }
2149
- if (data.updateDateTime != null) {
2150
- contents.updateDateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.updateDateTime)));
2151
- }
2152
- if (data.workspaceId != null) {
2153
- contents.workspaceId = (0, smithy_client_1.expectString)(data.workspaceId);
2154
- }
2006
+ const doc = (0, smithy_client_1.take)(data, {
2007
+ arn: smithy_client_1.expectString,
2008
+ creationDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2009
+ description: smithy_client_1.expectString,
2010
+ role: smithy_client_1.expectString,
2011
+ s3Location: smithy_client_1.expectString,
2012
+ updateDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2013
+ workspaceId: smithy_client_1.expectString,
2014
+ });
2015
+ Object.assign(contents, doc);
2155
2016
  return contents;
2156
2017
  };
2157
2018
  exports.de_GetWorkspaceCommand = de_GetWorkspaceCommand;
@@ -2179,10 +2040,9 @@ const de_GetWorkspaceCommandError = async (output, context) => {
2179
2040
  throw await de_ValidationExceptionRes(parsedOutput, context);
2180
2041
  default:
2181
2042
  const parsedBody = parsedOutput.body;
2182
- (0, smithy_client_1.throwDefaultError)({
2043
+ return throwDefaultError({
2183
2044
  output,
2184
2045
  parsedBody,
2185
- exceptionCtor: IoTTwinMakerServiceException_1.IoTTwinMakerServiceException,
2186
2046
  errorCode,
2187
2047
  });
2188
2048
  }
@@ -2191,22 +2051,17 @@ const de_ListComponentTypesCommand = async (output, context) => {
2191
2051
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2192
2052
  return de_ListComponentTypesCommandError(output, context);
2193
2053
  }
2194
- const contents = map({
2054
+ const contents = (0, smithy_client_1.map)({
2195
2055
  $metadata: deserializeMetadata(output),
2196
2056
  });
2197
2057
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2198
- if (data.componentTypeSummaries != null) {
2199
- contents.componentTypeSummaries = de_ComponentTypeSummaries(data.componentTypeSummaries, context);
2200
- }
2201
- if (data.maxResults != null) {
2202
- contents.maxResults = (0, smithy_client_1.expectInt32)(data.maxResults);
2203
- }
2204
- if (data.nextToken != null) {
2205
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
2206
- }
2207
- if (data.workspaceId != null) {
2208
- contents.workspaceId = (0, smithy_client_1.expectString)(data.workspaceId);
2209
- }
2058
+ const doc = (0, smithy_client_1.take)(data, {
2059
+ componentTypeSummaries: (_) => de_ComponentTypeSummaries(_, context),
2060
+ maxResults: smithy_client_1.expectInt32,
2061
+ nextToken: smithy_client_1.expectString,
2062
+ workspaceId: smithy_client_1.expectString,
2063
+ });
2064
+ Object.assign(contents, doc);
2210
2065
  return contents;
2211
2066
  };
2212
2067
  exports.de_ListComponentTypesCommand = de_ListComponentTypesCommand;
@@ -2231,10 +2086,9 @@ const de_ListComponentTypesCommandError = async (output, context) => {
2231
2086
  throw await de_ValidationExceptionRes(parsedOutput, context);
2232
2087
  default:
2233
2088
  const parsedBody = parsedOutput.body;
2234
- (0, smithy_client_1.throwDefaultError)({
2089
+ return throwDefaultError({
2235
2090
  output,
2236
2091
  parsedBody,
2237
- exceptionCtor: IoTTwinMakerServiceException_1.IoTTwinMakerServiceException,
2238
2092
  errorCode,
2239
2093
  });
2240
2094
  }
@@ -2243,16 +2097,15 @@ const de_ListEntitiesCommand = async (output, context) => {
2243
2097
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2244
2098
  return de_ListEntitiesCommandError(output, context);
2245
2099
  }
2246
- const contents = map({
2100
+ const contents = (0, smithy_client_1.map)({
2247
2101
  $metadata: deserializeMetadata(output),
2248
2102
  });
2249
2103
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2250
- if (data.entitySummaries != null) {
2251
- contents.entitySummaries = de_EntitySummaries(data.entitySummaries, context);
2252
- }
2253
- if (data.nextToken != null) {
2254
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
2255
- }
2104
+ const doc = (0, smithy_client_1.take)(data, {
2105
+ entitySummaries: (_) => de_EntitySummaries(_, context),
2106
+ nextToken: smithy_client_1.expectString,
2107
+ });
2108
+ Object.assign(contents, doc);
2256
2109
  return contents;
2257
2110
  };
2258
2111
  exports.de_ListEntitiesCommand = de_ListEntitiesCommand;
@@ -2277,10 +2130,9 @@ const de_ListEntitiesCommandError = async (output, context) => {
2277
2130
  throw await de_ValidationExceptionRes(parsedOutput, context);
2278
2131
  default:
2279
2132
  const parsedBody = parsedOutput.body;
2280
- (0, smithy_client_1.throwDefaultError)({
2133
+ return throwDefaultError({
2281
2134
  output,
2282
2135
  parsedBody,
2283
- exceptionCtor: IoTTwinMakerServiceException_1.IoTTwinMakerServiceException,
2284
2136
  errorCode,
2285
2137
  });
2286
2138
  }
@@ -2289,16 +2141,15 @@ const de_ListScenesCommand = async (output, context) => {
2289
2141
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2290
2142
  return de_ListScenesCommandError(output, context);
2291
2143
  }
2292
- const contents = map({
2144
+ const contents = (0, smithy_client_1.map)({
2293
2145
  $metadata: deserializeMetadata(output),
2294
2146
  });
2295
2147
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2296
- if (data.nextToken != null) {
2297
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
2298
- }
2299
- if (data.sceneSummaries != null) {
2300
- contents.sceneSummaries = de_SceneSummaries(data.sceneSummaries, context);
2301
- }
2148
+ const doc = (0, smithy_client_1.take)(data, {
2149
+ nextToken: smithy_client_1.expectString,
2150
+ sceneSummaries: (_) => de_SceneSummaries(_, context),
2151
+ });
2152
+ Object.assign(contents, doc);
2302
2153
  return contents;
2303
2154
  };
2304
2155
  exports.de_ListScenesCommand = de_ListScenesCommand;
@@ -2323,10 +2174,9 @@ const de_ListScenesCommandError = async (output, context) => {
2323
2174
  throw await de_ValidationExceptionRes(parsedOutput, context);
2324
2175
  default:
2325
2176
  const parsedBody = parsedOutput.body;
2326
- (0, smithy_client_1.throwDefaultError)({
2177
+ return throwDefaultError({
2327
2178
  output,
2328
2179
  parsedBody,
2329
- exceptionCtor: IoTTwinMakerServiceException_1.IoTTwinMakerServiceException,
2330
2180
  errorCode,
2331
2181
  });
2332
2182
  }
@@ -2335,16 +2185,15 @@ const de_ListSyncJobsCommand = async (output, context) => {
2335
2185
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2336
2186
  return de_ListSyncJobsCommandError(output, context);
2337
2187
  }
2338
- const contents = map({
2188
+ const contents = (0, smithy_client_1.map)({
2339
2189
  $metadata: deserializeMetadata(output),
2340
2190
  });
2341
2191
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2342
- if (data.nextToken != null) {
2343
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
2344
- }
2345
- if (data.syncJobSummaries != null) {
2346
- contents.syncJobSummaries = de_SyncJobSummaries(data.syncJobSummaries, context);
2347
- }
2192
+ const doc = (0, smithy_client_1.take)(data, {
2193
+ nextToken: smithy_client_1.expectString,
2194
+ syncJobSummaries: (_) => de_SyncJobSummaries(_, context),
2195
+ });
2196
+ Object.assign(contents, doc);
2348
2197
  return contents;
2349
2198
  };
2350
2199
  exports.de_ListSyncJobsCommand = de_ListSyncJobsCommand;
@@ -2372,10 +2221,9 @@ const de_ListSyncJobsCommandError = async (output, context) => {
2372
2221
  throw await de_ValidationExceptionRes(parsedOutput, context);
2373
2222
  default:
2374
2223
  const parsedBody = parsedOutput.body;
2375
- (0, smithy_client_1.throwDefaultError)({
2224
+ return throwDefaultError({
2376
2225
  output,
2377
2226
  parsedBody,
2378
- exceptionCtor: IoTTwinMakerServiceException_1.IoTTwinMakerServiceException,
2379
2227
  errorCode,
2380
2228
  });
2381
2229
  }
@@ -2384,16 +2232,15 @@ const de_ListSyncResourcesCommand = async (output, context) => {
2384
2232
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2385
2233
  return de_ListSyncResourcesCommandError(output, context);
2386
2234
  }
2387
- const contents = map({
2235
+ const contents = (0, smithy_client_1.map)({
2388
2236
  $metadata: deserializeMetadata(output),
2389
2237
  });
2390
2238
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2391
- if (data.nextToken != null) {
2392
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
2393
- }
2394
- if (data.syncResources != null) {
2395
- contents.syncResources = de_SyncResourceSummaries(data.syncResources, context);
2396
- }
2239
+ const doc = (0, smithy_client_1.take)(data, {
2240
+ nextToken: smithy_client_1.expectString,
2241
+ syncResources: (_) => de_SyncResourceSummaries(_, context),
2242
+ });
2243
+ Object.assign(contents, doc);
2397
2244
  return contents;
2398
2245
  };
2399
2246
  exports.de_ListSyncResourcesCommand = de_ListSyncResourcesCommand;
@@ -2421,10 +2268,9 @@ const de_ListSyncResourcesCommandError = async (output, context) => {
2421
2268
  throw await de_ValidationExceptionRes(parsedOutput, context);
2422
2269
  default:
2423
2270
  const parsedBody = parsedOutput.body;
2424
- (0, smithy_client_1.throwDefaultError)({
2271
+ return throwDefaultError({
2425
2272
  output,
2426
2273
  parsedBody,
2427
- exceptionCtor: IoTTwinMakerServiceException_1.IoTTwinMakerServiceException,
2428
2274
  errorCode,
2429
2275
  });
2430
2276
  }
@@ -2433,16 +2279,15 @@ const de_ListTagsForResourceCommand = async (output, context) => {
2433
2279
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2434
2280
  return de_ListTagsForResourceCommandError(output, context);
2435
2281
  }
2436
- const contents = map({
2282
+ const contents = (0, smithy_client_1.map)({
2437
2283
  $metadata: deserializeMetadata(output),
2438
2284
  });
2439
2285
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2440
- if (data.nextToken != null) {
2441
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
2442
- }
2443
- if (data.tags != null) {
2444
- contents.tags = de_TagMap(data.tags, context);
2445
- }
2286
+ const doc = (0, smithy_client_1.take)(data, {
2287
+ nextToken: smithy_client_1.expectString,
2288
+ tags: smithy_client_1._json,
2289
+ });
2290
+ Object.assign(contents, doc);
2446
2291
  return contents;
2447
2292
  };
2448
2293
  exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
@@ -2461,10 +2306,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
2461
2306
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2462
2307
  default:
2463
2308
  const parsedBody = parsedOutput.body;
2464
- (0, smithy_client_1.throwDefaultError)({
2309
+ return throwDefaultError({
2465
2310
  output,
2466
2311
  parsedBody,
2467
- exceptionCtor: IoTTwinMakerServiceException_1.IoTTwinMakerServiceException,
2468
2312
  errorCode,
2469
2313
  });
2470
2314
  }
@@ -2473,16 +2317,15 @@ const de_ListWorkspacesCommand = async (output, context) => {
2473
2317
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2474
2318
  return de_ListWorkspacesCommandError(output, context);
2475
2319
  }
2476
- const contents = map({
2320
+ const contents = (0, smithy_client_1.map)({
2477
2321
  $metadata: deserializeMetadata(output),
2478
2322
  });
2479
2323
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2480
- if (data.nextToken != null) {
2481
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
2482
- }
2483
- if (data.workspaceSummaries != null) {
2484
- contents.workspaceSummaries = de_WorkspaceSummaries(data.workspaceSummaries, context);
2485
- }
2324
+ const doc = (0, smithy_client_1.take)(data, {
2325
+ nextToken: smithy_client_1.expectString,
2326
+ workspaceSummaries: (_) => de_WorkspaceSummaries(_, context),
2327
+ });
2328
+ Object.assign(contents, doc);
2486
2329
  return contents;
2487
2330
  };
2488
2331
  exports.de_ListWorkspacesCommand = de_ListWorkspacesCommand;
@@ -2507,10 +2350,9 @@ const de_ListWorkspacesCommandError = async (output, context) => {
2507
2350
  throw await de_ValidationExceptionRes(parsedOutput, context);
2508
2351
  default:
2509
2352
  const parsedBody = parsedOutput.body;
2510
- (0, smithy_client_1.throwDefaultError)({
2353
+ return throwDefaultError({
2511
2354
  output,
2512
2355
  parsedBody,
2513
- exceptionCtor: IoTTwinMakerServiceException_1.IoTTwinMakerServiceException,
2514
2356
  errorCode,
2515
2357
  });
2516
2358
  }
@@ -2519,7 +2361,7 @@ const de_TagResourceCommand = async (output, context) => {
2519
2361
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2520
2362
  return de_TagResourceCommandError(output, context);
2521
2363
  }
2522
- const contents = map({
2364
+ const contents = (0, smithy_client_1.map)({
2523
2365
  $metadata: deserializeMetadata(output),
2524
2366
  });
2525
2367
  await collectBody(output.body, context);
@@ -2544,10 +2386,9 @@ const de_TagResourceCommandError = async (output, context) => {
2544
2386
  throw await de_TooManyTagsExceptionRes(parsedOutput, context);
2545
2387
  default:
2546
2388
  const parsedBody = parsedOutput.body;
2547
- (0, smithy_client_1.throwDefaultError)({
2389
+ return throwDefaultError({
2548
2390
  output,
2549
2391
  parsedBody,
2550
- exceptionCtor: IoTTwinMakerServiceException_1.IoTTwinMakerServiceException,
2551
2392
  errorCode,
2552
2393
  });
2553
2394
  }
@@ -2556,7 +2397,7 @@ const de_UntagResourceCommand = async (output, context) => {
2556
2397
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2557
2398
  return de_UntagResourceCommandError(output, context);
2558
2399
  }
2559
- const contents = map({
2400
+ const contents = (0, smithy_client_1.map)({
2560
2401
  $metadata: deserializeMetadata(output),
2561
2402
  });
2562
2403
  await collectBody(output.body, context);
@@ -2578,10 +2419,9 @@ const de_UntagResourceCommandError = async (output, context) => {
2578
2419
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2579
2420
  default:
2580
2421
  const parsedBody = parsedOutput.body;
2581
- (0, smithy_client_1.throwDefaultError)({
2422
+ return throwDefaultError({
2582
2423
  output,
2583
2424
  parsedBody,
2584
- exceptionCtor: IoTTwinMakerServiceException_1.IoTTwinMakerServiceException,
2585
2425
  errorCode,
2586
2426
  });
2587
2427
  }
@@ -2590,22 +2430,17 @@ const de_UpdateComponentTypeCommand = async (output, context) => {
2590
2430
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2591
2431
  return de_UpdateComponentTypeCommandError(output, context);
2592
2432
  }
2593
- const contents = map({
2433
+ const contents = (0, smithy_client_1.map)({
2594
2434
  $metadata: deserializeMetadata(output),
2595
2435
  });
2596
2436
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2597
- if (data.arn != null) {
2598
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
2599
- }
2600
- if (data.componentTypeId != null) {
2601
- contents.componentTypeId = (0, smithy_client_1.expectString)(data.componentTypeId);
2602
- }
2603
- if (data.state != null) {
2604
- contents.state = (0, smithy_client_1.expectString)(data.state);
2605
- }
2606
- if (data.workspaceId != null) {
2607
- contents.workspaceId = (0, smithy_client_1.expectString)(data.workspaceId);
2608
- }
2437
+ const doc = (0, smithy_client_1.take)(data, {
2438
+ arn: smithy_client_1.expectString,
2439
+ componentTypeId: smithy_client_1.expectString,
2440
+ state: smithy_client_1.expectString,
2441
+ workspaceId: smithy_client_1.expectString,
2442
+ });
2443
+ Object.assign(contents, doc);
2609
2444
  return contents;
2610
2445
  };
2611
2446
  exports.de_UpdateComponentTypeCommand = de_UpdateComponentTypeCommand;
@@ -2636,10 +2471,9 @@ const de_UpdateComponentTypeCommandError = async (output, context) => {
2636
2471
  throw await de_ValidationExceptionRes(parsedOutput, context);
2637
2472
  default:
2638
2473
  const parsedBody = parsedOutput.body;
2639
- (0, smithy_client_1.throwDefaultError)({
2474
+ return throwDefaultError({
2640
2475
  output,
2641
2476
  parsedBody,
2642
- exceptionCtor: IoTTwinMakerServiceException_1.IoTTwinMakerServiceException,
2643
2477
  errorCode,
2644
2478
  });
2645
2479
  }
@@ -2648,16 +2482,15 @@ const de_UpdateEntityCommand = async (output, context) => {
2648
2482
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2649
2483
  return de_UpdateEntityCommandError(output, context);
2650
2484
  }
2651
- const contents = map({
2485
+ const contents = (0, smithy_client_1.map)({
2652
2486
  $metadata: deserializeMetadata(output),
2653
2487
  });
2654
2488
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2655
- if (data.state != null) {
2656
- contents.state = (0, smithy_client_1.expectString)(data.state);
2657
- }
2658
- if (data.updateDateTime != null) {
2659
- contents.updateDateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.updateDateTime)));
2660
- }
2489
+ const doc = (0, smithy_client_1.take)(data, {
2490
+ state: smithy_client_1.expectString,
2491
+ updateDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2492
+ });
2493
+ Object.assign(contents, doc);
2661
2494
  return contents;
2662
2495
  };
2663
2496
  exports.de_UpdateEntityCommand = de_UpdateEntityCommand;
@@ -2691,10 +2524,9 @@ const de_UpdateEntityCommandError = async (output, context) => {
2691
2524
  throw await de_ValidationExceptionRes(parsedOutput, context);
2692
2525
  default:
2693
2526
  const parsedBody = parsedOutput.body;
2694
- (0, smithy_client_1.throwDefaultError)({
2527
+ return throwDefaultError({
2695
2528
  output,
2696
2529
  parsedBody,
2697
- exceptionCtor: IoTTwinMakerServiceException_1.IoTTwinMakerServiceException,
2698
2530
  errorCode,
2699
2531
  });
2700
2532
  }
@@ -2703,16 +2535,15 @@ const de_UpdatePricingPlanCommand = async (output, context) => {
2703
2535
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2704
2536
  return de_UpdatePricingPlanCommandError(output, context);
2705
2537
  }
2706
- const contents = map({
2538
+ const contents = (0, smithy_client_1.map)({
2707
2539
  $metadata: deserializeMetadata(output),
2708
2540
  });
2709
2541
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2710
- if (data.currentPricingPlan != null) {
2711
- contents.currentPricingPlan = de_PricingPlan(data.currentPricingPlan, context);
2712
- }
2713
- if (data.pendingPricingPlan != null) {
2714
- contents.pendingPricingPlan = de_PricingPlan(data.pendingPricingPlan, context);
2715
- }
2542
+ const doc = (0, smithy_client_1.take)(data, {
2543
+ currentPricingPlan: (_) => de_PricingPlan(_, context),
2544
+ pendingPricingPlan: (_) => de_PricingPlan(_, context),
2545
+ });
2546
+ Object.assign(contents, doc);
2716
2547
  return contents;
2717
2548
  };
2718
2549
  exports.de_UpdatePricingPlanCommand = de_UpdatePricingPlanCommand;
@@ -2737,10 +2568,9 @@ const de_UpdatePricingPlanCommandError = async (output, context) => {
2737
2568
  throw await de_ValidationExceptionRes(parsedOutput, context);
2738
2569
  default:
2739
2570
  const parsedBody = parsedOutput.body;
2740
- (0, smithy_client_1.throwDefaultError)({
2571
+ return throwDefaultError({
2741
2572
  output,
2742
2573
  parsedBody,
2743
- exceptionCtor: IoTTwinMakerServiceException_1.IoTTwinMakerServiceException,
2744
2574
  errorCode,
2745
2575
  });
2746
2576
  }
@@ -2749,13 +2579,14 @@ const de_UpdateSceneCommand = async (output, context) => {
2749
2579
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2750
2580
  return de_UpdateSceneCommandError(output, context);
2751
2581
  }
2752
- const contents = map({
2582
+ const contents = (0, smithy_client_1.map)({
2753
2583
  $metadata: deserializeMetadata(output),
2754
2584
  });
2755
2585
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2756
- if (data.updateDateTime != null) {
2757
- contents.updateDateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.updateDateTime)));
2758
- }
2586
+ const doc = (0, smithy_client_1.take)(data, {
2587
+ updateDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2588
+ });
2589
+ Object.assign(contents, doc);
2759
2590
  return contents;
2760
2591
  };
2761
2592
  exports.de_UpdateSceneCommand = de_UpdateSceneCommand;
@@ -2783,10 +2614,9 @@ const de_UpdateSceneCommandError = async (output, context) => {
2783
2614
  throw await de_ValidationExceptionRes(parsedOutput, context);
2784
2615
  default:
2785
2616
  const parsedBody = parsedOutput.body;
2786
- (0, smithy_client_1.throwDefaultError)({
2617
+ return throwDefaultError({
2787
2618
  output,
2788
2619
  parsedBody,
2789
- exceptionCtor: IoTTwinMakerServiceException_1.IoTTwinMakerServiceException,
2790
2620
  errorCode,
2791
2621
  });
2792
2622
  }
@@ -2795,13 +2625,14 @@ const de_UpdateWorkspaceCommand = async (output, context) => {
2795
2625
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2796
2626
  return de_UpdateWorkspaceCommandError(output, context);
2797
2627
  }
2798
- const contents = map({
2628
+ const contents = (0, smithy_client_1.map)({
2799
2629
  $metadata: deserializeMetadata(output),
2800
2630
  });
2801
2631
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2802
- if (data.updateDateTime != null) {
2803
- contents.updateDateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.updateDateTime)));
2804
- }
2632
+ const doc = (0, smithy_client_1.take)(data, {
2633
+ updateDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2634
+ });
2635
+ Object.assign(contents, doc);
2805
2636
  return contents;
2806
2637
  };
2807
2638
  exports.de_UpdateWorkspaceCommand = de_UpdateWorkspaceCommand;
@@ -2832,21 +2663,21 @@ const de_UpdateWorkspaceCommandError = async (output, context) => {
2832
2663
  throw await de_ValidationExceptionRes(parsedOutput, context);
2833
2664
  default:
2834
2665
  const parsedBody = parsedOutput.body;
2835
- (0, smithy_client_1.throwDefaultError)({
2666
+ return throwDefaultError({
2836
2667
  output,
2837
2668
  parsedBody,
2838
- exceptionCtor: IoTTwinMakerServiceException_1.IoTTwinMakerServiceException,
2839
2669
  errorCode,
2840
2670
  });
2841
2671
  }
2842
2672
  };
2843
- const map = smithy_client_1.map;
2673
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(IoTTwinMakerServiceException_1.IoTTwinMakerServiceException);
2844
2674
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
2845
- const contents = map({});
2675
+ const contents = (0, smithy_client_1.map)({});
2846
2676
  const data = parsedOutput.body;
2847
- if (data.message != null) {
2848
- contents.message = (0, smithy_client_1.expectString)(data.message);
2849
- }
2677
+ const doc = (0, smithy_client_1.take)(data, {
2678
+ message: smithy_client_1.expectString,
2679
+ });
2680
+ Object.assign(contents, doc);
2850
2681
  const exception = new models_0_1.AccessDeniedException({
2851
2682
  $metadata: deserializeMetadata(parsedOutput),
2852
2683
  ...contents,
@@ -2854,11 +2685,12 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
2854
2685
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2855
2686
  };
2856
2687
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
2857
- const contents = map({});
2688
+ const contents = (0, smithy_client_1.map)({});
2858
2689
  const data = parsedOutput.body;
2859
- if (data.message != null) {
2860
- contents.message = (0, smithy_client_1.expectString)(data.message);
2861
- }
2690
+ const doc = (0, smithy_client_1.take)(data, {
2691
+ message: smithy_client_1.expectString,
2692
+ });
2693
+ Object.assign(contents, doc);
2862
2694
  const exception = new models_0_1.ConflictException({
2863
2695
  $metadata: deserializeMetadata(parsedOutput),
2864
2696
  ...contents,
@@ -2866,11 +2698,12 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
2866
2698
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2867
2699
  };
2868
2700
  const de_ConnectorFailureExceptionRes = async (parsedOutput, context) => {
2869
- const contents = map({});
2701
+ const contents = (0, smithy_client_1.map)({});
2870
2702
  const data = parsedOutput.body;
2871
- if (data.message != null) {
2872
- contents.message = (0, smithy_client_1.expectString)(data.message);
2873
- }
2703
+ const doc = (0, smithy_client_1.take)(data, {
2704
+ message: smithy_client_1.expectString,
2705
+ });
2706
+ Object.assign(contents, doc);
2874
2707
  const exception = new models_0_1.ConnectorFailureException({
2875
2708
  $metadata: deserializeMetadata(parsedOutput),
2876
2709
  ...contents,
@@ -2878,11 +2711,12 @@ const de_ConnectorFailureExceptionRes = async (parsedOutput, context) => {
2878
2711
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2879
2712
  };
2880
2713
  const de_ConnectorTimeoutExceptionRes = async (parsedOutput, context) => {
2881
- const contents = map({});
2714
+ const contents = (0, smithy_client_1.map)({});
2882
2715
  const data = parsedOutput.body;
2883
- if (data.message != null) {
2884
- contents.message = (0, smithy_client_1.expectString)(data.message);
2885
- }
2716
+ const doc = (0, smithy_client_1.take)(data, {
2717
+ message: smithy_client_1.expectString,
2718
+ });
2719
+ Object.assign(contents, doc);
2886
2720
  const exception = new models_0_1.ConnectorTimeoutException({
2887
2721
  $metadata: deserializeMetadata(parsedOutput),
2888
2722
  ...contents,
@@ -2890,11 +2724,12 @@ const de_ConnectorTimeoutExceptionRes = async (parsedOutput, context) => {
2890
2724
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2891
2725
  };
2892
2726
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
2893
- const contents = map({});
2727
+ const contents = (0, smithy_client_1.map)({});
2894
2728
  const data = parsedOutput.body;
2895
- if (data.message != null) {
2896
- contents.message = (0, smithy_client_1.expectString)(data.message);
2897
- }
2729
+ const doc = (0, smithy_client_1.take)(data, {
2730
+ message: smithy_client_1.expectString,
2731
+ });
2732
+ Object.assign(contents, doc);
2898
2733
  const exception = new models_0_1.InternalServerException({
2899
2734
  $metadata: deserializeMetadata(parsedOutput),
2900
2735
  ...contents,
@@ -2902,11 +2737,12 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
2902
2737
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2903
2738
  };
2904
2739
  const de_QueryTimeoutExceptionRes = async (parsedOutput, context) => {
2905
- const contents = map({});
2740
+ const contents = (0, smithy_client_1.map)({});
2906
2741
  const data = parsedOutput.body;
2907
- if (data.message != null) {
2908
- contents.message = (0, smithy_client_1.expectString)(data.message);
2909
- }
2742
+ const doc = (0, smithy_client_1.take)(data, {
2743
+ message: smithy_client_1.expectString,
2744
+ });
2745
+ Object.assign(contents, doc);
2910
2746
  const exception = new models_0_1.QueryTimeoutException({
2911
2747
  $metadata: deserializeMetadata(parsedOutput),
2912
2748
  ...contents,
@@ -2914,11 +2750,12 @@ const de_QueryTimeoutExceptionRes = async (parsedOutput, context) => {
2914
2750
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2915
2751
  };
2916
2752
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
2917
- const contents = map({});
2753
+ const contents = (0, smithy_client_1.map)({});
2918
2754
  const data = parsedOutput.body;
2919
- if (data.message != null) {
2920
- contents.message = (0, smithy_client_1.expectString)(data.message);
2921
- }
2755
+ const doc = (0, smithy_client_1.take)(data, {
2756
+ message: smithy_client_1.expectString,
2757
+ });
2758
+ Object.assign(contents, doc);
2922
2759
  const exception = new models_0_1.ResourceNotFoundException({
2923
2760
  $metadata: deserializeMetadata(parsedOutput),
2924
2761
  ...contents,
@@ -2926,11 +2763,12 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
2926
2763
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2927
2764
  };
2928
2765
  const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
2929
- const contents = map({});
2766
+ const contents = (0, smithy_client_1.map)({});
2930
2767
  const data = parsedOutput.body;
2931
- if (data.message != null) {
2932
- contents.message = (0, smithy_client_1.expectString)(data.message);
2933
- }
2768
+ const doc = (0, smithy_client_1.take)(data, {
2769
+ message: smithy_client_1.expectString,
2770
+ });
2771
+ Object.assign(contents, doc);
2934
2772
  const exception = new models_0_1.ServiceQuotaExceededException({
2935
2773
  $metadata: deserializeMetadata(parsedOutput),
2936
2774
  ...contents,
@@ -2938,11 +2776,12 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
2938
2776
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2939
2777
  };
2940
2778
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
2941
- const contents = map({});
2779
+ const contents = (0, smithy_client_1.map)({});
2942
2780
  const data = parsedOutput.body;
2943
- if (data.message != null) {
2944
- contents.message = (0, smithy_client_1.expectString)(data.message);
2945
- }
2781
+ const doc = (0, smithy_client_1.take)(data, {
2782
+ message: smithy_client_1.expectString,
2783
+ });
2784
+ Object.assign(contents, doc);
2946
2785
  const exception = new models_0_1.ThrottlingException({
2947
2786
  $metadata: deserializeMetadata(parsedOutput),
2948
2787
  ...contents,
@@ -2950,11 +2789,12 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
2950
2789
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2951
2790
  };
2952
2791
  const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
2953
- const contents = map({});
2792
+ const contents = (0, smithy_client_1.map)({});
2954
2793
  const data = parsedOutput.body;
2955
- if (data.message != null) {
2956
- contents.message = (0, smithy_client_1.expectString)(data.message);
2957
- }
2794
+ const doc = (0, smithy_client_1.take)(data, {
2795
+ message: smithy_client_1.expectString,
2796
+ });
2797
+ Object.assign(contents, doc);
2958
2798
  const exception = new models_0_1.TooManyTagsException({
2959
2799
  $metadata: deserializeMetadata(parsedOutput),
2960
2800
  ...contents,
@@ -2962,42 +2802,25 @@ const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
2962
2802
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2963
2803
  };
2964
2804
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
2965
- const contents = map({});
2805
+ const contents = (0, smithy_client_1.map)({});
2966
2806
  const data = parsedOutput.body;
2967
- if (data.message != null) {
2968
- contents.message = (0, smithy_client_1.expectString)(data.message);
2969
- }
2807
+ const doc = (0, smithy_client_1.take)(data, {
2808
+ message: smithy_client_1.expectString,
2809
+ });
2810
+ Object.assign(contents, doc);
2970
2811
  const exception = new models_0_1.ValidationException({
2971
2812
  $metadata: deserializeMetadata(parsedOutput),
2972
2813
  ...contents,
2973
2814
  });
2974
2815
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2975
2816
  };
2976
- const se_ComponentPropertyGroupRequest = (input, context) => {
2977
- return {
2978
- ...(input.groupType != null && { groupType: input.groupType }),
2979
- ...(input.propertyNames != null && { propertyNames: se_PropertyNames(input.propertyNames, context) }),
2980
- ...(input.updateType != null && { updateType: input.updateType }),
2981
- };
2982
- };
2983
- const se_ComponentPropertyGroupRequests = (input, context) => {
2984
- return Object.entries(input).reduce((acc, [key, value]) => {
2985
- if (value === null) {
2986
- return acc;
2987
- }
2988
- acc[key] = se_ComponentPropertyGroupRequest(value, context);
2989
- return acc;
2990
- }, {});
2991
- };
2992
2817
  const se_ComponentRequest = (input, context) => {
2993
- return {
2994
- ...(input.componentTypeId != null && { componentTypeId: input.componentTypeId }),
2995
- ...(input.description != null && { description: input.description }),
2996
- ...(input.properties != null && { properties: se_PropertyRequests(input.properties, context) }),
2997
- ...(input.propertyGroups != null && {
2998
- propertyGroups: se_ComponentPropertyGroupRequests(input.propertyGroups, context),
2999
- }),
3000
- };
2818
+ return (0, smithy_client_1.take)(input, {
2819
+ componentTypeId: [],
2820
+ description: [],
2821
+ properties: (_) => se_PropertyRequests(_, context),
2822
+ propertyGroups: smithy_client_1._json,
2823
+ });
3001
2824
  };
3002
2825
  const se_ComponentsMapRequest = (input, context) => {
3003
2826
  return Object.entries(input).reduce((acc, [key, value]) => {
@@ -3009,15 +2832,13 @@ const se_ComponentsMapRequest = (input, context) => {
3009
2832
  }, {});
3010
2833
  };
3011
2834
  const se_ComponentUpdateRequest = (input, context) => {
3012
- return {
3013
- ...(input.componentTypeId != null && { componentTypeId: input.componentTypeId }),
3014
- ...(input.description != null && { description: input.description }),
3015
- ...(input.propertyGroupUpdates != null && {
3016
- propertyGroupUpdates: se_ComponentPropertyGroupRequests(input.propertyGroupUpdates, context),
3017
- }),
3018
- ...(input.propertyUpdates != null && { propertyUpdates: se_PropertyRequests(input.propertyUpdates, context) }),
3019
- ...(input.updateType != null && { updateType: input.updateType }),
3020
- };
2835
+ return (0, smithy_client_1.take)(input, {
2836
+ componentTypeId: [],
2837
+ description: [],
2838
+ propertyGroupUpdates: smithy_client_1._json,
2839
+ propertyUpdates: (_) => se_PropertyRequests(_, context),
2840
+ updateType: [],
2841
+ });
3021
2842
  };
3022
2843
  const se_ComponentUpdatesMapRequest = (input, context) => {
3023
2844
  return Object.entries(input).reduce((acc, [key, value]) => {
@@ -3028,44 +2849,27 @@ const se_ComponentUpdatesMapRequest = (input, context) => {
3028
2849
  return acc;
3029
2850
  }, {});
3030
2851
  };
3031
- const se_Configuration = (input, context) => {
3032
- return Object.entries(input).reduce((acc, [key, value]) => {
3033
- if (value === null) {
3034
- return acc;
3035
- }
3036
- acc[key] = value;
3037
- return acc;
3038
- }, {});
3039
- };
3040
- const se_DataConnector = (input, context) => {
3041
- return {
3042
- ...(input.isNative != null && { isNative: input.isNative }),
3043
- ...(input.lambda != null && { lambda: se_LambdaFunction(input.lambda, context) }),
3044
- };
3045
- };
3046
2852
  const se_DataType = (input, context) => {
3047
- return {
3048
- ...(input.allowedValues != null && { allowedValues: se_DataValueList(input.allowedValues, context) }),
3049
- ...(input.nestedType != null && { nestedType: se_DataType(input.nestedType, context) }),
3050
- ...(input.relationship != null && { relationship: se_Relationship(input.relationship, context) }),
3051
- ...(input.type != null && { type: input.type }),
3052
- ...(input.unitOfMeasure != null && { unitOfMeasure: input.unitOfMeasure }),
3053
- };
2853
+ return (0, smithy_client_1.take)(input, {
2854
+ allowedValues: (_) => se_DataValueList(_, context),
2855
+ nestedType: (_) => se_DataType(_, context),
2856
+ relationship: smithy_client_1._json,
2857
+ type: [],
2858
+ unitOfMeasure: [],
2859
+ });
3054
2860
  };
3055
2861
  const se_DataValue = (input, context) => {
3056
- return {
3057
- ...(input.booleanValue != null && { booleanValue: input.booleanValue }),
3058
- ...(input.doubleValue != null && { doubleValue: (0, smithy_client_1.serializeFloat)(input.doubleValue) }),
3059
- ...(input.expression != null && { expression: input.expression }),
3060
- ...(input.integerValue != null && { integerValue: input.integerValue }),
3061
- ...(input.listValue != null && { listValue: se_DataValueList(input.listValue, context) }),
3062
- ...(input.longValue != null && { longValue: input.longValue }),
3063
- ...(input.mapValue != null && { mapValue: se_DataValueMap(input.mapValue, context) }),
3064
- ...(input.relationshipValue != null && {
3065
- relationshipValue: se_RelationshipValue(input.relationshipValue, context),
3066
- }),
3067
- ...(input.stringValue != null && { stringValue: input.stringValue }),
3068
- };
2862
+ return (0, smithy_client_1.take)(input, {
2863
+ booleanValue: [],
2864
+ doubleValue: smithy_client_1.serializeFloat,
2865
+ expression: [],
2866
+ integerValue: [],
2867
+ listValue: (_) => se_DataValueList(_, context),
2868
+ longValue: [],
2869
+ mapValue: (_) => se_DataValueMap(_, context),
2870
+ relationshipValue: smithy_client_1._json,
2871
+ stringValue: [],
2872
+ });
3069
2873
  };
3070
2874
  const se_DataValueList = (input, context) => {
3071
2875
  return input
@@ -3083,16 +2887,6 @@ const se_DataValueMap = (input, context) => {
3083
2887
  return acc;
3084
2888
  }, {});
3085
2889
  };
3086
- const se_EntityPropertyReference = (input, context) => {
3087
- return {
3088
- ...(input.componentName != null && { componentName: input.componentName }),
3089
- ...(input.entityId != null && { entityId: input.entityId }),
3090
- ...(input.externalIdProperty != null && {
3091
- externalIdProperty: se_ExternalIdProperty(input.externalIdProperty, context),
3092
- }),
3093
- ...(input.propertyName != null && { propertyName: input.propertyName }),
3094
- };
3095
- };
3096
2890
  const se_Entries = (input, context) => {
3097
2891
  return input
3098
2892
  .filter((e) => e != null)
@@ -3100,118 +2894,17 @@ const se_Entries = (input, context) => {
3100
2894
  return se_PropertyValueEntry(entry, context);
3101
2895
  });
3102
2896
  };
3103
- const se_ExtendsFrom = (input, context) => {
3104
- return input
3105
- .filter((e) => e != null)
3106
- .map((entry) => {
3107
- return entry;
3108
- });
3109
- };
3110
- const se_ExternalIdProperty = (input, context) => {
3111
- return Object.entries(input).reduce((acc, [key, value]) => {
3112
- if (value === null) {
3113
- return acc;
3114
- }
3115
- acc[key] = value;
3116
- return acc;
3117
- }, {});
3118
- };
3119
- const se_FunctionRequest = (input, context) => {
3120
- return {
3121
- ...(input.implementedBy != null && { implementedBy: se_DataConnector(input.implementedBy, context) }),
3122
- ...(input.requiredProperties != null && {
3123
- requiredProperties: se_RequiredProperties(input.requiredProperties, context),
3124
- }),
3125
- ...(input.scope != null && { scope: input.scope }),
3126
- };
3127
- };
3128
- const se_FunctionsRequest = (input, context) => {
3129
- return Object.entries(input).reduce((acc, [key, value]) => {
3130
- if (value === null) {
3131
- return acc;
3132
- }
3133
- acc[key] = se_FunctionRequest(value, context);
3134
- return acc;
3135
- }, {});
3136
- };
3137
- const se_InterpolationParameters = (input, context) => {
3138
- return {
3139
- ...(input.interpolationType != null && { interpolationType: input.interpolationType }),
3140
- ...(input.intervalInSeconds != null && { intervalInSeconds: input.intervalInSeconds }),
3141
- };
3142
- };
3143
- const se_LambdaFunction = (input, context) => {
3144
- return {
3145
- ...(input.arn != null && { arn: input.arn }),
3146
- };
3147
- };
3148
- const se_ListComponentTypesFilter = (input, context) => {
3149
- return models_0_1.ListComponentTypesFilter.visit(input, {
3150
- extendsFrom: (value) => ({ extendsFrom: value }),
3151
- isAbstract: (value) => ({ isAbstract: value }),
3152
- namespace: (value) => ({ namespace: value }),
3153
- _: (name, value) => ({ name: value }),
3154
- });
3155
- };
3156
- const se_ListComponentTypesFilters = (input, context) => {
3157
- return input
3158
- .filter((e) => e != null)
3159
- .map((entry) => {
3160
- return se_ListComponentTypesFilter(entry, context);
3161
- });
3162
- };
3163
- const se_ListEntitiesFilter = (input, context) => {
3164
- return models_0_1.ListEntitiesFilter.visit(input, {
3165
- componentTypeId: (value) => ({ componentTypeId: value }),
3166
- externalId: (value) => ({ externalId: value }),
3167
- parentEntityId: (value) => ({ parentEntityId: value }),
3168
- _: (name, value) => ({ name: value }),
3169
- });
3170
- };
3171
- const se_ListEntitiesFilters = (input, context) => {
3172
- return input
3173
- .filter((e) => e != null)
3174
- .map((entry) => {
3175
- return se_ListEntitiesFilter(entry, context);
3176
- });
3177
- };
3178
- const se_OrderBy = (input, context) => {
3179
- return {
3180
- ...(input.order != null && { order: input.order }),
3181
- ...(input.propertyName != null && { propertyName: input.propertyName }),
3182
- };
3183
- };
3184
- const se_OrderByList = (input, context) => {
3185
- return input
3186
- .filter((e) => e != null)
3187
- .map((entry) => {
3188
- return se_OrderBy(entry, context);
3189
- });
3190
- };
3191
- const se_ParentEntityUpdateRequest = (input, context) => {
3192
- return {
3193
- ...(input.parentEntityId != null && { parentEntityId: input.parentEntityId }),
3194
- ...(input.updateType != null && { updateType: input.updateType }),
3195
- };
3196
- };
3197
- const se_PricingBundles = (input, context) => {
3198
- return input
3199
- .filter((e) => e != null)
3200
- .map((entry) => {
3201
- return entry;
3202
- });
3203
- };
3204
2897
  const se_PropertyDefinitionRequest = (input, context) => {
3205
- return {
3206
- ...(input.configuration != null && { configuration: se_Configuration(input.configuration, context) }),
3207
- ...(input.dataType != null && { dataType: se_DataType(input.dataType, context) }),
3208
- ...(input.defaultValue != null && { defaultValue: se_DataValue(input.defaultValue, context) }),
3209
- ...(input.displayName != null && { displayName: input.displayName }),
3210
- ...(input.isExternalId != null && { isExternalId: input.isExternalId }),
3211
- ...(input.isRequiredInEntity != null && { isRequiredInEntity: input.isRequiredInEntity }),
3212
- ...(input.isStoredExternally != null && { isStoredExternally: input.isStoredExternally }),
3213
- ...(input.isTimeSeries != null && { isTimeSeries: input.isTimeSeries }),
3214
- };
2898
+ return (0, smithy_client_1.take)(input, {
2899
+ configuration: smithy_client_1._json,
2900
+ dataType: (_) => se_DataType(_, context),
2901
+ defaultValue: (_) => se_DataValue(_, context),
2902
+ displayName: [],
2903
+ isExternalId: [],
2904
+ isRequiredInEntity: [],
2905
+ isStoredExternally: [],
2906
+ isTimeSeries: [],
2907
+ });
3215
2908
  };
3216
2909
  const se_PropertyDefinitionsRequest = (input, context) => {
3217
2910
  return Object.entries(input).reduce((acc, [key, value]) => {
@@ -3223,11 +2916,11 @@ const se_PropertyDefinitionsRequest = (input, context) => {
3223
2916
  }, {});
3224
2917
  };
3225
2918
  const se_PropertyFilter = (input, context) => {
3226
- return {
3227
- ...(input.operator != null && { operator: input.operator }),
3228
- ...(input.propertyName != null && { propertyName: input.propertyName }),
3229
- ...(input.value != null && { value: se_DataValue(input.value, context) }),
3230
- };
2919
+ return (0, smithy_client_1.take)(input, {
2920
+ operator: [],
2921
+ propertyName: [],
2922
+ value: (_) => se_DataValue(_, context),
2923
+ });
3231
2924
  };
3232
2925
  const se_PropertyFilters = (input, context) => {
3233
2926
  return input
@@ -3236,34 +2929,12 @@ const se_PropertyFilters = (input, context) => {
3236
2929
  return se_PropertyFilter(entry, context);
3237
2930
  });
3238
2931
  };
3239
- const se_PropertyGroupRequest = (input, context) => {
3240
- return {
3241
- ...(input.groupType != null && { groupType: input.groupType }),
3242
- ...(input.propertyNames != null && { propertyNames: se_PropertyNames(input.propertyNames, context) }),
3243
- };
3244
- };
3245
- const se_PropertyGroupsRequest = (input, context) => {
3246
- return Object.entries(input).reduce((acc, [key, value]) => {
3247
- if (value === null) {
3248
- return acc;
3249
- }
3250
- acc[key] = se_PropertyGroupRequest(value, context);
3251
- return acc;
3252
- }, {});
3253
- };
3254
- const se_PropertyNames = (input, context) => {
3255
- return input
3256
- .filter((e) => e != null)
3257
- .map((entry) => {
3258
- return entry;
3259
- });
3260
- };
3261
2932
  const se_PropertyRequest = (input, context) => {
3262
- return {
3263
- ...(input.definition != null && { definition: se_PropertyDefinitionRequest(input.definition, context) }),
3264
- ...(input.updateType != null && { updateType: input.updateType }),
3265
- ...(input.value != null && { value: se_DataValue(input.value, context) }),
3266
- };
2933
+ return (0, smithy_client_1.take)(input, {
2934
+ definition: (_) => se_PropertyDefinitionRequest(_, context),
2935
+ updateType: [],
2936
+ value: (_) => se_DataValue(_, context),
2937
+ });
3267
2938
  };
3268
2939
  const se_PropertyRequests = (input, context) => {
3269
2940
  return Object.entries(input).reduce((acc, [key, value]) => {
@@ -3275,19 +2946,17 @@ const se_PropertyRequests = (input, context) => {
3275
2946
  }, {});
3276
2947
  };
3277
2948
  const se_PropertyValue = (input, context) => {
3278
- return {
3279
- ...(input.time != null && { time: input.time }),
3280
- ...(input.timestamp != null && { timestamp: Math.round(input.timestamp.getTime() / 1000) }),
3281
- ...(input.value != null && { value: se_DataValue(input.value, context) }),
3282
- };
2949
+ return (0, smithy_client_1.take)(input, {
2950
+ time: [],
2951
+ timestamp: (_) => Math.round(_.getTime() / 1000),
2952
+ value: (_) => se_DataValue(_, context),
2953
+ });
3283
2954
  };
3284
2955
  const se_PropertyValueEntry = (input, context) => {
3285
- return {
3286
- ...(input.entityPropertyReference != null && {
3287
- entityPropertyReference: se_EntityPropertyReference(input.entityPropertyReference, context),
3288
- }),
3289
- ...(input.propertyValues != null && { propertyValues: se_PropertyValues(input.propertyValues, context) }),
3290
- };
2956
+ return (0, smithy_client_1.take)(input, {
2957
+ entityPropertyReference: smithy_client_1._json,
2958
+ propertyValues: (_) => se_PropertyValues(_, context),
2959
+ });
3291
2960
  };
3292
2961
  const se_PropertyValues = (input, context) => {
3293
2962
  return input
@@ -3296,141 +2965,35 @@ const se_PropertyValues = (input, context) => {
3296
2965
  return se_PropertyValue(entry, context);
3297
2966
  });
3298
2967
  };
3299
- const se_Relationship = (input, context) => {
3300
- return {
3301
- ...(input.relationshipType != null && { relationshipType: input.relationshipType }),
3302
- ...(input.targetComponentTypeId != null && { targetComponentTypeId: input.targetComponentTypeId }),
3303
- };
3304
- };
3305
- const se_RelationshipValue = (input, context) => {
3306
- return {
3307
- ...(input.targetComponentName != null && { targetComponentName: input.targetComponentName }),
3308
- ...(input.targetEntityId != null && { targetEntityId: input.targetEntityId }),
3309
- };
3310
- };
3311
- const se_RequiredProperties = (input, context) => {
3312
- return input
3313
- .filter((e) => e != null)
3314
- .map((entry) => {
3315
- return entry;
3316
- });
3317
- };
3318
- const se_SceneCapabilities = (input, context) => {
3319
- return input
3320
- .filter((e) => e != null)
3321
- .map((entry) => {
3322
- return entry;
3323
- });
3324
- };
3325
- const se_SceneMetadataMap = (input, context) => {
3326
- return Object.entries(input).reduce((acc, [key, value]) => {
3327
- if (value === null) {
3328
- return acc;
3329
- }
3330
- acc[key] = value;
3331
- return acc;
3332
- }, {});
3333
- };
3334
- const se_SelectedPropertyList = (input, context) => {
3335
- return input
3336
- .filter((e) => e != null)
3337
- .map((entry) => {
3338
- return entry;
3339
- });
3340
- };
3341
- const se_SyncResourceFilter = (input, context) => {
3342
- return models_0_1.SyncResourceFilter.visit(input, {
3343
- externalId: (value) => ({ externalId: value }),
3344
- resourceId: (value) => ({ resourceId: value }),
3345
- resourceType: (value) => ({ resourceType: value }),
3346
- state: (value) => ({ state: value }),
3347
- _: (name, value) => ({ name: value }),
3348
- });
3349
- };
3350
- const se_SyncResourceFilters = (input, context) => {
3351
- return input
3352
- .filter((e) => e != null)
3353
- .map((entry) => {
3354
- return se_SyncResourceFilter(entry, context);
3355
- });
3356
- };
3357
2968
  const se_TabularConditions = (input, context) => {
3358
- return {
3359
- ...(input.orderBy != null && { orderBy: se_OrderByList(input.orderBy, context) }),
3360
- ...(input.propertyFilters != null && { propertyFilters: se_PropertyFilters(input.propertyFilters, context) }),
3361
- };
3362
- };
3363
- const se_TagMap = (input, context) => {
3364
- return Object.entries(input).reduce((acc, [key, value]) => {
3365
- if (value === null) {
3366
- return acc;
3367
- }
3368
- acc[key] = value;
3369
- return acc;
3370
- }, {});
2969
+ return (0, smithy_client_1.take)(input, {
2970
+ orderBy: smithy_client_1._json,
2971
+ propertyFilters: (_) => se_PropertyFilters(_, context),
2972
+ });
3371
2973
  };
3372
2974
  const de_BatchPutPropertyError = (output, context) => {
3373
- return {
3374
- entry: output.entry != null ? de_PropertyValueEntry(output.entry, context) : undefined,
3375
- errorCode: (0, smithy_client_1.expectString)(output.errorCode),
3376
- errorMessage: (0, smithy_client_1.expectString)(output.errorMessage),
3377
- };
2975
+ return (0, smithy_client_1.take)(output, {
2976
+ entry: (_) => de_PropertyValueEntry(_, context),
2977
+ errorCode: smithy_client_1.expectString,
2978
+ errorMessage: smithy_client_1.expectString,
2979
+ });
3378
2980
  };
3379
2981
  const de_BatchPutPropertyErrorEntry = (output, context) => {
3380
- return {
3381
- errors: output.errors != null ? de_Errors(output.errors, context) : undefined,
3382
- };
3383
- };
3384
- const de_BundleInformation = (output, context) => {
3385
- return {
3386
- bundleNames: output.bundleNames != null ? de_PricingBundles(output.bundleNames, context) : undefined,
3387
- pricingTier: (0, smithy_client_1.expectString)(output.pricingTier),
3388
- };
3389
- };
3390
- const de_ColumnDescription = (output, context) => {
3391
- return {
3392
- name: (0, smithy_client_1.expectString)(output.name),
3393
- type: (0, smithy_client_1.expectString)(output.type),
3394
- };
3395
- };
3396
- const de_ColumnDescriptions = (output, context) => {
3397
- const retVal = (output || [])
3398
- .filter((e) => e != null)
3399
- .map((entry) => {
3400
- if (entry === null) {
3401
- return null;
3402
- }
3403
- return de_ColumnDescription(entry, context);
2982
+ return (0, smithy_client_1.take)(output, {
2983
+ errors: (_) => de_Errors(_, context),
3404
2984
  });
3405
- return retVal;
3406
- };
3407
- const de_ComponentPropertyGroupResponse = (output, context) => {
3408
- return {
3409
- groupType: (0, smithy_client_1.expectString)(output.groupType),
3410
- isInherited: (0, smithy_client_1.expectBoolean)(output.isInherited),
3411
- propertyNames: output.propertyNames != null ? de_PropertyNames(output.propertyNames, context) : undefined,
3412
- };
3413
- };
3414
- const de_ComponentPropertyGroupResponses = (output, context) => {
3415
- return Object.entries(output).reduce((acc, [key, value]) => {
3416
- if (value === null) {
3417
- return acc;
3418
- }
3419
- acc[key] = de_ComponentPropertyGroupResponse(value, context);
3420
- return acc;
3421
- }, {});
3422
2985
  };
3423
2986
  const de_ComponentResponse = (output, context) => {
3424
- return {
3425
- componentName: (0, smithy_client_1.expectString)(output.componentName),
3426
- componentTypeId: (0, smithy_client_1.expectString)(output.componentTypeId),
3427
- definedIn: (0, smithy_client_1.expectString)(output.definedIn),
3428
- description: (0, smithy_client_1.expectString)(output.description),
3429
- properties: output.properties != null ? de_PropertyResponses(output.properties, context) : undefined,
3430
- propertyGroups: output.propertyGroups != null ? de_ComponentPropertyGroupResponses(output.propertyGroups, context) : undefined,
3431
- status: output.status != null ? de_Status(output.status, context) : undefined,
3432
- syncSource: (0, smithy_client_1.expectString)(output.syncSource),
3433
- };
2987
+ return (0, smithy_client_1.take)(output, {
2988
+ componentName: smithy_client_1.expectString,
2989
+ componentTypeId: smithy_client_1.expectString,
2990
+ definedIn: smithy_client_1.expectString,
2991
+ description: smithy_client_1.expectString,
2992
+ properties: (_) => de_PropertyResponses(_, context),
2993
+ propertyGroups: smithy_client_1._json,
2994
+ status: smithy_client_1._json,
2995
+ syncSource: smithy_client_1.expectString,
2996
+ });
3434
2997
  };
3435
2998
  const de_ComponentsMap = (output, context) => {
3436
2999
  return Object.entries(output).reduce((acc, [key, value]) => {
@@ -3445,72 +3008,47 @@ const de_ComponentTypeSummaries = (output, context) => {
3445
3008
  const retVal = (output || [])
3446
3009
  .filter((e) => e != null)
3447
3010
  .map((entry) => {
3448
- if (entry === null) {
3449
- return null;
3450
- }
3451
3011
  return de_ComponentTypeSummary(entry, context);
3452
3012
  });
3453
3013
  return retVal;
3454
3014
  };
3455
3015
  const de_ComponentTypeSummary = (output, context) => {
3456
- return {
3457
- arn: (0, smithy_client_1.expectString)(output.arn),
3458
- componentTypeId: (0, smithy_client_1.expectString)(output.componentTypeId),
3459
- componentTypeName: (0, smithy_client_1.expectString)(output.componentTypeName),
3460
- creationDateTime: output.creationDateTime != null
3461
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.creationDateTime)))
3462
- : undefined,
3463
- description: (0, smithy_client_1.expectString)(output.description),
3464
- status: output.status != null ? de_Status(output.status, context) : undefined,
3465
- updateDateTime: output.updateDateTime != null
3466
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.updateDateTime)))
3467
- : undefined,
3468
- };
3469
- };
3470
- const de_Configuration = (output, context) => {
3471
- return Object.entries(output).reduce((acc, [key, value]) => {
3472
- if (value === null) {
3473
- return acc;
3474
- }
3475
- acc[key] = (0, smithy_client_1.expectString)(value);
3476
- return acc;
3477
- }, {});
3478
- };
3479
- const de_DataConnector = (output, context) => {
3480
- return {
3481
- isNative: (0, smithy_client_1.expectBoolean)(output.isNative),
3482
- lambda: output.lambda != null ? de_LambdaFunction(output.lambda, context) : undefined,
3483
- };
3016
+ return (0, smithy_client_1.take)(output, {
3017
+ arn: smithy_client_1.expectString,
3018
+ componentTypeId: smithy_client_1.expectString,
3019
+ componentTypeName: smithy_client_1.expectString,
3020
+ creationDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3021
+ description: smithy_client_1.expectString,
3022
+ status: smithy_client_1._json,
3023
+ updateDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3024
+ });
3484
3025
  };
3485
3026
  const de_DataType = (output, context) => {
3486
- return {
3487
- allowedValues: output.allowedValues != null ? de_DataValueList(output.allowedValues, context) : undefined,
3488
- nestedType: output.nestedType != null ? de_DataType(output.nestedType, context) : undefined,
3489
- relationship: output.relationship != null ? de_Relationship(output.relationship, context) : undefined,
3490
- type: (0, smithy_client_1.expectString)(output.type),
3491
- unitOfMeasure: (0, smithy_client_1.expectString)(output.unitOfMeasure),
3492
- };
3027
+ return (0, smithy_client_1.take)(output, {
3028
+ allowedValues: (_) => de_DataValueList(_, context),
3029
+ nestedType: (_) => de_DataType(_, context),
3030
+ relationship: smithy_client_1._json,
3031
+ type: smithy_client_1.expectString,
3032
+ unitOfMeasure: smithy_client_1.expectString,
3033
+ });
3493
3034
  };
3494
3035
  const de_DataValue = (output, context) => {
3495
- return {
3496
- booleanValue: (0, smithy_client_1.expectBoolean)(output.booleanValue),
3497
- doubleValue: (0, smithy_client_1.limitedParseDouble)(output.doubleValue),
3498
- expression: (0, smithy_client_1.expectString)(output.expression),
3499
- integerValue: (0, smithy_client_1.expectInt32)(output.integerValue),
3500
- listValue: output.listValue != null ? de_DataValueList(output.listValue, context) : undefined,
3501
- longValue: (0, smithy_client_1.expectLong)(output.longValue),
3502
- mapValue: output.mapValue != null ? de_DataValueMap(output.mapValue, context) : undefined,
3503
- relationshipValue: output.relationshipValue != null ? de_RelationshipValue(output.relationshipValue, context) : undefined,
3504
- stringValue: (0, smithy_client_1.expectString)(output.stringValue),
3505
- };
3036
+ return (0, smithy_client_1.take)(output, {
3037
+ booleanValue: smithy_client_1.expectBoolean,
3038
+ doubleValue: smithy_client_1.limitedParseDouble,
3039
+ expression: smithy_client_1.expectString,
3040
+ integerValue: smithy_client_1.expectInt32,
3041
+ listValue: (_) => de_DataValueList(_, context),
3042
+ longValue: smithy_client_1.expectLong,
3043
+ mapValue: (_) => de_DataValueMap(_, context),
3044
+ relationshipValue: smithy_client_1._json,
3045
+ stringValue: smithy_client_1.expectString,
3046
+ });
3506
3047
  };
3507
3048
  const de_DataValueList = (output, context) => {
3508
3049
  const retVal = (output || [])
3509
3050
  .filter((e) => e != null)
3510
3051
  .map((entry) => {
3511
- if (entry === null) {
3512
- return null;
3513
- }
3514
3052
  return de_DataValue(entry, context);
3515
3053
  });
3516
3054
  return retVal;
@@ -3524,55 +3062,31 @@ const de_DataValueMap = (output, context) => {
3524
3062
  return acc;
3525
3063
  }, {});
3526
3064
  };
3527
- const de_EntityPropertyReference = (output, context) => {
3528
- return {
3529
- componentName: (0, smithy_client_1.expectString)(output.componentName),
3530
- entityId: (0, smithy_client_1.expectString)(output.entityId),
3531
- externalIdProperty: output.externalIdProperty != null ? de_ExternalIdProperty(output.externalIdProperty, context) : undefined,
3532
- propertyName: (0, smithy_client_1.expectString)(output.propertyName),
3533
- };
3534
- };
3535
3065
  const de_EntitySummaries = (output, context) => {
3536
3066
  const retVal = (output || [])
3537
3067
  .filter((e) => e != null)
3538
3068
  .map((entry) => {
3539
- if (entry === null) {
3540
- return null;
3541
- }
3542
3069
  return de_EntitySummary(entry, context);
3543
3070
  });
3544
3071
  return retVal;
3545
3072
  };
3546
3073
  const de_EntitySummary = (output, context) => {
3547
- return {
3548
- arn: (0, smithy_client_1.expectString)(output.arn),
3549
- creationDateTime: output.creationDateTime != null
3550
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.creationDateTime)))
3551
- : undefined,
3552
- description: (0, smithy_client_1.expectString)(output.description),
3553
- entityId: (0, smithy_client_1.expectString)(output.entityId),
3554
- entityName: (0, smithy_client_1.expectString)(output.entityName),
3555
- hasChildEntities: (0, smithy_client_1.expectBoolean)(output.hasChildEntities),
3556
- parentEntityId: (0, smithy_client_1.expectString)(output.parentEntityId),
3557
- status: output.status != null ? de_Status(output.status, context) : undefined,
3558
- updateDateTime: output.updateDateTime != null
3559
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.updateDateTime)))
3560
- : undefined,
3561
- };
3562
- };
3563
- const de_ErrorDetails = (output, context) => {
3564
- return {
3565
- code: (0, smithy_client_1.expectString)(output.code),
3566
- message: (0, smithy_client_1.expectString)(output.message),
3567
- };
3074
+ return (0, smithy_client_1.take)(output, {
3075
+ arn: smithy_client_1.expectString,
3076
+ creationDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3077
+ description: smithy_client_1.expectString,
3078
+ entityId: smithy_client_1.expectString,
3079
+ entityName: smithy_client_1.expectString,
3080
+ hasChildEntities: smithy_client_1.expectBoolean,
3081
+ parentEntityId: smithy_client_1.expectString,
3082
+ status: smithy_client_1._json,
3083
+ updateDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3084
+ });
3568
3085
  };
3569
3086
  const de_ErrorEntries = (output, context) => {
3570
3087
  const retVal = (output || [])
3571
3088
  .filter((e) => e != null)
3572
3089
  .map((entry) => {
3573
- if (entry === null) {
3574
- return null;
3575
- }
3576
3090
  return de_BatchPutPropertyErrorEntry(entry, context);
3577
3091
  });
3578
3092
  return retVal;
@@ -3581,103 +3095,34 @@ const de_Errors = (output, context) => {
3581
3095
  const retVal = (output || [])
3582
3096
  .filter((e) => e != null)
3583
3097
  .map((entry) => {
3584
- if (entry === null) {
3585
- return null;
3586
- }
3587
3098
  return de_BatchPutPropertyError(entry, context);
3588
3099
  });
3589
3100
  return retVal;
3590
3101
  };
3591
- const de_ExtendsFrom = (output, context) => {
3592
- const retVal = (output || [])
3593
- .filter((e) => e != null)
3594
- .map((entry) => {
3595
- if (entry === null) {
3596
- return null;
3597
- }
3598
- return (0, smithy_client_1.expectString)(entry);
3599
- });
3600
- return retVal;
3601
- };
3602
- const de_ExternalIdProperty = (output, context) => {
3603
- return Object.entries(output).reduce((acc, [key, value]) => {
3604
- if (value === null) {
3605
- return acc;
3606
- }
3607
- acc[key] = (0, smithy_client_1.expectString)(value);
3608
- return acc;
3609
- }, {});
3610
- };
3611
- const de_FunctionResponse = (output, context) => {
3612
- return {
3613
- implementedBy: output.implementedBy != null ? de_DataConnector(output.implementedBy, context) : undefined,
3614
- isInherited: (0, smithy_client_1.expectBoolean)(output.isInherited),
3615
- requiredProperties: output.requiredProperties != null ? de_RequiredProperties(output.requiredProperties, context) : undefined,
3616
- scope: (0, smithy_client_1.expectString)(output.scope),
3617
- };
3618
- };
3619
- const de_FunctionsResponse = (output, context) => {
3620
- return Object.entries(output).reduce((acc, [key, value]) => {
3621
- if (value === null) {
3622
- return acc;
3623
- }
3624
- acc[key] = de_FunctionResponse(value, context);
3625
- return acc;
3626
- }, {});
3627
- };
3628
- const de_GeneratedSceneMetadataMap = (output, context) => {
3629
- return Object.entries(output).reduce((acc, [key, value]) => {
3630
- if (value === null) {
3631
- return acc;
3632
- }
3633
- acc[key] = (0, smithy_client_1.expectString)(value);
3634
- return acc;
3635
- }, {});
3636
- };
3637
- const de_LambdaFunction = (output, context) => {
3638
- return {
3639
- arn: (0, smithy_client_1.expectString)(output.arn),
3640
- };
3641
- };
3642
- const de_PricingBundles = (output, context) => {
3643
- const retVal = (output || [])
3644
- .filter((e) => e != null)
3645
- .map((entry) => {
3646
- if (entry === null) {
3647
- return null;
3648
- }
3649
- return (0, smithy_client_1.expectString)(entry);
3650
- });
3651
- return retVal;
3652
- };
3653
3102
  const de_PricingPlan = (output, context) => {
3654
- return {
3655
- billableEntityCount: (0, smithy_client_1.expectLong)(output.billableEntityCount),
3656
- bundleInformation: output.bundleInformation != null ? de_BundleInformation(output.bundleInformation, context) : undefined,
3657
- effectiveDateTime: output.effectiveDateTime != null
3658
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.effectiveDateTime)))
3659
- : undefined,
3660
- pricingMode: (0, smithy_client_1.expectString)(output.pricingMode),
3661
- updateDateTime: output.updateDateTime != null
3662
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.updateDateTime)))
3663
- : undefined,
3664
- updateReason: (0, smithy_client_1.expectString)(output.updateReason),
3665
- };
3103
+ return (0, smithy_client_1.take)(output, {
3104
+ billableEntityCount: smithy_client_1.expectLong,
3105
+ bundleInformation: smithy_client_1._json,
3106
+ effectiveDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3107
+ pricingMode: smithy_client_1.expectString,
3108
+ updateDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3109
+ updateReason: smithy_client_1.expectString,
3110
+ });
3666
3111
  };
3667
3112
  const de_PropertyDefinitionResponse = (output, context) => {
3668
- return {
3669
- configuration: output.configuration != null ? de_Configuration(output.configuration, context) : undefined,
3670
- dataType: output.dataType != null ? de_DataType(output.dataType, context) : undefined,
3671
- defaultValue: output.defaultValue != null ? de_DataValue(output.defaultValue, context) : undefined,
3672
- displayName: (0, smithy_client_1.expectString)(output.displayName),
3673
- isExternalId: (0, smithy_client_1.expectBoolean)(output.isExternalId),
3674
- isFinal: (0, smithy_client_1.expectBoolean)(output.isFinal),
3675
- isImported: (0, smithy_client_1.expectBoolean)(output.isImported),
3676
- isInherited: (0, smithy_client_1.expectBoolean)(output.isInherited),
3677
- isRequiredInEntity: (0, smithy_client_1.expectBoolean)(output.isRequiredInEntity),
3678
- isStoredExternally: (0, smithy_client_1.expectBoolean)(output.isStoredExternally),
3679
- isTimeSeries: (0, smithy_client_1.expectBoolean)(output.isTimeSeries),
3680
- };
3113
+ return (0, smithy_client_1.take)(output, {
3114
+ configuration: smithy_client_1._json,
3115
+ dataType: (_) => de_DataType(_, context),
3116
+ defaultValue: (_) => de_DataValue(_, context),
3117
+ displayName: smithy_client_1.expectString,
3118
+ isExternalId: smithy_client_1.expectBoolean,
3119
+ isFinal: smithy_client_1.expectBoolean,
3120
+ isImported: smithy_client_1.expectBoolean,
3121
+ isInherited: smithy_client_1.expectBoolean,
3122
+ isRequiredInEntity: smithy_client_1.expectBoolean,
3123
+ isStoredExternally: smithy_client_1.expectBoolean,
3124
+ isTimeSeries: smithy_client_1.expectBoolean,
3125
+ });
3681
3126
  };
3682
3127
  const de_PropertyDefinitionsResponse = (output, context) => {
3683
3128
  return Object.entries(output).reduce((acc, [key, value]) => {
@@ -3688,27 +3133,11 @@ const de_PropertyDefinitionsResponse = (output, context) => {
3688
3133
  return acc;
3689
3134
  }, {});
3690
3135
  };
3691
- const de_PropertyGroupResponse = (output, context) => {
3692
- return {
3693
- groupType: (0, smithy_client_1.expectString)(output.groupType),
3694
- isInherited: (0, smithy_client_1.expectBoolean)(output.isInherited),
3695
- propertyNames: output.propertyNames != null ? de_PropertyNames(output.propertyNames, context) : undefined,
3696
- };
3697
- };
3698
- const de_PropertyGroupsResponse = (output, context) => {
3699
- return Object.entries(output).reduce((acc, [key, value]) => {
3700
- if (value === null) {
3701
- return acc;
3702
- }
3703
- acc[key] = de_PropertyGroupResponse(value, context);
3704
- return acc;
3705
- }, {});
3706
- };
3707
3136
  const de_PropertyLatestValue = (output, context) => {
3708
- return {
3709
- propertyReference: output.propertyReference != null ? de_EntityPropertyReference(output.propertyReference, context) : undefined,
3710
- propertyValue: output.propertyValue != null ? de_DataValue(output.propertyValue, context) : undefined,
3711
- };
3137
+ return (0, smithy_client_1.take)(output, {
3138
+ propertyReference: smithy_client_1._json,
3139
+ propertyValue: (_) => de_DataValue(_, context),
3140
+ });
3712
3141
  };
3713
3142
  const de_PropertyLatestValueMap = (output, context) => {
3714
3143
  return Object.entries(output).reduce((acc, [key, value]) => {
@@ -3719,22 +3148,11 @@ const de_PropertyLatestValueMap = (output, context) => {
3719
3148
  return acc;
3720
3149
  }, {});
3721
3150
  };
3722
- const de_PropertyNames = (output, context) => {
3723
- const retVal = (output || [])
3724
- .filter((e) => e != null)
3725
- .map((entry) => {
3726
- if (entry === null) {
3727
- return null;
3728
- }
3729
- return (0, smithy_client_1.expectString)(entry);
3730
- });
3731
- return retVal;
3732
- };
3733
3151
  const de_PropertyResponse = (output, context) => {
3734
- return {
3735
- definition: output.definition != null ? de_PropertyDefinitionResponse(output.definition, context) : undefined,
3736
- value: output.value != null ? de_DataValue(output.value, context) : undefined,
3737
- };
3152
+ return (0, smithy_client_1.take)(output, {
3153
+ definition: (_) => de_PropertyDefinitionResponse(_, context),
3154
+ value: (_) => de_DataValue(_, context),
3155
+ });
3738
3156
  };
3739
3157
  const de_PropertyResponses = (output, context) => {
3740
3158
  return Object.entries(output).reduce((acc, [key, value]) => {
@@ -3755,35 +3173,28 @@ const de_PropertyTableValue = (output, context) => {
3755
3173
  }, {});
3756
3174
  };
3757
3175
  const de_PropertyValue = (output, context) => {
3758
- return {
3759
- time: (0, smithy_client_1.expectString)(output.time),
3760
- timestamp: output.timestamp != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.timestamp))) : undefined,
3761
- value: output.value != null ? de_DataValue(output.value, context) : undefined,
3762
- };
3176
+ return (0, smithy_client_1.take)(output, {
3177
+ time: smithy_client_1.expectString,
3178
+ timestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3179
+ value: (_) => de_DataValue(_, context),
3180
+ });
3763
3181
  };
3764
3182
  const de_PropertyValueEntry = (output, context) => {
3765
- return {
3766
- entityPropertyReference: output.entityPropertyReference != null
3767
- ? de_EntityPropertyReference(output.entityPropertyReference, context)
3768
- : undefined,
3769
- propertyValues: output.propertyValues != null ? de_PropertyValues(output.propertyValues, context) : undefined,
3770
- };
3183
+ return (0, smithy_client_1.take)(output, {
3184
+ entityPropertyReference: smithy_client_1._json,
3185
+ propertyValues: (_) => de_PropertyValues(_, context),
3186
+ });
3771
3187
  };
3772
3188
  const de_PropertyValueHistory = (output, context) => {
3773
- return {
3774
- entityPropertyReference: output.entityPropertyReference != null
3775
- ? de_EntityPropertyReference(output.entityPropertyReference, context)
3776
- : undefined,
3777
- values: output.values != null ? de_Values(output.values, context) : undefined,
3778
- };
3189
+ return (0, smithy_client_1.take)(output, {
3190
+ entityPropertyReference: smithy_client_1._json,
3191
+ values: (_) => de_Values(_, context),
3192
+ });
3779
3193
  };
3780
3194
  const de_PropertyValueList = (output, context) => {
3781
3195
  const retVal = (output || [])
3782
3196
  .filter((e) => e != null)
3783
3197
  .map((entry) => {
3784
- if (entry === null) {
3785
- return null;
3786
- }
3787
3198
  return de_PropertyValueHistory(entry, context);
3788
3199
  });
3789
3200
  return retVal;
@@ -3792,9 +3203,6 @@ const de_PropertyValues = (output, context) => {
3792
3203
  const retVal = (output || [])
3793
3204
  .filter((e) => e != null)
3794
3205
  .map((entry) => {
3795
- if (entry === null) {
3796
- return null;
3797
- }
3798
3206
  return de_PropertyValue(entry, context);
3799
3207
  });
3800
3208
  return retVal;
@@ -3802,41 +3210,15 @@ const de_PropertyValues = (output, context) => {
3802
3210
  const de_QueryResultValue = (output, context) => {
3803
3211
  return output;
3804
3212
  };
3805
- const de_Relationship = (output, context) => {
3806
- return {
3807
- relationshipType: (0, smithy_client_1.expectString)(output.relationshipType),
3808
- targetComponentTypeId: (0, smithy_client_1.expectString)(output.targetComponentTypeId),
3809
- };
3810
- };
3811
- const de_RelationshipValue = (output, context) => {
3812
- return {
3813
- targetComponentName: (0, smithy_client_1.expectString)(output.targetComponentName),
3814
- targetEntityId: (0, smithy_client_1.expectString)(output.targetEntityId),
3815
- };
3816
- };
3817
- const de_RequiredProperties = (output, context) => {
3818
- const retVal = (output || [])
3819
- .filter((e) => e != null)
3820
- .map((entry) => {
3821
- if (entry === null) {
3822
- return null;
3823
- }
3824
- return (0, smithy_client_1.expectString)(entry);
3825
- });
3826
- return retVal;
3827
- };
3828
3213
  const de_Row = (output, context) => {
3829
- return {
3830
- rowData: output.rowData != null ? de_RowData(output.rowData, context) : undefined,
3831
- };
3214
+ return (0, smithy_client_1.take)(output, {
3215
+ rowData: (_) => de_RowData(_, context),
3216
+ });
3832
3217
  };
3833
3218
  const de_RowData = (output, context) => {
3834
3219
  const retVal = (output || [])
3835
3220
  .filter((e) => e != null)
3836
3221
  .map((entry) => {
3837
- if (entry === null) {
3838
- return null;
3839
- }
3840
3222
  return de_QueryResultValue(entry, context);
3841
3223
  });
3842
3224
  return retVal;
@@ -3845,130 +3227,67 @@ const de_Rows = (output, context) => {
3845
3227
  const retVal = (output || [])
3846
3228
  .filter((e) => e != null)
3847
3229
  .map((entry) => {
3848
- if (entry === null) {
3849
- return null;
3850
- }
3851
3230
  return de_Row(entry, context);
3852
3231
  });
3853
3232
  return retVal;
3854
3233
  };
3855
- const de_SceneCapabilities = (output, context) => {
3856
- const retVal = (output || [])
3857
- .filter((e) => e != null)
3858
- .map((entry) => {
3859
- if (entry === null) {
3860
- return null;
3861
- }
3862
- return (0, smithy_client_1.expectString)(entry);
3863
- });
3864
- return retVal;
3865
- };
3866
- const de_SceneMetadataMap = (output, context) => {
3867
- return Object.entries(output).reduce((acc, [key, value]) => {
3868
- if (value === null) {
3869
- return acc;
3870
- }
3871
- acc[key] = (0, smithy_client_1.expectString)(value);
3872
- return acc;
3873
- }, {});
3874
- };
3875
3234
  const de_SceneSummaries = (output, context) => {
3876
3235
  const retVal = (output || [])
3877
3236
  .filter((e) => e != null)
3878
3237
  .map((entry) => {
3879
- if (entry === null) {
3880
- return null;
3881
- }
3882
3238
  return de_SceneSummary(entry, context);
3883
3239
  });
3884
3240
  return retVal;
3885
3241
  };
3886
3242
  const de_SceneSummary = (output, context) => {
3887
- return {
3888
- arn: (0, smithy_client_1.expectString)(output.arn),
3889
- contentLocation: (0, smithy_client_1.expectString)(output.contentLocation),
3890
- creationDateTime: output.creationDateTime != null
3891
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.creationDateTime)))
3892
- : undefined,
3893
- description: (0, smithy_client_1.expectString)(output.description),
3894
- sceneId: (0, smithy_client_1.expectString)(output.sceneId),
3895
- updateDateTime: output.updateDateTime != null
3896
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.updateDateTime)))
3897
- : undefined,
3898
- };
3899
- };
3900
- const de_Status = (output, context) => {
3901
- return {
3902
- error: output.error != null ? de_ErrorDetails(output.error, context) : undefined,
3903
- state: (0, smithy_client_1.expectString)(output.state),
3904
- };
3905
- };
3906
- const de_SyncJobStatus = (output, context) => {
3907
- return {
3908
- error: output.error != null ? de_ErrorDetails(output.error, context) : undefined,
3909
- state: (0, smithy_client_1.expectString)(output.state),
3910
- };
3243
+ return (0, smithy_client_1.take)(output, {
3244
+ arn: smithy_client_1.expectString,
3245
+ contentLocation: smithy_client_1.expectString,
3246
+ creationDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3247
+ description: smithy_client_1.expectString,
3248
+ sceneId: smithy_client_1.expectString,
3249
+ updateDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3250
+ });
3911
3251
  };
3912
3252
  const de_SyncJobSummaries = (output, context) => {
3913
3253
  const retVal = (output || [])
3914
3254
  .filter((e) => e != null)
3915
3255
  .map((entry) => {
3916
- if (entry === null) {
3917
- return null;
3918
- }
3919
3256
  return de_SyncJobSummary(entry, context);
3920
3257
  });
3921
3258
  return retVal;
3922
3259
  };
3923
3260
  const de_SyncJobSummary = (output, context) => {
3924
- return {
3925
- arn: (0, smithy_client_1.expectString)(output.arn),
3926
- creationDateTime: output.creationDateTime != null
3927
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.creationDateTime)))
3928
- : undefined,
3929
- status: output.status != null ? de_SyncJobStatus(output.status, context) : undefined,
3930
- syncSource: (0, smithy_client_1.expectString)(output.syncSource),
3931
- updateDateTime: output.updateDateTime != null
3932
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.updateDateTime)))
3933
- : undefined,
3934
- workspaceId: (0, smithy_client_1.expectString)(output.workspaceId),
3935
- };
3936
- };
3937
- const de_SyncResourceStatus = (output, context) => {
3938
- return {
3939
- error: output.error != null ? de_ErrorDetails(output.error, context) : undefined,
3940
- state: (0, smithy_client_1.expectString)(output.state),
3941
- };
3261
+ return (0, smithy_client_1.take)(output, {
3262
+ arn: smithy_client_1.expectString,
3263
+ creationDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3264
+ status: smithy_client_1._json,
3265
+ syncSource: smithy_client_1.expectString,
3266
+ updateDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3267
+ workspaceId: smithy_client_1.expectString,
3268
+ });
3942
3269
  };
3943
3270
  const de_SyncResourceSummaries = (output, context) => {
3944
3271
  const retVal = (output || [])
3945
3272
  .filter((e) => e != null)
3946
3273
  .map((entry) => {
3947
- if (entry === null) {
3948
- return null;
3949
- }
3950
3274
  return de_SyncResourceSummary(entry, context);
3951
3275
  });
3952
3276
  return retVal;
3953
3277
  };
3954
3278
  const de_SyncResourceSummary = (output, context) => {
3955
- return {
3956
- externalId: (0, smithy_client_1.expectString)(output.externalId),
3957
- resourceId: (0, smithy_client_1.expectString)(output.resourceId),
3958
- resourceType: (0, smithy_client_1.expectString)(output.resourceType),
3959
- status: output.status != null ? de_SyncResourceStatus(output.status, context) : undefined,
3960
- updateDateTime: output.updateDateTime != null
3961
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.updateDateTime)))
3962
- : undefined,
3963
- };
3279
+ return (0, smithy_client_1.take)(output, {
3280
+ externalId: smithy_client_1.expectString,
3281
+ resourceId: smithy_client_1.expectString,
3282
+ resourceType: smithy_client_1.expectString,
3283
+ status: smithy_client_1._json,
3284
+ updateDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3285
+ });
3964
3286
  };
3965
3287
  const de_TabularPropertyValue = (output, context) => {
3966
3288
  const retVal = (output || [])
3967
3289
  .filter((e) => e != null)
3968
3290
  .map((entry) => {
3969
- if (entry === null) {
3970
- return null;
3971
- }
3972
3291
  return de_PropertyTableValue(entry, context);
3973
3292
  });
3974
3293
  return retVal;
@@ -3977,29 +3296,14 @@ const de_TabularPropertyValues = (output, context) => {
3977
3296
  const retVal = (output || [])
3978
3297
  .filter((e) => e != null)
3979
3298
  .map((entry) => {
3980
- if (entry === null) {
3981
- return null;
3982
- }
3983
3299
  return de_TabularPropertyValue(entry, context);
3984
3300
  });
3985
3301
  return retVal;
3986
3302
  };
3987
- const de_TagMap = (output, context) => {
3988
- return Object.entries(output).reduce((acc, [key, value]) => {
3989
- if (value === null) {
3990
- return acc;
3991
- }
3992
- acc[key] = (0, smithy_client_1.expectString)(value);
3993
- return acc;
3994
- }, {});
3995
- };
3996
3303
  const de_Values = (output, context) => {
3997
3304
  const retVal = (output || [])
3998
3305
  .filter((e) => e != null)
3999
3306
  .map((entry) => {
4000
- if (entry === null) {
4001
- return null;
4002
- }
4003
3307
  return de_PropertyValue(entry, context);
4004
3308
  });
4005
3309
  return retVal;
@@ -4008,25 +3312,18 @@ const de_WorkspaceSummaries = (output, context) => {
4008
3312
  const retVal = (output || [])
4009
3313
  .filter((e) => e != null)
4010
3314
  .map((entry) => {
4011
- if (entry === null) {
4012
- return null;
4013
- }
4014
3315
  return de_WorkspaceSummary(entry, context);
4015
3316
  });
4016
3317
  return retVal;
4017
3318
  };
4018
3319
  const de_WorkspaceSummary = (output, context) => {
4019
- return {
4020
- arn: (0, smithy_client_1.expectString)(output.arn),
4021
- creationDateTime: output.creationDateTime != null
4022
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.creationDateTime)))
4023
- : undefined,
4024
- description: (0, smithy_client_1.expectString)(output.description),
4025
- updateDateTime: output.updateDateTime != null
4026
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.updateDateTime)))
4027
- : undefined,
4028
- workspaceId: (0, smithy_client_1.expectString)(output.workspaceId),
4029
- };
3320
+ return (0, smithy_client_1.take)(output, {
3321
+ arn: smithy_client_1.expectString,
3322
+ creationDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3323
+ description: smithy_client_1.expectString,
3324
+ updateDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3325
+ workspaceId: smithy_client_1.expectString,
3326
+ });
4030
3327
  };
4031
3328
  const deserializeMetadata = (output) => ({
4032
3329
  httpStatusCode: output.statusCode,