@aws-sdk/client-codecatalyst 3.310.0 → 3.316.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,10 +12,10 @@ const se_CreateAccessTokenCommand = async (input, context) => {
12
12
  };
13
13
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/accessTokens";
14
14
  let body;
15
- body = JSON.stringify({
16
- ...(input.expiresTime != null && { expiresTime: input.expiresTime.toISOString().split(".")[0] + "Z" }),
17
- ...(input.name != null && { name: input.name }),
18
- });
15
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
16
+ expiresTime: (_) => _.toISOString().split(".")[0] + "Z",
17
+ name: [],
18
+ }));
19
19
  return new protocol_http_1.HttpRequest({
20
20
  protocol,
21
21
  hostname,
@@ -37,17 +37,15 @@ const se_CreateDevEnvironmentCommand = async (input, context) => {
37
37
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "spaceName", () => input.spaceName, "{spaceName}", false);
38
38
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "projectName", () => input.projectName, "{projectName}", false);
39
39
  let body;
40
- body = JSON.stringify({
41
- ...(input.alias != null && { alias: input.alias }),
42
- ...(input.clientToken != null && { clientToken: input.clientToken }),
43
- ...(input.ides != null && { ides: se_IdeConfigurationList(input.ides, context) }),
44
- ...(input.inactivityTimeoutMinutes != null && { inactivityTimeoutMinutes: input.inactivityTimeoutMinutes }),
45
- ...(input.instanceType != null && { instanceType: input.instanceType }),
46
- ...(input.persistentStorage != null && {
47
- persistentStorage: se_PersistentStorageConfiguration(input.persistentStorage, context),
48
- }),
49
- ...(input.repositories != null && { repositories: se_RepositoriesInput(input.repositories, context) }),
50
- });
40
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
41
+ alias: [],
42
+ clientToken: [],
43
+ ides: (_) => (0, smithy_client_1._json)(_),
44
+ inactivityTimeoutMinutes: [],
45
+ instanceType: [],
46
+ persistentStorage: (_) => (0, smithy_client_1._json)(_),
47
+ repositories: (_) => (0, smithy_client_1._json)(_),
48
+ }));
51
49
  return new protocol_http_1.HttpRequest({
52
50
  protocol,
53
51
  hostname,
@@ -67,10 +65,10 @@ const se_CreateProjectCommand = async (input, context) => {
67
65
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/spaces/{spaceName}/projects";
68
66
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "spaceName", () => input.spaceName, "{spaceName}", false);
69
67
  let body;
70
- body = JSON.stringify({
71
- ...(input.description != null && { description: input.description }),
72
- ...(input.displayName != null && { displayName: input.displayName }),
73
- });
68
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
69
+ description: [],
70
+ displayName: [],
71
+ }));
74
72
  return new protocol_http_1.HttpRequest({
75
73
  protocol,
76
74
  hostname,
@@ -94,9 +92,9 @@ const se_CreateSourceRepositoryBranchCommand = async (input, context) => {
94
92
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "sourceRepositoryName", () => input.sourceRepositoryName, "{sourceRepositoryName}", false);
95
93
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "name", () => input.name, "{name}", false);
96
94
  let body;
97
- body = JSON.stringify({
98
- ...(input.headCommitId != null && { headCommitId: input.headCommitId }),
99
- });
95
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
96
+ headCommitId: [],
97
+ }));
100
98
  return new protocol_http_1.HttpRequest({
101
99
  protocol,
102
100
  hostname,
@@ -241,7 +239,7 @@ const se_GetUserDetailsCommand = async (input, context) => {
241
239
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
242
240
  const headers = {};
243
241
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/userDetails";
244
- const query = map({
242
+ const query = (0, smithy_client_1.map)({
245
243
  id: [, input.id],
246
244
  userName: [, input.userName],
247
245
  });
@@ -265,10 +263,10 @@ const se_ListAccessTokensCommand = async (input, context) => {
265
263
  };
266
264
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/accessTokens";
267
265
  let body;
268
- body = JSON.stringify({
269
- ...(input.maxResults != null && { maxResults: input.maxResults }),
270
- ...(input.nextToken != null && { nextToken: input.nextToken }),
271
- });
266
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
267
+ maxResults: [],
268
+ nextToken: [],
269
+ }));
272
270
  return new protocol_http_1.HttpRequest({
273
271
  protocol,
274
272
  hostname,
@@ -290,11 +288,11 @@ const se_ListDevEnvironmentsCommand = async (input, context) => {
290
288
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "spaceName", () => input.spaceName, "{spaceName}", false);
291
289
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "projectName", () => input.projectName, "{projectName}", false);
292
290
  let body;
293
- body = JSON.stringify({
294
- ...(input.filters != null && { filters: se_Filters(input.filters, context) }),
295
- ...(input.maxResults != null && { maxResults: input.maxResults }),
296
- ...(input.nextToken != null && { nextToken: input.nextToken }),
297
- });
291
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
292
+ filters: (_) => (0, smithy_client_1._json)(_),
293
+ maxResults: [],
294
+ nextToken: [],
295
+ }));
298
296
  return new protocol_http_1.HttpRequest({
299
297
  protocol,
300
298
  hostname,
@@ -314,13 +312,13 @@ const se_ListEventLogsCommand = async (input, context) => {
314
312
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/spaces/{spaceName}/eventLogs";
315
313
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "spaceName", () => input.spaceName, "{spaceName}", false);
316
314
  let body;
317
- body = JSON.stringify({
318
- ...(input.endTime != null && { endTime: input.endTime.toISOString().split(".")[0] + "Z" }),
319
- ...(input.eventName != null && { eventName: input.eventName }),
320
- ...(input.maxResults != null && { maxResults: input.maxResults }),
321
- ...(input.nextToken != null && { nextToken: input.nextToken }),
322
- ...(input.startTime != null && { startTime: input.startTime.toISOString().split(".")[0] + "Z" }),
323
- });
315
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
316
+ endTime: (_) => _.toISOString().split(".")[0] + "Z",
317
+ eventName: [],
318
+ maxResults: [],
319
+ nextToken: [],
320
+ startTime: (_) => _.toISOString().split(".")[0] + "Z",
321
+ }));
324
322
  return new protocol_http_1.HttpRequest({
325
323
  protocol,
326
324
  hostname,
@@ -340,11 +338,11 @@ const se_ListProjectsCommand = async (input, context) => {
340
338
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/spaces/{spaceName}/projects";
341
339
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "spaceName", () => input.spaceName, "{spaceName}", false);
342
340
  let body;
343
- body = JSON.stringify({
344
- ...(input.filters != null && { filters: se_ProjectListFilters(input.filters, context) }),
345
- ...(input.maxResults != null && { maxResults: input.maxResults }),
346
- ...(input.nextToken != null && { nextToken: input.nextToken }),
347
- });
341
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
342
+ filters: (_) => (0, smithy_client_1._json)(_),
343
+ maxResults: [],
344
+ nextToken: [],
345
+ }));
348
346
  return new protocol_http_1.HttpRequest({
349
347
  protocol,
350
348
  hostname,
@@ -366,10 +364,10 @@ const se_ListSourceRepositoriesCommand = async (input, context) => {
366
364
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "spaceName", () => input.spaceName, "{spaceName}", false);
367
365
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "projectName", () => input.projectName, "{projectName}", false);
368
366
  let body;
369
- body = JSON.stringify({
370
- ...(input.maxResults != null && { maxResults: input.maxResults }),
371
- ...(input.nextToken != null && { nextToken: input.nextToken }),
372
- });
367
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
368
+ maxResults: [],
369
+ nextToken: [],
370
+ }));
373
371
  return new protocol_http_1.HttpRequest({
374
372
  protocol,
375
373
  hostname,
@@ -392,10 +390,10 @@ const se_ListSourceRepositoryBranchesCommand = async (input, context) => {
392
390
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "projectName", () => input.projectName, "{projectName}", false);
393
391
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "sourceRepositoryName", () => input.sourceRepositoryName, "{sourceRepositoryName}", false);
394
392
  let body;
395
- body = JSON.stringify({
396
- ...(input.maxResults != null && { maxResults: input.maxResults }),
397
- ...(input.nextToken != null && { nextToken: input.nextToken }),
398
- });
393
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
394
+ maxResults: [],
395
+ nextToken: [],
396
+ }));
399
397
  return new protocol_http_1.HttpRequest({
400
398
  protocol,
401
399
  hostname,
@@ -414,9 +412,9 @@ const se_ListSpacesCommand = async (input, context) => {
414
412
  };
415
413
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/spaces";
416
414
  let body;
417
- body = JSON.stringify({
418
- ...(input.nextToken != null && { nextToken: input.nextToken }),
419
- });
415
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
416
+ nextToken: [],
417
+ }));
420
418
  return new protocol_http_1.HttpRequest({
421
419
  protocol,
422
420
  hostname,
@@ -439,11 +437,11 @@ const se_StartDevEnvironmentCommand = async (input, context) => {
439
437
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "projectName", () => input.projectName, "{projectName}", false);
440
438
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
441
439
  let body;
442
- body = JSON.stringify({
443
- ...(input.ides != null && { ides: se_IdeConfigurationList(input.ides, context) }),
444
- ...(input.inactivityTimeoutMinutes != null && { inactivityTimeoutMinutes: input.inactivityTimeoutMinutes }),
445
- ...(input.instanceType != null && { instanceType: input.instanceType }),
446
- });
440
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
441
+ ides: (_) => (0, smithy_client_1._json)(_),
442
+ inactivityTimeoutMinutes: [],
443
+ instanceType: [],
444
+ }));
447
445
  return new protocol_http_1.HttpRequest({
448
446
  protocol,
449
447
  hostname,
@@ -466,11 +464,9 @@ const se_StartDevEnvironmentSessionCommand = async (input, context) => {
466
464
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "projectName", () => input.projectName, "{projectName}", false);
467
465
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
468
466
  let body;
469
- body = JSON.stringify({
470
- ...(input.sessionConfiguration != null && {
471
- sessionConfiguration: se_DevEnvironmentSessionConfiguration(input.sessionConfiguration, context),
472
- }),
473
- });
467
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
468
+ sessionConfiguration: (_) => (0, smithy_client_1._json)(_),
469
+ }));
474
470
  return new protocol_http_1.HttpRequest({
475
471
  protocol,
476
472
  hostname,
@@ -534,13 +530,13 @@ const se_UpdateDevEnvironmentCommand = async (input, context) => {
534
530
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "projectName", () => input.projectName, "{projectName}", false);
535
531
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
536
532
  let body;
537
- body = JSON.stringify({
538
- ...(input.alias != null && { alias: input.alias }),
539
- ...(input.clientToken != null && { clientToken: input.clientToken }),
540
- ...(input.ides != null && { ides: se_IdeConfigurationList(input.ides, context) }),
541
- ...(input.inactivityTimeoutMinutes != null && { inactivityTimeoutMinutes: input.inactivityTimeoutMinutes }),
542
- ...(input.instanceType != null && { instanceType: input.instanceType }),
543
- });
533
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
534
+ alias: [],
535
+ clientToken: [],
536
+ ides: (_) => (0, smithy_client_1._json)(_),
537
+ inactivityTimeoutMinutes: [],
538
+ instanceType: [],
539
+ }));
544
540
  return new protocol_http_1.HttpRequest({
545
541
  protocol,
546
542
  hostname,
@@ -575,22 +571,17 @@ const de_CreateAccessTokenCommand = async (output, context) => {
575
571
  if (output.statusCode !== 201 && output.statusCode >= 300) {
576
572
  return de_CreateAccessTokenCommandError(output, context);
577
573
  }
578
- const contents = map({
574
+ const contents = (0, smithy_client_1.map)({
579
575
  $metadata: deserializeMetadata(output),
580
576
  });
581
577
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
582
- if (data.accessTokenId != null) {
583
- contents.accessTokenId = (0, smithy_client_1.expectString)(data.accessTokenId);
584
- }
585
- if (data.expiresTime != null) {
586
- contents.expiresTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.expiresTime));
587
- }
588
- if (data.name != null) {
589
- contents.name = (0, smithy_client_1.expectString)(data.name);
590
- }
591
- if (data.secret != null) {
592
- contents.secret = (0, smithy_client_1.expectString)(data.secret);
593
- }
578
+ const doc = (0, smithy_client_1.take)(data, {
579
+ accessTokenId: smithy_client_1.expectString,
580
+ expiresTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
581
+ name: smithy_client_1.expectString,
582
+ secret: smithy_client_1.expectString,
583
+ });
584
+ Object.assign(contents, doc);
594
585
  return contents;
595
586
  };
596
587
  exports.de_CreateAccessTokenCommand = de_CreateAccessTokenCommand;
@@ -621,10 +612,9 @@ const de_CreateAccessTokenCommandError = async (output, context) => {
621
612
  throw await de_ValidationExceptionRes(parsedOutput, context);
622
613
  default:
623
614
  const parsedBody = parsedOutput.body;
624
- (0, smithy_client_1.throwDefaultError)({
615
+ return throwDefaultError({
625
616
  output,
626
617
  parsedBody,
627
- exceptionCtor: CodeCatalystServiceException_1.CodeCatalystServiceException,
628
618
  errorCode,
629
619
  });
630
620
  }
@@ -633,19 +623,16 @@ const de_CreateDevEnvironmentCommand = async (output, context) => {
633
623
  if (output.statusCode !== 201 && output.statusCode >= 300) {
634
624
  return de_CreateDevEnvironmentCommandError(output, context);
635
625
  }
636
- const contents = map({
626
+ const contents = (0, smithy_client_1.map)({
637
627
  $metadata: deserializeMetadata(output),
638
628
  });
639
629
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
640
- if (data.id != null) {
641
- contents.id = (0, smithy_client_1.expectString)(data.id);
642
- }
643
- if (data.projectName != null) {
644
- contents.projectName = (0, smithy_client_1.expectString)(data.projectName);
645
- }
646
- if (data.spaceName != null) {
647
- contents.spaceName = (0, smithy_client_1.expectString)(data.spaceName);
648
- }
630
+ const doc = (0, smithy_client_1.take)(data, {
631
+ id: smithy_client_1.expectString,
632
+ projectName: smithy_client_1.expectString,
633
+ spaceName: smithy_client_1.expectString,
634
+ });
635
+ Object.assign(contents, doc);
649
636
  return contents;
650
637
  };
651
638
  exports.de_CreateDevEnvironmentCommand = de_CreateDevEnvironmentCommand;
@@ -676,10 +663,9 @@ const de_CreateDevEnvironmentCommandError = async (output, context) => {
676
663
  throw await de_ValidationExceptionRes(parsedOutput, context);
677
664
  default:
678
665
  const parsedBody = parsedOutput.body;
679
- (0, smithy_client_1.throwDefaultError)({
666
+ return throwDefaultError({
680
667
  output,
681
668
  parsedBody,
682
- exceptionCtor: CodeCatalystServiceException_1.CodeCatalystServiceException,
683
669
  errorCode,
684
670
  });
685
671
  }
@@ -688,22 +674,17 @@ const de_CreateProjectCommand = async (output, context) => {
688
674
  if (output.statusCode !== 201 && output.statusCode >= 300) {
689
675
  return de_CreateProjectCommandError(output, context);
690
676
  }
691
- const contents = map({
677
+ const contents = (0, smithy_client_1.map)({
692
678
  $metadata: deserializeMetadata(output),
693
679
  });
694
680
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
695
- if (data.description != null) {
696
- contents.description = (0, smithy_client_1.expectString)(data.description);
697
- }
698
- if (data.displayName != null) {
699
- contents.displayName = (0, smithy_client_1.expectString)(data.displayName);
700
- }
701
- if (data.name != null) {
702
- contents.name = (0, smithy_client_1.expectString)(data.name);
703
- }
704
- if (data.spaceName != null) {
705
- contents.spaceName = (0, smithy_client_1.expectString)(data.spaceName);
706
- }
681
+ const doc = (0, smithy_client_1.take)(data, {
682
+ description: smithy_client_1.expectString,
683
+ displayName: smithy_client_1.expectString,
684
+ name: smithy_client_1.expectString,
685
+ spaceName: smithy_client_1.expectString,
686
+ });
687
+ Object.assign(contents, doc);
707
688
  return contents;
708
689
  };
709
690
  exports.de_CreateProjectCommand = de_CreateProjectCommand;
@@ -734,10 +715,9 @@ const de_CreateProjectCommandError = async (output, context) => {
734
715
  throw await de_ValidationExceptionRes(parsedOutput, context);
735
716
  default:
736
717
  const parsedBody = parsedOutput.body;
737
- (0, smithy_client_1.throwDefaultError)({
718
+ return throwDefaultError({
738
719
  output,
739
720
  parsedBody,
740
- exceptionCtor: CodeCatalystServiceException_1.CodeCatalystServiceException,
741
721
  errorCode,
742
722
  });
743
723
  }
@@ -746,22 +726,17 @@ const de_CreateSourceRepositoryBranchCommand = async (output, context) => {
746
726
  if (output.statusCode !== 201 && output.statusCode >= 300) {
747
727
  return de_CreateSourceRepositoryBranchCommandError(output, context);
748
728
  }
749
- const contents = map({
729
+ const contents = (0, smithy_client_1.map)({
750
730
  $metadata: deserializeMetadata(output),
751
731
  });
752
732
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
753
- if (data.headCommitId != null) {
754
- contents.headCommitId = (0, smithy_client_1.expectString)(data.headCommitId);
755
- }
756
- if (data.lastUpdatedTime != null) {
757
- contents.lastUpdatedTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.lastUpdatedTime));
758
- }
759
- if (data.name != null) {
760
- contents.name = (0, smithy_client_1.expectString)(data.name);
761
- }
762
- if (data.ref != null) {
763
- contents.ref = (0, smithy_client_1.expectString)(data.ref);
764
- }
733
+ const doc = (0, smithy_client_1.take)(data, {
734
+ headCommitId: smithy_client_1.expectString,
735
+ lastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
736
+ name: smithy_client_1.expectString,
737
+ ref: smithy_client_1.expectString,
738
+ });
739
+ Object.assign(contents, doc);
765
740
  return contents;
766
741
  };
767
742
  exports.de_CreateSourceRepositoryBranchCommand = de_CreateSourceRepositoryBranchCommand;
@@ -792,10 +767,9 @@ const de_CreateSourceRepositoryBranchCommandError = async (output, context) => {
792
767
  throw await de_ValidationExceptionRes(parsedOutput, context);
793
768
  default:
794
769
  const parsedBody = parsedOutput.body;
795
- (0, smithy_client_1.throwDefaultError)({
770
+ return throwDefaultError({
796
771
  output,
797
772
  parsedBody,
798
- exceptionCtor: CodeCatalystServiceException_1.CodeCatalystServiceException,
799
773
  errorCode,
800
774
  });
801
775
  }
@@ -804,7 +778,7 @@ const de_DeleteAccessTokenCommand = async (output, context) => {
804
778
  if (output.statusCode !== 200 && output.statusCode >= 300) {
805
779
  return de_DeleteAccessTokenCommandError(output, context);
806
780
  }
807
- const contents = map({
781
+ const contents = (0, smithy_client_1.map)({
808
782
  $metadata: deserializeMetadata(output),
809
783
  });
810
784
  await collectBody(output.body, context);
@@ -838,10 +812,9 @@ const de_DeleteAccessTokenCommandError = async (output, context) => {
838
812
  throw await de_ValidationExceptionRes(parsedOutput, context);
839
813
  default:
840
814
  const parsedBody = parsedOutput.body;
841
- (0, smithy_client_1.throwDefaultError)({
815
+ return throwDefaultError({
842
816
  output,
843
817
  parsedBody,
844
- exceptionCtor: CodeCatalystServiceException_1.CodeCatalystServiceException,
845
818
  errorCode,
846
819
  });
847
820
  }
@@ -850,19 +823,16 @@ const de_DeleteDevEnvironmentCommand = async (output, context) => {
850
823
  if (output.statusCode !== 200 && output.statusCode >= 300) {
851
824
  return de_DeleteDevEnvironmentCommandError(output, context);
852
825
  }
853
- const contents = map({
826
+ const contents = (0, smithy_client_1.map)({
854
827
  $metadata: deserializeMetadata(output),
855
828
  });
856
829
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
857
- if (data.id != null) {
858
- contents.id = (0, smithy_client_1.expectString)(data.id);
859
- }
860
- if (data.projectName != null) {
861
- contents.projectName = (0, smithy_client_1.expectString)(data.projectName);
862
- }
863
- if (data.spaceName != null) {
864
- contents.spaceName = (0, smithy_client_1.expectString)(data.spaceName);
865
- }
830
+ const doc = (0, smithy_client_1.take)(data, {
831
+ id: smithy_client_1.expectString,
832
+ projectName: smithy_client_1.expectString,
833
+ spaceName: smithy_client_1.expectString,
834
+ });
835
+ Object.assign(contents, doc);
866
836
  return contents;
867
837
  };
868
838
  exports.de_DeleteDevEnvironmentCommand = de_DeleteDevEnvironmentCommand;
@@ -893,10 +863,9 @@ const de_DeleteDevEnvironmentCommandError = async (output, context) => {
893
863
  throw await de_ValidationExceptionRes(parsedOutput, context);
894
864
  default:
895
865
  const parsedBody = parsedOutput.body;
896
- (0, smithy_client_1.throwDefaultError)({
866
+ return throwDefaultError({
897
867
  output,
898
868
  parsedBody,
899
- exceptionCtor: CodeCatalystServiceException_1.CodeCatalystServiceException,
900
869
  errorCode,
901
870
  });
902
871
  }
@@ -905,49 +874,26 @@ const de_GetDevEnvironmentCommand = async (output, context) => {
905
874
  if (output.statusCode !== 200 && output.statusCode >= 300) {
906
875
  return de_GetDevEnvironmentCommandError(output, context);
907
876
  }
908
- const contents = map({
877
+ const contents = (0, smithy_client_1.map)({
909
878
  $metadata: deserializeMetadata(output),
910
879
  });
911
880
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
912
- if (data.alias != null) {
913
- contents.alias = (0, smithy_client_1.expectString)(data.alias);
914
- }
915
- if (data.creatorId != null) {
916
- contents.creatorId = (0, smithy_client_1.expectString)(data.creatorId);
917
- }
918
- if (data.id != null) {
919
- contents.id = (0, smithy_client_1.expectString)(data.id);
920
- }
921
- if (data.ides != null) {
922
- contents.ides = de_Ides(data.ides, context);
923
- }
924
- if (data.inactivityTimeoutMinutes != null) {
925
- contents.inactivityTimeoutMinutes = (0, smithy_client_1.expectInt32)(data.inactivityTimeoutMinutes);
926
- }
927
- if (data.instanceType != null) {
928
- contents.instanceType = (0, smithy_client_1.expectString)(data.instanceType);
929
- }
930
- if (data.lastUpdatedTime != null) {
931
- contents.lastUpdatedTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.lastUpdatedTime));
932
- }
933
- if (data.persistentStorage != null) {
934
- contents.persistentStorage = de_PersistentStorage(data.persistentStorage, context);
935
- }
936
- if (data.projectName != null) {
937
- contents.projectName = (0, smithy_client_1.expectString)(data.projectName);
938
- }
939
- if (data.repositories != null) {
940
- contents.repositories = de_DevEnvironmentRepositorySummaries(data.repositories, context);
941
- }
942
- if (data.spaceName != null) {
943
- contents.spaceName = (0, smithy_client_1.expectString)(data.spaceName);
944
- }
945
- if (data.status != null) {
946
- contents.status = (0, smithy_client_1.expectString)(data.status);
947
- }
948
- if (data.statusReason != null) {
949
- contents.statusReason = (0, smithy_client_1.expectString)(data.statusReason);
950
- }
881
+ const doc = (0, smithy_client_1.take)(data, {
882
+ alias: smithy_client_1.expectString,
883
+ creatorId: smithy_client_1.expectString,
884
+ id: smithy_client_1.expectString,
885
+ ides: smithy_client_1._json,
886
+ inactivityTimeoutMinutes: smithy_client_1.expectInt32,
887
+ instanceType: smithy_client_1.expectString,
888
+ lastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
889
+ persistentStorage: smithy_client_1._json,
890
+ projectName: smithy_client_1.expectString,
891
+ repositories: smithy_client_1._json,
892
+ spaceName: smithy_client_1.expectString,
893
+ status: smithy_client_1.expectString,
894
+ statusReason: smithy_client_1.expectString,
895
+ });
896
+ Object.assign(contents, doc);
951
897
  return contents;
952
898
  };
953
899
  exports.de_GetDevEnvironmentCommand = de_GetDevEnvironmentCommand;
@@ -978,10 +924,9 @@ const de_GetDevEnvironmentCommandError = async (output, context) => {
978
924
  throw await de_ValidationExceptionRes(parsedOutput, context);
979
925
  default:
980
926
  const parsedBody = parsedOutput.body;
981
- (0, smithy_client_1.throwDefaultError)({
927
+ return throwDefaultError({
982
928
  output,
983
929
  parsedBody,
984
- exceptionCtor: CodeCatalystServiceException_1.CodeCatalystServiceException,
985
930
  errorCode,
986
931
  });
987
932
  }
@@ -990,22 +935,17 @@ const de_GetProjectCommand = async (output, context) => {
990
935
  if (output.statusCode !== 200 && output.statusCode >= 300) {
991
936
  return de_GetProjectCommandError(output, context);
992
937
  }
993
- const contents = map({
938
+ const contents = (0, smithy_client_1.map)({
994
939
  $metadata: deserializeMetadata(output),
995
940
  });
996
941
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
997
- if (data.description != null) {
998
- contents.description = (0, smithy_client_1.expectString)(data.description);
999
- }
1000
- if (data.displayName != null) {
1001
- contents.displayName = (0, smithy_client_1.expectString)(data.displayName);
1002
- }
1003
- if (data.name != null) {
1004
- contents.name = (0, smithy_client_1.expectString)(data.name);
1005
- }
1006
- if (data.spaceName != null) {
1007
- contents.spaceName = (0, smithy_client_1.expectString)(data.spaceName);
1008
- }
942
+ const doc = (0, smithy_client_1.take)(data, {
943
+ description: smithy_client_1.expectString,
944
+ displayName: smithy_client_1.expectString,
945
+ name: smithy_client_1.expectString,
946
+ spaceName: smithy_client_1.expectString,
947
+ });
948
+ Object.assign(contents, doc);
1009
949
  return contents;
1010
950
  };
1011
951
  exports.de_GetProjectCommand = de_GetProjectCommand;
@@ -1036,10 +976,9 @@ const de_GetProjectCommandError = async (output, context) => {
1036
976
  throw await de_ValidationExceptionRes(parsedOutput, context);
1037
977
  default:
1038
978
  const parsedBody = parsedOutput.body;
1039
- (0, smithy_client_1.throwDefaultError)({
979
+ return throwDefaultError({
1040
980
  output,
1041
981
  parsedBody,
1042
- exceptionCtor: CodeCatalystServiceException_1.CodeCatalystServiceException,
1043
982
  errorCode,
1044
983
  });
1045
984
  }
@@ -1048,13 +987,14 @@ const de_GetSourceRepositoryCloneUrlsCommand = async (output, context) => {
1048
987
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1049
988
  return de_GetSourceRepositoryCloneUrlsCommandError(output, context);
1050
989
  }
1051
- const contents = map({
990
+ const contents = (0, smithy_client_1.map)({
1052
991
  $metadata: deserializeMetadata(output),
1053
992
  });
1054
993
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1055
- if (data.https != null) {
1056
- contents.https = (0, smithy_client_1.expectString)(data.https);
1057
- }
994
+ const doc = (0, smithy_client_1.take)(data, {
995
+ https: smithy_client_1.expectString,
996
+ });
997
+ Object.assign(contents, doc);
1058
998
  return contents;
1059
999
  };
1060
1000
  exports.de_GetSourceRepositoryCloneUrlsCommand = de_GetSourceRepositoryCloneUrlsCommand;
@@ -1085,10 +1025,9 @@ const de_GetSourceRepositoryCloneUrlsCommandError = async (output, context) => {
1085
1025
  throw await de_ValidationExceptionRes(parsedOutput, context);
1086
1026
  default:
1087
1027
  const parsedBody = parsedOutput.body;
1088
- (0, smithy_client_1.throwDefaultError)({
1028
+ return throwDefaultError({
1089
1029
  output,
1090
1030
  parsedBody,
1091
- exceptionCtor: CodeCatalystServiceException_1.CodeCatalystServiceException,
1092
1031
  errorCode,
1093
1032
  });
1094
1033
  }
@@ -1097,22 +1036,17 @@ const de_GetSpaceCommand = async (output, context) => {
1097
1036
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1098
1037
  return de_GetSpaceCommandError(output, context);
1099
1038
  }
1100
- const contents = map({
1039
+ const contents = (0, smithy_client_1.map)({
1101
1040
  $metadata: deserializeMetadata(output),
1102
1041
  });
1103
1042
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1104
- if (data.description != null) {
1105
- contents.description = (0, smithy_client_1.expectString)(data.description);
1106
- }
1107
- if (data.displayName != null) {
1108
- contents.displayName = (0, smithy_client_1.expectString)(data.displayName);
1109
- }
1110
- if (data.name != null) {
1111
- contents.name = (0, smithy_client_1.expectString)(data.name);
1112
- }
1113
- if (data.regionName != null) {
1114
- contents.regionName = (0, smithy_client_1.expectString)(data.regionName);
1115
- }
1043
+ const doc = (0, smithy_client_1.take)(data, {
1044
+ description: smithy_client_1.expectString,
1045
+ displayName: smithy_client_1.expectString,
1046
+ name: smithy_client_1.expectString,
1047
+ regionName: smithy_client_1.expectString,
1048
+ });
1049
+ Object.assign(contents, doc);
1116
1050
  return contents;
1117
1051
  };
1118
1052
  exports.de_GetSpaceCommand = de_GetSpaceCommand;
@@ -1143,10 +1077,9 @@ const de_GetSpaceCommandError = async (output, context) => {
1143
1077
  throw await de_ValidationExceptionRes(parsedOutput, context);
1144
1078
  default:
1145
1079
  const parsedBody = parsedOutput.body;
1146
- (0, smithy_client_1.throwDefaultError)({
1080
+ return throwDefaultError({
1147
1081
  output,
1148
1082
  parsedBody,
1149
- exceptionCtor: CodeCatalystServiceException_1.CodeCatalystServiceException,
1150
1083
  errorCode,
1151
1084
  });
1152
1085
  }
@@ -1155,16 +1088,15 @@ const de_GetSubscriptionCommand = async (output, context) => {
1155
1088
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1156
1089
  return de_GetSubscriptionCommandError(output, context);
1157
1090
  }
1158
- const contents = map({
1091
+ const contents = (0, smithy_client_1.map)({
1159
1092
  $metadata: deserializeMetadata(output),
1160
1093
  });
1161
1094
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1162
- if (data.awsAccountName != null) {
1163
- contents.awsAccountName = (0, smithy_client_1.expectString)(data.awsAccountName);
1164
- }
1165
- if (data.subscriptionType != null) {
1166
- contents.subscriptionType = (0, smithy_client_1.expectString)(data.subscriptionType);
1167
- }
1095
+ const doc = (0, smithy_client_1.take)(data, {
1096
+ awsAccountName: smithy_client_1.expectString,
1097
+ subscriptionType: smithy_client_1.expectString,
1098
+ });
1099
+ Object.assign(contents, doc);
1168
1100
  return contents;
1169
1101
  };
1170
1102
  exports.de_GetSubscriptionCommand = de_GetSubscriptionCommand;
@@ -1195,10 +1127,9 @@ const de_GetSubscriptionCommandError = async (output, context) => {
1195
1127
  throw await de_ValidationExceptionRes(parsedOutput, context);
1196
1128
  default:
1197
1129
  const parsedBody = parsedOutput.body;
1198
- (0, smithy_client_1.throwDefaultError)({
1130
+ return throwDefaultError({
1199
1131
  output,
1200
1132
  parsedBody,
1201
- exceptionCtor: CodeCatalystServiceException_1.CodeCatalystServiceException,
1202
1133
  errorCode,
1203
1134
  });
1204
1135
  }
@@ -1207,25 +1138,18 @@ const de_GetUserDetailsCommand = async (output, context) => {
1207
1138
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1208
1139
  return de_GetUserDetailsCommandError(output, context);
1209
1140
  }
1210
- const contents = map({
1141
+ const contents = (0, smithy_client_1.map)({
1211
1142
  $metadata: deserializeMetadata(output),
1212
1143
  });
1213
1144
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1214
- if (data.displayName != null) {
1215
- contents.displayName = (0, smithy_client_1.expectString)(data.displayName);
1216
- }
1217
- if (data.primaryEmail != null) {
1218
- contents.primaryEmail = de_EmailAddress(data.primaryEmail, context);
1219
- }
1220
- if (data.userId != null) {
1221
- contents.userId = (0, smithy_client_1.expectString)(data.userId);
1222
- }
1223
- if (data.userName != null) {
1224
- contents.userName = (0, smithy_client_1.expectString)(data.userName);
1225
- }
1226
- if (data.version != null) {
1227
- contents.version = (0, smithy_client_1.expectString)(data.version);
1228
- }
1145
+ const doc = (0, smithy_client_1.take)(data, {
1146
+ displayName: smithy_client_1.expectString,
1147
+ primaryEmail: smithy_client_1._json,
1148
+ userId: smithy_client_1.expectString,
1149
+ userName: smithy_client_1.expectString,
1150
+ version: smithy_client_1.expectString,
1151
+ });
1152
+ Object.assign(contents, doc);
1229
1153
  return contents;
1230
1154
  };
1231
1155
  exports.de_GetUserDetailsCommand = de_GetUserDetailsCommand;
@@ -1256,10 +1180,9 @@ const de_GetUserDetailsCommandError = async (output, context) => {
1256
1180
  throw await de_ValidationExceptionRes(parsedOutput, context);
1257
1181
  default:
1258
1182
  const parsedBody = parsedOutput.body;
1259
- (0, smithy_client_1.throwDefaultError)({
1183
+ return throwDefaultError({
1260
1184
  output,
1261
1185
  parsedBody,
1262
- exceptionCtor: CodeCatalystServiceException_1.CodeCatalystServiceException,
1263
1186
  errorCode,
1264
1187
  });
1265
1188
  }
@@ -1268,16 +1191,15 @@ const de_ListAccessTokensCommand = async (output, context) => {
1268
1191
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1269
1192
  return de_ListAccessTokensCommandError(output, context);
1270
1193
  }
1271
- const contents = map({
1194
+ const contents = (0, smithy_client_1.map)({
1272
1195
  $metadata: deserializeMetadata(output),
1273
1196
  });
1274
1197
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1275
- if (data.items != null) {
1276
- contents.items = de_AccessTokenSummaries(data.items, context);
1277
- }
1278
- if (data.nextToken != null) {
1279
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1280
- }
1198
+ const doc = (0, smithy_client_1.take)(data, {
1199
+ items: (_) => de_AccessTokenSummaries(_, context),
1200
+ nextToken: smithy_client_1.expectString,
1201
+ });
1202
+ Object.assign(contents, doc);
1281
1203
  return contents;
1282
1204
  };
1283
1205
  exports.de_ListAccessTokensCommand = de_ListAccessTokensCommand;
@@ -1308,10 +1230,9 @@ const de_ListAccessTokensCommandError = async (output, context) => {
1308
1230
  throw await de_ValidationExceptionRes(parsedOutput, context);
1309
1231
  default:
1310
1232
  const parsedBody = parsedOutput.body;
1311
- (0, smithy_client_1.throwDefaultError)({
1233
+ return throwDefaultError({
1312
1234
  output,
1313
1235
  parsedBody,
1314
- exceptionCtor: CodeCatalystServiceException_1.CodeCatalystServiceException,
1315
1236
  errorCode,
1316
1237
  });
1317
1238
  }
@@ -1320,16 +1241,15 @@ const de_ListDevEnvironmentsCommand = async (output, context) => {
1320
1241
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1321
1242
  return de_ListDevEnvironmentsCommandError(output, context);
1322
1243
  }
1323
- const contents = map({
1244
+ const contents = (0, smithy_client_1.map)({
1324
1245
  $metadata: deserializeMetadata(output),
1325
1246
  });
1326
1247
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1327
- if (data.items != null) {
1328
- contents.items = de_DevEnvironmentSummaryList(data.items, context);
1329
- }
1330
- if (data.nextToken != null) {
1331
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1332
- }
1248
+ const doc = (0, smithy_client_1.take)(data, {
1249
+ items: (_) => de_DevEnvironmentSummaryList(_, context),
1250
+ nextToken: smithy_client_1.expectString,
1251
+ });
1252
+ Object.assign(contents, doc);
1333
1253
  return contents;
1334
1254
  };
1335
1255
  exports.de_ListDevEnvironmentsCommand = de_ListDevEnvironmentsCommand;
@@ -1360,10 +1280,9 @@ const de_ListDevEnvironmentsCommandError = async (output, context) => {
1360
1280
  throw await de_ValidationExceptionRes(parsedOutput, context);
1361
1281
  default:
1362
1282
  const parsedBody = parsedOutput.body;
1363
- (0, smithy_client_1.throwDefaultError)({
1283
+ return throwDefaultError({
1364
1284
  output,
1365
1285
  parsedBody,
1366
- exceptionCtor: CodeCatalystServiceException_1.CodeCatalystServiceException,
1367
1286
  errorCode,
1368
1287
  });
1369
1288
  }
@@ -1372,16 +1291,15 @@ const de_ListEventLogsCommand = async (output, context) => {
1372
1291
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1373
1292
  return de_ListEventLogsCommandError(output, context);
1374
1293
  }
1375
- const contents = map({
1294
+ const contents = (0, smithy_client_1.map)({
1376
1295
  $metadata: deserializeMetadata(output),
1377
1296
  });
1378
1297
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1379
- if (data.items != null) {
1380
- contents.items = de_EventLogEntries(data.items, context);
1381
- }
1382
- if (data.nextToken != null) {
1383
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1384
- }
1298
+ const doc = (0, smithy_client_1.take)(data, {
1299
+ items: (_) => de_EventLogEntries(_, context),
1300
+ nextToken: smithy_client_1.expectString,
1301
+ });
1302
+ Object.assign(contents, doc);
1385
1303
  return contents;
1386
1304
  };
1387
1305
  exports.de_ListEventLogsCommand = de_ListEventLogsCommand;
@@ -1412,10 +1330,9 @@ const de_ListEventLogsCommandError = async (output, context) => {
1412
1330
  throw await de_ValidationExceptionRes(parsedOutput, context);
1413
1331
  default:
1414
1332
  const parsedBody = parsedOutput.body;
1415
- (0, smithy_client_1.throwDefaultError)({
1333
+ return throwDefaultError({
1416
1334
  output,
1417
1335
  parsedBody,
1418
- exceptionCtor: CodeCatalystServiceException_1.CodeCatalystServiceException,
1419
1336
  errorCode,
1420
1337
  });
1421
1338
  }
@@ -1424,16 +1341,15 @@ const de_ListProjectsCommand = async (output, context) => {
1424
1341
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1425
1342
  return de_ListProjectsCommandError(output, context);
1426
1343
  }
1427
- const contents = map({
1344
+ const contents = (0, smithy_client_1.map)({
1428
1345
  $metadata: deserializeMetadata(output),
1429
1346
  });
1430
1347
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1431
- if (data.items != null) {
1432
- contents.items = de_ProjectSummaries(data.items, context);
1433
- }
1434
- if (data.nextToken != null) {
1435
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1436
- }
1348
+ const doc = (0, smithy_client_1.take)(data, {
1349
+ items: smithy_client_1._json,
1350
+ nextToken: smithy_client_1.expectString,
1351
+ });
1352
+ Object.assign(contents, doc);
1437
1353
  return contents;
1438
1354
  };
1439
1355
  exports.de_ListProjectsCommand = de_ListProjectsCommand;
@@ -1464,10 +1380,9 @@ const de_ListProjectsCommandError = async (output, context) => {
1464
1380
  throw await de_ValidationExceptionRes(parsedOutput, context);
1465
1381
  default:
1466
1382
  const parsedBody = parsedOutput.body;
1467
- (0, smithy_client_1.throwDefaultError)({
1383
+ return throwDefaultError({
1468
1384
  output,
1469
1385
  parsedBody,
1470
- exceptionCtor: CodeCatalystServiceException_1.CodeCatalystServiceException,
1471
1386
  errorCode,
1472
1387
  });
1473
1388
  }
@@ -1476,16 +1391,15 @@ const de_ListSourceRepositoriesCommand = async (output, context) => {
1476
1391
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1477
1392
  return de_ListSourceRepositoriesCommandError(output, context);
1478
1393
  }
1479
- const contents = map({
1394
+ const contents = (0, smithy_client_1.map)({
1480
1395
  $metadata: deserializeMetadata(output),
1481
1396
  });
1482
1397
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1483
- if (data.items != null) {
1484
- contents.items = de_ListSourceRepositoriesItems(data.items, context);
1485
- }
1486
- if (data.nextToken != null) {
1487
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1488
- }
1398
+ const doc = (0, smithy_client_1.take)(data, {
1399
+ items: (_) => de_ListSourceRepositoriesItems(_, context),
1400
+ nextToken: smithy_client_1.expectString,
1401
+ });
1402
+ Object.assign(contents, doc);
1489
1403
  return contents;
1490
1404
  };
1491
1405
  exports.de_ListSourceRepositoriesCommand = de_ListSourceRepositoriesCommand;
@@ -1516,10 +1430,9 @@ const de_ListSourceRepositoriesCommandError = async (output, context) => {
1516
1430
  throw await de_ValidationExceptionRes(parsedOutput, context);
1517
1431
  default:
1518
1432
  const parsedBody = parsedOutput.body;
1519
- (0, smithy_client_1.throwDefaultError)({
1433
+ return throwDefaultError({
1520
1434
  output,
1521
1435
  parsedBody,
1522
- exceptionCtor: CodeCatalystServiceException_1.CodeCatalystServiceException,
1523
1436
  errorCode,
1524
1437
  });
1525
1438
  }
@@ -1528,16 +1441,15 @@ const de_ListSourceRepositoryBranchesCommand = async (output, context) => {
1528
1441
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1529
1442
  return de_ListSourceRepositoryBranchesCommandError(output, context);
1530
1443
  }
1531
- const contents = map({
1444
+ const contents = (0, smithy_client_1.map)({
1532
1445
  $metadata: deserializeMetadata(output),
1533
1446
  });
1534
1447
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1535
- if (data.items != null) {
1536
- contents.items = de_ListSourceRepositoryBranchesItems(data.items, context);
1537
- }
1538
- if (data.nextToken != null) {
1539
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1540
- }
1448
+ const doc = (0, smithy_client_1.take)(data, {
1449
+ items: (_) => de_ListSourceRepositoryBranchesItems(_, context),
1450
+ nextToken: smithy_client_1.expectString,
1451
+ });
1452
+ Object.assign(contents, doc);
1541
1453
  return contents;
1542
1454
  };
1543
1455
  exports.de_ListSourceRepositoryBranchesCommand = de_ListSourceRepositoryBranchesCommand;
@@ -1568,10 +1480,9 @@ const de_ListSourceRepositoryBranchesCommandError = async (output, context) => {
1568
1480
  throw await de_ValidationExceptionRes(parsedOutput, context);
1569
1481
  default:
1570
1482
  const parsedBody = parsedOutput.body;
1571
- (0, smithy_client_1.throwDefaultError)({
1483
+ return throwDefaultError({
1572
1484
  output,
1573
1485
  parsedBody,
1574
- exceptionCtor: CodeCatalystServiceException_1.CodeCatalystServiceException,
1575
1486
  errorCode,
1576
1487
  });
1577
1488
  }
@@ -1580,16 +1491,15 @@ const de_ListSpacesCommand = async (output, context) => {
1580
1491
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1581
1492
  return de_ListSpacesCommandError(output, context);
1582
1493
  }
1583
- const contents = map({
1494
+ const contents = (0, smithy_client_1.map)({
1584
1495
  $metadata: deserializeMetadata(output),
1585
1496
  });
1586
1497
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1587
- if (data.items != null) {
1588
- contents.items = de_SpaceSummaries(data.items, context);
1589
- }
1590
- if (data.nextToken != null) {
1591
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1592
- }
1498
+ const doc = (0, smithy_client_1.take)(data, {
1499
+ items: smithy_client_1._json,
1500
+ nextToken: smithy_client_1.expectString,
1501
+ });
1502
+ Object.assign(contents, doc);
1593
1503
  return contents;
1594
1504
  };
1595
1505
  exports.de_ListSpacesCommand = de_ListSpacesCommand;
@@ -1620,10 +1530,9 @@ const de_ListSpacesCommandError = async (output, context) => {
1620
1530
  throw await de_ValidationExceptionRes(parsedOutput, context);
1621
1531
  default:
1622
1532
  const parsedBody = parsedOutput.body;
1623
- (0, smithy_client_1.throwDefaultError)({
1533
+ return throwDefaultError({
1624
1534
  output,
1625
1535
  parsedBody,
1626
- exceptionCtor: CodeCatalystServiceException_1.CodeCatalystServiceException,
1627
1536
  errorCode,
1628
1537
  });
1629
1538
  }
@@ -1632,22 +1541,17 @@ const de_StartDevEnvironmentCommand = async (output, context) => {
1632
1541
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1633
1542
  return de_StartDevEnvironmentCommandError(output, context);
1634
1543
  }
1635
- const contents = map({
1544
+ const contents = (0, smithy_client_1.map)({
1636
1545
  $metadata: deserializeMetadata(output),
1637
1546
  });
1638
1547
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1639
- if (data.id != null) {
1640
- contents.id = (0, smithy_client_1.expectString)(data.id);
1641
- }
1642
- if (data.projectName != null) {
1643
- contents.projectName = (0, smithy_client_1.expectString)(data.projectName);
1644
- }
1645
- if (data.spaceName != null) {
1646
- contents.spaceName = (0, smithy_client_1.expectString)(data.spaceName);
1647
- }
1648
- if (data.status != null) {
1649
- contents.status = (0, smithy_client_1.expectString)(data.status);
1650
- }
1548
+ const doc = (0, smithy_client_1.take)(data, {
1549
+ id: smithy_client_1.expectString,
1550
+ projectName: smithy_client_1.expectString,
1551
+ spaceName: smithy_client_1.expectString,
1552
+ status: smithy_client_1.expectString,
1553
+ });
1554
+ Object.assign(contents, doc);
1651
1555
  return contents;
1652
1556
  };
1653
1557
  exports.de_StartDevEnvironmentCommand = de_StartDevEnvironmentCommand;
@@ -1678,10 +1582,9 @@ const de_StartDevEnvironmentCommandError = async (output, context) => {
1678
1582
  throw await de_ValidationExceptionRes(parsedOutput, context);
1679
1583
  default:
1680
1584
  const parsedBody = parsedOutput.body;
1681
- (0, smithy_client_1.throwDefaultError)({
1585
+ return throwDefaultError({
1682
1586
  output,
1683
1587
  parsedBody,
1684
- exceptionCtor: CodeCatalystServiceException_1.CodeCatalystServiceException,
1685
1588
  errorCode,
1686
1589
  });
1687
1590
  }
@@ -1690,25 +1593,18 @@ const de_StartDevEnvironmentSessionCommand = async (output, context) => {
1690
1593
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1691
1594
  return de_StartDevEnvironmentSessionCommandError(output, context);
1692
1595
  }
1693
- const contents = map({
1596
+ const contents = (0, smithy_client_1.map)({
1694
1597
  $metadata: deserializeMetadata(output),
1695
1598
  });
1696
1599
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1697
- if (data.accessDetails != null) {
1698
- contents.accessDetails = de_DevEnvironmentAccessDetails(data.accessDetails, context);
1699
- }
1700
- if (data.id != null) {
1701
- contents.id = (0, smithy_client_1.expectString)(data.id);
1702
- }
1703
- if (data.projectName != null) {
1704
- contents.projectName = (0, smithy_client_1.expectString)(data.projectName);
1705
- }
1706
- if (data.sessionId != null) {
1707
- contents.sessionId = (0, smithy_client_1.expectString)(data.sessionId);
1708
- }
1709
- if (data.spaceName != null) {
1710
- contents.spaceName = (0, smithy_client_1.expectString)(data.spaceName);
1711
- }
1600
+ const doc = (0, smithy_client_1.take)(data, {
1601
+ accessDetails: smithy_client_1._json,
1602
+ id: smithy_client_1.expectString,
1603
+ projectName: smithy_client_1.expectString,
1604
+ sessionId: smithy_client_1.expectString,
1605
+ spaceName: smithy_client_1.expectString,
1606
+ });
1607
+ Object.assign(contents, doc);
1712
1608
  return contents;
1713
1609
  };
1714
1610
  exports.de_StartDevEnvironmentSessionCommand = de_StartDevEnvironmentSessionCommand;
@@ -1739,10 +1635,9 @@ const de_StartDevEnvironmentSessionCommandError = async (output, context) => {
1739
1635
  throw await de_ValidationExceptionRes(parsedOutput, context);
1740
1636
  default:
1741
1637
  const parsedBody = parsedOutput.body;
1742
- (0, smithy_client_1.throwDefaultError)({
1638
+ return throwDefaultError({
1743
1639
  output,
1744
1640
  parsedBody,
1745
- exceptionCtor: CodeCatalystServiceException_1.CodeCatalystServiceException,
1746
1641
  errorCode,
1747
1642
  });
1748
1643
  }
@@ -1751,22 +1646,17 @@ const de_StopDevEnvironmentCommand = async (output, context) => {
1751
1646
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1752
1647
  return de_StopDevEnvironmentCommandError(output, context);
1753
1648
  }
1754
- const contents = map({
1649
+ const contents = (0, smithy_client_1.map)({
1755
1650
  $metadata: deserializeMetadata(output),
1756
1651
  });
1757
1652
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1758
- if (data.id != null) {
1759
- contents.id = (0, smithy_client_1.expectString)(data.id);
1760
- }
1761
- if (data.projectName != null) {
1762
- contents.projectName = (0, smithy_client_1.expectString)(data.projectName);
1763
- }
1764
- if (data.spaceName != null) {
1765
- contents.spaceName = (0, smithy_client_1.expectString)(data.spaceName);
1766
- }
1767
- if (data.status != null) {
1768
- contents.status = (0, smithy_client_1.expectString)(data.status);
1769
- }
1653
+ const doc = (0, smithy_client_1.take)(data, {
1654
+ id: smithy_client_1.expectString,
1655
+ projectName: smithy_client_1.expectString,
1656
+ spaceName: smithy_client_1.expectString,
1657
+ status: smithy_client_1.expectString,
1658
+ });
1659
+ Object.assign(contents, doc);
1770
1660
  return contents;
1771
1661
  };
1772
1662
  exports.de_StopDevEnvironmentCommand = de_StopDevEnvironmentCommand;
@@ -1797,10 +1687,9 @@ const de_StopDevEnvironmentCommandError = async (output, context) => {
1797
1687
  throw await de_ValidationExceptionRes(parsedOutput, context);
1798
1688
  default:
1799
1689
  const parsedBody = parsedOutput.body;
1800
- (0, smithy_client_1.throwDefaultError)({
1690
+ return throwDefaultError({
1801
1691
  output,
1802
1692
  parsedBody,
1803
- exceptionCtor: CodeCatalystServiceException_1.CodeCatalystServiceException,
1804
1693
  errorCode,
1805
1694
  });
1806
1695
  }
@@ -1809,22 +1698,17 @@ const de_StopDevEnvironmentSessionCommand = async (output, context) => {
1809
1698
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1810
1699
  return de_StopDevEnvironmentSessionCommandError(output, context);
1811
1700
  }
1812
- const contents = map({
1701
+ const contents = (0, smithy_client_1.map)({
1813
1702
  $metadata: deserializeMetadata(output),
1814
1703
  });
1815
1704
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1816
- if (data.id != null) {
1817
- contents.id = (0, smithy_client_1.expectString)(data.id);
1818
- }
1819
- if (data.projectName != null) {
1820
- contents.projectName = (0, smithy_client_1.expectString)(data.projectName);
1821
- }
1822
- if (data.sessionId != null) {
1823
- contents.sessionId = (0, smithy_client_1.expectString)(data.sessionId);
1824
- }
1825
- if (data.spaceName != null) {
1826
- contents.spaceName = (0, smithy_client_1.expectString)(data.spaceName);
1827
- }
1705
+ const doc = (0, smithy_client_1.take)(data, {
1706
+ id: smithy_client_1.expectString,
1707
+ projectName: smithy_client_1.expectString,
1708
+ sessionId: smithy_client_1.expectString,
1709
+ spaceName: smithy_client_1.expectString,
1710
+ });
1711
+ Object.assign(contents, doc);
1828
1712
  return contents;
1829
1713
  };
1830
1714
  exports.de_StopDevEnvironmentSessionCommand = de_StopDevEnvironmentSessionCommand;
@@ -1855,10 +1739,9 @@ const de_StopDevEnvironmentSessionCommandError = async (output, context) => {
1855
1739
  throw await de_ValidationExceptionRes(parsedOutput, context);
1856
1740
  default:
1857
1741
  const parsedBody = parsedOutput.body;
1858
- (0, smithy_client_1.throwDefaultError)({
1742
+ return throwDefaultError({
1859
1743
  output,
1860
1744
  parsedBody,
1861
- exceptionCtor: CodeCatalystServiceException_1.CodeCatalystServiceException,
1862
1745
  errorCode,
1863
1746
  });
1864
1747
  }
@@ -1867,34 +1750,21 @@ const de_UpdateDevEnvironmentCommand = async (output, context) => {
1867
1750
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1868
1751
  return de_UpdateDevEnvironmentCommandError(output, context);
1869
1752
  }
1870
- const contents = map({
1753
+ const contents = (0, smithy_client_1.map)({
1871
1754
  $metadata: deserializeMetadata(output),
1872
1755
  });
1873
1756
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1874
- if (data.alias != null) {
1875
- contents.alias = (0, smithy_client_1.expectString)(data.alias);
1876
- }
1877
- if (data.clientToken != null) {
1878
- contents.clientToken = (0, smithy_client_1.expectString)(data.clientToken);
1879
- }
1880
- if (data.id != null) {
1881
- contents.id = (0, smithy_client_1.expectString)(data.id);
1882
- }
1883
- if (data.ides != null) {
1884
- contents.ides = de_IdeConfigurationList(data.ides, context);
1885
- }
1886
- if (data.inactivityTimeoutMinutes != null) {
1887
- contents.inactivityTimeoutMinutes = (0, smithy_client_1.expectInt32)(data.inactivityTimeoutMinutes);
1888
- }
1889
- if (data.instanceType != null) {
1890
- contents.instanceType = (0, smithy_client_1.expectString)(data.instanceType);
1891
- }
1892
- if (data.projectName != null) {
1893
- contents.projectName = (0, smithy_client_1.expectString)(data.projectName);
1894
- }
1895
- if (data.spaceName != null) {
1896
- contents.spaceName = (0, smithy_client_1.expectString)(data.spaceName);
1897
- }
1757
+ const doc = (0, smithy_client_1.take)(data, {
1758
+ alias: smithy_client_1.expectString,
1759
+ clientToken: smithy_client_1.expectString,
1760
+ id: smithy_client_1.expectString,
1761
+ ides: smithy_client_1._json,
1762
+ inactivityTimeoutMinutes: smithy_client_1.expectInt32,
1763
+ instanceType: smithy_client_1.expectString,
1764
+ projectName: smithy_client_1.expectString,
1765
+ spaceName: smithy_client_1.expectString,
1766
+ });
1767
+ Object.assign(contents, doc);
1898
1768
  return contents;
1899
1769
  };
1900
1770
  exports.de_UpdateDevEnvironmentCommand = de_UpdateDevEnvironmentCommand;
@@ -1925,10 +1795,9 @@ const de_UpdateDevEnvironmentCommandError = async (output, context) => {
1925
1795
  throw await de_ValidationExceptionRes(parsedOutput, context);
1926
1796
  default:
1927
1797
  const parsedBody = parsedOutput.body;
1928
- (0, smithy_client_1.throwDefaultError)({
1798
+ return throwDefaultError({
1929
1799
  output,
1930
1800
  parsedBody,
1931
- exceptionCtor: CodeCatalystServiceException_1.CodeCatalystServiceException,
1932
1801
  errorCode,
1933
1802
  });
1934
1803
  }
@@ -1937,13 +1806,14 @@ const de_VerifySessionCommand = async (output, context) => {
1937
1806
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1938
1807
  return de_VerifySessionCommandError(output, context);
1939
1808
  }
1940
- const contents = map({
1809
+ const contents = (0, smithy_client_1.map)({
1941
1810
  $metadata: deserializeMetadata(output),
1942
1811
  });
1943
1812
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1944
- if (data.identity != null) {
1945
- contents.identity = (0, smithy_client_1.expectString)(data.identity);
1946
- }
1813
+ const doc = (0, smithy_client_1.take)(data, {
1814
+ identity: smithy_client_1.expectString,
1815
+ });
1816
+ Object.assign(contents, doc);
1947
1817
  return contents;
1948
1818
  };
1949
1819
  exports.de_VerifySessionCommand = de_VerifySessionCommand;
@@ -1974,21 +1844,21 @@ const de_VerifySessionCommandError = async (output, context) => {
1974
1844
  throw await de_ValidationExceptionRes(parsedOutput, context);
1975
1845
  default:
1976
1846
  const parsedBody = parsedOutput.body;
1977
- (0, smithy_client_1.throwDefaultError)({
1847
+ return throwDefaultError({
1978
1848
  output,
1979
1849
  parsedBody,
1980
- exceptionCtor: CodeCatalystServiceException_1.CodeCatalystServiceException,
1981
1850
  errorCode,
1982
1851
  });
1983
1852
  }
1984
1853
  };
1985
- const map = smithy_client_1.map;
1854
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(CodeCatalystServiceException_1.CodeCatalystServiceException);
1986
1855
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1987
- const contents = map({});
1856
+ const contents = (0, smithy_client_1.map)({});
1988
1857
  const data = parsedOutput.body;
1989
- if (data.message != null) {
1990
- contents.message = (0, smithy_client_1.expectString)(data.message);
1991
- }
1858
+ const doc = (0, smithy_client_1.take)(data, {
1859
+ message: smithy_client_1.expectString,
1860
+ });
1861
+ Object.assign(contents, doc);
1992
1862
  const exception = new models_0_1.AccessDeniedException({
1993
1863
  $metadata: deserializeMetadata(parsedOutput),
1994
1864
  ...contents,
@@ -1996,11 +1866,12 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1996
1866
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1997
1867
  };
1998
1868
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
1999
- const contents = map({});
1869
+ const contents = (0, smithy_client_1.map)({});
2000
1870
  const data = parsedOutput.body;
2001
- if (data.message != null) {
2002
- contents.message = (0, smithy_client_1.expectString)(data.message);
2003
- }
1871
+ const doc = (0, smithy_client_1.take)(data, {
1872
+ message: smithy_client_1.expectString,
1873
+ });
1874
+ Object.assign(contents, doc);
2004
1875
  const exception = new models_0_1.ConflictException({
2005
1876
  $metadata: deserializeMetadata(parsedOutput),
2006
1877
  ...contents,
@@ -2008,11 +1879,12 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
2008
1879
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2009
1880
  };
2010
1881
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
2011
- const contents = map({});
1882
+ const contents = (0, smithy_client_1.map)({});
2012
1883
  const data = parsedOutput.body;
2013
- if (data.message != null) {
2014
- contents.message = (0, smithy_client_1.expectString)(data.message);
2015
- }
1884
+ const doc = (0, smithy_client_1.take)(data, {
1885
+ message: smithy_client_1.expectString,
1886
+ });
1887
+ Object.assign(contents, doc);
2016
1888
  const exception = new models_0_1.ResourceNotFoundException({
2017
1889
  $metadata: deserializeMetadata(parsedOutput),
2018
1890
  ...contents,
@@ -2020,11 +1892,12 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
2020
1892
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2021
1893
  };
2022
1894
  const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
2023
- const contents = map({});
1895
+ const contents = (0, smithy_client_1.map)({});
2024
1896
  const data = parsedOutput.body;
2025
- if (data.message != null) {
2026
- contents.message = (0, smithy_client_1.expectString)(data.message);
2027
- }
1897
+ const doc = (0, smithy_client_1.take)(data, {
1898
+ message: smithy_client_1.expectString,
1899
+ });
1900
+ Object.assign(contents, doc);
2028
1901
  const exception = new models_0_1.ServiceQuotaExceededException({
2029
1902
  $metadata: deserializeMetadata(parsedOutput),
2030
1903
  ...contents,
@@ -2032,11 +1905,12 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
2032
1905
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2033
1906
  };
2034
1907
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
2035
- const contents = map({});
1908
+ const contents = (0, smithy_client_1.map)({});
2036
1909
  const data = parsedOutput.body;
2037
- if (data.message != null) {
2038
- contents.message = (0, smithy_client_1.expectString)(data.message);
2039
- }
1910
+ const doc = (0, smithy_client_1.take)(data, {
1911
+ message: smithy_client_1.expectString,
1912
+ });
1913
+ Object.assign(contents, doc);
2040
1914
  const exception = new models_0_1.ThrottlingException({
2041
1915
  $metadata: deserializeMetadata(parsedOutput),
2042
1916
  ...contents,
@@ -2044,352 +1918,118 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
2044
1918
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2045
1919
  };
2046
1920
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
2047
- const contents = map({});
1921
+ const contents = (0, smithy_client_1.map)({});
2048
1922
  const data = parsedOutput.body;
2049
- if (data.message != null) {
2050
- contents.message = (0, smithy_client_1.expectString)(data.message);
2051
- }
1923
+ const doc = (0, smithy_client_1.take)(data, {
1924
+ message: smithy_client_1.expectString,
1925
+ });
1926
+ Object.assign(contents, doc);
2052
1927
  const exception = new models_0_1.ValidationException({
2053
1928
  $metadata: deserializeMetadata(parsedOutput),
2054
1929
  ...contents,
2055
1930
  });
2056
1931
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2057
1932
  };
2058
- const se_DevEnvironmentSessionConfiguration = (input, context) => {
2059
- return {
2060
- ...(input.executeCommandSessionConfiguration != null && {
2061
- executeCommandSessionConfiguration: se_ExecuteCommandSessionConfiguration(input.executeCommandSessionConfiguration, context),
2062
- }),
2063
- ...(input.sessionType != null && { sessionType: input.sessionType }),
2064
- };
2065
- };
2066
- const se_ExecuteCommandSessionConfiguration = (input, context) => {
2067
- return {
2068
- ...(input.arguments != null && {
2069
- arguments: se_ExecuteCommandSessionConfigurationArguments(input.arguments, context),
2070
- }),
2071
- ...(input.command != null && { command: input.command }),
2072
- };
2073
- };
2074
- const se_ExecuteCommandSessionConfigurationArguments = (input, context) => {
2075
- return input
2076
- .filter((e) => e != null)
2077
- .map((entry) => {
2078
- return entry;
2079
- });
2080
- };
2081
- const se_Filter = (input, context) => {
2082
- return {
2083
- ...(input.comparisonOperator != null && { comparisonOperator: input.comparisonOperator }),
2084
- ...(input.key != null && { key: input.key }),
2085
- ...(input.values != null && { values: se_StringList(input.values, context) }),
2086
- };
2087
- };
2088
- const se_Filters = (input, context) => {
2089
- return input
2090
- .filter((e) => e != null)
2091
- .map((entry) => {
2092
- return se_Filter(entry, context);
2093
- });
2094
- };
2095
- const se_IdeConfiguration = (input, context) => {
2096
- return {
2097
- ...(input.name != null && { name: input.name }),
2098
- ...(input.runtime != null && { runtime: input.runtime }),
2099
- };
2100
- };
2101
- const se_IdeConfigurationList = (input, context) => {
2102
- return input
2103
- .filter((e) => e != null)
2104
- .map((entry) => {
2105
- return se_IdeConfiguration(entry, context);
2106
- });
2107
- };
2108
- const se_PersistentStorageConfiguration = (input, context) => {
2109
- return {
2110
- ...(input.sizeInGiB != null && { sizeInGiB: input.sizeInGiB }),
2111
- };
2112
- };
2113
- const se_ProjectListFilter = (input, context) => {
2114
- return {
2115
- ...(input.comparisonOperator != null && { comparisonOperator: input.comparisonOperator }),
2116
- ...(input.key != null && { key: input.key }),
2117
- ...(input.values != null && { values: se_StringList(input.values, context) }),
2118
- };
2119
- };
2120
- const se_ProjectListFilters = (input, context) => {
2121
- return input
2122
- .filter((e) => e != null)
2123
- .map((entry) => {
2124
- return se_ProjectListFilter(entry, context);
2125
- });
2126
- };
2127
- const se_RepositoriesInput = (input, context) => {
2128
- return input
2129
- .filter((e) => e != null)
2130
- .map((entry) => {
2131
- return se_RepositoryInput(entry, context);
2132
- });
2133
- };
2134
- const se_RepositoryInput = (input, context) => {
2135
- return {
2136
- ...(input.branchName != null && { branchName: input.branchName }),
2137
- ...(input.repositoryName != null && { repositoryName: input.repositoryName }),
2138
- };
2139
- };
2140
- const se_StringList = (input, context) => {
2141
- return input
2142
- .filter((e) => e != null)
2143
- .map((entry) => {
2144
- return entry;
2145
- });
2146
- };
2147
1933
  const de_AccessTokenSummaries = (output, context) => {
2148
1934
  const retVal = (output || [])
2149
1935
  .filter((e) => e != null)
2150
1936
  .map((entry) => {
2151
- if (entry === null) {
2152
- return null;
2153
- }
2154
1937
  return de_AccessTokenSummary(entry, context);
2155
1938
  });
2156
1939
  return retVal;
2157
1940
  };
2158
1941
  const de_AccessTokenSummary = (output, context) => {
2159
- return {
2160
- expiresTime: output.expiresTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.expiresTime)) : undefined,
2161
- id: (0, smithy_client_1.expectString)(output.id),
2162
- name: (0, smithy_client_1.expectString)(output.name),
2163
- };
2164
- };
2165
- const de_DevEnvironmentAccessDetails = (output, context) => {
2166
- return {
2167
- streamUrl: (0, smithy_client_1.expectString)(output.streamUrl),
2168
- tokenValue: (0, smithy_client_1.expectString)(output.tokenValue),
2169
- };
2170
- };
2171
- const de_DevEnvironmentRepositorySummaries = (output, context) => {
2172
- const retVal = (output || [])
2173
- .filter((e) => e != null)
2174
- .map((entry) => {
2175
- if (entry === null) {
2176
- return null;
2177
- }
2178
- return de_DevEnvironmentRepositorySummary(entry, context);
1942
+ return (0, smithy_client_1.take)(output, {
1943
+ expiresTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1944
+ id: smithy_client_1.expectString,
1945
+ name: smithy_client_1.expectString,
2179
1946
  });
2180
- return retVal;
2181
- };
2182
- const de_DevEnvironmentRepositorySummary = (output, context) => {
2183
- return {
2184
- branchName: (0, smithy_client_1.expectString)(output.branchName),
2185
- repositoryName: (0, smithy_client_1.expectString)(output.repositoryName),
2186
- };
2187
1947
  };
2188
1948
  const de_DevEnvironmentSummary = (output, context) => {
2189
- return {
2190
- alias: (0, smithy_client_1.expectString)(output.alias),
2191
- creatorId: (0, smithy_client_1.expectString)(output.creatorId),
2192
- id: (0, smithy_client_1.expectString)(output.id),
2193
- ides: output.ides != null ? de_Ides(output.ides, context) : undefined,
2194
- inactivityTimeoutMinutes: (0, smithy_client_1.expectInt32)(output.inactivityTimeoutMinutes),
2195
- instanceType: (0, smithy_client_1.expectString)(output.instanceType),
2196
- lastUpdatedTime: output.lastUpdatedTime != null
2197
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.lastUpdatedTime))
2198
- : undefined,
2199
- persistentStorage: output.persistentStorage != null ? de_PersistentStorage(output.persistentStorage, context) : undefined,
2200
- projectName: (0, smithy_client_1.expectString)(output.projectName),
2201
- repositories: output.repositories != null ? de_DevEnvironmentRepositorySummaries(output.repositories, context) : undefined,
2202
- spaceName: (0, smithy_client_1.expectString)(output.spaceName),
2203
- status: (0, smithy_client_1.expectString)(output.status),
2204
- statusReason: (0, smithy_client_1.expectString)(output.statusReason),
2205
- };
1949
+ return (0, smithy_client_1.take)(output, {
1950
+ alias: smithy_client_1.expectString,
1951
+ creatorId: smithy_client_1.expectString,
1952
+ id: smithy_client_1.expectString,
1953
+ ides: smithy_client_1._json,
1954
+ inactivityTimeoutMinutes: smithy_client_1.expectInt32,
1955
+ instanceType: smithy_client_1.expectString,
1956
+ lastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1957
+ persistentStorage: smithy_client_1._json,
1958
+ projectName: smithy_client_1.expectString,
1959
+ repositories: smithy_client_1._json,
1960
+ spaceName: smithy_client_1.expectString,
1961
+ status: smithy_client_1.expectString,
1962
+ statusReason: smithy_client_1.expectString,
1963
+ });
2206
1964
  };
2207
1965
  const de_DevEnvironmentSummaryList = (output, context) => {
2208
1966
  const retVal = (output || [])
2209
1967
  .filter((e) => e != null)
2210
1968
  .map((entry) => {
2211
- if (entry === null) {
2212
- return null;
2213
- }
2214
1969
  return de_DevEnvironmentSummary(entry, context);
2215
1970
  });
2216
1971
  return retVal;
2217
1972
  };
2218
- const de_EmailAddress = (output, context) => {
2219
- return {
2220
- email: (0, smithy_client_1.expectString)(output.email),
2221
- verified: (0, smithy_client_1.expectBoolean)(output.verified),
2222
- };
2223
- };
2224
1973
  const de_EventLogEntries = (output, context) => {
2225
1974
  const retVal = (output || [])
2226
1975
  .filter((e) => e != null)
2227
1976
  .map((entry) => {
2228
- if (entry === null) {
2229
- return null;
2230
- }
2231
1977
  return de_EventLogEntry(entry, context);
2232
1978
  });
2233
1979
  return retVal;
2234
1980
  };
2235
1981
  const de_EventLogEntry = (output, context) => {
2236
- return {
2237
- errorCode: (0, smithy_client_1.expectString)(output.errorCode),
2238
- eventCategory: (0, smithy_client_1.expectString)(output.eventCategory),
2239
- eventName: (0, smithy_client_1.expectString)(output.eventName),
2240
- eventSource: (0, smithy_client_1.expectString)(output.eventSource),
2241
- eventTime: output.eventTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.eventTime)) : undefined,
2242
- eventType: (0, smithy_client_1.expectString)(output.eventType),
2243
- id: (0, smithy_client_1.expectString)(output.id),
2244
- operationType: (0, smithy_client_1.expectString)(output.operationType),
2245
- projectInformation: output.projectInformation != null ? de_ProjectInformation(output.projectInformation, context) : undefined,
2246
- requestId: (0, smithy_client_1.expectString)(output.requestId),
2247
- requestPayload: output.requestPayload != null ? de_EventPayload(output.requestPayload, context) : undefined,
2248
- responsePayload: output.responsePayload != null ? de_EventPayload(output.responsePayload, context) : undefined,
2249
- sourceIpAddress: (0, smithy_client_1.expectString)(output.sourceIpAddress),
2250
- userAgent: (0, smithy_client_1.expectString)(output.userAgent),
2251
- userIdentity: output.userIdentity != null ? de_UserIdentity(output.userIdentity, context) : undefined,
2252
- };
2253
- };
2254
- const de_EventPayload = (output, context) => {
2255
- return {
2256
- contentType: (0, smithy_client_1.expectString)(output.contentType),
2257
- data: (0, smithy_client_1.expectString)(output.data),
2258
- };
2259
- };
2260
- const de_Ide = (output, context) => {
2261
- return {
2262
- name: (0, smithy_client_1.expectString)(output.name),
2263
- runtime: (0, smithy_client_1.expectString)(output.runtime),
2264
- };
2265
- };
2266
- const de_IdeConfiguration = (output, context) => {
2267
- return {
2268
- name: (0, smithy_client_1.expectString)(output.name),
2269
- runtime: (0, smithy_client_1.expectString)(output.runtime),
2270
- };
2271
- };
2272
- const de_IdeConfigurationList = (output, context) => {
2273
- const retVal = (output || [])
2274
- .filter((e) => e != null)
2275
- .map((entry) => {
2276
- if (entry === null) {
2277
- return null;
2278
- }
2279
- return de_IdeConfiguration(entry, context);
1982
+ return (0, smithy_client_1.take)(output, {
1983
+ errorCode: smithy_client_1.expectString,
1984
+ eventCategory: smithy_client_1.expectString,
1985
+ eventName: smithy_client_1.expectString,
1986
+ eventSource: smithy_client_1.expectString,
1987
+ eventTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1988
+ eventType: smithy_client_1.expectString,
1989
+ id: smithy_client_1.expectString,
1990
+ operationType: smithy_client_1.expectString,
1991
+ projectInformation: smithy_client_1._json,
1992
+ requestId: smithy_client_1.expectString,
1993
+ requestPayload: smithy_client_1._json,
1994
+ responsePayload: smithy_client_1._json,
1995
+ sourceIpAddress: smithy_client_1.expectString,
1996
+ userAgent: smithy_client_1.expectString,
1997
+ userIdentity: smithy_client_1._json,
2280
1998
  });
2281
- return retVal;
2282
- };
2283
- const de_Ides = (output, context) => {
2284
- const retVal = (output || [])
2285
- .filter((e) => e != null)
2286
- .map((entry) => {
2287
- if (entry === null) {
2288
- return null;
2289
- }
2290
- return de_Ide(entry, context);
2291
- });
2292
- return retVal;
2293
1999
  };
2294
2000
  const de_ListSourceRepositoriesItem = (output, context) => {
2295
- return {
2296
- createdTime: output.createdTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.createdTime)) : undefined,
2297
- description: (0, smithy_client_1.expectString)(output.description),
2298
- id: (0, smithy_client_1.expectString)(output.id),
2299
- lastUpdatedTime: output.lastUpdatedTime != null
2300
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.lastUpdatedTime))
2301
- : undefined,
2302
- name: (0, smithy_client_1.expectString)(output.name),
2303
- };
2001
+ return (0, smithy_client_1.take)(output, {
2002
+ createdTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2003
+ description: smithy_client_1.expectString,
2004
+ id: smithy_client_1.expectString,
2005
+ lastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2006
+ name: smithy_client_1.expectString,
2007
+ });
2304
2008
  };
2305
2009
  const de_ListSourceRepositoriesItems = (output, context) => {
2306
2010
  const retVal = (output || [])
2307
2011
  .filter((e) => e != null)
2308
2012
  .map((entry) => {
2309
- if (entry === null) {
2310
- return null;
2311
- }
2312
2013
  return de_ListSourceRepositoriesItem(entry, context);
2313
2014
  });
2314
2015
  return retVal;
2315
2016
  };
2316
2017
  const de_ListSourceRepositoryBranchesItem = (output, context) => {
2317
- return {
2318
- headCommitId: (0, smithy_client_1.expectString)(output.headCommitId),
2319
- lastUpdatedTime: output.lastUpdatedTime != null
2320
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.lastUpdatedTime))
2321
- : undefined,
2322
- name: (0, smithy_client_1.expectString)(output.name),
2323
- ref: (0, smithy_client_1.expectString)(output.ref),
2324
- };
2018
+ return (0, smithy_client_1.take)(output, {
2019
+ headCommitId: smithy_client_1.expectString,
2020
+ lastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2021
+ name: smithy_client_1.expectString,
2022
+ ref: smithy_client_1.expectString,
2023
+ });
2325
2024
  };
2326
2025
  const de_ListSourceRepositoryBranchesItems = (output, context) => {
2327
2026
  const retVal = (output || [])
2328
2027
  .filter((e) => e != null)
2329
2028
  .map((entry) => {
2330
- if (entry === null) {
2331
- return null;
2332
- }
2333
2029
  return de_ListSourceRepositoryBranchesItem(entry, context);
2334
2030
  });
2335
2031
  return retVal;
2336
2032
  };
2337
- const de_PersistentStorage = (output, context) => {
2338
- return {
2339
- sizeInGiB: (0, smithy_client_1.expectInt32)(output.sizeInGiB),
2340
- };
2341
- };
2342
- const de_ProjectInformation = (output, context) => {
2343
- return {
2344
- name: (0, smithy_client_1.expectString)(output.name),
2345
- projectId: (0, smithy_client_1.expectString)(output.projectId),
2346
- };
2347
- };
2348
- const de_ProjectSummaries = (output, context) => {
2349
- const retVal = (output || [])
2350
- .filter((e) => e != null)
2351
- .map((entry) => {
2352
- if (entry === null) {
2353
- return null;
2354
- }
2355
- return de_ProjectSummary(entry, context);
2356
- });
2357
- return retVal;
2358
- };
2359
- const de_ProjectSummary = (output, context) => {
2360
- return {
2361
- description: (0, smithy_client_1.expectString)(output.description),
2362
- displayName: (0, smithy_client_1.expectString)(output.displayName),
2363
- name: (0, smithy_client_1.expectString)(output.name),
2364
- };
2365
- };
2366
- const de_SpaceSummaries = (output, context) => {
2367
- const retVal = (output || [])
2368
- .filter((e) => e != null)
2369
- .map((entry) => {
2370
- if (entry === null) {
2371
- return null;
2372
- }
2373
- return de_SpaceSummary(entry, context);
2374
- });
2375
- return retVal;
2376
- };
2377
- const de_SpaceSummary = (output, context) => {
2378
- return {
2379
- description: (0, smithy_client_1.expectString)(output.description),
2380
- displayName: (0, smithy_client_1.expectString)(output.displayName),
2381
- name: (0, smithy_client_1.expectString)(output.name),
2382
- regionName: (0, smithy_client_1.expectString)(output.regionName),
2383
- };
2384
- };
2385
- const de_UserIdentity = (output, context) => {
2386
- return {
2387
- awsAccountId: (0, smithy_client_1.expectString)(output.awsAccountId),
2388
- principalId: (0, smithy_client_1.expectString)(output.principalId),
2389
- userName: (0, smithy_client_1.expectString)(output.userName),
2390
- userType: (0, smithy_client_1.expectString)(output.userType),
2391
- };
2392
- };
2393
2033
  const deserializeMetadata = (output) => ({
2394
2034
  httpStatusCode: output.statusCode,
2395
2035
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],