@aws-sdk/client-amplifyuibuilder 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,7 +15,7 @@ const se_CreateComponentCommand = async (input, context) => {
15
15
  "/app/{appId}/environment/{environmentName}/components";
16
16
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
17
17
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "environmentName", () => input.environmentName, "{environmentName}", false);
18
- const query = map({
18
+ const query = (0, smithy_client_1.map)({
19
19
  clientToken: [, input.clientToken ?? (0, uuid_1.v4)()],
20
20
  });
21
21
  let body;
@@ -47,7 +47,7 @@ const se_CreateFormCommand = async (input, context) => {
47
47
  "/app/{appId}/environment/{environmentName}/forms";
48
48
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
49
49
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "environmentName", () => input.environmentName, "{environmentName}", false);
50
- const query = map({
50
+ const query = (0, smithy_client_1.map)({
51
51
  clientToken: [, input.clientToken ?? (0, uuid_1.v4)()],
52
52
  });
53
53
  let body;
@@ -79,7 +79,7 @@ const se_CreateThemeCommand = async (input, context) => {
79
79
  "/app/{appId}/environment/{environmentName}/themes";
80
80
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
81
81
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "environmentName", () => input.environmentName, "{environmentName}", false);
82
- const query = map({
82
+ const query = (0, smithy_client_1.map)({
83
83
  clientToken: [, input.clientToken ?? (0, uuid_1.v4)()],
84
84
  });
85
85
  let body;
@@ -171,7 +171,7 @@ const se_ExchangeCodeForTokenCommand = async (input, context) => {
171
171
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "provider", () => input.provider, "{provider}", false);
172
172
  let body;
173
173
  if (input.request !== undefined) {
174
- body = se_ExchangeCodeForTokenRequestBody(input.request, context);
174
+ body = (0, smithy_client_1._json)(input.request);
175
175
  }
176
176
  if (body === undefined) {
177
177
  body = {};
@@ -195,7 +195,7 @@ const se_ExportComponentsCommand = async (input, context) => {
195
195
  "/export/app/{appId}/environment/{environmentName}/components";
196
196
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
197
197
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "environmentName", () => input.environmentName, "{environmentName}", false);
198
- const query = map({
198
+ const query = (0, smithy_client_1.map)({
199
199
  nextToken: [, input.nextToken],
200
200
  });
201
201
  let body;
@@ -218,7 +218,7 @@ const se_ExportFormsCommand = async (input, context) => {
218
218
  "/export/app/{appId}/environment/{environmentName}/forms";
219
219
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
220
220
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "environmentName", () => input.environmentName, "{environmentName}", false);
221
- const query = map({
221
+ const query = (0, smithy_client_1.map)({
222
222
  nextToken: [, input.nextToken],
223
223
  });
224
224
  let body;
@@ -241,7 +241,7 @@ const se_ExportThemesCommand = async (input, context) => {
241
241
  "/export/app/{appId}/environment/{environmentName}/themes";
242
242
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
243
243
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "environmentName", () => input.environmentName, "{environmentName}", false);
244
- const query = map({
244
+ const query = (0, smithy_client_1.map)({
245
245
  nextToken: [, input.nextToken],
246
246
  });
247
247
  let body;
@@ -343,7 +343,7 @@ const se_ListComponentsCommand = async (input, context) => {
343
343
  "/app/{appId}/environment/{environmentName}/components";
344
344
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
345
345
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "environmentName", () => input.environmentName, "{environmentName}", false);
346
- const query = map({
346
+ const query = (0, smithy_client_1.map)({
347
347
  nextToken: [, input.nextToken],
348
348
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
349
349
  });
@@ -367,7 +367,7 @@ const se_ListFormsCommand = async (input, context) => {
367
367
  "/app/{appId}/environment/{environmentName}/forms";
368
368
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
369
369
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "environmentName", () => input.environmentName, "{environmentName}", false);
370
- const query = map({
370
+ const query = (0, smithy_client_1.map)({
371
371
  nextToken: [, input.nextToken],
372
372
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
373
373
  });
@@ -391,7 +391,7 @@ const se_ListThemesCommand = async (input, context) => {
391
391
  "/app/{appId}/environment/{environmentName}/themes";
392
392
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
393
393
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "environmentName", () => input.environmentName, "{environmentName}", false);
394
- const query = map({
394
+ const query = (0, smithy_client_1.map)({
395
395
  nextToken: [, input.nextToken],
396
396
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
397
397
  });
@@ -420,7 +420,7 @@ const se_PutMetadataFlagCommand = async (input, context) => {
420
420
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "featureName", () => input.featureName, "{featureName}", false);
421
421
  let body;
422
422
  if (input.body !== undefined) {
423
- body = se_PutMetadataFlagBody(input.body, context);
423
+ body = (0, smithy_client_1._json)(input.body);
424
424
  }
425
425
  if (body === undefined) {
426
426
  body = {};
@@ -446,7 +446,7 @@ const se_RefreshTokenCommand = async (input, context) => {
446
446
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "provider", () => input.provider, "{provider}", false);
447
447
  let body;
448
448
  if (input.refreshTokenBody !== undefined) {
449
- body = se_RefreshTokenRequestBody(input.refreshTokenBody, context);
449
+ body = (0, smithy_client_1._json)(input.refreshTokenBody);
450
450
  }
451
451
  if (body === undefined) {
452
452
  body = {};
@@ -473,7 +473,7 @@ const se_UpdateComponentCommand = async (input, context) => {
473
473
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
474
474
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "environmentName", () => input.environmentName, "{environmentName}", false);
475
475
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
476
- const query = map({
476
+ const query = (0, smithy_client_1.map)({
477
477
  clientToken: [, input.clientToken ?? (0, uuid_1.v4)()],
478
478
  });
479
479
  let body;
@@ -506,7 +506,7 @@ const se_UpdateFormCommand = async (input, context) => {
506
506
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
507
507
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "environmentName", () => input.environmentName, "{environmentName}", false);
508
508
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
509
- const query = map({
509
+ const query = (0, smithy_client_1.map)({
510
510
  clientToken: [, input.clientToken ?? (0, uuid_1.v4)()],
511
511
  });
512
512
  let body;
@@ -539,7 +539,7 @@ const se_UpdateThemeCommand = async (input, context) => {
539
539
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
540
540
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "environmentName", () => input.environmentName, "{environmentName}", false);
541
541
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
542
- const query = map({
542
+ const query = (0, smithy_client_1.map)({
543
543
  clientToken: [, input.clientToken ?? (0, uuid_1.v4)()],
544
544
  });
545
545
  let body;
@@ -566,7 +566,7 @@ const de_CreateComponentCommand = async (output, context) => {
566
566
  if (output.statusCode !== 200 && output.statusCode >= 300) {
567
567
  return de_CreateComponentCommandError(output, context);
568
568
  }
569
- const contents = map({
569
+ const contents = (0, smithy_client_1.map)({
570
570
  $metadata: deserializeMetadata(output),
571
571
  });
572
572
  const data = (0, smithy_client_1.expectObject)(await parseBody(output.body, context));
@@ -595,10 +595,9 @@ const de_CreateComponentCommandError = async (output, context) => {
595
595
  throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
596
596
  default:
597
597
  const parsedBody = parsedOutput.body;
598
- (0, smithy_client_1.throwDefaultError)({
598
+ return throwDefaultError({
599
599
  output,
600
600
  parsedBody,
601
- exceptionCtor: AmplifyUIBuilderServiceException_1.AmplifyUIBuilderServiceException,
602
601
  errorCode,
603
602
  });
604
603
  }
@@ -607,7 +606,7 @@ const de_CreateFormCommand = async (output, context) => {
607
606
  if (output.statusCode !== 200 && output.statusCode >= 300) {
608
607
  return de_CreateFormCommandError(output, context);
609
608
  }
610
- const contents = map({
609
+ const contents = (0, smithy_client_1.map)({
611
610
  $metadata: deserializeMetadata(output),
612
611
  });
613
612
  const data = (0, smithy_client_1.expectObject)(await parseBody(output.body, context));
@@ -636,10 +635,9 @@ const de_CreateFormCommandError = async (output, context) => {
636
635
  throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
637
636
  default:
638
637
  const parsedBody = parsedOutput.body;
639
- (0, smithy_client_1.throwDefaultError)({
638
+ return throwDefaultError({
640
639
  output,
641
640
  parsedBody,
642
- exceptionCtor: AmplifyUIBuilderServiceException_1.AmplifyUIBuilderServiceException,
643
641
  errorCode,
644
642
  });
645
643
  }
@@ -648,7 +646,7 @@ const de_CreateThemeCommand = async (output, context) => {
648
646
  if (output.statusCode !== 200 && output.statusCode >= 300) {
649
647
  return de_CreateThemeCommandError(output, context);
650
648
  }
651
- const contents = map({
649
+ const contents = (0, smithy_client_1.map)({
652
650
  $metadata: deserializeMetadata(output),
653
651
  });
654
652
  const data = (0, smithy_client_1.expectObject)(await parseBody(output.body, context));
@@ -677,10 +675,9 @@ const de_CreateThemeCommandError = async (output, context) => {
677
675
  throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
678
676
  default:
679
677
  const parsedBody = parsedOutput.body;
680
- (0, smithy_client_1.throwDefaultError)({
678
+ return throwDefaultError({
681
679
  output,
682
680
  parsedBody,
683
- exceptionCtor: AmplifyUIBuilderServiceException_1.AmplifyUIBuilderServiceException,
684
681
  errorCode,
685
682
  });
686
683
  }
@@ -689,7 +686,7 @@ const de_DeleteComponentCommand = async (output, context) => {
689
686
  if (output.statusCode !== 200 && output.statusCode >= 300) {
690
687
  return de_DeleteComponentCommandError(output, context);
691
688
  }
692
- const contents = map({
689
+ const contents = (0, smithy_client_1.map)({
693
690
  $metadata: deserializeMetadata(output),
694
691
  });
695
692
  await collectBody(output.body, context);
@@ -714,10 +711,9 @@ const de_DeleteComponentCommandError = async (output, context) => {
714
711
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
715
712
  default:
716
713
  const parsedBody = parsedOutput.body;
717
- (0, smithy_client_1.throwDefaultError)({
714
+ return throwDefaultError({
718
715
  output,
719
716
  parsedBody,
720
- exceptionCtor: AmplifyUIBuilderServiceException_1.AmplifyUIBuilderServiceException,
721
717
  errorCode,
722
718
  });
723
719
  }
@@ -726,7 +722,7 @@ const de_DeleteFormCommand = async (output, context) => {
726
722
  if (output.statusCode !== 200 && output.statusCode >= 300) {
727
723
  return de_DeleteFormCommandError(output, context);
728
724
  }
729
- const contents = map({
725
+ const contents = (0, smithy_client_1.map)({
730
726
  $metadata: deserializeMetadata(output),
731
727
  });
732
728
  await collectBody(output.body, context);
@@ -751,10 +747,9 @@ const de_DeleteFormCommandError = async (output, context) => {
751
747
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
752
748
  default:
753
749
  const parsedBody = parsedOutput.body;
754
- (0, smithy_client_1.throwDefaultError)({
750
+ return throwDefaultError({
755
751
  output,
756
752
  parsedBody,
757
- exceptionCtor: AmplifyUIBuilderServiceException_1.AmplifyUIBuilderServiceException,
758
753
  errorCode,
759
754
  });
760
755
  }
@@ -763,7 +758,7 @@ const de_DeleteThemeCommand = async (output, context) => {
763
758
  if (output.statusCode !== 200 && output.statusCode >= 300) {
764
759
  return de_DeleteThemeCommandError(output, context);
765
760
  }
766
- const contents = map({
761
+ const contents = (0, smithy_client_1.map)({
767
762
  $metadata: deserializeMetadata(output),
768
763
  });
769
764
  await collectBody(output.body, context);
@@ -788,10 +783,9 @@ const de_DeleteThemeCommandError = async (output, context) => {
788
783
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
789
784
  default:
790
785
  const parsedBody = parsedOutput.body;
791
- (0, smithy_client_1.throwDefaultError)({
786
+ return throwDefaultError({
792
787
  output,
793
788
  parsedBody,
794
- exceptionCtor: AmplifyUIBuilderServiceException_1.AmplifyUIBuilderServiceException,
795
789
  errorCode,
796
790
  });
797
791
  }
@@ -800,19 +794,16 @@ const de_ExchangeCodeForTokenCommand = async (output, context) => {
800
794
  if (output.statusCode !== 200 && output.statusCode >= 300) {
801
795
  return de_ExchangeCodeForTokenCommandError(output, context);
802
796
  }
803
- const contents = map({
797
+ const contents = (0, smithy_client_1.map)({
804
798
  $metadata: deserializeMetadata(output),
805
799
  });
806
800
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
807
- if (data.accessToken != null) {
808
- contents.accessToken = (0, smithy_client_1.expectString)(data.accessToken);
809
- }
810
- if (data.expiresIn != null) {
811
- contents.expiresIn = (0, smithy_client_1.expectInt32)(data.expiresIn);
812
- }
813
- if (data.refreshToken != null) {
814
- contents.refreshToken = (0, smithy_client_1.expectString)(data.refreshToken);
815
- }
801
+ const doc = (0, smithy_client_1.take)(data, {
802
+ accessToken: smithy_client_1.expectString,
803
+ expiresIn: smithy_client_1.expectInt32,
804
+ refreshToken: smithy_client_1.expectString,
805
+ });
806
+ Object.assign(contents, doc);
816
807
  return contents;
817
808
  };
818
809
  exports.de_ExchangeCodeForTokenCommand = de_ExchangeCodeForTokenCommand;
@@ -828,10 +819,9 @@ const de_ExchangeCodeForTokenCommandError = async (output, context) => {
828
819
  throw await de_InvalidParameterExceptionRes(parsedOutput, context);
829
820
  default:
830
821
  const parsedBody = parsedOutput.body;
831
- (0, smithy_client_1.throwDefaultError)({
822
+ return throwDefaultError({
832
823
  output,
833
824
  parsedBody,
834
- exceptionCtor: AmplifyUIBuilderServiceException_1.AmplifyUIBuilderServiceException,
835
825
  errorCode,
836
826
  });
837
827
  }
@@ -840,16 +830,15 @@ const de_ExportComponentsCommand = async (output, context) => {
840
830
  if (output.statusCode !== 200 && output.statusCode >= 300) {
841
831
  return de_ExportComponentsCommandError(output, context);
842
832
  }
843
- const contents = map({
833
+ const contents = (0, smithy_client_1.map)({
844
834
  $metadata: deserializeMetadata(output),
845
835
  });
846
836
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
847
- if (data.entities != null) {
848
- contents.entities = de_ComponentList(data.entities, context);
849
- }
850
- if (data.nextToken != null) {
851
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
852
- }
837
+ const doc = (0, smithy_client_1.take)(data, {
838
+ entities: (_) => de_ComponentList(_, context),
839
+ nextToken: smithy_client_1.expectString,
840
+ });
841
+ Object.assign(contents, doc);
853
842
  return contents;
854
843
  };
855
844
  exports.de_ExportComponentsCommand = de_ExportComponentsCommand;
@@ -868,10 +857,9 @@ const de_ExportComponentsCommandError = async (output, context) => {
868
857
  throw await de_InvalidParameterExceptionRes(parsedOutput, context);
869
858
  default:
870
859
  const parsedBody = parsedOutput.body;
871
- (0, smithy_client_1.throwDefaultError)({
860
+ return throwDefaultError({
872
861
  output,
873
862
  parsedBody,
874
- exceptionCtor: AmplifyUIBuilderServiceException_1.AmplifyUIBuilderServiceException,
875
863
  errorCode,
876
864
  });
877
865
  }
@@ -880,16 +868,15 @@ const de_ExportFormsCommand = async (output, context) => {
880
868
  if (output.statusCode !== 200 && output.statusCode >= 300) {
881
869
  return de_ExportFormsCommandError(output, context);
882
870
  }
883
- const contents = map({
871
+ const contents = (0, smithy_client_1.map)({
884
872
  $metadata: deserializeMetadata(output),
885
873
  });
886
874
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
887
- if (data.entities != null) {
888
- contents.entities = de_FormList(data.entities, context);
889
- }
890
- if (data.nextToken != null) {
891
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
892
- }
875
+ const doc = (0, smithy_client_1.take)(data, {
876
+ entities: (_) => de_FormList(_, context),
877
+ nextToken: smithy_client_1.expectString,
878
+ });
879
+ Object.assign(contents, doc);
893
880
  return contents;
894
881
  };
895
882
  exports.de_ExportFormsCommand = de_ExportFormsCommand;
@@ -908,10 +895,9 @@ const de_ExportFormsCommandError = async (output, context) => {
908
895
  throw await de_InvalidParameterExceptionRes(parsedOutput, context);
909
896
  default:
910
897
  const parsedBody = parsedOutput.body;
911
- (0, smithy_client_1.throwDefaultError)({
898
+ return throwDefaultError({
912
899
  output,
913
900
  parsedBody,
914
- exceptionCtor: AmplifyUIBuilderServiceException_1.AmplifyUIBuilderServiceException,
915
901
  errorCode,
916
902
  });
917
903
  }
@@ -920,16 +906,15 @@ const de_ExportThemesCommand = async (output, context) => {
920
906
  if (output.statusCode !== 200 && output.statusCode >= 300) {
921
907
  return de_ExportThemesCommandError(output, context);
922
908
  }
923
- const contents = map({
909
+ const contents = (0, smithy_client_1.map)({
924
910
  $metadata: deserializeMetadata(output),
925
911
  });
926
912
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
927
- if (data.entities != null) {
928
- contents.entities = de_ThemeList(data.entities, context);
929
- }
930
- if (data.nextToken != null) {
931
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
932
- }
913
+ const doc = (0, smithy_client_1.take)(data, {
914
+ entities: (_) => de_ThemeList(_, context),
915
+ nextToken: smithy_client_1.expectString,
916
+ });
917
+ Object.assign(contents, doc);
933
918
  return contents;
934
919
  };
935
920
  exports.de_ExportThemesCommand = de_ExportThemesCommand;
@@ -948,10 +933,9 @@ const de_ExportThemesCommandError = async (output, context) => {
948
933
  throw await de_InvalidParameterExceptionRes(parsedOutput, context);
949
934
  default:
950
935
  const parsedBody = parsedOutput.body;
951
- (0, smithy_client_1.throwDefaultError)({
936
+ return throwDefaultError({
952
937
  output,
953
938
  parsedBody,
954
- exceptionCtor: AmplifyUIBuilderServiceException_1.AmplifyUIBuilderServiceException,
955
939
  errorCode,
956
940
  });
957
941
  }
@@ -960,7 +944,7 @@ const de_GetComponentCommand = async (output, context) => {
960
944
  if (output.statusCode !== 200 && output.statusCode >= 300) {
961
945
  return de_GetComponentCommandError(output, context);
962
946
  }
963
- const contents = map({
947
+ const contents = (0, smithy_client_1.map)({
964
948
  $metadata: deserializeMetadata(output),
965
949
  });
966
950
  const data = (0, smithy_client_1.expectObject)(await parseBody(output.body, context));
@@ -986,10 +970,9 @@ const de_GetComponentCommandError = async (output, context) => {
986
970
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
987
971
  default:
988
972
  const parsedBody = parsedOutput.body;
989
- (0, smithy_client_1.throwDefaultError)({
973
+ return throwDefaultError({
990
974
  output,
991
975
  parsedBody,
992
- exceptionCtor: AmplifyUIBuilderServiceException_1.AmplifyUIBuilderServiceException,
993
976
  errorCode,
994
977
  });
995
978
  }
@@ -998,7 +981,7 @@ const de_GetFormCommand = async (output, context) => {
998
981
  if (output.statusCode !== 200 && output.statusCode >= 300) {
999
982
  return de_GetFormCommandError(output, context);
1000
983
  }
1001
- const contents = map({
984
+ const contents = (0, smithy_client_1.map)({
1002
985
  $metadata: deserializeMetadata(output),
1003
986
  });
1004
987
  const data = (0, smithy_client_1.expectObject)(await parseBody(output.body, context));
@@ -1024,10 +1007,9 @@ const de_GetFormCommandError = async (output, context) => {
1024
1007
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1025
1008
  default:
1026
1009
  const parsedBody = parsedOutput.body;
1027
- (0, smithy_client_1.throwDefaultError)({
1010
+ return throwDefaultError({
1028
1011
  output,
1029
1012
  parsedBody,
1030
- exceptionCtor: AmplifyUIBuilderServiceException_1.AmplifyUIBuilderServiceException,
1031
1013
  errorCode,
1032
1014
  });
1033
1015
  }
@@ -1036,13 +1018,14 @@ const de_GetMetadataCommand = async (output, context) => {
1036
1018
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1037
1019
  return de_GetMetadataCommandError(output, context);
1038
1020
  }
1039
- const contents = map({
1021
+ const contents = (0, smithy_client_1.map)({
1040
1022
  $metadata: deserializeMetadata(output),
1041
1023
  });
1042
1024
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1043
- if (data.features != null) {
1044
- contents.features = de_FeaturesMap(data.features, context);
1045
- }
1025
+ const doc = (0, smithy_client_1.take)(data, {
1026
+ features: smithy_client_1._json,
1027
+ });
1028
+ Object.assign(contents, doc);
1046
1029
  return contents;
1047
1030
  };
1048
1031
  exports.de_GetMetadataCommand = de_GetMetadataCommand;
@@ -1061,10 +1044,9 @@ const de_GetMetadataCommandError = async (output, context) => {
1061
1044
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1062
1045
  default:
1063
1046
  const parsedBody = parsedOutput.body;
1064
- (0, smithy_client_1.throwDefaultError)({
1047
+ return throwDefaultError({
1065
1048
  output,
1066
1049
  parsedBody,
1067
- exceptionCtor: AmplifyUIBuilderServiceException_1.AmplifyUIBuilderServiceException,
1068
1050
  errorCode,
1069
1051
  });
1070
1052
  }
@@ -1073,7 +1055,7 @@ const de_GetThemeCommand = async (output, context) => {
1073
1055
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1074
1056
  return de_GetThemeCommandError(output, context);
1075
1057
  }
1076
- const contents = map({
1058
+ const contents = (0, smithy_client_1.map)({
1077
1059
  $metadata: deserializeMetadata(output),
1078
1060
  });
1079
1061
  const data = (0, smithy_client_1.expectObject)(await parseBody(output.body, context));
@@ -1099,10 +1081,9 @@ const de_GetThemeCommandError = async (output, context) => {
1099
1081
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1100
1082
  default:
1101
1083
  const parsedBody = parsedOutput.body;
1102
- (0, smithy_client_1.throwDefaultError)({
1084
+ return throwDefaultError({
1103
1085
  output,
1104
1086
  parsedBody,
1105
- exceptionCtor: AmplifyUIBuilderServiceException_1.AmplifyUIBuilderServiceException,
1106
1087
  errorCode,
1107
1088
  });
1108
1089
  }
@@ -1111,16 +1092,15 @@ const de_ListComponentsCommand = async (output, context) => {
1111
1092
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1112
1093
  return de_ListComponentsCommandError(output, context);
1113
1094
  }
1114
- const contents = map({
1095
+ const contents = (0, smithy_client_1.map)({
1115
1096
  $metadata: deserializeMetadata(output),
1116
1097
  });
1117
1098
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1118
- if (data.entities != null) {
1119
- contents.entities = de_ComponentSummaryList(data.entities, context);
1120
- }
1121
- if (data.nextToken != null) {
1122
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1123
- }
1099
+ const doc = (0, smithy_client_1.take)(data, {
1100
+ entities: smithy_client_1._json,
1101
+ nextToken: smithy_client_1.expectString,
1102
+ });
1103
+ Object.assign(contents, doc);
1124
1104
  return contents;
1125
1105
  };
1126
1106
  exports.de_ListComponentsCommand = de_ListComponentsCommand;
@@ -1139,10 +1119,9 @@ const de_ListComponentsCommandError = async (output, context) => {
1139
1119
  throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1140
1120
  default:
1141
1121
  const parsedBody = parsedOutput.body;
1142
- (0, smithy_client_1.throwDefaultError)({
1122
+ return throwDefaultError({
1143
1123
  output,
1144
1124
  parsedBody,
1145
- exceptionCtor: AmplifyUIBuilderServiceException_1.AmplifyUIBuilderServiceException,
1146
1125
  errorCode,
1147
1126
  });
1148
1127
  }
@@ -1151,16 +1130,15 @@ const de_ListFormsCommand = async (output, context) => {
1151
1130
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1152
1131
  return de_ListFormsCommandError(output, context);
1153
1132
  }
1154
- const contents = map({
1133
+ const contents = (0, smithy_client_1.map)({
1155
1134
  $metadata: deserializeMetadata(output),
1156
1135
  });
1157
1136
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1158
- if (data.entities != null) {
1159
- contents.entities = de_FormSummaryList(data.entities, context);
1160
- }
1161
- if (data.nextToken != null) {
1162
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1163
- }
1137
+ const doc = (0, smithy_client_1.take)(data, {
1138
+ entities: smithy_client_1._json,
1139
+ nextToken: smithy_client_1.expectString,
1140
+ });
1141
+ Object.assign(contents, doc);
1164
1142
  return contents;
1165
1143
  };
1166
1144
  exports.de_ListFormsCommand = de_ListFormsCommand;
@@ -1179,10 +1157,9 @@ const de_ListFormsCommandError = async (output, context) => {
1179
1157
  throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1180
1158
  default:
1181
1159
  const parsedBody = parsedOutput.body;
1182
- (0, smithy_client_1.throwDefaultError)({
1160
+ return throwDefaultError({
1183
1161
  output,
1184
1162
  parsedBody,
1185
- exceptionCtor: AmplifyUIBuilderServiceException_1.AmplifyUIBuilderServiceException,
1186
1163
  errorCode,
1187
1164
  });
1188
1165
  }
@@ -1191,16 +1168,15 @@ const de_ListThemesCommand = async (output, context) => {
1191
1168
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1192
1169
  return de_ListThemesCommandError(output, context);
1193
1170
  }
1194
- const contents = map({
1171
+ const contents = (0, smithy_client_1.map)({
1195
1172
  $metadata: deserializeMetadata(output),
1196
1173
  });
1197
1174
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1198
- if (data.entities != null) {
1199
- contents.entities = de_ThemeSummaryList(data.entities, context);
1200
- }
1201
- if (data.nextToken != null) {
1202
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1203
- }
1175
+ const doc = (0, smithy_client_1.take)(data, {
1176
+ entities: smithy_client_1._json,
1177
+ nextToken: smithy_client_1.expectString,
1178
+ });
1179
+ Object.assign(contents, doc);
1204
1180
  return contents;
1205
1181
  };
1206
1182
  exports.de_ListThemesCommand = de_ListThemesCommand;
@@ -1219,10 +1195,9 @@ const de_ListThemesCommandError = async (output, context) => {
1219
1195
  throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1220
1196
  default:
1221
1197
  const parsedBody = parsedOutput.body;
1222
- (0, smithy_client_1.throwDefaultError)({
1198
+ return throwDefaultError({
1223
1199
  output,
1224
1200
  parsedBody,
1225
- exceptionCtor: AmplifyUIBuilderServiceException_1.AmplifyUIBuilderServiceException,
1226
1201
  errorCode,
1227
1202
  });
1228
1203
  }
@@ -1231,7 +1206,7 @@ const de_PutMetadataFlagCommand = async (output, context) => {
1231
1206
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1232
1207
  return de_PutMetadataFlagCommandError(output, context);
1233
1208
  }
1234
- const contents = map({
1209
+ const contents = (0, smithy_client_1.map)({
1235
1210
  $metadata: deserializeMetadata(output),
1236
1211
  });
1237
1212
  await collectBody(output.body, context);
@@ -1253,10 +1228,9 @@ const de_PutMetadataFlagCommandError = async (output, context) => {
1253
1228
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1254
1229
  default:
1255
1230
  const parsedBody = parsedOutput.body;
1256
- (0, smithy_client_1.throwDefaultError)({
1231
+ return throwDefaultError({
1257
1232
  output,
1258
1233
  parsedBody,
1259
- exceptionCtor: AmplifyUIBuilderServiceException_1.AmplifyUIBuilderServiceException,
1260
1234
  errorCode,
1261
1235
  });
1262
1236
  }
@@ -1265,16 +1239,15 @@ const de_RefreshTokenCommand = async (output, context) => {
1265
1239
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1266
1240
  return de_RefreshTokenCommandError(output, context);
1267
1241
  }
1268
- const contents = map({
1242
+ const contents = (0, smithy_client_1.map)({
1269
1243
  $metadata: deserializeMetadata(output),
1270
1244
  });
1271
1245
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1272
- if (data.accessToken != null) {
1273
- contents.accessToken = (0, smithy_client_1.expectString)(data.accessToken);
1274
- }
1275
- if (data.expiresIn != null) {
1276
- contents.expiresIn = (0, smithy_client_1.expectInt32)(data.expiresIn);
1277
- }
1246
+ const doc = (0, smithy_client_1.take)(data, {
1247
+ accessToken: smithy_client_1.expectString,
1248
+ expiresIn: smithy_client_1.expectInt32,
1249
+ });
1250
+ Object.assign(contents, doc);
1278
1251
  return contents;
1279
1252
  };
1280
1253
  exports.de_RefreshTokenCommand = de_RefreshTokenCommand;
@@ -1290,10 +1263,9 @@ const de_RefreshTokenCommandError = async (output, context) => {
1290
1263
  throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1291
1264
  default:
1292
1265
  const parsedBody = parsedOutput.body;
1293
- (0, smithy_client_1.throwDefaultError)({
1266
+ return throwDefaultError({
1294
1267
  output,
1295
1268
  parsedBody,
1296
- exceptionCtor: AmplifyUIBuilderServiceException_1.AmplifyUIBuilderServiceException,
1297
1269
  errorCode,
1298
1270
  });
1299
1271
  }
@@ -1302,7 +1274,7 @@ const de_UpdateComponentCommand = async (output, context) => {
1302
1274
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1303
1275
  return de_UpdateComponentCommandError(output, context);
1304
1276
  }
1305
- const contents = map({
1277
+ const contents = (0, smithy_client_1.map)({
1306
1278
  $metadata: deserializeMetadata(output),
1307
1279
  });
1308
1280
  const data = (0, smithy_client_1.expectObject)(await parseBody(output.body, context));
@@ -1328,10 +1300,9 @@ const de_UpdateComponentCommandError = async (output, context) => {
1328
1300
  throw await de_ResourceConflictExceptionRes(parsedOutput, context);
1329
1301
  default:
1330
1302
  const parsedBody = parsedOutput.body;
1331
- (0, smithy_client_1.throwDefaultError)({
1303
+ return throwDefaultError({
1332
1304
  output,
1333
1305
  parsedBody,
1334
- exceptionCtor: AmplifyUIBuilderServiceException_1.AmplifyUIBuilderServiceException,
1335
1306
  errorCode,
1336
1307
  });
1337
1308
  }
@@ -1340,7 +1311,7 @@ const de_UpdateFormCommand = async (output, context) => {
1340
1311
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1341
1312
  return de_UpdateFormCommandError(output, context);
1342
1313
  }
1343
- const contents = map({
1314
+ const contents = (0, smithy_client_1.map)({
1344
1315
  $metadata: deserializeMetadata(output),
1345
1316
  });
1346
1317
  const data = (0, smithy_client_1.expectObject)(await parseBody(output.body, context));
@@ -1366,10 +1337,9 @@ const de_UpdateFormCommandError = async (output, context) => {
1366
1337
  throw await de_ResourceConflictExceptionRes(parsedOutput, context);
1367
1338
  default:
1368
1339
  const parsedBody = parsedOutput.body;
1369
- (0, smithy_client_1.throwDefaultError)({
1340
+ return throwDefaultError({
1370
1341
  output,
1371
1342
  parsedBody,
1372
- exceptionCtor: AmplifyUIBuilderServiceException_1.AmplifyUIBuilderServiceException,
1373
1343
  errorCode,
1374
1344
  });
1375
1345
  }
@@ -1378,7 +1348,7 @@ const de_UpdateThemeCommand = async (output, context) => {
1378
1348
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1379
1349
  return de_UpdateThemeCommandError(output, context);
1380
1350
  }
1381
- const contents = map({
1351
+ const contents = (0, smithy_client_1.map)({
1382
1352
  $metadata: deserializeMetadata(output),
1383
1353
  });
1384
1354
  const data = (0, smithy_client_1.expectObject)(await parseBody(output.body, context));
@@ -1404,21 +1374,21 @@ const de_UpdateThemeCommandError = async (output, context) => {
1404
1374
  throw await de_ResourceConflictExceptionRes(parsedOutput, context);
1405
1375
  default:
1406
1376
  const parsedBody = parsedOutput.body;
1407
- (0, smithy_client_1.throwDefaultError)({
1377
+ return throwDefaultError({
1408
1378
  output,
1409
1379
  parsedBody,
1410
- exceptionCtor: AmplifyUIBuilderServiceException_1.AmplifyUIBuilderServiceException,
1411
1380
  errorCode,
1412
1381
  });
1413
1382
  }
1414
1383
  };
1415
- const map = smithy_client_1.map;
1384
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(AmplifyUIBuilderServiceException_1.AmplifyUIBuilderServiceException);
1416
1385
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1417
- const contents = map({});
1386
+ const contents = (0, smithy_client_1.map)({});
1418
1387
  const data = parsedOutput.body;
1419
- if (data.message != null) {
1420
- contents.message = (0, smithy_client_1.expectString)(data.message);
1421
- }
1388
+ const doc = (0, smithy_client_1.take)(data, {
1389
+ message: smithy_client_1.expectString,
1390
+ });
1391
+ Object.assign(contents, doc);
1422
1392
  const exception = new models_0_1.InternalServerException({
1423
1393
  $metadata: deserializeMetadata(parsedOutput),
1424
1394
  ...contents,
@@ -1426,11 +1396,12 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1426
1396
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1427
1397
  };
1428
1398
  const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
1429
- const contents = map({});
1399
+ const contents = (0, smithy_client_1.map)({});
1430
1400
  const data = parsedOutput.body;
1431
- if (data.message != null) {
1432
- contents.message = (0, smithy_client_1.expectString)(data.message);
1433
- }
1401
+ const doc = (0, smithy_client_1.take)(data, {
1402
+ message: smithy_client_1.expectString,
1403
+ });
1404
+ Object.assign(contents, doc);
1434
1405
  const exception = new models_0_1.InvalidParameterException({
1435
1406
  $metadata: deserializeMetadata(parsedOutput),
1436
1407
  ...contents,
@@ -1438,11 +1409,12 @@ const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
1438
1409
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1439
1410
  };
1440
1411
  const de_ResourceConflictExceptionRes = async (parsedOutput, context) => {
1441
- const contents = map({});
1412
+ const contents = (0, smithy_client_1.map)({});
1442
1413
  const data = parsedOutput.body;
1443
- if (data.message != null) {
1444
- contents.message = (0, smithy_client_1.expectString)(data.message);
1445
- }
1414
+ const doc = (0, smithy_client_1.take)(data, {
1415
+ message: smithy_client_1.expectString,
1416
+ });
1417
+ Object.assign(contents, doc);
1446
1418
  const exception = new models_0_1.ResourceConflictException({
1447
1419
  $metadata: deserializeMetadata(parsedOutput),
1448
1420
  ...contents,
@@ -1450,11 +1422,12 @@ const de_ResourceConflictExceptionRes = async (parsedOutput, context) => {
1450
1422
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1451
1423
  };
1452
1424
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1453
- const contents = map({});
1425
+ const contents = (0, smithy_client_1.map)({});
1454
1426
  const data = parsedOutput.body;
1455
- if (data.message != null) {
1456
- contents.message = (0, smithy_client_1.expectString)(data.message);
1457
- }
1427
+ const doc = (0, smithy_client_1.take)(data, {
1428
+ message: smithy_client_1.expectString,
1429
+ });
1430
+ Object.assign(contents, doc);
1458
1431
  const exception = new models_0_1.ResourceNotFoundException({
1459
1432
  $metadata: deserializeMetadata(parsedOutput),
1460
1433
  ...contents,
@@ -1462,11 +1435,12 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1462
1435
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1463
1436
  };
1464
1437
  const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1465
- const contents = map({});
1438
+ const contents = (0, smithy_client_1.map)({});
1466
1439
  const data = parsedOutput.body;
1467
- if (data.message != null) {
1468
- contents.message = (0, smithy_client_1.expectString)(data.message);
1469
- }
1440
+ const doc = (0, smithy_client_1.take)(data, {
1441
+ message: smithy_client_1.expectString,
1442
+ });
1443
+ Object.assign(contents, doc);
1470
1444
  const exception = new models_0_1.ServiceQuotaExceededException({
1471
1445
  $metadata: deserializeMetadata(parsedOutput),
1472
1446
  ...contents,
@@ -1474,11 +1448,12 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1474
1448
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1475
1449
  };
1476
1450
  const de_UnauthorizedExceptionRes = async (parsedOutput, context) => {
1477
- const contents = map({});
1451
+ const contents = (0, smithy_client_1.map)({});
1478
1452
  const data = parsedOutput.body;
1479
- if (data.message != null) {
1480
- contents.message = (0, smithy_client_1.expectString)(data.message);
1481
- }
1453
+ const doc = (0, smithy_client_1.take)(data, {
1454
+ message: smithy_client_1.expectString,
1455
+ });
1456
+ Object.assign(contents, doc);
1482
1457
  const exception = new models_0_1.UnauthorizedException({
1483
1458
  $metadata: deserializeMetadata(parsedOutput),
1484
1459
  ...contents,
@@ -1486,17 +1461,17 @@ const de_UnauthorizedExceptionRes = async (parsedOutput, context) => {
1486
1461
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1487
1462
  };
1488
1463
  const se_ActionParameters = (input, context) => {
1489
- return {
1490
- ...(input.anchor != null && { anchor: se_ComponentProperty(input.anchor, context) }),
1491
- ...(input.fields != null && { fields: se_ComponentProperties(input.fields, context) }),
1492
- ...(input.global != null && { global: se_ComponentProperty(input.global, context) }),
1493
- ...(input.id != null && { id: se_ComponentProperty(input.id, context) }),
1494
- ...(input.model != null && { model: input.model }),
1495
- ...(input.state != null && { state: se_MutationActionSetStateParameter(input.state, context) }),
1496
- ...(input.target != null && { target: se_ComponentProperty(input.target, context) }),
1497
- ...(input.type != null && { type: se_ComponentProperty(input.type, context) }),
1498
- ...(input.url != null && { url: se_ComponentProperty(input.url, context) }),
1499
- };
1464
+ return (0, smithy_client_1.take)(input, {
1465
+ anchor: (_) => se_ComponentProperty(_, context),
1466
+ fields: (_) => se_ComponentProperties(_, context),
1467
+ global: (_) => se_ComponentProperty(_, context),
1468
+ id: (_) => se_ComponentProperty(_, context),
1469
+ model: [],
1470
+ state: (_) => se_MutationActionSetStateParameter(_, context),
1471
+ target: (_) => se_ComponentProperty(_, context),
1472
+ type: (_) => se_ComponentProperty(_, context),
1473
+ url: (_) => se_ComponentProperty(_, context),
1474
+ });
1500
1475
  };
1501
1476
  const se_ComponentBindingProperties = (input, context) => {
1502
1477
  return Object.entries(input).reduce((acc, [key, value]) => {
@@ -1508,35 +1483,33 @@ const se_ComponentBindingProperties = (input, context) => {
1508
1483
  }, {});
1509
1484
  };
1510
1485
  const se_ComponentBindingPropertiesValue = (input, context) => {
1511
- return {
1512
- ...(input.bindingProperties != null && {
1513
- bindingProperties: se_ComponentBindingPropertiesValueProperties(input.bindingProperties, context),
1514
- }),
1515
- ...(input.defaultValue != null && { defaultValue: input.defaultValue }),
1516
- ...(input.type != null && { type: input.type }),
1517
- };
1486
+ return (0, smithy_client_1.take)(input, {
1487
+ bindingProperties: (_) => se_ComponentBindingPropertiesValueProperties(_, context),
1488
+ defaultValue: [],
1489
+ type: [],
1490
+ });
1518
1491
  };
1519
1492
  const se_ComponentBindingPropertiesValueProperties = (input, context) => {
1520
- return {
1521
- ...(input.bucket != null && { bucket: input.bucket }),
1522
- ...(input.defaultValue != null && { defaultValue: input.defaultValue }),
1523
- ...(input.field != null && { field: input.field }),
1524
- ...(input.key != null && { key: input.key }),
1525
- ...(input.model != null && { model: input.model }),
1526
- ...(input.predicates != null && { predicates: se_PredicateList(input.predicates, context) }),
1527
- ...(input.slotName != null && { slotName: input.slotName }),
1528
- ...(input.userAttribute != null && { userAttribute: input.userAttribute }),
1529
- };
1493
+ return (0, smithy_client_1.take)(input, {
1494
+ bucket: [],
1495
+ defaultValue: [],
1496
+ field: [],
1497
+ key: [],
1498
+ model: [],
1499
+ predicates: (_) => se_PredicateList(_, context),
1500
+ slotName: [],
1501
+ userAttribute: [],
1502
+ });
1530
1503
  };
1531
1504
  const se_ComponentChild = (input, context) => {
1532
- return {
1533
- ...(input.children != null && { children: se_ComponentChildList(input.children, context) }),
1534
- ...(input.componentType != null && { componentType: input.componentType }),
1535
- ...(input.events != null && { events: se_ComponentEvents(input.events, context) }),
1536
- ...(input.name != null && { name: input.name }),
1537
- ...(input.properties != null && { properties: se_ComponentProperties(input.properties, context) }),
1538
- ...(input.sourceId != null && { sourceId: input.sourceId }),
1539
- };
1505
+ return (0, smithy_client_1.take)(input, {
1506
+ children: (_) => se_ComponentChildList(_, context),
1507
+ componentType: [],
1508
+ events: (_) => se_ComponentEvents(_, context),
1509
+ name: [],
1510
+ properties: (_) => se_ComponentProperties(_, context),
1511
+ sourceId: [],
1512
+ });
1540
1513
  };
1541
1514
  const se_ComponentChildList = (input, context) => {
1542
1515
  return input
@@ -1555,30 +1528,30 @@ const se_ComponentCollectionProperties = (input, context) => {
1555
1528
  }, {});
1556
1529
  };
1557
1530
  const se_ComponentConditionProperty = (input, context) => {
1558
- return {
1559
- ...(input.else != null && { else: se_ComponentProperty(input.else, context) }),
1560
- ...(input.field != null && { field: input.field }),
1561
- ...(input.operand != null && { operand: input.operand }),
1562
- ...(input.operandType != null && { operandType: input.operandType }),
1563
- ...(input.operator != null && { operator: input.operator }),
1564
- ...(input.property != null && { property: input.property }),
1565
- ...(input.then != null && { then: se_ComponentProperty(input.then, context) }),
1566
- };
1531
+ return (0, smithy_client_1.take)(input, {
1532
+ else: (_) => se_ComponentProperty(_, context),
1533
+ field: [],
1534
+ operand: [],
1535
+ operandType: [],
1536
+ operator: [],
1537
+ property: [],
1538
+ then: (_) => se_ComponentProperty(_, context),
1539
+ });
1567
1540
  };
1568
1541
  const se_ComponentDataConfiguration = (input, context) => {
1569
- return {
1570
- ...(input.identifiers != null && { identifiers: se_IdentifierList(input.identifiers, context) }),
1571
- ...(input.model != null && { model: input.model }),
1572
- ...(input.predicate != null && { predicate: se_Predicate(input.predicate, context) }),
1573
- ...(input.sort != null && { sort: se_SortPropertyList(input.sort, context) }),
1574
- };
1542
+ return (0, smithy_client_1.take)(input, {
1543
+ identifiers: smithy_client_1._json,
1544
+ model: [],
1545
+ predicate: (_) => se_Predicate(_, context),
1546
+ sort: smithy_client_1._json,
1547
+ });
1575
1548
  };
1576
1549
  const se_ComponentEvent = (input, context) => {
1577
- return {
1578
- ...(input.action != null && { action: input.action }),
1579
- ...(input.bindingEvent != null && { bindingEvent: input.bindingEvent }),
1580
- ...(input.parameters != null && { parameters: se_ActionParameters(input.parameters, context) }),
1581
- };
1550
+ return (0, smithy_client_1.take)(input, {
1551
+ action: [],
1552
+ bindingEvent: [],
1553
+ parameters: (_) => se_ActionParameters(_, context),
1554
+ });
1582
1555
  };
1583
1556
  const se_ComponentEvents = (input, context) => {
1584
1557
  return Object.entries(input).reduce((acc, [key, value]) => {
@@ -1589,24 +1562,6 @@ const se_ComponentEvents = (input, context) => {
1589
1562
  return acc;
1590
1563
  }, {});
1591
1564
  };
1592
- const se_ComponentOverrides = (input, context) => {
1593
- return Object.entries(input).reduce((acc, [key, value]) => {
1594
- if (value === null) {
1595
- return acc;
1596
- }
1597
- acc[key] = se_ComponentOverridesValue(value, context);
1598
- return acc;
1599
- }, {});
1600
- };
1601
- const se_ComponentOverridesValue = (input, context) => {
1602
- return Object.entries(input).reduce((acc, [key, value]) => {
1603
- if (value === null) {
1604
- return acc;
1605
- }
1606
- acc[key] = value;
1607
- return acc;
1608
- }, {});
1609
- };
1610
1565
  const se_ComponentProperties = (input, context) => {
1611
1566
  return Object.entries(input).reduce((acc, [key, value]) => {
1612
1567
  if (value === null) {
@@ -1617,33 +1572,23 @@ const se_ComponentProperties = (input, context) => {
1617
1572
  }, {});
1618
1573
  };
1619
1574
  const se_ComponentProperty = (input, context) => {
1620
- return {
1621
- ...(input.bindingProperties != null && {
1622
- bindingProperties: se_ComponentPropertyBindingProperties(input.bindingProperties, context),
1623
- }),
1624
- ...(input.bindings != null && { bindings: se_FormBindings(input.bindings, context) }),
1625
- ...(input.collectionBindingProperties != null && {
1626
- collectionBindingProperties: se_ComponentPropertyBindingProperties(input.collectionBindingProperties, context),
1627
- }),
1628
- ...(input.componentName != null && { componentName: input.componentName }),
1629
- ...(input.concat != null && { concat: se_ComponentPropertyList(input.concat, context) }),
1630
- ...(input.condition != null && { condition: se_ComponentConditionProperty(input.condition, context) }),
1631
- ...(input.configured != null && { configured: input.configured }),
1632
- ...(input.defaultValue != null && { defaultValue: input.defaultValue }),
1633
- ...(input.event != null && { event: input.event }),
1634
- ...(input.importedValue != null && { importedValue: input.importedValue }),
1635
- ...(input.model != null && { model: input.model }),
1636
- ...(input.property != null && { property: input.property }),
1637
- ...(input.type != null && { type: input.type }),
1638
- ...(input.userAttribute != null && { userAttribute: input.userAttribute }),
1639
- ...(input.value != null && { value: input.value }),
1640
- };
1641
- };
1642
- const se_ComponentPropertyBindingProperties = (input, context) => {
1643
- return {
1644
- ...(input.field != null && { field: input.field }),
1645
- ...(input.property != null && { property: input.property }),
1646
- };
1575
+ return (0, smithy_client_1.take)(input, {
1576
+ bindingProperties: smithy_client_1._json,
1577
+ bindings: smithy_client_1._json,
1578
+ collectionBindingProperties: smithy_client_1._json,
1579
+ componentName: [],
1580
+ concat: (_) => se_ComponentPropertyList(_, context),
1581
+ condition: (_) => se_ComponentConditionProperty(_, context),
1582
+ configured: [],
1583
+ defaultValue: [],
1584
+ event: [],
1585
+ importedValue: [],
1586
+ model: [],
1587
+ property: [],
1588
+ type: [],
1589
+ userAttribute: [],
1590
+ value: [],
1591
+ });
1647
1592
  };
1648
1593
  const se_ComponentPropertyList = (input, context) => {
1649
1594
  return input
@@ -1652,116 +1597,71 @@ const se_ComponentPropertyList = (input, context) => {
1652
1597
  return se_ComponentProperty(entry, context);
1653
1598
  });
1654
1599
  };
1655
- const se_ComponentVariant = (input, context) => {
1656
- return {
1657
- ...(input.overrides != null && { overrides: se_ComponentOverrides(input.overrides, context) }),
1658
- ...(input.variantValues != null && { variantValues: se_ComponentVariantValues(input.variantValues, context) }),
1659
- };
1660
- };
1661
- const se_ComponentVariants = (input, context) => {
1662
- return input
1663
- .filter((e) => e != null)
1664
- .map((entry) => {
1665
- return se_ComponentVariant(entry, context);
1666
- });
1667
- };
1668
- const se_ComponentVariantValues = (input, context) => {
1669
- return Object.entries(input).reduce((acc, [key, value]) => {
1670
- if (value === null) {
1671
- return acc;
1672
- }
1673
- acc[key] = value;
1674
- return acc;
1675
- }, {});
1676
- };
1677
1600
  const se_CreateComponentData = (input, context) => {
1678
- return {
1679
- ...(input.bindingProperties != null && {
1680
- bindingProperties: se_ComponentBindingProperties(input.bindingProperties, context),
1681
- }),
1682
- ...(input.children != null && { children: se_ComponentChildList(input.children, context) }),
1683
- ...(input.collectionProperties != null && {
1684
- collectionProperties: se_ComponentCollectionProperties(input.collectionProperties, context),
1685
- }),
1686
- ...(input.componentType != null && { componentType: input.componentType }),
1687
- ...(input.events != null && { events: se_ComponentEvents(input.events, context) }),
1688
- ...(input.name != null && { name: input.name }),
1689
- ...(input.overrides != null && { overrides: se_ComponentOverrides(input.overrides, context) }),
1690
- ...(input.properties != null && { properties: se_ComponentProperties(input.properties, context) }),
1691
- ...(input.schemaVersion != null && { schemaVersion: input.schemaVersion }),
1692
- ...(input.sourceId != null && { sourceId: input.sourceId }),
1693
- ...(input.tags != null && { tags: se_Tags(input.tags, context) }),
1694
- ...(input.variants != null && { variants: se_ComponentVariants(input.variants, context) }),
1695
- };
1601
+ return (0, smithy_client_1.take)(input, {
1602
+ bindingProperties: (_) => se_ComponentBindingProperties(_, context),
1603
+ children: (_) => se_ComponentChildList(_, context),
1604
+ collectionProperties: (_) => se_ComponentCollectionProperties(_, context),
1605
+ componentType: [],
1606
+ events: (_) => se_ComponentEvents(_, context),
1607
+ name: [],
1608
+ overrides: smithy_client_1._json,
1609
+ properties: (_) => se_ComponentProperties(_, context),
1610
+ schemaVersion: [],
1611
+ sourceId: [],
1612
+ tags: smithy_client_1._json,
1613
+ variants: smithy_client_1._json,
1614
+ });
1696
1615
  };
1697
1616
  const se_CreateFormData = (input, context) => {
1698
- return {
1699
- ...(input.cta != null && { cta: se_FormCTA(input.cta, context) }),
1700
- ...(input.dataType != null && { dataType: se_FormDataTypeConfig(input.dataType, context) }),
1701
- ...(input.fields != null && { fields: se_FieldsMap(input.fields, context) }),
1702
- ...(input.formActionType != null && { formActionType: input.formActionType }),
1703
- ...(input.labelDecorator != null && { labelDecorator: input.labelDecorator }),
1704
- ...(input.name != null && { name: input.name }),
1705
- ...(input.schemaVersion != null && { schemaVersion: input.schemaVersion }),
1706
- ...(input.sectionalElements != null && {
1707
- sectionalElements: se_SectionalElementMap(input.sectionalElements, context),
1708
- }),
1709
- ...(input.style != null && { style: se_FormStyle(input.style, context) }),
1710
- ...(input.tags != null && { tags: se_Tags(input.tags, context) }),
1711
- };
1617
+ return (0, smithy_client_1.take)(input, {
1618
+ cta: smithy_client_1._json,
1619
+ dataType: smithy_client_1._json,
1620
+ fields: (_) => se_FieldsMap(_, context),
1621
+ formActionType: [],
1622
+ labelDecorator: [],
1623
+ name: [],
1624
+ schemaVersion: [],
1625
+ sectionalElements: smithy_client_1._json,
1626
+ style: smithy_client_1._json,
1627
+ tags: smithy_client_1._json,
1628
+ });
1712
1629
  };
1713
1630
  const se_CreateThemeData = (input, context) => {
1714
- return {
1715
- ...(input.name != null && { name: input.name }),
1716
- ...(input.overrides != null && { overrides: se_ThemeValuesList(input.overrides, context) }),
1717
- ...(input.tags != null && { tags: se_Tags(input.tags, context) }),
1718
- ...(input.values != null && { values: se_ThemeValuesList(input.values, context) }),
1719
- };
1720
- };
1721
- const se_ExchangeCodeForTokenRequestBody = (input, context) => {
1722
- return {
1723
- ...(input.clientId != null && { clientId: input.clientId }),
1724
- ...(input.code != null && { code: input.code }),
1725
- ...(input.redirectUri != null && { redirectUri: input.redirectUri }),
1726
- };
1631
+ return (0, smithy_client_1.take)(input, {
1632
+ name: [],
1633
+ overrides: (_) => se_ThemeValuesList(_, context),
1634
+ tags: smithy_client_1._json,
1635
+ values: (_) => se_ThemeValuesList(_, context),
1636
+ });
1727
1637
  };
1728
1638
  const se_FieldConfig = (input, context) => {
1729
- return {
1730
- ...(input.excluded != null && { excluded: input.excluded }),
1731
- ...(input.inputType != null && { inputType: se_FieldInputConfig(input.inputType, context) }),
1732
- ...(input.label != null && { label: input.label }),
1733
- ...(input.position != null && { position: se_FieldPosition(input.position, context) }),
1734
- ...(input.validations != null && { validations: se_ValidationsList(input.validations, context) }),
1735
- };
1639
+ return (0, smithy_client_1.take)(input, {
1640
+ excluded: [],
1641
+ inputType: (_) => se_FieldInputConfig(_, context),
1642
+ label: [],
1643
+ position: smithy_client_1._json,
1644
+ validations: smithy_client_1._json,
1645
+ });
1736
1646
  };
1737
1647
  const se_FieldInputConfig = (input, context) => {
1738
- return {
1739
- ...(input.defaultChecked != null && { defaultChecked: input.defaultChecked }),
1740
- ...(input.defaultCountryCode != null && { defaultCountryCode: input.defaultCountryCode }),
1741
- ...(input.defaultValue != null && { defaultValue: input.defaultValue }),
1742
- ...(input.descriptiveText != null && { descriptiveText: input.descriptiveText }),
1743
- ...(input.fileUploaderConfig != null && {
1744
- fileUploaderConfig: se_FileUploaderFieldConfig(input.fileUploaderConfig, context),
1745
- }),
1746
- ...(input.isArray != null && { isArray: input.isArray }),
1747
- ...(input.maxValue != null && { maxValue: (0, smithy_client_1.serializeFloat)(input.maxValue) }),
1748
- ...(input.minValue != null && { minValue: (0, smithy_client_1.serializeFloat)(input.minValue) }),
1749
- ...(input.name != null && { name: input.name }),
1750
- ...(input.placeholder != null && { placeholder: input.placeholder }),
1751
- ...(input.readOnly != null && { readOnly: input.readOnly }),
1752
- ...(input.required != null && { required: input.required }),
1753
- ...(input.step != null && { step: (0, smithy_client_1.serializeFloat)(input.step) }),
1754
- ...(input.type != null && { type: input.type }),
1755
- ...(input.value != null && { value: input.value }),
1756
- ...(input.valueMappings != null && { valueMappings: se_ValueMappings(input.valueMappings, context) }),
1757
- };
1758
- };
1759
- const se_FieldPosition = (input, context) => {
1760
- return models_0_1.FieldPosition.visit(input, {
1761
- below: (value) => ({ below: value }),
1762
- fixed: (value) => ({ fixed: value }),
1763
- rightOf: (value) => ({ rightOf: value }),
1764
- _: (name, value) => ({ name: value }),
1648
+ return (0, smithy_client_1.take)(input, {
1649
+ defaultChecked: [],
1650
+ defaultCountryCode: [],
1651
+ defaultValue: [],
1652
+ descriptiveText: [],
1653
+ fileUploaderConfig: smithy_client_1._json,
1654
+ isArray: [],
1655
+ maxValue: smithy_client_1.serializeFloat,
1656
+ minValue: smithy_client_1.serializeFloat,
1657
+ name: [],
1658
+ placeholder: [],
1659
+ readOnly: [],
1660
+ required: [],
1661
+ step: smithy_client_1.serializeFloat,
1662
+ type: [],
1663
+ value: [],
1664
+ valueMappings: (_) => se_ValueMappings(_, context),
1765
1665
  });
1766
1666
  };
1767
1667
  const se_FieldsMap = (input, context) => {
@@ -1773,96 +1673,12 @@ const se_FieldsMap = (input, context) => {
1773
1673
  return acc;
1774
1674
  }, {});
1775
1675
  };
1776
- const se_FieldValidationConfiguration = (input, context) => {
1777
- return {
1778
- ...(input.numValues != null && { numValues: se_NumValues(input.numValues, context) }),
1779
- ...(input.strValues != null && { strValues: se_StrValues(input.strValues, context) }),
1780
- ...(input.type != null && { type: input.type }),
1781
- ...(input.validationMessage != null && { validationMessage: input.validationMessage }),
1782
- };
1783
- };
1784
- const se_FileUploaderFieldConfig = (input, context) => {
1785
- return {
1786
- ...(input.acceptedFileTypes != null && { acceptedFileTypes: se_StrValues(input.acceptedFileTypes, context) }),
1787
- ...(input.accessLevel != null && { accessLevel: input.accessLevel }),
1788
- ...(input.isResumable != null && { isResumable: input.isResumable }),
1789
- ...(input.maxFileCount != null && { maxFileCount: input.maxFileCount }),
1790
- ...(input.maxSize != null && { maxSize: input.maxSize }),
1791
- ...(input.showThumbnails != null && { showThumbnails: input.showThumbnails }),
1792
- };
1793
- };
1794
- const se_FormBindingElement = (input, context) => {
1795
- return {
1796
- ...(input.element != null && { element: input.element }),
1797
- ...(input.property != null && { property: input.property }),
1798
- };
1799
- };
1800
- const se_FormBindings = (input, context) => {
1801
- return Object.entries(input).reduce((acc, [key, value]) => {
1802
- if (value === null) {
1803
- return acc;
1804
- }
1805
- acc[key] = se_FormBindingElement(value, context);
1806
- return acc;
1807
- }, {});
1808
- };
1809
- const se_FormButton = (input, context) => {
1810
- return {
1811
- ...(input.children != null && { children: input.children }),
1812
- ...(input.excluded != null && { excluded: input.excluded }),
1813
- ...(input.position != null && { position: se_FieldPosition(input.position, context) }),
1814
- };
1815
- };
1816
- const se_FormCTA = (input, context) => {
1817
- return {
1818
- ...(input.cancel != null && { cancel: se_FormButton(input.cancel, context) }),
1819
- ...(input.clear != null && { clear: se_FormButton(input.clear, context) }),
1820
- ...(input.position != null && { position: input.position }),
1821
- ...(input.submit != null && { submit: se_FormButton(input.submit, context) }),
1822
- };
1823
- };
1824
- const se_FormDataTypeConfig = (input, context) => {
1825
- return {
1826
- ...(input.dataSourceType != null && { dataSourceType: input.dataSourceType }),
1827
- ...(input.dataTypeName != null && { dataTypeName: input.dataTypeName }),
1828
- };
1829
- };
1830
- const se_FormInputBindingProperties = (input, context) => {
1831
- return Object.entries(input).reduce((acc, [key, value]) => {
1832
- if (value === null) {
1833
- return acc;
1834
- }
1835
- acc[key] = se_FormInputBindingPropertiesValue(value, context);
1836
- return acc;
1837
- }, {});
1838
- };
1839
- const se_FormInputBindingPropertiesValue = (input, context) => {
1840
- return {
1841
- ...(input.bindingProperties != null && {
1842
- bindingProperties: se_FormInputBindingPropertiesValueProperties(input.bindingProperties, context),
1843
- }),
1844
- ...(input.type != null && { type: input.type }),
1845
- };
1846
- };
1847
- const se_FormInputBindingPropertiesValueProperties = (input, context) => {
1848
- return {
1849
- ...(input.model != null && { model: input.model }),
1850
- };
1851
- };
1852
1676
  const se_FormInputValueProperty = (input, context) => {
1853
- return {
1854
- ...(input.bindingProperties != null && {
1855
- bindingProperties: se_FormInputValuePropertyBindingProperties(input.bindingProperties, context),
1856
- }),
1857
- ...(input.concat != null && { concat: se_FormInputValuePropertyList(input.concat, context) }),
1858
- ...(input.value != null && { value: input.value }),
1859
- };
1860
- };
1861
- const se_FormInputValuePropertyBindingProperties = (input, context) => {
1862
- return {
1863
- ...(input.field != null && { field: input.field }),
1864
- ...(input.property != null && { property: input.property }),
1865
- };
1677
+ return (0, smithy_client_1.take)(input, {
1678
+ bindingProperties: smithy_client_1._json,
1679
+ concat: (_) => se_FormInputValuePropertyList(_, context),
1680
+ value: [],
1681
+ });
1866
1682
  };
1867
1683
  const se_FormInputValuePropertyList = (input, context) => {
1868
1684
  return input
@@ -1871,50 +1687,22 @@ const se_FormInputValuePropertyList = (input, context) => {
1871
1687
  return se_FormInputValueProperty(entry, context);
1872
1688
  });
1873
1689
  };
1874
- const se_FormStyle = (input, context) => {
1875
- return {
1876
- ...(input.horizontalGap != null && { horizontalGap: se_FormStyleConfig(input.horizontalGap, context) }),
1877
- ...(input.outerPadding != null && { outerPadding: se_FormStyleConfig(input.outerPadding, context) }),
1878
- ...(input.verticalGap != null && { verticalGap: se_FormStyleConfig(input.verticalGap, context) }),
1879
- };
1880
- };
1881
- const se_FormStyleConfig = (input, context) => {
1882
- return models_0_1.FormStyleConfig.visit(input, {
1883
- tokenReference: (value) => ({ tokenReference: value }),
1884
- value: (value) => ({ value: value }),
1885
- _: (name, value) => ({ name: value }),
1886
- });
1887
- };
1888
- const se_IdentifierList = (input, context) => {
1889
- return input
1890
- .filter((e) => e != null)
1891
- .map((entry) => {
1892
- return entry;
1893
- });
1894
- };
1895
1690
  const se_MutationActionSetStateParameter = (input, context) => {
1896
- return {
1897
- ...(input.componentName != null && { componentName: input.componentName }),
1898
- ...(input.property != null && { property: input.property }),
1899
- ...(input.set != null && { set: se_ComponentProperty(input.set, context) }),
1900
- };
1901
- };
1902
- const se_NumValues = (input, context) => {
1903
- return input
1904
- .filter((e) => e != null)
1905
- .map((entry) => {
1906
- return entry;
1691
+ return (0, smithy_client_1.take)(input, {
1692
+ componentName: [],
1693
+ property: [],
1694
+ set: (_) => se_ComponentProperty(_, context),
1907
1695
  });
1908
1696
  };
1909
1697
  const se_Predicate = (input, context) => {
1910
- return {
1911
- ...(input.and != null && { and: se_PredicateList(input.and, context) }),
1912
- ...(input.field != null && { field: input.field }),
1913
- ...(input.operand != null && { operand: input.operand }),
1914
- ...(input.operandType != null && { operandType: input.operandType }),
1915
- ...(input.operator != null && { operator: input.operator }),
1916
- ...(input.or != null && { or: se_PredicateList(input.or, context) }),
1917
- };
1698
+ return (0, smithy_client_1.take)(input, {
1699
+ and: (_) => se_PredicateList(_, context),
1700
+ field: [],
1701
+ operand: [],
1702
+ operandType: [],
1703
+ operator: [],
1704
+ or: (_) => se_PredicateList(_, context),
1705
+ });
1918
1706
  };
1919
1707
  const se_PredicateList = (input, context) => {
1920
1708
  return input
@@ -1923,76 +1711,17 @@ const se_PredicateList = (input, context) => {
1923
1711
  return se_Predicate(entry, context);
1924
1712
  });
1925
1713
  };
1926
- const se_PutMetadataFlagBody = (input, context) => {
1927
- return {
1928
- ...(input.newValue != null && { newValue: input.newValue }),
1929
- };
1930
- };
1931
- const se_RefreshTokenRequestBody = (input, context) => {
1932
- return {
1933
- ...(input.clientId != null && { clientId: input.clientId }),
1934
- ...(input.token != null && { token: input.token }),
1935
- };
1936
- };
1937
- const se_SectionalElement = (input, context) => {
1938
- return {
1939
- ...(input.excluded != null && { excluded: input.excluded }),
1940
- ...(input.level != null && { level: input.level }),
1941
- ...(input.orientation != null && { orientation: input.orientation }),
1942
- ...(input.position != null && { position: se_FieldPosition(input.position, context) }),
1943
- ...(input.text != null && { text: input.text }),
1944
- ...(input.type != null && { type: input.type }),
1945
- };
1946
- };
1947
- const se_SectionalElementMap = (input, context) => {
1948
- return Object.entries(input).reduce((acc, [key, value]) => {
1949
- if (value === null) {
1950
- return acc;
1951
- }
1952
- acc[key] = se_SectionalElement(value, context);
1953
- return acc;
1954
- }, {});
1955
- };
1956
- const se_SortProperty = (input, context) => {
1957
- return {
1958
- ...(input.direction != null && { direction: input.direction }),
1959
- ...(input.field != null && { field: input.field }),
1960
- };
1961
- };
1962
- const se_SortPropertyList = (input, context) => {
1963
- return input
1964
- .filter((e) => e != null)
1965
- .map((entry) => {
1966
- return se_SortProperty(entry, context);
1967
- });
1968
- };
1969
- const se_StrValues = (input, context) => {
1970
- return input
1971
- .filter((e) => e != null)
1972
- .map((entry) => {
1973
- return entry;
1974
- });
1975
- };
1976
- const se_Tags = (input, context) => {
1977
- return Object.entries(input).reduce((acc, [key, value]) => {
1978
- if (value === null) {
1979
- return acc;
1980
- }
1981
- acc[key] = value;
1982
- return acc;
1983
- }, {});
1984
- };
1985
1714
  const se_ThemeValue = (input, context) => {
1986
- return {
1987
- ...(input.children != null && { children: se_ThemeValuesList(input.children, context) }),
1988
- ...(input.value != null && { value: input.value }),
1989
- };
1715
+ return (0, smithy_client_1.take)(input, {
1716
+ children: (_) => se_ThemeValuesList(_, context),
1717
+ value: [],
1718
+ });
1990
1719
  };
1991
1720
  const se_ThemeValues = (input, context) => {
1992
- return {
1993
- ...(input.key != null && { key: input.key }),
1994
- ...(input.value != null && { value: se_ThemeValue(input.value, context) }),
1995
- };
1721
+ return (0, smithy_client_1.take)(input, {
1722
+ key: [],
1723
+ value: (_) => se_ThemeValue(_, context),
1724
+ });
1996
1725
  };
1997
1726
  const se_ThemeValuesList = (input, context) => {
1998
1727
  return input
@@ -2002,60 +1731,47 @@ const se_ThemeValuesList = (input, context) => {
2002
1731
  });
2003
1732
  };
2004
1733
  const se_UpdateComponentData = (input, context) => {
2005
- return {
2006
- ...(input.bindingProperties != null && {
2007
- bindingProperties: se_ComponentBindingProperties(input.bindingProperties, context),
2008
- }),
2009
- ...(input.children != null && { children: se_ComponentChildList(input.children, context) }),
2010
- ...(input.collectionProperties != null && {
2011
- collectionProperties: se_ComponentCollectionProperties(input.collectionProperties, context),
2012
- }),
2013
- ...(input.componentType != null && { componentType: input.componentType }),
2014
- ...(input.events != null && { events: se_ComponentEvents(input.events, context) }),
2015
- ...(input.id != null && { id: input.id }),
2016
- ...(input.name != null && { name: input.name }),
2017
- ...(input.overrides != null && { overrides: se_ComponentOverrides(input.overrides, context) }),
2018
- ...(input.properties != null && { properties: se_ComponentProperties(input.properties, context) }),
2019
- ...(input.schemaVersion != null && { schemaVersion: input.schemaVersion }),
2020
- ...(input.sourceId != null && { sourceId: input.sourceId }),
2021
- ...(input.variants != null && { variants: se_ComponentVariants(input.variants, context) }),
2022
- };
1734
+ return (0, smithy_client_1.take)(input, {
1735
+ bindingProperties: (_) => se_ComponentBindingProperties(_, context),
1736
+ children: (_) => se_ComponentChildList(_, context),
1737
+ collectionProperties: (_) => se_ComponentCollectionProperties(_, context),
1738
+ componentType: [],
1739
+ events: (_) => se_ComponentEvents(_, context),
1740
+ id: [],
1741
+ name: [],
1742
+ overrides: smithy_client_1._json,
1743
+ properties: (_) => se_ComponentProperties(_, context),
1744
+ schemaVersion: [],
1745
+ sourceId: [],
1746
+ variants: smithy_client_1._json,
1747
+ });
2023
1748
  };
2024
1749
  const se_UpdateFormData = (input, context) => {
2025
- return {
2026
- ...(input.cta != null && { cta: se_FormCTA(input.cta, context) }),
2027
- ...(input.dataType != null && { dataType: se_FormDataTypeConfig(input.dataType, context) }),
2028
- ...(input.fields != null && { fields: se_FieldsMap(input.fields, context) }),
2029
- ...(input.formActionType != null && { formActionType: input.formActionType }),
2030
- ...(input.labelDecorator != null && { labelDecorator: input.labelDecorator }),
2031
- ...(input.name != null && { name: input.name }),
2032
- ...(input.schemaVersion != null && { schemaVersion: input.schemaVersion }),
2033
- ...(input.sectionalElements != null && {
2034
- sectionalElements: se_SectionalElementMap(input.sectionalElements, context),
2035
- }),
2036
- ...(input.style != null && { style: se_FormStyle(input.style, context) }),
2037
- };
1750
+ return (0, smithy_client_1.take)(input, {
1751
+ cta: smithy_client_1._json,
1752
+ dataType: smithy_client_1._json,
1753
+ fields: (_) => se_FieldsMap(_, context),
1754
+ formActionType: [],
1755
+ labelDecorator: [],
1756
+ name: [],
1757
+ schemaVersion: [],
1758
+ sectionalElements: smithy_client_1._json,
1759
+ style: smithy_client_1._json,
1760
+ });
2038
1761
  };
2039
1762
  const se_UpdateThemeData = (input, context) => {
2040
- return {
2041
- ...(input.id != null && { id: input.id }),
2042
- ...(input.name != null && { name: input.name }),
2043
- ...(input.overrides != null && { overrides: se_ThemeValuesList(input.overrides, context) }),
2044
- ...(input.values != null && { values: se_ThemeValuesList(input.values, context) }),
2045
- };
2046
- };
2047
- const se_ValidationsList = (input, context) => {
2048
- return input
2049
- .filter((e) => e != null)
2050
- .map((entry) => {
2051
- return se_FieldValidationConfiguration(entry, context);
1763
+ return (0, smithy_client_1.take)(input, {
1764
+ id: [],
1765
+ name: [],
1766
+ overrides: (_) => se_ThemeValuesList(_, context),
1767
+ values: (_) => se_ThemeValuesList(_, context),
2052
1768
  });
2053
1769
  };
2054
1770
  const se_ValueMapping = (input, context) => {
2055
- return {
2056
- ...(input.displayValue != null && { displayValue: se_FormInputValueProperty(input.displayValue, context) }),
2057
- ...(input.value != null && { value: se_FormInputValueProperty(input.value, context) }),
2058
- };
1771
+ return (0, smithy_client_1.take)(input, {
1772
+ displayValue: (_) => se_FormInputValueProperty(_, context),
1773
+ value: (_) => se_FormInputValueProperty(_, context),
1774
+ });
2059
1775
  };
2060
1776
  const se_ValueMappingList = (input, context) => {
2061
1777
  return input
@@ -2065,48 +1781,44 @@ const se_ValueMappingList = (input, context) => {
2065
1781
  });
2066
1782
  };
2067
1783
  const se_ValueMappings = (input, context) => {
2068
- return {
2069
- ...(input.bindingProperties != null && {
2070
- bindingProperties: se_FormInputBindingProperties(input.bindingProperties, context),
2071
- }),
2072
- ...(input.values != null && { values: se_ValueMappingList(input.values, context) }),
2073
- };
1784
+ return (0, smithy_client_1.take)(input, {
1785
+ bindingProperties: smithy_client_1._json,
1786
+ values: (_) => se_ValueMappingList(_, context),
1787
+ });
2074
1788
  };
2075
1789
  const de_ActionParameters = (output, context) => {
2076
- return {
2077
- anchor: output.anchor != null ? de_ComponentProperty(output.anchor, context) : undefined,
2078
- fields: output.fields != null ? de_ComponentProperties(output.fields, context) : undefined,
2079
- global: output.global != null ? de_ComponentProperty(output.global, context) : undefined,
2080
- id: output.id != null ? de_ComponentProperty(output.id, context) : undefined,
2081
- model: (0, smithy_client_1.expectString)(output.model),
2082
- state: output.state != null ? de_MutationActionSetStateParameter(output.state, context) : undefined,
2083
- target: output.target != null ? de_ComponentProperty(output.target, context) : undefined,
2084
- type: output.type != null ? de_ComponentProperty(output.type, context) : undefined,
2085
- url: output.url != null ? de_ComponentProperty(output.url, context) : undefined,
2086
- };
1790
+ return (0, smithy_client_1.take)(output, {
1791
+ anchor: (_) => de_ComponentProperty(_, context),
1792
+ fields: (_) => de_ComponentProperties(_, context),
1793
+ global: (_) => de_ComponentProperty(_, context),
1794
+ id: (_) => de_ComponentProperty(_, context),
1795
+ model: smithy_client_1.expectString,
1796
+ state: (_) => de_MutationActionSetStateParameter(_, context),
1797
+ target: (_) => de_ComponentProperty(_, context),
1798
+ type: (_) => de_ComponentProperty(_, context),
1799
+ url: (_) => de_ComponentProperty(_, context),
1800
+ });
2087
1801
  };
2088
1802
  const de_Component = (output, context) => {
2089
- return {
2090
- appId: (0, smithy_client_1.expectString)(output.appId),
2091
- bindingProperties: output.bindingProperties != null ? de_ComponentBindingProperties(output.bindingProperties, context) : undefined,
2092
- children: output.children != null ? de_ComponentChildList(output.children, context) : undefined,
2093
- collectionProperties: output.collectionProperties != null
2094
- ? de_ComponentCollectionProperties(output.collectionProperties, context)
2095
- : undefined,
2096
- componentType: (0, smithy_client_1.expectString)(output.componentType),
2097
- createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.createdAt)) : undefined,
2098
- environmentName: (0, smithy_client_1.expectString)(output.environmentName),
2099
- events: output.events != null ? de_ComponentEvents(output.events, context) : undefined,
2100
- id: (0, smithy_client_1.expectString)(output.id),
2101
- modifiedAt: output.modifiedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.modifiedAt)) : undefined,
2102
- name: (0, smithy_client_1.expectString)(output.name),
2103
- overrides: output.overrides != null ? de_ComponentOverrides(output.overrides, context) : undefined,
2104
- properties: output.properties != null ? de_ComponentProperties(output.properties, context) : undefined,
2105
- schemaVersion: (0, smithy_client_1.expectString)(output.schemaVersion),
2106
- sourceId: (0, smithy_client_1.expectString)(output.sourceId),
2107
- tags: output.tags != null ? de_Tags(output.tags, context) : undefined,
2108
- variants: output.variants != null ? de_ComponentVariants(output.variants, context) : undefined,
2109
- };
1803
+ return (0, smithy_client_1.take)(output, {
1804
+ appId: smithy_client_1.expectString,
1805
+ bindingProperties: (_) => de_ComponentBindingProperties(_, context),
1806
+ children: (_) => de_ComponentChildList(_, context),
1807
+ collectionProperties: (_) => de_ComponentCollectionProperties(_, context),
1808
+ componentType: smithy_client_1.expectString,
1809
+ createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1810
+ environmentName: smithy_client_1.expectString,
1811
+ events: (_) => de_ComponentEvents(_, context),
1812
+ id: smithy_client_1.expectString,
1813
+ modifiedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1814
+ name: smithy_client_1.expectString,
1815
+ overrides: smithy_client_1._json,
1816
+ properties: (_) => de_ComponentProperties(_, context),
1817
+ schemaVersion: smithy_client_1.expectString,
1818
+ sourceId: smithy_client_1.expectString,
1819
+ tags: smithy_client_1._json,
1820
+ variants: smithy_client_1._json,
1821
+ });
2110
1822
  };
2111
1823
  const de_ComponentBindingProperties = (output, context) => {
2112
1824
  return Object.entries(output).reduce((acc, [key, value]) => {
@@ -2118,43 +1830,38 @@ const de_ComponentBindingProperties = (output, context) => {
2118
1830
  }, {});
2119
1831
  };
2120
1832
  const de_ComponentBindingPropertiesValue = (output, context) => {
2121
- return {
2122
- bindingProperties: output.bindingProperties != null
2123
- ? de_ComponentBindingPropertiesValueProperties(output.bindingProperties, context)
2124
- : undefined,
2125
- defaultValue: (0, smithy_client_1.expectString)(output.defaultValue),
2126
- type: (0, smithy_client_1.expectString)(output.type),
2127
- };
1833
+ return (0, smithy_client_1.take)(output, {
1834
+ bindingProperties: (_) => de_ComponentBindingPropertiesValueProperties(_, context),
1835
+ defaultValue: smithy_client_1.expectString,
1836
+ type: smithy_client_1.expectString,
1837
+ });
2128
1838
  };
2129
1839
  const de_ComponentBindingPropertiesValueProperties = (output, context) => {
2130
- return {
2131
- bucket: (0, smithy_client_1.expectString)(output.bucket),
2132
- defaultValue: (0, smithy_client_1.expectString)(output.defaultValue),
2133
- field: (0, smithy_client_1.expectString)(output.field),
2134
- key: (0, smithy_client_1.expectString)(output.key),
2135
- model: (0, smithy_client_1.expectString)(output.model),
2136
- predicates: output.predicates != null ? de_PredicateList(output.predicates, context) : undefined,
2137
- slotName: (0, smithy_client_1.expectString)(output.slotName),
2138
- userAttribute: (0, smithy_client_1.expectString)(output.userAttribute),
2139
- };
1840
+ return (0, smithy_client_1.take)(output, {
1841
+ bucket: smithy_client_1.expectString,
1842
+ defaultValue: smithy_client_1.expectString,
1843
+ field: smithy_client_1.expectString,
1844
+ key: smithy_client_1.expectString,
1845
+ model: smithy_client_1.expectString,
1846
+ predicates: (_) => de_PredicateList(_, context),
1847
+ slotName: smithy_client_1.expectString,
1848
+ userAttribute: smithy_client_1.expectString,
1849
+ });
2140
1850
  };
2141
1851
  const de_ComponentChild = (output, context) => {
2142
- return {
2143
- children: output.children != null ? de_ComponentChildList(output.children, context) : undefined,
2144
- componentType: (0, smithy_client_1.expectString)(output.componentType),
2145
- events: output.events != null ? de_ComponentEvents(output.events, context) : undefined,
2146
- name: (0, smithy_client_1.expectString)(output.name),
2147
- properties: output.properties != null ? de_ComponentProperties(output.properties, context) : undefined,
2148
- sourceId: (0, smithy_client_1.expectString)(output.sourceId),
2149
- };
1852
+ return (0, smithy_client_1.take)(output, {
1853
+ children: (_) => de_ComponentChildList(_, context),
1854
+ componentType: smithy_client_1.expectString,
1855
+ events: (_) => de_ComponentEvents(_, context),
1856
+ name: smithy_client_1.expectString,
1857
+ properties: (_) => de_ComponentProperties(_, context),
1858
+ sourceId: smithy_client_1.expectString,
1859
+ });
2150
1860
  };
2151
1861
  const de_ComponentChildList = (output, context) => {
2152
1862
  const retVal = (output || [])
2153
1863
  .filter((e) => e != null)
2154
1864
  .map((entry) => {
2155
- if (entry === null) {
2156
- return null;
2157
- }
2158
1865
  return de_ComponentChild(entry, context);
2159
1866
  });
2160
1867
  return retVal;
@@ -2169,30 +1876,30 @@ const de_ComponentCollectionProperties = (output, context) => {
2169
1876
  }, {});
2170
1877
  };
2171
1878
  const de_ComponentConditionProperty = (output, context) => {
2172
- return {
2173
- else: output.else != null ? de_ComponentProperty(output.else, context) : undefined,
2174
- field: (0, smithy_client_1.expectString)(output.field),
2175
- operand: (0, smithy_client_1.expectString)(output.operand),
2176
- operandType: (0, smithy_client_1.expectString)(output.operandType),
2177
- operator: (0, smithy_client_1.expectString)(output.operator),
2178
- property: (0, smithy_client_1.expectString)(output.property),
2179
- then: output.then != null ? de_ComponentProperty(output.then, context) : undefined,
2180
- };
1879
+ return (0, smithy_client_1.take)(output, {
1880
+ else: (_) => de_ComponentProperty(_, context),
1881
+ field: smithy_client_1.expectString,
1882
+ operand: smithy_client_1.expectString,
1883
+ operandType: smithy_client_1.expectString,
1884
+ operator: smithy_client_1.expectString,
1885
+ property: smithy_client_1.expectString,
1886
+ then: (_) => de_ComponentProperty(_, context),
1887
+ });
2181
1888
  };
2182
1889
  const de_ComponentDataConfiguration = (output, context) => {
2183
- return {
2184
- identifiers: output.identifiers != null ? de_IdentifierList(output.identifiers, context) : undefined,
2185
- model: (0, smithy_client_1.expectString)(output.model),
2186
- predicate: output.predicate != null ? de_Predicate(output.predicate, context) : undefined,
2187
- sort: output.sort != null ? de_SortPropertyList(output.sort, context) : undefined,
2188
- };
1890
+ return (0, smithy_client_1.take)(output, {
1891
+ identifiers: smithy_client_1._json,
1892
+ model: smithy_client_1.expectString,
1893
+ predicate: (_) => de_Predicate(_, context),
1894
+ sort: smithy_client_1._json,
1895
+ });
2189
1896
  };
2190
1897
  const de_ComponentEvent = (output, context) => {
2191
- return {
2192
- action: (0, smithy_client_1.expectString)(output.action),
2193
- bindingEvent: (0, smithy_client_1.expectString)(output.bindingEvent),
2194
- parameters: output.parameters != null ? de_ActionParameters(output.parameters, context) : undefined,
2195
- };
1898
+ return (0, smithy_client_1.take)(output, {
1899
+ action: smithy_client_1.expectString,
1900
+ bindingEvent: smithy_client_1.expectString,
1901
+ parameters: (_) => de_ActionParameters(_, context),
1902
+ });
2196
1903
  };
2197
1904
  const de_ComponentEvents = (output, context) => {
2198
1905
  return Object.entries(output).reduce((acc, [key, value]) => {
@@ -2207,31 +1914,10 @@ const de_ComponentList = (output, context) => {
2207
1914
  const retVal = (output || [])
2208
1915
  .filter((e) => e != null)
2209
1916
  .map((entry) => {
2210
- if (entry === null) {
2211
- return null;
2212
- }
2213
1917
  return de_Component(entry, context);
2214
1918
  });
2215
1919
  return retVal;
2216
1920
  };
2217
- const de_ComponentOverrides = (output, context) => {
2218
- return Object.entries(output).reduce((acc, [key, value]) => {
2219
- if (value === null) {
2220
- return acc;
2221
- }
2222
- acc[key] = de_ComponentOverridesValue(value, context);
2223
- return acc;
2224
- }, {});
2225
- };
2226
- const de_ComponentOverridesValue = (output, context) => {
2227
- return Object.entries(output).reduce((acc, [key, value]) => {
2228
- if (value === null) {
2229
- return acc;
2230
- }
2231
- acc[key] = (0, smithy_client_1.expectString)(value);
2232
- return acc;
2233
- }, {});
2234
- };
2235
1921
  const de_ComponentProperties = (output, context) => {
2236
1922
  return Object.entries(output).reduce((acc, [key, value]) => {
2237
1923
  if (value === null) {
@@ -2242,140 +1928,60 @@ const de_ComponentProperties = (output, context) => {
2242
1928
  }, {});
2243
1929
  };
2244
1930
  const de_ComponentProperty = (output, context) => {
2245
- return {
2246
- bindingProperties: output.bindingProperties != null
2247
- ? de_ComponentPropertyBindingProperties(output.bindingProperties, context)
2248
- : undefined,
2249
- bindings: output.bindings != null ? de_FormBindings(output.bindings, context) : undefined,
2250
- collectionBindingProperties: output.collectionBindingProperties != null
2251
- ? de_ComponentPropertyBindingProperties(output.collectionBindingProperties, context)
2252
- : undefined,
2253
- componentName: (0, smithy_client_1.expectString)(output.componentName),
2254
- concat: output.concat != null ? de_ComponentPropertyList(output.concat, context) : undefined,
2255
- condition: output.condition != null ? de_ComponentConditionProperty(output.condition, context) : undefined,
2256
- configured: (0, smithy_client_1.expectBoolean)(output.configured),
2257
- defaultValue: (0, smithy_client_1.expectString)(output.defaultValue),
2258
- event: (0, smithy_client_1.expectString)(output.event),
2259
- importedValue: (0, smithy_client_1.expectString)(output.importedValue),
2260
- model: (0, smithy_client_1.expectString)(output.model),
2261
- property: (0, smithy_client_1.expectString)(output.property),
2262
- type: (0, smithy_client_1.expectString)(output.type),
2263
- userAttribute: (0, smithy_client_1.expectString)(output.userAttribute),
2264
- value: (0, smithy_client_1.expectString)(output.value),
2265
- };
2266
- };
2267
- const de_ComponentPropertyBindingProperties = (output, context) => {
2268
- return {
2269
- field: (0, smithy_client_1.expectString)(output.field),
2270
- property: (0, smithy_client_1.expectString)(output.property),
2271
- };
1931
+ return (0, smithy_client_1.take)(output, {
1932
+ bindingProperties: smithy_client_1._json,
1933
+ bindings: smithy_client_1._json,
1934
+ collectionBindingProperties: smithy_client_1._json,
1935
+ componentName: smithy_client_1.expectString,
1936
+ concat: (_) => de_ComponentPropertyList(_, context),
1937
+ condition: (_) => de_ComponentConditionProperty(_, context),
1938
+ configured: smithy_client_1.expectBoolean,
1939
+ defaultValue: smithy_client_1.expectString,
1940
+ event: smithy_client_1.expectString,
1941
+ importedValue: smithy_client_1.expectString,
1942
+ model: smithy_client_1.expectString,
1943
+ property: smithy_client_1.expectString,
1944
+ type: smithy_client_1.expectString,
1945
+ userAttribute: smithy_client_1.expectString,
1946
+ value: smithy_client_1.expectString,
1947
+ });
2272
1948
  };
2273
1949
  const de_ComponentPropertyList = (output, context) => {
2274
1950
  const retVal = (output || [])
2275
1951
  .filter((e) => e != null)
2276
1952
  .map((entry) => {
2277
- if (entry === null) {
2278
- return null;
2279
- }
2280
1953
  return de_ComponentProperty(entry, context);
2281
1954
  });
2282
1955
  return retVal;
2283
1956
  };
2284
- const de_ComponentSummary = (output, context) => {
2285
- return {
2286
- appId: (0, smithy_client_1.expectString)(output.appId),
2287
- componentType: (0, smithy_client_1.expectString)(output.componentType),
2288
- environmentName: (0, smithy_client_1.expectString)(output.environmentName),
2289
- id: (0, smithy_client_1.expectString)(output.id),
2290
- name: (0, smithy_client_1.expectString)(output.name),
2291
- };
2292
- };
2293
- const de_ComponentSummaryList = (output, context) => {
2294
- const retVal = (output || [])
2295
- .filter((e) => e != null)
2296
- .map((entry) => {
2297
- if (entry === null) {
2298
- return null;
2299
- }
2300
- return de_ComponentSummary(entry, context);
2301
- });
2302
- return retVal;
2303
- };
2304
- const de_ComponentVariant = (output, context) => {
2305
- return {
2306
- overrides: output.overrides != null ? de_ComponentOverrides(output.overrides, context) : undefined,
2307
- variantValues: output.variantValues != null ? de_ComponentVariantValues(output.variantValues, context) : undefined,
2308
- };
2309
- };
2310
- const de_ComponentVariants = (output, context) => {
2311
- const retVal = (output || [])
2312
- .filter((e) => e != null)
2313
- .map((entry) => {
2314
- if (entry === null) {
2315
- return null;
2316
- }
2317
- return de_ComponentVariant(entry, context);
2318
- });
2319
- return retVal;
2320
- };
2321
- const de_ComponentVariantValues = (output, context) => {
2322
- return Object.entries(output).reduce((acc, [key, value]) => {
2323
- if (value === null) {
2324
- return acc;
2325
- }
2326
- acc[key] = (0, smithy_client_1.expectString)(value);
2327
- return acc;
2328
- }, {});
2329
- };
2330
- const de_FeaturesMap = (output, context) => {
2331
- return Object.entries(output).reduce((acc, [key, value]) => {
2332
- if (value === null) {
2333
- return acc;
2334
- }
2335
- acc[key] = (0, smithy_client_1.expectString)(value);
2336
- return acc;
2337
- }, {});
2338
- };
2339
1957
  const de_FieldConfig = (output, context) => {
2340
- return {
2341
- excluded: (0, smithy_client_1.expectBoolean)(output.excluded),
2342
- inputType: output.inputType != null ? de_FieldInputConfig(output.inputType, context) : undefined,
2343
- label: (0, smithy_client_1.expectString)(output.label),
2344
- position: output.position != null ? de_FieldPosition((0, smithy_client_1.expectUnion)(output.position), context) : undefined,
2345
- validations: output.validations != null ? de_ValidationsList(output.validations, context) : undefined,
2346
- };
1958
+ return (0, smithy_client_1.take)(output, {
1959
+ excluded: smithy_client_1.expectBoolean,
1960
+ inputType: (_) => de_FieldInputConfig(_, context),
1961
+ label: smithy_client_1.expectString,
1962
+ position: (_) => (0, smithy_client_1._json)((0, smithy_client_1.expectUnion)(_)),
1963
+ validations: smithy_client_1._json,
1964
+ });
2347
1965
  };
2348
1966
  const de_FieldInputConfig = (output, context) => {
2349
- return {
2350
- defaultChecked: (0, smithy_client_1.expectBoolean)(output.defaultChecked),
2351
- defaultCountryCode: (0, smithy_client_1.expectString)(output.defaultCountryCode),
2352
- defaultValue: (0, smithy_client_1.expectString)(output.defaultValue),
2353
- descriptiveText: (0, smithy_client_1.expectString)(output.descriptiveText),
2354
- fileUploaderConfig: output.fileUploaderConfig != null ? de_FileUploaderFieldConfig(output.fileUploaderConfig, context) : undefined,
2355
- isArray: (0, smithy_client_1.expectBoolean)(output.isArray),
2356
- maxValue: (0, smithy_client_1.limitedParseFloat32)(output.maxValue),
2357
- minValue: (0, smithy_client_1.limitedParseFloat32)(output.minValue),
2358
- name: (0, smithy_client_1.expectString)(output.name),
2359
- placeholder: (0, smithy_client_1.expectString)(output.placeholder),
2360
- readOnly: (0, smithy_client_1.expectBoolean)(output.readOnly),
2361
- required: (0, smithy_client_1.expectBoolean)(output.required),
2362
- step: (0, smithy_client_1.limitedParseFloat32)(output.step),
2363
- type: (0, smithy_client_1.expectString)(output.type),
2364
- value: (0, smithy_client_1.expectString)(output.value),
2365
- valueMappings: output.valueMappings != null ? de_ValueMappings(output.valueMappings, context) : undefined,
2366
- };
2367
- };
2368
- const de_FieldPosition = (output, context) => {
2369
- if ((0, smithy_client_1.expectString)(output.below) !== undefined) {
2370
- return { below: (0, smithy_client_1.expectString)(output.below) };
2371
- }
2372
- if ((0, smithy_client_1.expectString)(output.fixed) !== undefined) {
2373
- return { fixed: (0, smithy_client_1.expectString)(output.fixed) };
2374
- }
2375
- if ((0, smithy_client_1.expectString)(output.rightOf) !== undefined) {
2376
- return { rightOf: (0, smithy_client_1.expectString)(output.rightOf) };
2377
- }
2378
- return { $unknown: Object.entries(output)[0] };
1967
+ return (0, smithy_client_1.take)(output, {
1968
+ defaultChecked: smithy_client_1.expectBoolean,
1969
+ defaultCountryCode: smithy_client_1.expectString,
1970
+ defaultValue: smithy_client_1.expectString,
1971
+ descriptiveText: smithy_client_1.expectString,
1972
+ fileUploaderConfig: smithy_client_1._json,
1973
+ isArray: smithy_client_1.expectBoolean,
1974
+ maxValue: smithy_client_1.limitedParseFloat32,
1975
+ minValue: smithy_client_1.limitedParseFloat32,
1976
+ name: smithy_client_1.expectString,
1977
+ placeholder: smithy_client_1.expectString,
1978
+ readOnly: smithy_client_1.expectBoolean,
1979
+ required: smithy_client_1.expectBoolean,
1980
+ step: smithy_client_1.limitedParseFloat32,
1981
+ type: smithy_client_1.expectString,
1982
+ value: smithy_client_1.expectString,
1983
+ valueMappings: (_) => de_ValueMappings(_, context),
1984
+ });
2379
1985
  };
2380
1986
  const de_FieldsMap = (output, context) => {
2381
1987
  return Object.entries(output).reduce((acc, [key, value]) => {
@@ -2386,121 +1992,34 @@ const de_FieldsMap = (output, context) => {
2386
1992
  return acc;
2387
1993
  }, {});
2388
1994
  };
2389
- const de_FieldValidationConfiguration = (output, context) => {
2390
- return {
2391
- numValues: output.numValues != null ? de_NumValues(output.numValues, context) : undefined,
2392
- strValues: output.strValues != null ? de_StrValues(output.strValues, context) : undefined,
2393
- type: (0, smithy_client_1.expectString)(output.type),
2394
- validationMessage: (0, smithy_client_1.expectString)(output.validationMessage),
2395
- };
2396
- };
2397
- const de_FileUploaderFieldConfig = (output, context) => {
2398
- return {
2399
- acceptedFileTypes: output.acceptedFileTypes != null ? de_StrValues(output.acceptedFileTypes, context) : undefined,
2400
- accessLevel: (0, smithy_client_1.expectString)(output.accessLevel),
2401
- isResumable: (0, smithy_client_1.expectBoolean)(output.isResumable),
2402
- maxFileCount: (0, smithy_client_1.expectInt32)(output.maxFileCount),
2403
- maxSize: (0, smithy_client_1.expectInt32)(output.maxSize),
2404
- showThumbnails: (0, smithy_client_1.expectBoolean)(output.showThumbnails),
2405
- };
2406
- };
2407
1995
  const de_Form = (output, context) => {
2408
- return {
2409
- appId: (0, smithy_client_1.expectString)(output.appId),
2410
- cta: output.cta != null ? de_FormCTA(output.cta, context) : undefined,
2411
- dataType: output.dataType != null ? de_FormDataTypeConfig(output.dataType, context) : undefined,
2412
- environmentName: (0, smithy_client_1.expectString)(output.environmentName),
2413
- fields: output.fields != null ? de_FieldsMap(output.fields, context) : undefined,
2414
- formActionType: (0, smithy_client_1.expectString)(output.formActionType),
2415
- id: (0, smithy_client_1.expectString)(output.id),
2416
- labelDecorator: (0, smithy_client_1.expectString)(output.labelDecorator),
2417
- name: (0, smithy_client_1.expectString)(output.name),
2418
- schemaVersion: (0, smithy_client_1.expectString)(output.schemaVersion),
2419
- sectionalElements: output.sectionalElements != null ? de_SectionalElementMap(output.sectionalElements, context) : undefined,
2420
- style: output.style != null ? de_FormStyle(output.style, context) : undefined,
2421
- tags: output.tags != null ? de_Tags(output.tags, context) : undefined,
2422
- };
2423
- };
2424
- const de_FormBindingElement = (output, context) => {
2425
- return {
2426
- element: (0, smithy_client_1.expectString)(output.element),
2427
- property: (0, smithy_client_1.expectString)(output.property),
2428
- };
2429
- };
2430
- const de_FormBindings = (output, context) => {
2431
- return Object.entries(output).reduce((acc, [key, value]) => {
2432
- if (value === null) {
2433
- return acc;
2434
- }
2435
- acc[key] = de_FormBindingElement(value, context);
2436
- return acc;
2437
- }, {});
2438
- };
2439
- const de_FormButton = (output, context) => {
2440
- return {
2441
- children: (0, smithy_client_1.expectString)(output.children),
2442
- excluded: (0, smithy_client_1.expectBoolean)(output.excluded),
2443
- position: output.position != null ? de_FieldPosition((0, smithy_client_1.expectUnion)(output.position), context) : undefined,
2444
- };
2445
- };
2446
- const de_FormCTA = (output, context) => {
2447
- return {
2448
- cancel: output.cancel != null ? de_FormButton(output.cancel, context) : undefined,
2449
- clear: output.clear != null ? de_FormButton(output.clear, context) : undefined,
2450
- position: (0, smithy_client_1.expectString)(output.position),
2451
- submit: output.submit != null ? de_FormButton(output.submit, context) : undefined,
2452
- };
2453
- };
2454
- const de_FormDataTypeConfig = (output, context) => {
2455
- return {
2456
- dataSourceType: (0, smithy_client_1.expectString)(output.dataSourceType),
2457
- dataTypeName: (0, smithy_client_1.expectString)(output.dataTypeName),
2458
- };
2459
- };
2460
- const de_FormInputBindingProperties = (output, context) => {
2461
- return Object.entries(output).reduce((acc, [key, value]) => {
2462
- if (value === null) {
2463
- return acc;
2464
- }
2465
- acc[key] = de_FormInputBindingPropertiesValue(value, context);
2466
- return acc;
2467
- }, {});
2468
- };
2469
- const de_FormInputBindingPropertiesValue = (output, context) => {
2470
- return {
2471
- bindingProperties: output.bindingProperties != null
2472
- ? de_FormInputBindingPropertiesValueProperties(output.bindingProperties, context)
2473
- : undefined,
2474
- type: (0, smithy_client_1.expectString)(output.type),
2475
- };
2476
- };
2477
- const de_FormInputBindingPropertiesValueProperties = (output, context) => {
2478
- return {
2479
- model: (0, smithy_client_1.expectString)(output.model),
2480
- };
1996
+ return (0, smithy_client_1.take)(output, {
1997
+ appId: smithy_client_1.expectString,
1998
+ cta: smithy_client_1._json,
1999
+ dataType: smithy_client_1._json,
2000
+ environmentName: smithy_client_1.expectString,
2001
+ fields: (_) => de_FieldsMap(_, context),
2002
+ formActionType: smithy_client_1.expectString,
2003
+ id: smithy_client_1.expectString,
2004
+ labelDecorator: smithy_client_1.expectString,
2005
+ name: smithy_client_1.expectString,
2006
+ schemaVersion: smithy_client_1.expectString,
2007
+ sectionalElements: smithy_client_1._json,
2008
+ style: smithy_client_1._json,
2009
+ tags: smithy_client_1._json,
2010
+ });
2481
2011
  };
2482
2012
  const de_FormInputValueProperty = (output, context) => {
2483
- return {
2484
- bindingProperties: output.bindingProperties != null
2485
- ? de_FormInputValuePropertyBindingProperties(output.bindingProperties, context)
2486
- : undefined,
2487
- concat: output.concat != null ? de_FormInputValuePropertyList(output.concat, context) : undefined,
2488
- value: (0, smithy_client_1.expectString)(output.value),
2489
- };
2490
- };
2491
- const de_FormInputValuePropertyBindingProperties = (output, context) => {
2492
- return {
2493
- field: (0, smithy_client_1.expectString)(output.field),
2494
- property: (0, smithy_client_1.expectString)(output.property),
2495
- };
2013
+ return (0, smithy_client_1.take)(output, {
2014
+ bindingProperties: smithy_client_1._json,
2015
+ concat: (_) => de_FormInputValuePropertyList(_, context),
2016
+ value: smithy_client_1.expectString,
2017
+ });
2496
2018
  };
2497
2019
  const de_FormInputValuePropertyList = (output, context) => {
2498
2020
  const retVal = (output || [])
2499
2021
  .filter((e) => e != null)
2500
2022
  .map((entry) => {
2501
- if (entry === null) {
2502
- return null;
2503
- }
2504
2023
  return de_FormInputValueProperty(entry, context);
2505
2024
  });
2506
2025
  return retVal;
@@ -2509,255 +2028,95 @@ const de_FormList = (output, context) => {
2509
2028
  const retVal = (output || [])
2510
2029
  .filter((e) => e != null)
2511
2030
  .map((entry) => {
2512
- if (entry === null) {
2513
- return null;
2514
- }
2515
2031
  return de_Form(entry, context);
2516
2032
  });
2517
2033
  return retVal;
2518
2034
  };
2519
- const de_FormStyle = (output, context) => {
2520
- return {
2521
- horizontalGap: output.horizontalGap != null ? de_FormStyleConfig((0, smithy_client_1.expectUnion)(output.horizontalGap), context) : undefined,
2522
- outerPadding: output.outerPadding != null ? de_FormStyleConfig((0, smithy_client_1.expectUnion)(output.outerPadding), context) : undefined,
2523
- verticalGap: output.verticalGap != null ? de_FormStyleConfig((0, smithy_client_1.expectUnion)(output.verticalGap), context) : undefined,
2524
- };
2525
- };
2526
- const de_FormStyleConfig = (output, context) => {
2527
- if ((0, smithy_client_1.expectString)(output.tokenReference) !== undefined) {
2528
- return { tokenReference: (0, smithy_client_1.expectString)(output.tokenReference) };
2529
- }
2530
- if ((0, smithy_client_1.expectString)(output.value) !== undefined) {
2531
- return { value: (0, smithy_client_1.expectString)(output.value) };
2532
- }
2533
- return { $unknown: Object.entries(output)[0] };
2534
- };
2535
- const de_FormSummary = (output, context) => {
2536
- return {
2537
- appId: (0, smithy_client_1.expectString)(output.appId),
2538
- dataType: output.dataType != null ? de_FormDataTypeConfig(output.dataType, context) : undefined,
2539
- environmentName: (0, smithy_client_1.expectString)(output.environmentName),
2540
- formActionType: (0, smithy_client_1.expectString)(output.formActionType),
2541
- id: (0, smithy_client_1.expectString)(output.id),
2542
- name: (0, smithy_client_1.expectString)(output.name),
2543
- };
2544
- };
2545
- const de_FormSummaryList = (output, context) => {
2546
- const retVal = (output || [])
2547
- .filter((e) => e != null)
2548
- .map((entry) => {
2549
- if (entry === null) {
2550
- return null;
2551
- }
2552
- return de_FormSummary(entry, context);
2553
- });
2554
- return retVal;
2555
- };
2556
- const de_IdentifierList = (output, context) => {
2557
- const retVal = (output || [])
2558
- .filter((e) => e != null)
2559
- .map((entry) => {
2560
- if (entry === null) {
2561
- return null;
2562
- }
2563
- return (0, smithy_client_1.expectString)(entry);
2564
- });
2565
- return retVal;
2566
- };
2567
2035
  const de_MutationActionSetStateParameter = (output, context) => {
2568
- return {
2569
- componentName: (0, smithy_client_1.expectString)(output.componentName),
2570
- property: (0, smithy_client_1.expectString)(output.property),
2571
- set: output.set != null ? de_ComponentProperty(output.set, context) : undefined,
2572
- };
2573
- };
2574
- const de_NumValues = (output, context) => {
2575
- const retVal = (output || [])
2576
- .filter((e) => e != null)
2577
- .map((entry) => {
2578
- if (entry === null) {
2579
- return null;
2580
- }
2581
- return (0, smithy_client_1.expectInt32)(entry);
2036
+ return (0, smithy_client_1.take)(output, {
2037
+ componentName: smithy_client_1.expectString,
2038
+ property: smithy_client_1.expectString,
2039
+ set: (_) => de_ComponentProperty(_, context),
2582
2040
  });
2583
- return retVal;
2584
2041
  };
2585
2042
  const de_Predicate = (output, context) => {
2586
- return {
2587
- and: output.and != null ? de_PredicateList(output.and, context) : undefined,
2588
- field: (0, smithy_client_1.expectString)(output.field),
2589
- operand: (0, smithy_client_1.expectString)(output.operand),
2590
- operandType: (0, smithy_client_1.expectString)(output.operandType),
2591
- operator: (0, smithy_client_1.expectString)(output.operator),
2592
- or: output.or != null ? de_PredicateList(output.or, context) : undefined,
2593
- };
2043
+ return (0, smithy_client_1.take)(output, {
2044
+ and: (_) => de_PredicateList(_, context),
2045
+ field: smithy_client_1.expectString,
2046
+ operand: smithy_client_1.expectString,
2047
+ operandType: smithy_client_1.expectString,
2048
+ operator: smithy_client_1.expectString,
2049
+ or: (_) => de_PredicateList(_, context),
2050
+ });
2594
2051
  };
2595
2052
  const de_PredicateList = (output, context) => {
2596
2053
  const retVal = (output || [])
2597
2054
  .filter((e) => e != null)
2598
2055
  .map((entry) => {
2599
- if (entry === null) {
2600
- return null;
2601
- }
2602
2056
  return de_Predicate(entry, context);
2603
2057
  });
2604
2058
  return retVal;
2605
2059
  };
2606
- const de_SectionalElement = (output, context) => {
2607
- return {
2608
- excluded: (0, smithy_client_1.expectBoolean)(output.excluded),
2609
- level: (0, smithy_client_1.expectInt32)(output.level),
2610
- orientation: (0, smithy_client_1.expectString)(output.orientation),
2611
- position: output.position != null ? de_FieldPosition((0, smithy_client_1.expectUnion)(output.position), context) : undefined,
2612
- text: (0, smithy_client_1.expectString)(output.text),
2613
- type: (0, smithy_client_1.expectString)(output.type),
2614
- };
2615
- };
2616
- const de_SectionalElementMap = (output, context) => {
2617
- return Object.entries(output).reduce((acc, [key, value]) => {
2618
- if (value === null) {
2619
- return acc;
2620
- }
2621
- acc[key] = de_SectionalElement(value, context);
2622
- return acc;
2623
- }, {});
2624
- };
2625
- const de_SortProperty = (output, context) => {
2626
- return {
2627
- direction: (0, smithy_client_1.expectString)(output.direction),
2628
- field: (0, smithy_client_1.expectString)(output.field),
2629
- };
2630
- };
2631
- const de_SortPropertyList = (output, context) => {
2632
- const retVal = (output || [])
2633
- .filter((e) => e != null)
2634
- .map((entry) => {
2635
- if (entry === null) {
2636
- return null;
2637
- }
2638
- return de_SortProperty(entry, context);
2639
- });
2640
- return retVal;
2641
- };
2642
- const de_StrValues = (output, context) => {
2643
- const retVal = (output || [])
2644
- .filter((e) => e != null)
2645
- .map((entry) => {
2646
- if (entry === null) {
2647
- return null;
2648
- }
2649
- return (0, smithy_client_1.expectString)(entry);
2650
- });
2651
- return retVal;
2652
- };
2653
- const de_Tags = (output, context) => {
2654
- return Object.entries(output).reduce((acc, [key, value]) => {
2655
- if (value === null) {
2656
- return acc;
2657
- }
2658
- acc[key] = (0, smithy_client_1.expectString)(value);
2659
- return acc;
2660
- }, {});
2661
- };
2662
2060
  const de_Theme = (output, context) => {
2663
- return {
2664
- appId: (0, smithy_client_1.expectString)(output.appId),
2665
- createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.createdAt)) : undefined,
2666
- environmentName: (0, smithy_client_1.expectString)(output.environmentName),
2667
- id: (0, smithy_client_1.expectString)(output.id),
2668
- modifiedAt: output.modifiedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.modifiedAt)) : undefined,
2669
- name: (0, smithy_client_1.expectString)(output.name),
2670
- overrides: output.overrides != null ? de_ThemeValuesList(output.overrides, context) : undefined,
2671
- tags: output.tags != null ? de_Tags(output.tags, context) : undefined,
2672
- values: output.values != null ? de_ThemeValuesList(output.values, context) : undefined,
2673
- };
2061
+ return (0, smithy_client_1.take)(output, {
2062
+ appId: smithy_client_1.expectString,
2063
+ createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2064
+ environmentName: smithy_client_1.expectString,
2065
+ id: smithy_client_1.expectString,
2066
+ modifiedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2067
+ name: smithy_client_1.expectString,
2068
+ overrides: (_) => de_ThemeValuesList(_, context),
2069
+ tags: smithy_client_1._json,
2070
+ values: (_) => de_ThemeValuesList(_, context),
2071
+ });
2674
2072
  };
2675
2073
  const de_ThemeList = (output, context) => {
2676
2074
  const retVal = (output || [])
2677
2075
  .filter((e) => e != null)
2678
2076
  .map((entry) => {
2679
- if (entry === null) {
2680
- return null;
2681
- }
2682
2077
  return de_Theme(entry, context);
2683
2078
  });
2684
2079
  return retVal;
2685
2080
  };
2686
- const de_ThemeSummary = (output, context) => {
2687
- return {
2688
- appId: (0, smithy_client_1.expectString)(output.appId),
2689
- environmentName: (0, smithy_client_1.expectString)(output.environmentName),
2690
- id: (0, smithy_client_1.expectString)(output.id),
2691
- name: (0, smithy_client_1.expectString)(output.name),
2692
- };
2693
- };
2694
- const de_ThemeSummaryList = (output, context) => {
2695
- const retVal = (output || [])
2696
- .filter((e) => e != null)
2697
- .map((entry) => {
2698
- if (entry === null) {
2699
- return null;
2700
- }
2701
- return de_ThemeSummary(entry, context);
2702
- });
2703
- return retVal;
2704
- };
2705
2081
  const de_ThemeValue = (output, context) => {
2706
- return {
2707
- children: output.children != null ? de_ThemeValuesList(output.children, context) : undefined,
2708
- value: (0, smithy_client_1.expectString)(output.value),
2709
- };
2082
+ return (0, smithy_client_1.take)(output, {
2083
+ children: (_) => de_ThemeValuesList(_, context),
2084
+ value: smithy_client_1.expectString,
2085
+ });
2710
2086
  };
2711
2087
  const de_ThemeValues = (output, context) => {
2712
- return {
2713
- key: (0, smithy_client_1.expectString)(output.key),
2714
- value: output.value != null ? de_ThemeValue(output.value, context) : undefined,
2715
- };
2088
+ return (0, smithy_client_1.take)(output, {
2089
+ key: smithy_client_1.expectString,
2090
+ value: (_) => de_ThemeValue(_, context),
2091
+ });
2716
2092
  };
2717
2093
  const de_ThemeValuesList = (output, context) => {
2718
2094
  const retVal = (output || [])
2719
2095
  .filter((e) => e != null)
2720
2096
  .map((entry) => {
2721
- if (entry === null) {
2722
- return null;
2723
- }
2724
2097
  return de_ThemeValues(entry, context);
2725
2098
  });
2726
2099
  return retVal;
2727
2100
  };
2728
- const de_ValidationsList = (output, context) => {
2729
- const retVal = (output || [])
2730
- .filter((e) => e != null)
2731
- .map((entry) => {
2732
- if (entry === null) {
2733
- return null;
2734
- }
2735
- return de_FieldValidationConfiguration(entry, context);
2736
- });
2737
- return retVal;
2738
- };
2739
2101
  const de_ValueMapping = (output, context) => {
2740
- return {
2741
- displayValue: output.displayValue != null ? de_FormInputValueProperty(output.displayValue, context) : undefined,
2742
- value: output.value != null ? de_FormInputValueProperty(output.value, context) : undefined,
2743
- };
2102
+ return (0, smithy_client_1.take)(output, {
2103
+ displayValue: (_) => de_FormInputValueProperty(_, context),
2104
+ value: (_) => de_FormInputValueProperty(_, context),
2105
+ });
2744
2106
  };
2745
2107
  const de_ValueMappingList = (output, context) => {
2746
2108
  const retVal = (output || [])
2747
2109
  .filter((e) => e != null)
2748
2110
  .map((entry) => {
2749
- if (entry === null) {
2750
- return null;
2751
- }
2752
2111
  return de_ValueMapping(entry, context);
2753
2112
  });
2754
2113
  return retVal;
2755
2114
  };
2756
2115
  const de_ValueMappings = (output, context) => {
2757
- return {
2758
- bindingProperties: output.bindingProperties != null ? de_FormInputBindingProperties(output.bindingProperties, context) : undefined,
2759
- values: output.values != null ? de_ValueMappingList(output.values, context) : undefined,
2760
- };
2116
+ return (0, smithy_client_1.take)(output, {
2117
+ bindingProperties: smithy_client_1._json,
2118
+ values: (_) => de_ValueMappingList(_, context),
2119
+ });
2761
2120
  };
2762
2121
  const deserializeMetadata = (output) => ({
2763
2122
  httpStatusCode: output.statusCode,