@aws-sdk/client-codecatalyst 3.309.0 → 3.315.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
- import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map as __map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
2
+ import { _json, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, take, withBaseException, } from "@aws-sdk/smithy-client";
3
3
  import { CodeCatalystServiceException as __BaseException } from "../models/CodeCatalystServiceException";
4
4
  import { AccessDeniedException, ConflictException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
5
5
  export const se_CreateAccessTokenCommand = async (input, context) => {
@@ -9,10 +9,10 @@ export const se_CreateAccessTokenCommand = async (input, context) => {
9
9
  };
10
10
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/accessTokens";
11
11
  let body;
12
- body = JSON.stringify({
13
- ...(input.expiresTime != null && { expiresTime: input.expiresTime.toISOString().split(".")[0] + "Z" }),
14
- ...(input.name != null && { name: input.name }),
15
- });
12
+ body = JSON.stringify(take(input, {
13
+ expiresTime: (_) => _.toISOString().split(".")[0] + "Z",
14
+ name: [],
15
+ }));
16
16
  return new __HttpRequest({
17
17
  protocol,
18
18
  hostname,
@@ -33,17 +33,15 @@ export const se_CreateDevEnvironmentCommand = async (input, context) => {
33
33
  resolvedPath = __resolvedPath(resolvedPath, input, "spaceName", () => input.spaceName, "{spaceName}", false);
34
34
  resolvedPath = __resolvedPath(resolvedPath, input, "projectName", () => input.projectName, "{projectName}", false);
35
35
  let body;
36
- body = JSON.stringify({
37
- ...(input.alias != null && { alias: input.alias }),
38
- ...(input.clientToken != null && { clientToken: input.clientToken }),
39
- ...(input.ides != null && { ides: se_IdeConfigurationList(input.ides, context) }),
40
- ...(input.inactivityTimeoutMinutes != null && { inactivityTimeoutMinutes: input.inactivityTimeoutMinutes }),
41
- ...(input.instanceType != null && { instanceType: input.instanceType }),
42
- ...(input.persistentStorage != null && {
43
- persistentStorage: se_PersistentStorageConfiguration(input.persistentStorage, context),
44
- }),
45
- ...(input.repositories != null && { repositories: se_RepositoriesInput(input.repositories, context) }),
46
- });
36
+ body = JSON.stringify(take(input, {
37
+ alias: [],
38
+ clientToken: [],
39
+ ides: (_) => _json(_),
40
+ inactivityTimeoutMinutes: [],
41
+ instanceType: [],
42
+ persistentStorage: (_) => _json(_),
43
+ repositories: (_) => _json(_),
44
+ }));
47
45
  return new __HttpRequest({
48
46
  protocol,
49
47
  hostname,
@@ -62,10 +60,10 @@ export const se_CreateProjectCommand = async (input, context) => {
62
60
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/spaces/{spaceName}/projects";
63
61
  resolvedPath = __resolvedPath(resolvedPath, input, "spaceName", () => input.spaceName, "{spaceName}", false);
64
62
  let body;
65
- body = JSON.stringify({
66
- ...(input.description != null && { description: input.description }),
67
- ...(input.displayName != null && { displayName: input.displayName }),
68
- });
63
+ body = JSON.stringify(take(input, {
64
+ description: [],
65
+ displayName: [],
66
+ }));
69
67
  return new __HttpRequest({
70
68
  protocol,
71
69
  hostname,
@@ -88,9 +86,9 @@ export const se_CreateSourceRepositoryBranchCommand = async (input, context) =>
88
86
  resolvedPath = __resolvedPath(resolvedPath, input, "sourceRepositoryName", () => input.sourceRepositoryName, "{sourceRepositoryName}", false);
89
87
  resolvedPath = __resolvedPath(resolvedPath, input, "name", () => input.name, "{name}", false);
90
88
  let body;
91
- body = JSON.stringify({
92
- ...(input.headCommitId != null && { headCommitId: input.headCommitId }),
93
- });
89
+ body = JSON.stringify(take(input, {
90
+ headCommitId: [],
91
+ }));
94
92
  return new __HttpRequest({
95
93
  protocol,
96
94
  hostname,
@@ -250,10 +248,10 @@ export const se_ListAccessTokensCommand = async (input, context) => {
250
248
  };
251
249
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/accessTokens";
252
250
  let body;
253
- body = JSON.stringify({
254
- ...(input.maxResults != null && { maxResults: input.maxResults }),
255
- ...(input.nextToken != null && { nextToken: input.nextToken }),
256
- });
251
+ body = JSON.stringify(take(input, {
252
+ maxResults: [],
253
+ nextToken: [],
254
+ }));
257
255
  return new __HttpRequest({
258
256
  protocol,
259
257
  hostname,
@@ -274,11 +272,11 @@ export const se_ListDevEnvironmentsCommand = async (input, context) => {
274
272
  resolvedPath = __resolvedPath(resolvedPath, input, "spaceName", () => input.spaceName, "{spaceName}", false);
275
273
  resolvedPath = __resolvedPath(resolvedPath, input, "projectName", () => input.projectName, "{projectName}", false);
276
274
  let body;
277
- body = JSON.stringify({
278
- ...(input.filters != null && { filters: se_Filters(input.filters, context) }),
279
- ...(input.maxResults != null && { maxResults: input.maxResults }),
280
- ...(input.nextToken != null && { nextToken: input.nextToken }),
281
- });
275
+ body = JSON.stringify(take(input, {
276
+ filters: (_) => _json(_),
277
+ maxResults: [],
278
+ nextToken: [],
279
+ }));
282
280
  return new __HttpRequest({
283
281
  protocol,
284
282
  hostname,
@@ -297,13 +295,13 @@ export const se_ListEventLogsCommand = async (input, context) => {
297
295
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/spaces/{spaceName}/eventLogs";
298
296
  resolvedPath = __resolvedPath(resolvedPath, input, "spaceName", () => input.spaceName, "{spaceName}", false);
299
297
  let body;
300
- body = JSON.stringify({
301
- ...(input.endTime != null && { endTime: input.endTime.toISOString().split(".")[0] + "Z" }),
302
- ...(input.eventName != null && { eventName: input.eventName }),
303
- ...(input.maxResults != null && { maxResults: input.maxResults }),
304
- ...(input.nextToken != null && { nextToken: input.nextToken }),
305
- ...(input.startTime != null && { startTime: input.startTime.toISOString().split(".")[0] + "Z" }),
306
- });
298
+ body = JSON.stringify(take(input, {
299
+ endTime: (_) => _.toISOString().split(".")[0] + "Z",
300
+ eventName: [],
301
+ maxResults: [],
302
+ nextToken: [],
303
+ startTime: (_) => _.toISOString().split(".")[0] + "Z",
304
+ }));
307
305
  return new __HttpRequest({
308
306
  protocol,
309
307
  hostname,
@@ -322,11 +320,11 @@ export const se_ListProjectsCommand = async (input, context) => {
322
320
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/spaces/{spaceName}/projects";
323
321
  resolvedPath = __resolvedPath(resolvedPath, input, "spaceName", () => input.spaceName, "{spaceName}", false);
324
322
  let body;
325
- body = JSON.stringify({
326
- ...(input.filters != null && { filters: se_ProjectListFilters(input.filters, context) }),
327
- ...(input.maxResults != null && { maxResults: input.maxResults }),
328
- ...(input.nextToken != null && { nextToken: input.nextToken }),
329
- });
323
+ body = JSON.stringify(take(input, {
324
+ filters: (_) => _json(_),
325
+ maxResults: [],
326
+ nextToken: [],
327
+ }));
330
328
  return new __HttpRequest({
331
329
  protocol,
332
330
  hostname,
@@ -347,10 +345,10 @@ export const se_ListSourceRepositoriesCommand = async (input, context) => {
347
345
  resolvedPath = __resolvedPath(resolvedPath, input, "spaceName", () => input.spaceName, "{spaceName}", false);
348
346
  resolvedPath = __resolvedPath(resolvedPath, input, "projectName", () => input.projectName, "{projectName}", false);
349
347
  let body;
350
- body = JSON.stringify({
351
- ...(input.maxResults != null && { maxResults: input.maxResults }),
352
- ...(input.nextToken != null && { nextToken: input.nextToken }),
353
- });
348
+ body = JSON.stringify(take(input, {
349
+ maxResults: [],
350
+ nextToken: [],
351
+ }));
354
352
  return new __HttpRequest({
355
353
  protocol,
356
354
  hostname,
@@ -372,10 +370,10 @@ export const se_ListSourceRepositoryBranchesCommand = async (input, context) =>
372
370
  resolvedPath = __resolvedPath(resolvedPath, input, "projectName", () => input.projectName, "{projectName}", false);
373
371
  resolvedPath = __resolvedPath(resolvedPath, input, "sourceRepositoryName", () => input.sourceRepositoryName, "{sourceRepositoryName}", false);
374
372
  let body;
375
- body = JSON.stringify({
376
- ...(input.maxResults != null && { maxResults: input.maxResults }),
377
- ...(input.nextToken != null && { nextToken: input.nextToken }),
378
- });
373
+ body = JSON.stringify(take(input, {
374
+ maxResults: [],
375
+ nextToken: [],
376
+ }));
379
377
  return new __HttpRequest({
380
378
  protocol,
381
379
  hostname,
@@ -393,9 +391,9 @@ export const se_ListSpacesCommand = async (input, context) => {
393
391
  };
394
392
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/spaces";
395
393
  let body;
396
- body = JSON.stringify({
397
- ...(input.nextToken != null && { nextToken: input.nextToken }),
398
- });
394
+ body = JSON.stringify(take(input, {
395
+ nextToken: [],
396
+ }));
399
397
  return new __HttpRequest({
400
398
  protocol,
401
399
  hostname,
@@ -417,11 +415,11 @@ export const se_StartDevEnvironmentCommand = async (input, context) => {
417
415
  resolvedPath = __resolvedPath(resolvedPath, input, "projectName", () => input.projectName, "{projectName}", false);
418
416
  resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
419
417
  let body;
420
- body = JSON.stringify({
421
- ...(input.ides != null && { ides: se_IdeConfigurationList(input.ides, context) }),
422
- ...(input.inactivityTimeoutMinutes != null && { inactivityTimeoutMinutes: input.inactivityTimeoutMinutes }),
423
- ...(input.instanceType != null && { instanceType: input.instanceType }),
424
- });
418
+ body = JSON.stringify(take(input, {
419
+ ides: (_) => _json(_),
420
+ inactivityTimeoutMinutes: [],
421
+ instanceType: [],
422
+ }));
425
423
  return new __HttpRequest({
426
424
  protocol,
427
425
  hostname,
@@ -443,11 +441,9 @@ export const se_StartDevEnvironmentSessionCommand = async (input, context) => {
443
441
  resolvedPath = __resolvedPath(resolvedPath, input, "projectName", () => input.projectName, "{projectName}", false);
444
442
  resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
445
443
  let body;
446
- body = JSON.stringify({
447
- ...(input.sessionConfiguration != null && {
448
- sessionConfiguration: se_DevEnvironmentSessionConfiguration(input.sessionConfiguration, context),
449
- }),
450
- });
444
+ body = JSON.stringify(take(input, {
445
+ sessionConfiguration: (_) => _json(_),
446
+ }));
451
447
  return new __HttpRequest({
452
448
  protocol,
453
449
  hostname,
@@ -508,13 +504,13 @@ export const se_UpdateDevEnvironmentCommand = async (input, context) => {
508
504
  resolvedPath = __resolvedPath(resolvedPath, input, "projectName", () => input.projectName, "{projectName}", false);
509
505
  resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
510
506
  let body;
511
- body = JSON.stringify({
512
- ...(input.alias != null && { alias: input.alias }),
513
- ...(input.clientToken != null && { clientToken: input.clientToken }),
514
- ...(input.ides != null && { ides: se_IdeConfigurationList(input.ides, context) }),
515
- ...(input.inactivityTimeoutMinutes != null && { inactivityTimeoutMinutes: input.inactivityTimeoutMinutes }),
516
- ...(input.instanceType != null && { instanceType: input.instanceType }),
517
- });
507
+ body = JSON.stringify(take(input, {
508
+ alias: [],
509
+ clientToken: [],
510
+ ides: (_) => _json(_),
511
+ inactivityTimeoutMinutes: [],
512
+ instanceType: [],
513
+ }));
518
514
  return new __HttpRequest({
519
515
  protocol,
520
516
  hostname,
@@ -551,18 +547,13 @@ export const de_CreateAccessTokenCommand = async (output, context) => {
551
547
  $metadata: deserializeMetadata(output),
552
548
  });
553
549
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
554
- if (data.accessTokenId != null) {
555
- contents.accessTokenId = __expectString(data.accessTokenId);
556
- }
557
- if (data.expiresTime != null) {
558
- contents.expiresTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.expiresTime));
559
- }
560
- if (data.name != null) {
561
- contents.name = __expectString(data.name);
562
- }
563
- if (data.secret != null) {
564
- contents.secret = __expectString(data.secret);
565
- }
550
+ const doc = take(data, {
551
+ accessTokenId: __expectString,
552
+ expiresTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
553
+ name: __expectString,
554
+ secret: __expectString,
555
+ });
556
+ Object.assign(contents, doc);
566
557
  return contents;
567
558
  };
568
559
  const de_CreateAccessTokenCommandError = async (output, context) => {
@@ -592,10 +583,9 @@ const de_CreateAccessTokenCommandError = async (output, context) => {
592
583
  throw await de_ValidationExceptionRes(parsedOutput, context);
593
584
  default:
594
585
  const parsedBody = parsedOutput.body;
595
- throwDefaultError({
586
+ return throwDefaultError({
596
587
  output,
597
588
  parsedBody,
598
- exceptionCtor: __BaseException,
599
589
  errorCode,
600
590
  });
601
591
  }
@@ -608,15 +598,12 @@ export const de_CreateDevEnvironmentCommand = async (output, context) => {
608
598
  $metadata: deserializeMetadata(output),
609
599
  });
610
600
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
611
- if (data.id != null) {
612
- contents.id = __expectString(data.id);
613
- }
614
- if (data.projectName != null) {
615
- contents.projectName = __expectString(data.projectName);
616
- }
617
- if (data.spaceName != null) {
618
- contents.spaceName = __expectString(data.spaceName);
619
- }
601
+ const doc = take(data, {
602
+ id: __expectString,
603
+ projectName: __expectString,
604
+ spaceName: __expectString,
605
+ });
606
+ Object.assign(contents, doc);
620
607
  return contents;
621
608
  };
622
609
  const de_CreateDevEnvironmentCommandError = async (output, context) => {
@@ -646,10 +633,9 @@ const de_CreateDevEnvironmentCommandError = async (output, context) => {
646
633
  throw await de_ValidationExceptionRes(parsedOutput, context);
647
634
  default:
648
635
  const parsedBody = parsedOutput.body;
649
- throwDefaultError({
636
+ return throwDefaultError({
650
637
  output,
651
638
  parsedBody,
652
- exceptionCtor: __BaseException,
653
639
  errorCode,
654
640
  });
655
641
  }
@@ -662,18 +648,13 @@ export const de_CreateProjectCommand = async (output, context) => {
662
648
  $metadata: deserializeMetadata(output),
663
649
  });
664
650
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
665
- if (data.description != null) {
666
- contents.description = __expectString(data.description);
667
- }
668
- if (data.displayName != null) {
669
- contents.displayName = __expectString(data.displayName);
670
- }
671
- if (data.name != null) {
672
- contents.name = __expectString(data.name);
673
- }
674
- if (data.spaceName != null) {
675
- contents.spaceName = __expectString(data.spaceName);
676
- }
651
+ const doc = take(data, {
652
+ description: __expectString,
653
+ displayName: __expectString,
654
+ name: __expectString,
655
+ spaceName: __expectString,
656
+ });
657
+ Object.assign(contents, doc);
677
658
  return contents;
678
659
  };
679
660
  const de_CreateProjectCommandError = async (output, context) => {
@@ -703,10 +684,9 @@ const de_CreateProjectCommandError = async (output, context) => {
703
684
  throw await de_ValidationExceptionRes(parsedOutput, context);
704
685
  default:
705
686
  const parsedBody = parsedOutput.body;
706
- throwDefaultError({
687
+ return throwDefaultError({
707
688
  output,
708
689
  parsedBody,
709
- exceptionCtor: __BaseException,
710
690
  errorCode,
711
691
  });
712
692
  }
@@ -719,18 +699,13 @@ export const de_CreateSourceRepositoryBranchCommand = async (output, context) =>
719
699
  $metadata: deserializeMetadata(output),
720
700
  });
721
701
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
722
- if (data.headCommitId != null) {
723
- contents.headCommitId = __expectString(data.headCommitId);
724
- }
725
- if (data.lastUpdatedTime != null) {
726
- contents.lastUpdatedTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.lastUpdatedTime));
727
- }
728
- if (data.name != null) {
729
- contents.name = __expectString(data.name);
730
- }
731
- if (data.ref != null) {
732
- contents.ref = __expectString(data.ref);
733
- }
702
+ const doc = take(data, {
703
+ headCommitId: __expectString,
704
+ lastUpdatedTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
705
+ name: __expectString,
706
+ ref: __expectString,
707
+ });
708
+ Object.assign(contents, doc);
734
709
  return contents;
735
710
  };
736
711
  const de_CreateSourceRepositoryBranchCommandError = async (output, context) => {
@@ -760,10 +735,9 @@ const de_CreateSourceRepositoryBranchCommandError = async (output, context) => {
760
735
  throw await de_ValidationExceptionRes(parsedOutput, context);
761
736
  default:
762
737
  const parsedBody = parsedOutput.body;
763
- throwDefaultError({
738
+ return throwDefaultError({
764
739
  output,
765
740
  parsedBody,
766
- exceptionCtor: __BaseException,
767
741
  errorCode,
768
742
  });
769
743
  }
@@ -805,10 +779,9 @@ const de_DeleteAccessTokenCommandError = async (output, context) => {
805
779
  throw await de_ValidationExceptionRes(parsedOutput, context);
806
780
  default:
807
781
  const parsedBody = parsedOutput.body;
808
- throwDefaultError({
782
+ return throwDefaultError({
809
783
  output,
810
784
  parsedBody,
811
- exceptionCtor: __BaseException,
812
785
  errorCode,
813
786
  });
814
787
  }
@@ -821,15 +794,12 @@ export const de_DeleteDevEnvironmentCommand = async (output, context) => {
821
794
  $metadata: deserializeMetadata(output),
822
795
  });
823
796
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
824
- if (data.id != null) {
825
- contents.id = __expectString(data.id);
826
- }
827
- if (data.projectName != null) {
828
- contents.projectName = __expectString(data.projectName);
829
- }
830
- if (data.spaceName != null) {
831
- contents.spaceName = __expectString(data.spaceName);
832
- }
797
+ const doc = take(data, {
798
+ id: __expectString,
799
+ projectName: __expectString,
800
+ spaceName: __expectString,
801
+ });
802
+ Object.assign(contents, doc);
833
803
  return contents;
834
804
  };
835
805
  const de_DeleteDevEnvironmentCommandError = async (output, context) => {
@@ -859,10 +829,9 @@ const de_DeleteDevEnvironmentCommandError = async (output, context) => {
859
829
  throw await de_ValidationExceptionRes(parsedOutput, context);
860
830
  default:
861
831
  const parsedBody = parsedOutput.body;
862
- throwDefaultError({
832
+ return throwDefaultError({
863
833
  output,
864
834
  parsedBody,
865
- exceptionCtor: __BaseException,
866
835
  errorCode,
867
836
  });
868
837
  }
@@ -875,45 +844,22 @@ export const de_GetDevEnvironmentCommand = async (output, context) => {
875
844
  $metadata: deserializeMetadata(output),
876
845
  });
877
846
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
878
- if (data.alias != null) {
879
- contents.alias = __expectString(data.alias);
880
- }
881
- if (data.creatorId != null) {
882
- contents.creatorId = __expectString(data.creatorId);
883
- }
884
- if (data.id != null) {
885
- contents.id = __expectString(data.id);
886
- }
887
- if (data.ides != null) {
888
- contents.ides = de_Ides(data.ides, context);
889
- }
890
- if (data.inactivityTimeoutMinutes != null) {
891
- contents.inactivityTimeoutMinutes = __expectInt32(data.inactivityTimeoutMinutes);
892
- }
893
- if (data.instanceType != null) {
894
- contents.instanceType = __expectString(data.instanceType);
895
- }
896
- if (data.lastUpdatedTime != null) {
897
- contents.lastUpdatedTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.lastUpdatedTime));
898
- }
899
- if (data.persistentStorage != null) {
900
- contents.persistentStorage = de_PersistentStorage(data.persistentStorage, context);
901
- }
902
- if (data.projectName != null) {
903
- contents.projectName = __expectString(data.projectName);
904
- }
905
- if (data.repositories != null) {
906
- contents.repositories = de_DevEnvironmentRepositorySummaries(data.repositories, context);
907
- }
908
- if (data.spaceName != null) {
909
- contents.spaceName = __expectString(data.spaceName);
910
- }
911
- if (data.status != null) {
912
- contents.status = __expectString(data.status);
913
- }
914
- if (data.statusReason != null) {
915
- contents.statusReason = __expectString(data.statusReason);
916
- }
847
+ const doc = take(data, {
848
+ alias: __expectString,
849
+ creatorId: __expectString,
850
+ id: __expectString,
851
+ ides: _json,
852
+ inactivityTimeoutMinutes: __expectInt32,
853
+ instanceType: __expectString,
854
+ lastUpdatedTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
855
+ persistentStorage: _json,
856
+ projectName: __expectString,
857
+ repositories: _json,
858
+ spaceName: __expectString,
859
+ status: __expectString,
860
+ statusReason: __expectString,
861
+ });
862
+ Object.assign(contents, doc);
917
863
  return contents;
918
864
  };
919
865
  const de_GetDevEnvironmentCommandError = async (output, context) => {
@@ -943,10 +889,9 @@ const de_GetDevEnvironmentCommandError = async (output, context) => {
943
889
  throw await de_ValidationExceptionRes(parsedOutput, context);
944
890
  default:
945
891
  const parsedBody = parsedOutput.body;
946
- throwDefaultError({
892
+ return throwDefaultError({
947
893
  output,
948
894
  parsedBody,
949
- exceptionCtor: __BaseException,
950
895
  errorCode,
951
896
  });
952
897
  }
@@ -959,18 +904,13 @@ export const de_GetProjectCommand = async (output, context) => {
959
904
  $metadata: deserializeMetadata(output),
960
905
  });
961
906
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
962
- if (data.description != null) {
963
- contents.description = __expectString(data.description);
964
- }
965
- if (data.displayName != null) {
966
- contents.displayName = __expectString(data.displayName);
967
- }
968
- if (data.name != null) {
969
- contents.name = __expectString(data.name);
970
- }
971
- if (data.spaceName != null) {
972
- contents.spaceName = __expectString(data.spaceName);
973
- }
907
+ const doc = take(data, {
908
+ description: __expectString,
909
+ displayName: __expectString,
910
+ name: __expectString,
911
+ spaceName: __expectString,
912
+ });
913
+ Object.assign(contents, doc);
974
914
  return contents;
975
915
  };
976
916
  const de_GetProjectCommandError = async (output, context) => {
@@ -1000,10 +940,9 @@ const de_GetProjectCommandError = async (output, context) => {
1000
940
  throw await de_ValidationExceptionRes(parsedOutput, context);
1001
941
  default:
1002
942
  const parsedBody = parsedOutput.body;
1003
- throwDefaultError({
943
+ return throwDefaultError({
1004
944
  output,
1005
945
  parsedBody,
1006
- exceptionCtor: __BaseException,
1007
946
  errorCode,
1008
947
  });
1009
948
  }
@@ -1016,9 +955,10 @@ export const de_GetSourceRepositoryCloneUrlsCommand = async (output, context) =>
1016
955
  $metadata: deserializeMetadata(output),
1017
956
  });
1018
957
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1019
- if (data.https != null) {
1020
- contents.https = __expectString(data.https);
1021
- }
958
+ const doc = take(data, {
959
+ https: __expectString,
960
+ });
961
+ Object.assign(contents, doc);
1022
962
  return contents;
1023
963
  };
1024
964
  const de_GetSourceRepositoryCloneUrlsCommandError = async (output, context) => {
@@ -1048,10 +988,9 @@ const de_GetSourceRepositoryCloneUrlsCommandError = async (output, context) => {
1048
988
  throw await de_ValidationExceptionRes(parsedOutput, context);
1049
989
  default:
1050
990
  const parsedBody = parsedOutput.body;
1051
- throwDefaultError({
991
+ return throwDefaultError({
1052
992
  output,
1053
993
  parsedBody,
1054
- exceptionCtor: __BaseException,
1055
994
  errorCode,
1056
995
  });
1057
996
  }
@@ -1064,18 +1003,13 @@ export const de_GetSpaceCommand = async (output, context) => {
1064
1003
  $metadata: deserializeMetadata(output),
1065
1004
  });
1066
1005
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1067
- if (data.description != null) {
1068
- contents.description = __expectString(data.description);
1069
- }
1070
- if (data.displayName != null) {
1071
- contents.displayName = __expectString(data.displayName);
1072
- }
1073
- if (data.name != null) {
1074
- contents.name = __expectString(data.name);
1075
- }
1076
- if (data.regionName != null) {
1077
- contents.regionName = __expectString(data.regionName);
1078
- }
1006
+ const doc = take(data, {
1007
+ description: __expectString,
1008
+ displayName: __expectString,
1009
+ name: __expectString,
1010
+ regionName: __expectString,
1011
+ });
1012
+ Object.assign(contents, doc);
1079
1013
  return contents;
1080
1014
  };
1081
1015
  const de_GetSpaceCommandError = async (output, context) => {
@@ -1105,10 +1039,9 @@ const de_GetSpaceCommandError = async (output, context) => {
1105
1039
  throw await de_ValidationExceptionRes(parsedOutput, context);
1106
1040
  default:
1107
1041
  const parsedBody = parsedOutput.body;
1108
- throwDefaultError({
1042
+ return throwDefaultError({
1109
1043
  output,
1110
1044
  parsedBody,
1111
- exceptionCtor: __BaseException,
1112
1045
  errorCode,
1113
1046
  });
1114
1047
  }
@@ -1121,12 +1054,11 @@ export const de_GetSubscriptionCommand = async (output, context) => {
1121
1054
  $metadata: deserializeMetadata(output),
1122
1055
  });
1123
1056
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1124
- if (data.awsAccountName != null) {
1125
- contents.awsAccountName = __expectString(data.awsAccountName);
1126
- }
1127
- if (data.subscriptionType != null) {
1128
- contents.subscriptionType = __expectString(data.subscriptionType);
1129
- }
1057
+ const doc = take(data, {
1058
+ awsAccountName: __expectString,
1059
+ subscriptionType: __expectString,
1060
+ });
1061
+ Object.assign(contents, doc);
1130
1062
  return contents;
1131
1063
  };
1132
1064
  const de_GetSubscriptionCommandError = async (output, context) => {
@@ -1156,10 +1088,9 @@ const de_GetSubscriptionCommandError = async (output, context) => {
1156
1088
  throw await de_ValidationExceptionRes(parsedOutput, context);
1157
1089
  default:
1158
1090
  const parsedBody = parsedOutput.body;
1159
- throwDefaultError({
1091
+ return throwDefaultError({
1160
1092
  output,
1161
1093
  parsedBody,
1162
- exceptionCtor: __BaseException,
1163
1094
  errorCode,
1164
1095
  });
1165
1096
  }
@@ -1172,21 +1103,14 @@ export const de_GetUserDetailsCommand = async (output, context) => {
1172
1103
  $metadata: deserializeMetadata(output),
1173
1104
  });
1174
1105
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1175
- if (data.displayName != null) {
1176
- contents.displayName = __expectString(data.displayName);
1177
- }
1178
- if (data.primaryEmail != null) {
1179
- contents.primaryEmail = de_EmailAddress(data.primaryEmail, context);
1180
- }
1181
- if (data.userId != null) {
1182
- contents.userId = __expectString(data.userId);
1183
- }
1184
- if (data.userName != null) {
1185
- contents.userName = __expectString(data.userName);
1186
- }
1187
- if (data.version != null) {
1188
- contents.version = __expectString(data.version);
1189
- }
1106
+ const doc = take(data, {
1107
+ displayName: __expectString,
1108
+ primaryEmail: _json,
1109
+ userId: __expectString,
1110
+ userName: __expectString,
1111
+ version: __expectString,
1112
+ });
1113
+ Object.assign(contents, doc);
1190
1114
  return contents;
1191
1115
  };
1192
1116
  const de_GetUserDetailsCommandError = async (output, context) => {
@@ -1216,10 +1140,9 @@ const de_GetUserDetailsCommandError = async (output, context) => {
1216
1140
  throw await de_ValidationExceptionRes(parsedOutput, context);
1217
1141
  default:
1218
1142
  const parsedBody = parsedOutput.body;
1219
- throwDefaultError({
1143
+ return throwDefaultError({
1220
1144
  output,
1221
1145
  parsedBody,
1222
- exceptionCtor: __BaseException,
1223
1146
  errorCode,
1224
1147
  });
1225
1148
  }
@@ -1232,12 +1155,11 @@ export const de_ListAccessTokensCommand = async (output, context) => {
1232
1155
  $metadata: deserializeMetadata(output),
1233
1156
  });
1234
1157
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1235
- if (data.items != null) {
1236
- contents.items = de_AccessTokenSummaries(data.items, context);
1237
- }
1238
- if (data.nextToken != null) {
1239
- contents.nextToken = __expectString(data.nextToken);
1240
- }
1158
+ const doc = take(data, {
1159
+ items: (_) => de_AccessTokenSummaries(_, context),
1160
+ nextToken: __expectString,
1161
+ });
1162
+ Object.assign(contents, doc);
1241
1163
  return contents;
1242
1164
  };
1243
1165
  const de_ListAccessTokensCommandError = async (output, context) => {
@@ -1267,10 +1189,9 @@ const de_ListAccessTokensCommandError = async (output, context) => {
1267
1189
  throw await de_ValidationExceptionRes(parsedOutput, context);
1268
1190
  default:
1269
1191
  const parsedBody = parsedOutput.body;
1270
- throwDefaultError({
1192
+ return throwDefaultError({
1271
1193
  output,
1272
1194
  parsedBody,
1273
- exceptionCtor: __BaseException,
1274
1195
  errorCode,
1275
1196
  });
1276
1197
  }
@@ -1283,12 +1204,11 @@ export const de_ListDevEnvironmentsCommand = async (output, context) => {
1283
1204
  $metadata: deserializeMetadata(output),
1284
1205
  });
1285
1206
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1286
- if (data.items != null) {
1287
- contents.items = de_DevEnvironmentSummaryList(data.items, context);
1288
- }
1289
- if (data.nextToken != null) {
1290
- contents.nextToken = __expectString(data.nextToken);
1291
- }
1207
+ const doc = take(data, {
1208
+ items: (_) => de_DevEnvironmentSummaryList(_, context),
1209
+ nextToken: __expectString,
1210
+ });
1211
+ Object.assign(contents, doc);
1292
1212
  return contents;
1293
1213
  };
1294
1214
  const de_ListDevEnvironmentsCommandError = async (output, context) => {
@@ -1318,10 +1238,9 @@ const de_ListDevEnvironmentsCommandError = async (output, context) => {
1318
1238
  throw await de_ValidationExceptionRes(parsedOutput, context);
1319
1239
  default:
1320
1240
  const parsedBody = parsedOutput.body;
1321
- throwDefaultError({
1241
+ return throwDefaultError({
1322
1242
  output,
1323
1243
  parsedBody,
1324
- exceptionCtor: __BaseException,
1325
1244
  errorCode,
1326
1245
  });
1327
1246
  }
@@ -1334,12 +1253,11 @@ export const de_ListEventLogsCommand = async (output, context) => {
1334
1253
  $metadata: deserializeMetadata(output),
1335
1254
  });
1336
1255
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1337
- if (data.items != null) {
1338
- contents.items = de_EventLogEntries(data.items, context);
1339
- }
1340
- if (data.nextToken != null) {
1341
- contents.nextToken = __expectString(data.nextToken);
1342
- }
1256
+ const doc = take(data, {
1257
+ items: (_) => de_EventLogEntries(_, context),
1258
+ nextToken: __expectString,
1259
+ });
1260
+ Object.assign(contents, doc);
1343
1261
  return contents;
1344
1262
  };
1345
1263
  const de_ListEventLogsCommandError = async (output, context) => {
@@ -1369,10 +1287,9 @@ const de_ListEventLogsCommandError = async (output, context) => {
1369
1287
  throw await de_ValidationExceptionRes(parsedOutput, context);
1370
1288
  default:
1371
1289
  const parsedBody = parsedOutput.body;
1372
- throwDefaultError({
1290
+ return throwDefaultError({
1373
1291
  output,
1374
1292
  parsedBody,
1375
- exceptionCtor: __BaseException,
1376
1293
  errorCode,
1377
1294
  });
1378
1295
  }
@@ -1385,12 +1302,11 @@ export const de_ListProjectsCommand = async (output, context) => {
1385
1302
  $metadata: deserializeMetadata(output),
1386
1303
  });
1387
1304
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1388
- if (data.items != null) {
1389
- contents.items = de_ProjectSummaries(data.items, context);
1390
- }
1391
- if (data.nextToken != null) {
1392
- contents.nextToken = __expectString(data.nextToken);
1393
- }
1305
+ const doc = take(data, {
1306
+ items: _json,
1307
+ nextToken: __expectString,
1308
+ });
1309
+ Object.assign(contents, doc);
1394
1310
  return contents;
1395
1311
  };
1396
1312
  const de_ListProjectsCommandError = async (output, context) => {
@@ -1420,10 +1336,9 @@ const de_ListProjectsCommandError = async (output, context) => {
1420
1336
  throw await de_ValidationExceptionRes(parsedOutput, context);
1421
1337
  default:
1422
1338
  const parsedBody = parsedOutput.body;
1423
- throwDefaultError({
1339
+ return throwDefaultError({
1424
1340
  output,
1425
1341
  parsedBody,
1426
- exceptionCtor: __BaseException,
1427
1342
  errorCode,
1428
1343
  });
1429
1344
  }
@@ -1436,12 +1351,11 @@ export const de_ListSourceRepositoriesCommand = async (output, context) => {
1436
1351
  $metadata: deserializeMetadata(output),
1437
1352
  });
1438
1353
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1439
- if (data.items != null) {
1440
- contents.items = de_ListSourceRepositoriesItems(data.items, context);
1441
- }
1442
- if (data.nextToken != null) {
1443
- contents.nextToken = __expectString(data.nextToken);
1444
- }
1354
+ const doc = take(data, {
1355
+ items: (_) => de_ListSourceRepositoriesItems(_, context),
1356
+ nextToken: __expectString,
1357
+ });
1358
+ Object.assign(contents, doc);
1445
1359
  return contents;
1446
1360
  };
1447
1361
  const de_ListSourceRepositoriesCommandError = async (output, context) => {
@@ -1471,10 +1385,9 @@ const de_ListSourceRepositoriesCommandError = async (output, context) => {
1471
1385
  throw await de_ValidationExceptionRes(parsedOutput, context);
1472
1386
  default:
1473
1387
  const parsedBody = parsedOutput.body;
1474
- throwDefaultError({
1388
+ return throwDefaultError({
1475
1389
  output,
1476
1390
  parsedBody,
1477
- exceptionCtor: __BaseException,
1478
1391
  errorCode,
1479
1392
  });
1480
1393
  }
@@ -1487,12 +1400,11 @@ export const de_ListSourceRepositoryBranchesCommand = async (output, context) =>
1487
1400
  $metadata: deserializeMetadata(output),
1488
1401
  });
1489
1402
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1490
- if (data.items != null) {
1491
- contents.items = de_ListSourceRepositoryBranchesItems(data.items, context);
1492
- }
1493
- if (data.nextToken != null) {
1494
- contents.nextToken = __expectString(data.nextToken);
1495
- }
1403
+ const doc = take(data, {
1404
+ items: (_) => de_ListSourceRepositoryBranchesItems(_, context),
1405
+ nextToken: __expectString,
1406
+ });
1407
+ Object.assign(contents, doc);
1496
1408
  return contents;
1497
1409
  };
1498
1410
  const de_ListSourceRepositoryBranchesCommandError = async (output, context) => {
@@ -1522,10 +1434,9 @@ const de_ListSourceRepositoryBranchesCommandError = async (output, context) => {
1522
1434
  throw await de_ValidationExceptionRes(parsedOutput, context);
1523
1435
  default:
1524
1436
  const parsedBody = parsedOutput.body;
1525
- throwDefaultError({
1437
+ return throwDefaultError({
1526
1438
  output,
1527
1439
  parsedBody,
1528
- exceptionCtor: __BaseException,
1529
1440
  errorCode,
1530
1441
  });
1531
1442
  }
@@ -1538,12 +1449,11 @@ export const de_ListSpacesCommand = async (output, context) => {
1538
1449
  $metadata: deserializeMetadata(output),
1539
1450
  });
1540
1451
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1541
- if (data.items != null) {
1542
- contents.items = de_SpaceSummaries(data.items, context);
1543
- }
1544
- if (data.nextToken != null) {
1545
- contents.nextToken = __expectString(data.nextToken);
1546
- }
1452
+ const doc = take(data, {
1453
+ items: _json,
1454
+ nextToken: __expectString,
1455
+ });
1456
+ Object.assign(contents, doc);
1547
1457
  return contents;
1548
1458
  };
1549
1459
  const de_ListSpacesCommandError = async (output, context) => {
@@ -1573,10 +1483,9 @@ const de_ListSpacesCommandError = async (output, context) => {
1573
1483
  throw await de_ValidationExceptionRes(parsedOutput, context);
1574
1484
  default:
1575
1485
  const parsedBody = parsedOutput.body;
1576
- throwDefaultError({
1486
+ return throwDefaultError({
1577
1487
  output,
1578
1488
  parsedBody,
1579
- exceptionCtor: __BaseException,
1580
1489
  errorCode,
1581
1490
  });
1582
1491
  }
@@ -1589,18 +1498,13 @@ export const de_StartDevEnvironmentCommand = async (output, context) => {
1589
1498
  $metadata: deserializeMetadata(output),
1590
1499
  });
1591
1500
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1592
- if (data.id != null) {
1593
- contents.id = __expectString(data.id);
1594
- }
1595
- if (data.projectName != null) {
1596
- contents.projectName = __expectString(data.projectName);
1597
- }
1598
- if (data.spaceName != null) {
1599
- contents.spaceName = __expectString(data.spaceName);
1600
- }
1601
- if (data.status != null) {
1602
- contents.status = __expectString(data.status);
1603
- }
1501
+ const doc = take(data, {
1502
+ id: __expectString,
1503
+ projectName: __expectString,
1504
+ spaceName: __expectString,
1505
+ status: __expectString,
1506
+ });
1507
+ Object.assign(contents, doc);
1604
1508
  return contents;
1605
1509
  };
1606
1510
  const de_StartDevEnvironmentCommandError = async (output, context) => {
@@ -1630,10 +1534,9 @@ const de_StartDevEnvironmentCommandError = async (output, context) => {
1630
1534
  throw await de_ValidationExceptionRes(parsedOutput, context);
1631
1535
  default:
1632
1536
  const parsedBody = parsedOutput.body;
1633
- throwDefaultError({
1537
+ return throwDefaultError({
1634
1538
  output,
1635
1539
  parsedBody,
1636
- exceptionCtor: __BaseException,
1637
1540
  errorCode,
1638
1541
  });
1639
1542
  }
@@ -1646,21 +1549,14 @@ export const de_StartDevEnvironmentSessionCommand = async (output, context) => {
1646
1549
  $metadata: deserializeMetadata(output),
1647
1550
  });
1648
1551
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1649
- if (data.accessDetails != null) {
1650
- contents.accessDetails = de_DevEnvironmentAccessDetails(data.accessDetails, context);
1651
- }
1652
- if (data.id != null) {
1653
- contents.id = __expectString(data.id);
1654
- }
1655
- if (data.projectName != null) {
1656
- contents.projectName = __expectString(data.projectName);
1657
- }
1658
- if (data.sessionId != null) {
1659
- contents.sessionId = __expectString(data.sessionId);
1660
- }
1661
- if (data.spaceName != null) {
1662
- contents.spaceName = __expectString(data.spaceName);
1663
- }
1552
+ const doc = take(data, {
1553
+ accessDetails: _json,
1554
+ id: __expectString,
1555
+ projectName: __expectString,
1556
+ sessionId: __expectString,
1557
+ spaceName: __expectString,
1558
+ });
1559
+ Object.assign(contents, doc);
1664
1560
  return contents;
1665
1561
  };
1666
1562
  const de_StartDevEnvironmentSessionCommandError = async (output, context) => {
@@ -1690,10 +1586,9 @@ const de_StartDevEnvironmentSessionCommandError = async (output, context) => {
1690
1586
  throw await de_ValidationExceptionRes(parsedOutput, context);
1691
1587
  default:
1692
1588
  const parsedBody = parsedOutput.body;
1693
- throwDefaultError({
1589
+ return throwDefaultError({
1694
1590
  output,
1695
1591
  parsedBody,
1696
- exceptionCtor: __BaseException,
1697
1592
  errorCode,
1698
1593
  });
1699
1594
  }
@@ -1706,18 +1601,13 @@ export const de_StopDevEnvironmentCommand = async (output, context) => {
1706
1601
  $metadata: deserializeMetadata(output),
1707
1602
  });
1708
1603
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1709
- if (data.id != null) {
1710
- contents.id = __expectString(data.id);
1711
- }
1712
- if (data.projectName != null) {
1713
- contents.projectName = __expectString(data.projectName);
1714
- }
1715
- if (data.spaceName != null) {
1716
- contents.spaceName = __expectString(data.spaceName);
1717
- }
1718
- if (data.status != null) {
1719
- contents.status = __expectString(data.status);
1720
- }
1604
+ const doc = take(data, {
1605
+ id: __expectString,
1606
+ projectName: __expectString,
1607
+ spaceName: __expectString,
1608
+ status: __expectString,
1609
+ });
1610
+ Object.assign(contents, doc);
1721
1611
  return contents;
1722
1612
  };
1723
1613
  const de_StopDevEnvironmentCommandError = async (output, context) => {
@@ -1747,10 +1637,9 @@ const de_StopDevEnvironmentCommandError = async (output, context) => {
1747
1637
  throw await de_ValidationExceptionRes(parsedOutput, context);
1748
1638
  default:
1749
1639
  const parsedBody = parsedOutput.body;
1750
- throwDefaultError({
1640
+ return throwDefaultError({
1751
1641
  output,
1752
1642
  parsedBody,
1753
- exceptionCtor: __BaseException,
1754
1643
  errorCode,
1755
1644
  });
1756
1645
  }
@@ -1763,18 +1652,13 @@ export const de_StopDevEnvironmentSessionCommand = async (output, context) => {
1763
1652
  $metadata: deserializeMetadata(output),
1764
1653
  });
1765
1654
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1766
- if (data.id != null) {
1767
- contents.id = __expectString(data.id);
1768
- }
1769
- if (data.projectName != null) {
1770
- contents.projectName = __expectString(data.projectName);
1771
- }
1772
- if (data.sessionId != null) {
1773
- contents.sessionId = __expectString(data.sessionId);
1774
- }
1775
- if (data.spaceName != null) {
1776
- contents.spaceName = __expectString(data.spaceName);
1777
- }
1655
+ const doc = take(data, {
1656
+ id: __expectString,
1657
+ projectName: __expectString,
1658
+ sessionId: __expectString,
1659
+ spaceName: __expectString,
1660
+ });
1661
+ Object.assign(contents, doc);
1778
1662
  return contents;
1779
1663
  };
1780
1664
  const de_StopDevEnvironmentSessionCommandError = async (output, context) => {
@@ -1804,10 +1688,9 @@ const de_StopDevEnvironmentSessionCommandError = async (output, context) => {
1804
1688
  throw await de_ValidationExceptionRes(parsedOutput, context);
1805
1689
  default:
1806
1690
  const parsedBody = parsedOutput.body;
1807
- throwDefaultError({
1691
+ return throwDefaultError({
1808
1692
  output,
1809
1693
  parsedBody,
1810
- exceptionCtor: __BaseException,
1811
1694
  errorCode,
1812
1695
  });
1813
1696
  }
@@ -1820,30 +1703,17 @@ export const de_UpdateDevEnvironmentCommand = async (output, context) => {
1820
1703
  $metadata: deserializeMetadata(output),
1821
1704
  });
1822
1705
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1823
- if (data.alias != null) {
1824
- contents.alias = __expectString(data.alias);
1825
- }
1826
- if (data.clientToken != null) {
1827
- contents.clientToken = __expectString(data.clientToken);
1828
- }
1829
- if (data.id != null) {
1830
- contents.id = __expectString(data.id);
1831
- }
1832
- if (data.ides != null) {
1833
- contents.ides = de_IdeConfigurationList(data.ides, context);
1834
- }
1835
- if (data.inactivityTimeoutMinutes != null) {
1836
- contents.inactivityTimeoutMinutes = __expectInt32(data.inactivityTimeoutMinutes);
1837
- }
1838
- if (data.instanceType != null) {
1839
- contents.instanceType = __expectString(data.instanceType);
1840
- }
1841
- if (data.projectName != null) {
1842
- contents.projectName = __expectString(data.projectName);
1843
- }
1844
- if (data.spaceName != null) {
1845
- contents.spaceName = __expectString(data.spaceName);
1846
- }
1706
+ const doc = take(data, {
1707
+ alias: __expectString,
1708
+ clientToken: __expectString,
1709
+ id: __expectString,
1710
+ ides: _json,
1711
+ inactivityTimeoutMinutes: __expectInt32,
1712
+ instanceType: __expectString,
1713
+ projectName: __expectString,
1714
+ spaceName: __expectString,
1715
+ });
1716
+ Object.assign(contents, doc);
1847
1717
  return contents;
1848
1718
  };
1849
1719
  const de_UpdateDevEnvironmentCommandError = async (output, context) => {
@@ -1873,10 +1743,9 @@ const de_UpdateDevEnvironmentCommandError = async (output, context) => {
1873
1743
  throw await de_ValidationExceptionRes(parsedOutput, context);
1874
1744
  default:
1875
1745
  const parsedBody = parsedOutput.body;
1876
- throwDefaultError({
1746
+ return throwDefaultError({
1877
1747
  output,
1878
1748
  parsedBody,
1879
- exceptionCtor: __BaseException,
1880
1749
  errorCode,
1881
1750
  });
1882
1751
  }
@@ -1889,9 +1758,10 @@ export const de_VerifySessionCommand = async (output, context) => {
1889
1758
  $metadata: deserializeMetadata(output),
1890
1759
  });
1891
1760
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1892
- if (data.identity != null) {
1893
- contents.identity = __expectString(data.identity);
1894
- }
1761
+ const doc = take(data, {
1762
+ identity: __expectString,
1763
+ });
1764
+ Object.assign(contents, doc);
1895
1765
  return contents;
1896
1766
  };
1897
1767
  const de_VerifySessionCommandError = async (output, context) => {
@@ -1921,21 +1791,21 @@ const de_VerifySessionCommandError = async (output, context) => {
1921
1791
  throw await de_ValidationExceptionRes(parsedOutput, context);
1922
1792
  default:
1923
1793
  const parsedBody = parsedOutput.body;
1924
- throwDefaultError({
1794
+ return throwDefaultError({
1925
1795
  output,
1926
1796
  parsedBody,
1927
- exceptionCtor: __BaseException,
1928
1797
  errorCode,
1929
1798
  });
1930
1799
  }
1931
1800
  };
1932
- const map = __map;
1801
+ const throwDefaultError = withBaseException(__BaseException);
1933
1802
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1934
1803
  const contents = map({});
1935
1804
  const data = parsedOutput.body;
1936
- if (data.message != null) {
1937
- contents.message = __expectString(data.message);
1938
- }
1805
+ const doc = take(data, {
1806
+ message: __expectString,
1807
+ });
1808
+ Object.assign(contents, doc);
1939
1809
  const exception = new AccessDeniedException({
1940
1810
  $metadata: deserializeMetadata(parsedOutput),
1941
1811
  ...contents,
@@ -1945,9 +1815,10 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1945
1815
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
1946
1816
  const contents = map({});
1947
1817
  const data = parsedOutput.body;
1948
- if (data.message != null) {
1949
- contents.message = __expectString(data.message);
1950
- }
1818
+ const doc = take(data, {
1819
+ message: __expectString,
1820
+ });
1821
+ Object.assign(contents, doc);
1951
1822
  const exception = new ConflictException({
1952
1823
  $metadata: deserializeMetadata(parsedOutput),
1953
1824
  ...contents,
@@ -1957,9 +1828,10 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
1957
1828
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1958
1829
  const contents = map({});
1959
1830
  const data = parsedOutput.body;
1960
- if (data.message != null) {
1961
- contents.message = __expectString(data.message);
1962
- }
1831
+ const doc = take(data, {
1832
+ message: __expectString,
1833
+ });
1834
+ Object.assign(contents, doc);
1963
1835
  const exception = new ResourceNotFoundException({
1964
1836
  $metadata: deserializeMetadata(parsedOutput),
1965
1837
  ...contents,
@@ -1969,9 +1841,10 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1969
1841
  const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1970
1842
  const contents = map({});
1971
1843
  const data = parsedOutput.body;
1972
- if (data.message != null) {
1973
- contents.message = __expectString(data.message);
1974
- }
1844
+ const doc = take(data, {
1845
+ message: __expectString,
1846
+ });
1847
+ Object.assign(contents, doc);
1975
1848
  const exception = new ServiceQuotaExceededException({
1976
1849
  $metadata: deserializeMetadata(parsedOutput),
1977
1850
  ...contents,
@@ -1981,9 +1854,10 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1981
1854
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1982
1855
  const contents = map({});
1983
1856
  const data = parsedOutput.body;
1984
- if (data.message != null) {
1985
- contents.message = __expectString(data.message);
1986
- }
1857
+ const doc = take(data, {
1858
+ message: __expectString,
1859
+ });
1860
+ Object.assign(contents, doc);
1987
1861
  const exception = new ThrottlingException({
1988
1862
  $metadata: deserializeMetadata(parsedOutput),
1989
1863
  ...contents,
@@ -1993,350 +1867,116 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1993
1867
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
1994
1868
  const contents = map({});
1995
1869
  const data = parsedOutput.body;
1996
- if (data.message != null) {
1997
- contents.message = __expectString(data.message);
1998
- }
1870
+ const doc = take(data, {
1871
+ message: __expectString,
1872
+ });
1873
+ Object.assign(contents, doc);
1999
1874
  const exception = new ValidationException({
2000
1875
  $metadata: deserializeMetadata(parsedOutput),
2001
1876
  ...contents,
2002
1877
  });
2003
1878
  return __decorateServiceException(exception, parsedOutput.body);
2004
1879
  };
2005
- const se_DevEnvironmentSessionConfiguration = (input, context) => {
2006
- return {
2007
- ...(input.executeCommandSessionConfiguration != null && {
2008
- executeCommandSessionConfiguration: se_ExecuteCommandSessionConfiguration(input.executeCommandSessionConfiguration, context),
2009
- }),
2010
- ...(input.sessionType != null && { sessionType: input.sessionType }),
2011
- };
2012
- };
2013
- const se_ExecuteCommandSessionConfiguration = (input, context) => {
2014
- return {
2015
- ...(input.arguments != null && {
2016
- arguments: se_ExecuteCommandSessionConfigurationArguments(input.arguments, context),
2017
- }),
2018
- ...(input.command != null && { command: input.command }),
2019
- };
2020
- };
2021
- const se_ExecuteCommandSessionConfigurationArguments = (input, context) => {
2022
- return input
2023
- .filter((e) => e != null)
2024
- .map((entry) => {
2025
- return entry;
2026
- });
2027
- };
2028
- const se_Filter = (input, context) => {
2029
- return {
2030
- ...(input.comparisonOperator != null && { comparisonOperator: input.comparisonOperator }),
2031
- ...(input.key != null && { key: input.key }),
2032
- ...(input.values != null && { values: se_StringList(input.values, context) }),
2033
- };
2034
- };
2035
- const se_Filters = (input, context) => {
2036
- return input
2037
- .filter((e) => e != null)
2038
- .map((entry) => {
2039
- return se_Filter(entry, context);
2040
- });
2041
- };
2042
- const se_IdeConfiguration = (input, context) => {
2043
- return {
2044
- ...(input.name != null && { name: input.name }),
2045
- ...(input.runtime != null && { runtime: input.runtime }),
2046
- };
2047
- };
2048
- const se_IdeConfigurationList = (input, context) => {
2049
- return input
2050
- .filter((e) => e != null)
2051
- .map((entry) => {
2052
- return se_IdeConfiguration(entry, context);
2053
- });
2054
- };
2055
- const se_PersistentStorageConfiguration = (input, context) => {
2056
- return {
2057
- ...(input.sizeInGiB != null && { sizeInGiB: input.sizeInGiB }),
2058
- };
2059
- };
2060
- const se_ProjectListFilter = (input, context) => {
2061
- return {
2062
- ...(input.comparisonOperator != null && { comparisonOperator: input.comparisonOperator }),
2063
- ...(input.key != null && { key: input.key }),
2064
- ...(input.values != null && { values: se_StringList(input.values, context) }),
2065
- };
2066
- };
2067
- const se_ProjectListFilters = (input, context) => {
2068
- return input
2069
- .filter((e) => e != null)
2070
- .map((entry) => {
2071
- return se_ProjectListFilter(entry, context);
2072
- });
2073
- };
2074
- const se_RepositoriesInput = (input, context) => {
2075
- return input
2076
- .filter((e) => e != null)
2077
- .map((entry) => {
2078
- return se_RepositoryInput(entry, context);
2079
- });
2080
- };
2081
- const se_RepositoryInput = (input, context) => {
2082
- return {
2083
- ...(input.branchName != null && { branchName: input.branchName }),
2084
- ...(input.repositoryName != null && { repositoryName: input.repositoryName }),
2085
- };
2086
- };
2087
- const se_StringList = (input, context) => {
2088
- return input
2089
- .filter((e) => e != null)
2090
- .map((entry) => {
2091
- return entry;
2092
- });
2093
- };
2094
1880
  const de_AccessTokenSummaries = (output, context) => {
2095
1881
  const retVal = (output || [])
2096
1882
  .filter((e) => e != null)
2097
1883
  .map((entry) => {
2098
- if (entry === null) {
2099
- return null;
2100
- }
2101
1884
  return de_AccessTokenSummary(entry, context);
2102
1885
  });
2103
1886
  return retVal;
2104
1887
  };
2105
1888
  const de_AccessTokenSummary = (output, context) => {
2106
- return {
2107
- expiresTime: output.expiresTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.expiresTime)) : undefined,
2108
- id: __expectString(output.id),
2109
- name: __expectString(output.name),
2110
- };
2111
- };
2112
- const de_DevEnvironmentAccessDetails = (output, context) => {
2113
- return {
2114
- streamUrl: __expectString(output.streamUrl),
2115
- tokenValue: __expectString(output.tokenValue),
2116
- };
2117
- };
2118
- const de_DevEnvironmentRepositorySummaries = (output, context) => {
2119
- const retVal = (output || [])
2120
- .filter((e) => e != null)
2121
- .map((entry) => {
2122
- if (entry === null) {
2123
- return null;
2124
- }
2125
- return de_DevEnvironmentRepositorySummary(entry, context);
1889
+ return take(output, {
1890
+ expiresTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1891
+ id: __expectString,
1892
+ name: __expectString,
2126
1893
  });
2127
- return retVal;
2128
- };
2129
- const de_DevEnvironmentRepositorySummary = (output, context) => {
2130
- return {
2131
- branchName: __expectString(output.branchName),
2132
- repositoryName: __expectString(output.repositoryName),
2133
- };
2134
1894
  };
2135
1895
  const de_DevEnvironmentSummary = (output, context) => {
2136
- return {
2137
- alias: __expectString(output.alias),
2138
- creatorId: __expectString(output.creatorId),
2139
- id: __expectString(output.id),
2140
- ides: output.ides != null ? de_Ides(output.ides, context) : undefined,
2141
- inactivityTimeoutMinutes: __expectInt32(output.inactivityTimeoutMinutes),
2142
- instanceType: __expectString(output.instanceType),
2143
- lastUpdatedTime: output.lastUpdatedTime != null
2144
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.lastUpdatedTime))
2145
- : undefined,
2146
- persistentStorage: output.persistentStorage != null ? de_PersistentStorage(output.persistentStorage, context) : undefined,
2147
- projectName: __expectString(output.projectName),
2148
- repositories: output.repositories != null ? de_DevEnvironmentRepositorySummaries(output.repositories, context) : undefined,
2149
- spaceName: __expectString(output.spaceName),
2150
- status: __expectString(output.status),
2151
- statusReason: __expectString(output.statusReason),
2152
- };
1896
+ return take(output, {
1897
+ alias: __expectString,
1898
+ creatorId: __expectString,
1899
+ id: __expectString,
1900
+ ides: _json,
1901
+ inactivityTimeoutMinutes: __expectInt32,
1902
+ instanceType: __expectString,
1903
+ lastUpdatedTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1904
+ persistentStorage: _json,
1905
+ projectName: __expectString,
1906
+ repositories: _json,
1907
+ spaceName: __expectString,
1908
+ status: __expectString,
1909
+ statusReason: __expectString,
1910
+ });
2153
1911
  };
2154
1912
  const de_DevEnvironmentSummaryList = (output, context) => {
2155
1913
  const retVal = (output || [])
2156
1914
  .filter((e) => e != null)
2157
1915
  .map((entry) => {
2158
- if (entry === null) {
2159
- return null;
2160
- }
2161
1916
  return de_DevEnvironmentSummary(entry, context);
2162
1917
  });
2163
1918
  return retVal;
2164
1919
  };
2165
- const de_EmailAddress = (output, context) => {
2166
- return {
2167
- email: __expectString(output.email),
2168
- verified: __expectBoolean(output.verified),
2169
- };
2170
- };
2171
1920
  const de_EventLogEntries = (output, context) => {
2172
1921
  const retVal = (output || [])
2173
1922
  .filter((e) => e != null)
2174
1923
  .map((entry) => {
2175
- if (entry === null) {
2176
- return null;
2177
- }
2178
1924
  return de_EventLogEntry(entry, context);
2179
1925
  });
2180
1926
  return retVal;
2181
1927
  };
2182
1928
  const de_EventLogEntry = (output, context) => {
2183
- return {
2184
- errorCode: __expectString(output.errorCode),
2185
- eventCategory: __expectString(output.eventCategory),
2186
- eventName: __expectString(output.eventName),
2187
- eventSource: __expectString(output.eventSource),
2188
- eventTime: output.eventTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.eventTime)) : undefined,
2189
- eventType: __expectString(output.eventType),
2190
- id: __expectString(output.id),
2191
- operationType: __expectString(output.operationType),
2192
- projectInformation: output.projectInformation != null ? de_ProjectInformation(output.projectInformation, context) : undefined,
2193
- requestId: __expectString(output.requestId),
2194
- requestPayload: output.requestPayload != null ? de_EventPayload(output.requestPayload, context) : undefined,
2195
- responsePayload: output.responsePayload != null ? de_EventPayload(output.responsePayload, context) : undefined,
2196
- sourceIpAddress: __expectString(output.sourceIpAddress),
2197
- userAgent: __expectString(output.userAgent),
2198
- userIdentity: output.userIdentity != null ? de_UserIdentity(output.userIdentity, context) : undefined,
2199
- };
2200
- };
2201
- const de_EventPayload = (output, context) => {
2202
- return {
2203
- contentType: __expectString(output.contentType),
2204
- data: __expectString(output.data),
2205
- };
2206
- };
2207
- const de_Ide = (output, context) => {
2208
- return {
2209
- name: __expectString(output.name),
2210
- runtime: __expectString(output.runtime),
2211
- };
2212
- };
2213
- const de_IdeConfiguration = (output, context) => {
2214
- return {
2215
- name: __expectString(output.name),
2216
- runtime: __expectString(output.runtime),
2217
- };
2218
- };
2219
- const de_IdeConfigurationList = (output, context) => {
2220
- const retVal = (output || [])
2221
- .filter((e) => e != null)
2222
- .map((entry) => {
2223
- if (entry === null) {
2224
- return null;
2225
- }
2226
- return de_IdeConfiguration(entry, context);
1929
+ return take(output, {
1930
+ errorCode: __expectString,
1931
+ eventCategory: __expectString,
1932
+ eventName: __expectString,
1933
+ eventSource: __expectString,
1934
+ eventTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1935
+ eventType: __expectString,
1936
+ id: __expectString,
1937
+ operationType: __expectString,
1938
+ projectInformation: _json,
1939
+ requestId: __expectString,
1940
+ requestPayload: _json,
1941
+ responsePayload: _json,
1942
+ sourceIpAddress: __expectString,
1943
+ userAgent: __expectString,
1944
+ userIdentity: _json,
2227
1945
  });
2228
- return retVal;
2229
- };
2230
- const de_Ides = (output, context) => {
2231
- const retVal = (output || [])
2232
- .filter((e) => e != null)
2233
- .map((entry) => {
2234
- if (entry === null) {
2235
- return null;
2236
- }
2237
- return de_Ide(entry, context);
2238
- });
2239
- return retVal;
2240
1946
  };
2241
1947
  const de_ListSourceRepositoriesItem = (output, context) => {
2242
- return {
2243
- createdTime: output.createdTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdTime)) : undefined,
2244
- description: __expectString(output.description),
2245
- id: __expectString(output.id),
2246
- lastUpdatedTime: output.lastUpdatedTime != null
2247
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.lastUpdatedTime))
2248
- : undefined,
2249
- name: __expectString(output.name),
2250
- };
1948
+ return take(output, {
1949
+ createdTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1950
+ description: __expectString,
1951
+ id: __expectString,
1952
+ lastUpdatedTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1953
+ name: __expectString,
1954
+ });
2251
1955
  };
2252
1956
  const de_ListSourceRepositoriesItems = (output, context) => {
2253
1957
  const retVal = (output || [])
2254
1958
  .filter((e) => e != null)
2255
1959
  .map((entry) => {
2256
- if (entry === null) {
2257
- return null;
2258
- }
2259
1960
  return de_ListSourceRepositoriesItem(entry, context);
2260
1961
  });
2261
1962
  return retVal;
2262
1963
  };
2263
1964
  const de_ListSourceRepositoryBranchesItem = (output, context) => {
2264
- return {
2265
- headCommitId: __expectString(output.headCommitId),
2266
- lastUpdatedTime: output.lastUpdatedTime != null
2267
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.lastUpdatedTime))
2268
- : undefined,
2269
- name: __expectString(output.name),
2270
- ref: __expectString(output.ref),
2271
- };
1965
+ return take(output, {
1966
+ headCommitId: __expectString,
1967
+ lastUpdatedTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1968
+ name: __expectString,
1969
+ ref: __expectString,
1970
+ });
2272
1971
  };
2273
1972
  const de_ListSourceRepositoryBranchesItems = (output, context) => {
2274
1973
  const retVal = (output || [])
2275
1974
  .filter((e) => e != null)
2276
1975
  .map((entry) => {
2277
- if (entry === null) {
2278
- return null;
2279
- }
2280
1976
  return de_ListSourceRepositoryBranchesItem(entry, context);
2281
1977
  });
2282
1978
  return retVal;
2283
1979
  };
2284
- const de_PersistentStorage = (output, context) => {
2285
- return {
2286
- sizeInGiB: __expectInt32(output.sizeInGiB),
2287
- };
2288
- };
2289
- const de_ProjectInformation = (output, context) => {
2290
- return {
2291
- name: __expectString(output.name),
2292
- projectId: __expectString(output.projectId),
2293
- };
2294
- };
2295
- const de_ProjectSummaries = (output, context) => {
2296
- const retVal = (output || [])
2297
- .filter((e) => e != null)
2298
- .map((entry) => {
2299
- if (entry === null) {
2300
- return null;
2301
- }
2302
- return de_ProjectSummary(entry, context);
2303
- });
2304
- return retVal;
2305
- };
2306
- const de_ProjectSummary = (output, context) => {
2307
- return {
2308
- description: __expectString(output.description),
2309
- displayName: __expectString(output.displayName),
2310
- name: __expectString(output.name),
2311
- };
2312
- };
2313
- const de_SpaceSummaries = (output, context) => {
2314
- const retVal = (output || [])
2315
- .filter((e) => e != null)
2316
- .map((entry) => {
2317
- if (entry === null) {
2318
- return null;
2319
- }
2320
- return de_SpaceSummary(entry, context);
2321
- });
2322
- return retVal;
2323
- };
2324
- const de_SpaceSummary = (output, context) => {
2325
- return {
2326
- description: __expectString(output.description),
2327
- displayName: __expectString(output.displayName),
2328
- name: __expectString(output.name),
2329
- regionName: __expectString(output.regionName),
2330
- };
2331
- };
2332
- const de_UserIdentity = (output, context) => {
2333
- return {
2334
- awsAccountId: __expectString(output.awsAccountId),
2335
- principalId: __expectString(output.principalId),
2336
- userName: __expectString(output.userName),
2337
- userType: __expectString(output.userType),
2338
- };
2339
- };
2340
1980
  const deserializeMetadata = (output) => ({
2341
1981
  httpStatusCode: output.statusCode,
2342
1982
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],