@aws-sdk/client-amplify 3.310.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.
@@ -13,33 +13,27 @@ const se_CreateAppCommand = async (input, context) => {
13
13
  };
14
14
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/apps";
15
15
  let body;
16
- body = JSON.stringify({
17
- ...(input.accessToken != null && { accessToken: input.accessToken }),
18
- ...(input.autoBranchCreationConfig != null && {
19
- autoBranchCreationConfig: se_AutoBranchCreationConfig(input.autoBranchCreationConfig, context),
20
- }),
21
- ...(input.autoBranchCreationPatterns != null && {
22
- autoBranchCreationPatterns: se_AutoBranchCreationPatterns(input.autoBranchCreationPatterns, context),
23
- }),
24
- ...(input.basicAuthCredentials != null && { basicAuthCredentials: input.basicAuthCredentials }),
25
- ...(input.buildSpec != null && { buildSpec: input.buildSpec }),
26
- ...(input.customHeaders != null && { customHeaders: input.customHeaders }),
27
- ...(input.customRules != null && { customRules: se_CustomRules(input.customRules, context) }),
28
- ...(input.description != null && { description: input.description }),
29
- ...(input.enableAutoBranchCreation != null && { enableAutoBranchCreation: input.enableAutoBranchCreation }),
30
- ...(input.enableBasicAuth != null && { enableBasicAuth: input.enableBasicAuth }),
31
- ...(input.enableBranchAutoBuild != null && { enableBranchAutoBuild: input.enableBranchAutoBuild }),
32
- ...(input.enableBranchAutoDeletion != null && { enableBranchAutoDeletion: input.enableBranchAutoDeletion }),
33
- ...(input.environmentVariables != null && {
34
- environmentVariables: se_EnvironmentVariables(input.environmentVariables, context),
35
- }),
36
- ...(input.iamServiceRoleArn != null && { iamServiceRoleArn: input.iamServiceRoleArn }),
37
- ...(input.name != null && { name: input.name }),
38
- ...(input.oauthToken != null && { oauthToken: input.oauthToken }),
39
- ...(input.platform != null && { platform: input.platform }),
40
- ...(input.repository != null && { repository: input.repository }),
41
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
42
- });
16
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
17
+ accessToken: [],
18
+ autoBranchCreationConfig: (_) => (0, smithy_client_1._json)(_),
19
+ autoBranchCreationPatterns: (_) => (0, smithy_client_1._json)(_),
20
+ basicAuthCredentials: [],
21
+ buildSpec: [],
22
+ customHeaders: [],
23
+ customRules: (_) => (0, smithy_client_1._json)(_),
24
+ description: [],
25
+ enableAutoBranchCreation: [],
26
+ enableBasicAuth: [],
27
+ enableBranchAutoBuild: [],
28
+ enableBranchAutoDeletion: [],
29
+ environmentVariables: (_) => (0, smithy_client_1._json)(_),
30
+ iamServiceRoleArn: [],
31
+ name: [],
32
+ oauthToken: [],
33
+ platform: [],
34
+ repository: [],
35
+ tags: (_) => (0, smithy_client_1._json)(_),
36
+ }));
43
37
  return new protocol_http_1.HttpRequest({
44
38
  protocol,
45
39
  hostname,
@@ -59,11 +53,11 @@ const se_CreateBackendEnvironmentCommand = async (input, context) => {
59
53
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/apps/{appId}/backendenvironments";
60
54
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
61
55
  let body;
62
- body = JSON.stringify({
63
- ...(input.deploymentArtifacts != null && { deploymentArtifacts: input.deploymentArtifacts }),
64
- ...(input.environmentName != null && { environmentName: input.environmentName }),
65
- ...(input.stackName != null && { stackName: input.stackName }),
66
- });
56
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
57
+ deploymentArtifacts: [],
58
+ environmentName: [],
59
+ stackName: [],
60
+ }));
67
61
  return new protocol_http_1.HttpRequest({
68
62
  protocol,
69
63
  hostname,
@@ -83,27 +77,25 @@ const se_CreateBranchCommand = async (input, context) => {
83
77
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/apps/{appId}/branches";
84
78
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
85
79
  let body;
86
- body = JSON.stringify({
87
- ...(input.backendEnvironmentArn != null && { backendEnvironmentArn: input.backendEnvironmentArn }),
88
- ...(input.basicAuthCredentials != null && { basicAuthCredentials: input.basicAuthCredentials }),
89
- ...(input.branchName != null && { branchName: input.branchName }),
90
- ...(input.buildSpec != null && { buildSpec: input.buildSpec }),
91
- ...(input.description != null && { description: input.description }),
92
- ...(input.displayName != null && { displayName: input.displayName }),
93
- ...(input.enableAutoBuild != null && { enableAutoBuild: input.enableAutoBuild }),
94
- ...(input.enableBasicAuth != null && { enableBasicAuth: input.enableBasicAuth }),
95
- ...(input.enableNotification != null && { enableNotification: input.enableNotification }),
96
- ...(input.enablePerformanceMode != null && { enablePerformanceMode: input.enablePerformanceMode }),
97
- ...(input.enablePullRequestPreview != null && { enablePullRequestPreview: input.enablePullRequestPreview }),
98
- ...(input.environmentVariables != null && {
99
- environmentVariables: se_EnvironmentVariables(input.environmentVariables, context),
100
- }),
101
- ...(input.framework != null && { framework: input.framework }),
102
- ...(input.pullRequestEnvironmentName != null && { pullRequestEnvironmentName: input.pullRequestEnvironmentName }),
103
- ...(input.stage != null && { stage: input.stage }),
104
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
105
- ...(input.ttl != null && { ttl: input.ttl }),
106
- });
80
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
81
+ backendEnvironmentArn: [],
82
+ basicAuthCredentials: [],
83
+ branchName: [],
84
+ buildSpec: [],
85
+ description: [],
86
+ displayName: [],
87
+ enableAutoBuild: [],
88
+ enableBasicAuth: [],
89
+ enableNotification: [],
90
+ enablePerformanceMode: [],
91
+ enablePullRequestPreview: [],
92
+ environmentVariables: (_) => (0, smithy_client_1._json)(_),
93
+ framework: [],
94
+ pullRequestEnvironmentName: [],
95
+ stage: [],
96
+ tags: (_) => (0, smithy_client_1._json)(_),
97
+ ttl: [],
98
+ }));
107
99
  return new protocol_http_1.HttpRequest({
108
100
  protocol,
109
101
  hostname,
@@ -125,9 +117,9 @@ const se_CreateDeploymentCommand = async (input, context) => {
125
117
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
126
118
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "branchName", () => input.branchName, "{branchName}", false);
127
119
  let body;
128
- body = JSON.stringify({
129
- ...(input.fileMap != null && { fileMap: se_FileMap(input.fileMap, context) }),
130
- });
120
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
121
+ fileMap: (_) => (0, smithy_client_1._json)(_),
122
+ }));
131
123
  return new protocol_http_1.HttpRequest({
132
124
  protocol,
133
125
  hostname,
@@ -147,17 +139,13 @@ const se_CreateDomainAssociationCommand = async (input, context) => {
147
139
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/apps/{appId}/domains";
148
140
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
149
141
  let body;
150
- body = JSON.stringify({
151
- ...(input.autoSubDomainCreationPatterns != null && {
152
- autoSubDomainCreationPatterns: se_AutoSubDomainCreationPatterns(input.autoSubDomainCreationPatterns, context),
153
- }),
154
- ...(input.autoSubDomainIAMRole != null && { autoSubDomainIAMRole: input.autoSubDomainIAMRole }),
155
- ...(input.domainName != null && { domainName: input.domainName }),
156
- ...(input.enableAutoSubDomain != null && { enableAutoSubDomain: input.enableAutoSubDomain }),
157
- ...(input.subDomainSettings != null && {
158
- subDomainSettings: se_SubDomainSettings(input.subDomainSettings, context),
159
- }),
160
- });
142
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
143
+ autoSubDomainCreationPatterns: (_) => (0, smithy_client_1._json)(_),
144
+ autoSubDomainIAMRole: [],
145
+ domainName: [],
146
+ enableAutoSubDomain: [],
147
+ subDomainSettings: (_) => (0, smithy_client_1._json)(_),
148
+ }));
161
149
  return new protocol_http_1.HttpRequest({
162
150
  protocol,
163
151
  hostname,
@@ -177,10 +165,10 @@ const se_CreateWebhookCommand = async (input, context) => {
177
165
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/apps/{appId}/webhooks";
178
166
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
179
167
  let body;
180
- body = JSON.stringify({
181
- ...(input.branchName != null && { branchName: input.branchName }),
182
- ...(input.description != null && { description: input.description }),
183
- });
168
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
169
+ branchName: [],
170
+ description: [],
171
+ }));
184
172
  return new protocol_http_1.HttpRequest({
185
173
  protocol,
186
174
  hostname,
@@ -309,11 +297,11 @@ const se_GenerateAccessLogsCommand = async (input, context) => {
309
297
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/apps/{appId}/accesslogs";
310
298
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
311
299
  let body;
312
- body = JSON.stringify({
313
- ...(input.domainName != null && { domainName: input.domainName }),
314
- ...(input.endTime != null && { endTime: Math.round(input.endTime.getTime() / 1000) }),
315
- ...(input.startTime != null && { startTime: Math.round(input.startTime.getTime() / 1000) }),
316
- });
300
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
301
+ domainName: [],
302
+ endTime: (_) => Math.round(_.getTime() / 1000),
303
+ startTime: (_) => Math.round(_.getTime() / 1000),
304
+ }));
317
305
  return new protocol_http_1.HttpRequest({
318
306
  protocol,
319
307
  hostname,
@@ -455,7 +443,7 @@ const se_ListAppsCommand = async (input, context) => {
455
443
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
456
444
  const headers = {};
457
445
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/apps";
458
- const query = map({
446
+ const query = (0, smithy_client_1.map)({
459
447
  nextToken: [, input.nextToken],
460
448
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
461
449
  });
@@ -480,7 +468,7 @@ const se_ListArtifactsCommand = async (input, context) => {
480
468
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
481
469
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "branchName", () => input.branchName, "{branchName}", false);
482
470
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "jobId", () => input.jobId, "{jobId}", false);
483
- const query = map({
471
+ const query = (0, smithy_client_1.map)({
484
472
  nextToken: [, input.nextToken],
485
473
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
486
474
  });
@@ -502,7 +490,7 @@ const se_ListBackendEnvironmentsCommand = async (input, context) => {
502
490
  const headers = {};
503
491
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/apps/{appId}/backendenvironments";
504
492
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
505
- const query = map({
493
+ const query = (0, smithy_client_1.map)({
506
494
  environmentName: [, input.environmentName],
507
495
  nextToken: [, input.nextToken],
508
496
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
@@ -525,7 +513,7 @@ const se_ListBranchesCommand = async (input, context) => {
525
513
  const headers = {};
526
514
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/apps/{appId}/branches";
527
515
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
528
- const query = map({
516
+ const query = (0, smithy_client_1.map)({
529
517
  nextToken: [, input.nextToken],
530
518
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
531
519
  });
@@ -547,7 +535,7 @@ const se_ListDomainAssociationsCommand = async (input, context) => {
547
535
  const headers = {};
548
536
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/apps/{appId}/domains";
549
537
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
550
- const query = map({
538
+ const query = (0, smithy_client_1.map)({
551
539
  nextToken: [, input.nextToken],
552
540
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
553
541
  });
@@ -570,7 +558,7 @@ const se_ListJobsCommand = async (input, context) => {
570
558
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/apps/{appId}/branches/{branchName}/jobs";
571
559
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
572
560
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "branchName", () => input.branchName, "{branchName}", false);
573
- const query = map({
561
+ const query = (0, smithy_client_1.map)({
574
562
  nextToken: [, input.nextToken],
575
563
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
576
564
  });
@@ -609,7 +597,7 @@ const se_ListWebhooksCommand = async (input, context) => {
609
597
  const headers = {};
610
598
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/apps/{appId}/webhooks";
611
599
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
612
- const query = map({
600
+ const query = (0, smithy_client_1.map)({
613
601
  nextToken: [, input.nextToken],
614
602
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
615
603
  });
@@ -636,10 +624,10 @@ const se_StartDeploymentCommand = async (input, context) => {
636
624
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
637
625
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "branchName", () => input.branchName, "{branchName}", false);
638
626
  let body;
639
- body = JSON.stringify({
640
- ...(input.jobId != null && { jobId: input.jobId }),
641
- ...(input.sourceUrl != null && { sourceUrl: input.sourceUrl }),
642
- });
627
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
628
+ jobId: [],
629
+ sourceUrl: [],
630
+ }));
643
631
  return new protocol_http_1.HttpRequest({
644
632
  protocol,
645
633
  hostname,
@@ -660,14 +648,14 @@ const se_StartJobCommand = async (input, context) => {
660
648
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
661
649
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "branchName", () => input.branchName, "{branchName}", false);
662
650
  let body;
663
- body = JSON.stringify({
664
- ...(input.commitId != null && { commitId: input.commitId }),
665
- ...(input.commitMessage != null && { commitMessage: input.commitMessage }),
666
- ...(input.commitTime != null && { commitTime: Math.round(input.commitTime.getTime() / 1000) }),
667
- ...(input.jobId != null && { jobId: input.jobId }),
668
- ...(input.jobReason != null && { jobReason: input.jobReason }),
669
- ...(input.jobType != null && { jobType: input.jobType }),
670
- });
651
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
652
+ commitId: [],
653
+ commitMessage: [],
654
+ commitTime: (_) => Math.round(_.getTime() / 1000),
655
+ jobId: [],
656
+ jobReason: [],
657
+ jobType: [],
658
+ }));
671
659
  return new protocol_http_1.HttpRequest({
672
660
  protocol,
673
661
  hostname,
@@ -707,9 +695,9 @@ const se_TagResourceCommand = async (input, context) => {
707
695
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
708
696
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
709
697
  let body;
710
- body = JSON.stringify({
711
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
712
- });
698
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
699
+ tags: (_) => (0, smithy_client_1._json)(_),
700
+ }));
713
701
  return new protocol_http_1.HttpRequest({
714
702
  protocol,
715
703
  hostname,
@@ -726,7 +714,7 @@ const se_UntagResourceCommand = async (input, context) => {
726
714
  const headers = {};
727
715
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
728
716
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
729
- const query = map({
717
+ const query = (0, smithy_client_1.map)({
730
718
  tagKeys: [
731
719
  (0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
732
720
  () => (input.tagKeys || []).map((_entry) => _entry),
@@ -753,32 +741,26 @@ const se_UpdateAppCommand = async (input, context) => {
753
741
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/apps/{appId}";
754
742
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
755
743
  let body;
756
- body = JSON.stringify({
757
- ...(input.accessToken != null && { accessToken: input.accessToken }),
758
- ...(input.autoBranchCreationConfig != null && {
759
- autoBranchCreationConfig: se_AutoBranchCreationConfig(input.autoBranchCreationConfig, context),
760
- }),
761
- ...(input.autoBranchCreationPatterns != null && {
762
- autoBranchCreationPatterns: se_AutoBranchCreationPatterns(input.autoBranchCreationPatterns, context),
763
- }),
764
- ...(input.basicAuthCredentials != null && { basicAuthCredentials: input.basicAuthCredentials }),
765
- ...(input.buildSpec != null && { buildSpec: input.buildSpec }),
766
- ...(input.customHeaders != null && { customHeaders: input.customHeaders }),
767
- ...(input.customRules != null && { customRules: se_CustomRules(input.customRules, context) }),
768
- ...(input.description != null && { description: input.description }),
769
- ...(input.enableAutoBranchCreation != null && { enableAutoBranchCreation: input.enableAutoBranchCreation }),
770
- ...(input.enableBasicAuth != null && { enableBasicAuth: input.enableBasicAuth }),
771
- ...(input.enableBranchAutoBuild != null && { enableBranchAutoBuild: input.enableBranchAutoBuild }),
772
- ...(input.enableBranchAutoDeletion != null && { enableBranchAutoDeletion: input.enableBranchAutoDeletion }),
773
- ...(input.environmentVariables != null && {
774
- environmentVariables: se_EnvironmentVariables(input.environmentVariables, context),
775
- }),
776
- ...(input.iamServiceRoleArn != null && { iamServiceRoleArn: input.iamServiceRoleArn }),
777
- ...(input.name != null && { name: input.name }),
778
- ...(input.oauthToken != null && { oauthToken: input.oauthToken }),
779
- ...(input.platform != null && { platform: input.platform }),
780
- ...(input.repository != null && { repository: input.repository }),
781
- });
744
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
745
+ accessToken: [],
746
+ autoBranchCreationConfig: (_) => (0, smithy_client_1._json)(_),
747
+ autoBranchCreationPatterns: (_) => (0, smithy_client_1._json)(_),
748
+ basicAuthCredentials: [],
749
+ buildSpec: [],
750
+ customHeaders: [],
751
+ customRules: (_) => (0, smithy_client_1._json)(_),
752
+ description: [],
753
+ enableAutoBranchCreation: [],
754
+ enableBasicAuth: [],
755
+ enableBranchAutoBuild: [],
756
+ enableBranchAutoDeletion: [],
757
+ environmentVariables: (_) => (0, smithy_client_1._json)(_),
758
+ iamServiceRoleArn: [],
759
+ name: [],
760
+ oauthToken: [],
761
+ platform: [],
762
+ repository: [],
763
+ }));
782
764
  return new protocol_http_1.HttpRequest({
783
765
  protocol,
784
766
  hostname,
@@ -799,25 +781,23 @@ const se_UpdateBranchCommand = async (input, context) => {
799
781
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
800
782
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "branchName", () => input.branchName, "{branchName}", false);
801
783
  let body;
802
- body = JSON.stringify({
803
- ...(input.backendEnvironmentArn != null && { backendEnvironmentArn: input.backendEnvironmentArn }),
804
- ...(input.basicAuthCredentials != null && { basicAuthCredentials: input.basicAuthCredentials }),
805
- ...(input.buildSpec != null && { buildSpec: input.buildSpec }),
806
- ...(input.description != null && { description: input.description }),
807
- ...(input.displayName != null && { displayName: input.displayName }),
808
- ...(input.enableAutoBuild != null && { enableAutoBuild: input.enableAutoBuild }),
809
- ...(input.enableBasicAuth != null && { enableBasicAuth: input.enableBasicAuth }),
810
- ...(input.enableNotification != null && { enableNotification: input.enableNotification }),
811
- ...(input.enablePerformanceMode != null && { enablePerformanceMode: input.enablePerformanceMode }),
812
- ...(input.enablePullRequestPreview != null && { enablePullRequestPreview: input.enablePullRequestPreview }),
813
- ...(input.environmentVariables != null && {
814
- environmentVariables: se_EnvironmentVariables(input.environmentVariables, context),
815
- }),
816
- ...(input.framework != null && { framework: input.framework }),
817
- ...(input.pullRequestEnvironmentName != null && { pullRequestEnvironmentName: input.pullRequestEnvironmentName }),
818
- ...(input.stage != null && { stage: input.stage }),
819
- ...(input.ttl != null && { ttl: input.ttl }),
820
- });
784
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
785
+ backendEnvironmentArn: [],
786
+ basicAuthCredentials: [],
787
+ buildSpec: [],
788
+ description: [],
789
+ displayName: [],
790
+ enableAutoBuild: [],
791
+ enableBasicAuth: [],
792
+ enableNotification: [],
793
+ enablePerformanceMode: [],
794
+ enablePullRequestPreview: [],
795
+ environmentVariables: (_) => (0, smithy_client_1._json)(_),
796
+ framework: [],
797
+ pullRequestEnvironmentName: [],
798
+ stage: [],
799
+ ttl: [],
800
+ }));
821
801
  return new protocol_http_1.HttpRequest({
822
802
  protocol,
823
803
  hostname,
@@ -838,16 +818,12 @@ const se_UpdateDomainAssociationCommand = async (input, context) => {
838
818
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
839
819
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "domainName", () => input.domainName, "{domainName}", false);
840
820
  let body;
841
- body = JSON.stringify({
842
- ...(input.autoSubDomainCreationPatterns != null && {
843
- autoSubDomainCreationPatterns: se_AutoSubDomainCreationPatterns(input.autoSubDomainCreationPatterns, context),
844
- }),
845
- ...(input.autoSubDomainIAMRole != null && { autoSubDomainIAMRole: input.autoSubDomainIAMRole }),
846
- ...(input.enableAutoSubDomain != null && { enableAutoSubDomain: input.enableAutoSubDomain }),
847
- ...(input.subDomainSettings != null && {
848
- subDomainSettings: se_SubDomainSettings(input.subDomainSettings, context),
849
- }),
850
- });
821
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
822
+ autoSubDomainCreationPatterns: (_) => (0, smithy_client_1._json)(_),
823
+ autoSubDomainIAMRole: [],
824
+ enableAutoSubDomain: [],
825
+ subDomainSettings: (_) => (0, smithy_client_1._json)(_),
826
+ }));
851
827
  return new protocol_http_1.HttpRequest({
852
828
  protocol,
853
829
  hostname,
@@ -867,10 +843,10 @@ const se_UpdateWebhookCommand = async (input, context) => {
867
843
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/webhooks/{webhookId}";
868
844
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "webhookId", () => input.webhookId, "{webhookId}", false);
869
845
  let body;
870
- body = JSON.stringify({
871
- ...(input.branchName != null && { branchName: input.branchName }),
872
- ...(input.description != null && { description: input.description }),
873
- });
846
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
847
+ branchName: [],
848
+ description: [],
849
+ }));
874
850
  return new protocol_http_1.HttpRequest({
875
851
  protocol,
876
852
  hostname,
@@ -886,13 +862,14 @@ const de_CreateAppCommand = async (output, context) => {
886
862
  if (output.statusCode !== 200 && output.statusCode >= 300) {
887
863
  return de_CreateAppCommandError(output, context);
888
864
  }
889
- const contents = map({
865
+ const contents = (0, smithy_client_1.map)({
890
866
  $metadata: deserializeMetadata(output),
891
867
  });
892
868
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
893
- if (data.app != null) {
894
- contents.app = de_App(data.app, context);
895
- }
869
+ const doc = (0, smithy_client_1.take)(data, {
870
+ app: (_) => de_App(_, context),
871
+ });
872
+ Object.assign(contents, doc);
896
873
  return contents;
897
874
  };
898
875
  exports.de_CreateAppCommand = de_CreateAppCommand;
@@ -920,10 +897,9 @@ const de_CreateAppCommandError = async (output, context) => {
920
897
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
921
898
  default:
922
899
  const parsedBody = parsedOutput.body;
923
- (0, smithy_client_1.throwDefaultError)({
900
+ return throwDefaultError({
924
901
  output,
925
902
  parsedBody,
926
- exceptionCtor: AmplifyServiceException_1.AmplifyServiceException,
927
903
  errorCode,
928
904
  });
929
905
  }
@@ -932,13 +908,14 @@ const de_CreateBackendEnvironmentCommand = async (output, context) => {
932
908
  if (output.statusCode !== 200 && output.statusCode >= 300) {
933
909
  return de_CreateBackendEnvironmentCommandError(output, context);
934
910
  }
935
- const contents = map({
911
+ const contents = (0, smithy_client_1.map)({
936
912
  $metadata: deserializeMetadata(output),
937
913
  });
938
914
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
939
- if (data.backendEnvironment != null) {
940
- contents.backendEnvironment = de_BackendEnvironment(data.backendEnvironment, context);
941
- }
915
+ const doc = (0, smithy_client_1.take)(data, {
916
+ backendEnvironment: (_) => de_BackendEnvironment(_, context),
917
+ });
918
+ Object.assign(contents, doc);
942
919
  return contents;
943
920
  };
944
921
  exports.de_CreateBackendEnvironmentCommand = de_CreateBackendEnvironmentCommand;
@@ -966,10 +943,9 @@ const de_CreateBackendEnvironmentCommandError = async (output, context) => {
966
943
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
967
944
  default:
968
945
  const parsedBody = parsedOutput.body;
969
- (0, smithy_client_1.throwDefaultError)({
946
+ return throwDefaultError({
970
947
  output,
971
948
  parsedBody,
972
- exceptionCtor: AmplifyServiceException_1.AmplifyServiceException,
973
949
  errorCode,
974
950
  });
975
951
  }
@@ -978,13 +954,14 @@ const de_CreateBranchCommand = async (output, context) => {
978
954
  if (output.statusCode !== 200 && output.statusCode >= 300) {
979
955
  return de_CreateBranchCommandError(output, context);
980
956
  }
981
- const contents = map({
957
+ const contents = (0, smithy_client_1.map)({
982
958
  $metadata: deserializeMetadata(output),
983
959
  });
984
960
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
985
- if (data.branch != null) {
986
- contents.branch = de_Branch(data.branch, context);
987
- }
961
+ const doc = (0, smithy_client_1.take)(data, {
962
+ branch: (_) => de_Branch(_, context),
963
+ });
964
+ Object.assign(contents, doc);
988
965
  return contents;
989
966
  };
990
967
  exports.de_CreateBranchCommand = de_CreateBranchCommand;
@@ -1015,10 +992,9 @@ const de_CreateBranchCommandError = async (output, context) => {
1015
992
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1016
993
  default:
1017
994
  const parsedBody = parsedOutput.body;
1018
- (0, smithy_client_1.throwDefaultError)({
995
+ return throwDefaultError({
1019
996
  output,
1020
997
  parsedBody,
1021
- exceptionCtor: AmplifyServiceException_1.AmplifyServiceException,
1022
998
  errorCode,
1023
999
  });
1024
1000
  }
@@ -1027,19 +1003,16 @@ const de_CreateDeploymentCommand = async (output, context) => {
1027
1003
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1028
1004
  return de_CreateDeploymentCommandError(output, context);
1029
1005
  }
1030
- const contents = map({
1006
+ const contents = (0, smithy_client_1.map)({
1031
1007
  $metadata: deserializeMetadata(output),
1032
1008
  });
1033
1009
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1034
- if (data.fileUploadUrls != null) {
1035
- contents.fileUploadUrls = de_FileUploadUrls(data.fileUploadUrls, context);
1036
- }
1037
- if (data.jobId != null) {
1038
- contents.jobId = (0, smithy_client_1.expectString)(data.jobId);
1039
- }
1040
- if (data.zipUploadUrl != null) {
1041
- contents.zipUploadUrl = (0, smithy_client_1.expectString)(data.zipUploadUrl);
1042
- }
1010
+ const doc = (0, smithy_client_1.take)(data, {
1011
+ fileUploadUrls: smithy_client_1._json,
1012
+ jobId: smithy_client_1.expectString,
1013
+ zipUploadUrl: smithy_client_1.expectString,
1014
+ });
1015
+ Object.assign(contents, doc);
1043
1016
  return contents;
1044
1017
  };
1045
1018
  exports.de_CreateDeploymentCommand = de_CreateDeploymentCommand;
@@ -1064,10 +1037,9 @@ const de_CreateDeploymentCommandError = async (output, context) => {
1064
1037
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1065
1038
  default:
1066
1039
  const parsedBody = parsedOutput.body;
1067
- (0, smithy_client_1.throwDefaultError)({
1040
+ return throwDefaultError({
1068
1041
  output,
1069
1042
  parsedBody,
1070
- exceptionCtor: AmplifyServiceException_1.AmplifyServiceException,
1071
1043
  errorCode,
1072
1044
  });
1073
1045
  }
@@ -1076,13 +1048,14 @@ const de_CreateDomainAssociationCommand = async (output, context) => {
1076
1048
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1077
1049
  return de_CreateDomainAssociationCommandError(output, context);
1078
1050
  }
1079
- const contents = map({
1051
+ const contents = (0, smithy_client_1.map)({
1080
1052
  $metadata: deserializeMetadata(output),
1081
1053
  });
1082
1054
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1083
- if (data.domainAssociation != null) {
1084
- contents.domainAssociation = de_DomainAssociation(data.domainAssociation, context);
1085
- }
1055
+ const doc = (0, smithy_client_1.take)(data, {
1056
+ domainAssociation: smithy_client_1._json,
1057
+ });
1058
+ Object.assign(contents, doc);
1086
1059
  return contents;
1087
1060
  };
1088
1061
  exports.de_CreateDomainAssociationCommand = de_CreateDomainAssociationCommand;
@@ -1113,10 +1086,9 @@ const de_CreateDomainAssociationCommandError = async (output, context) => {
1113
1086
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1114
1087
  default:
1115
1088
  const parsedBody = parsedOutput.body;
1116
- (0, smithy_client_1.throwDefaultError)({
1089
+ return throwDefaultError({
1117
1090
  output,
1118
1091
  parsedBody,
1119
- exceptionCtor: AmplifyServiceException_1.AmplifyServiceException,
1120
1092
  errorCode,
1121
1093
  });
1122
1094
  }
@@ -1125,13 +1097,14 @@ const de_CreateWebhookCommand = async (output, context) => {
1125
1097
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1126
1098
  return de_CreateWebhookCommandError(output, context);
1127
1099
  }
1128
- const contents = map({
1100
+ const contents = (0, smithy_client_1.map)({
1129
1101
  $metadata: deserializeMetadata(output),
1130
1102
  });
1131
1103
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1132
- if (data.webhook != null) {
1133
- contents.webhook = de_Webhook(data.webhook, context);
1134
- }
1104
+ const doc = (0, smithy_client_1.take)(data, {
1105
+ webhook: (_) => de_Webhook(_, context),
1106
+ });
1107
+ Object.assign(contents, doc);
1135
1108
  return contents;
1136
1109
  };
1137
1110
  exports.de_CreateWebhookCommand = de_CreateWebhookCommand;
@@ -1162,10 +1135,9 @@ const de_CreateWebhookCommandError = async (output, context) => {
1162
1135
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1163
1136
  default:
1164
1137
  const parsedBody = parsedOutput.body;
1165
- (0, smithy_client_1.throwDefaultError)({
1138
+ return throwDefaultError({
1166
1139
  output,
1167
1140
  parsedBody,
1168
- exceptionCtor: AmplifyServiceException_1.AmplifyServiceException,
1169
1141
  errorCode,
1170
1142
  });
1171
1143
  }
@@ -1174,13 +1146,14 @@ const de_DeleteAppCommand = async (output, context) => {
1174
1146
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1175
1147
  return de_DeleteAppCommandError(output, context);
1176
1148
  }
1177
- const contents = map({
1149
+ const contents = (0, smithy_client_1.map)({
1178
1150
  $metadata: deserializeMetadata(output),
1179
1151
  });
1180
1152
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1181
- if (data.app != null) {
1182
- contents.app = de_App(data.app, context);
1183
- }
1153
+ const doc = (0, smithy_client_1.take)(data, {
1154
+ app: (_) => de_App(_, context),
1155
+ });
1156
+ Object.assign(contents, doc);
1184
1157
  return contents;
1185
1158
  };
1186
1159
  exports.de_DeleteAppCommand = de_DeleteAppCommand;
@@ -1208,10 +1181,9 @@ const de_DeleteAppCommandError = async (output, context) => {
1208
1181
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1209
1182
  default:
1210
1183
  const parsedBody = parsedOutput.body;
1211
- (0, smithy_client_1.throwDefaultError)({
1184
+ return throwDefaultError({
1212
1185
  output,
1213
1186
  parsedBody,
1214
- exceptionCtor: AmplifyServiceException_1.AmplifyServiceException,
1215
1187
  errorCode,
1216
1188
  });
1217
1189
  }
@@ -1220,13 +1192,14 @@ const de_DeleteBackendEnvironmentCommand = async (output, context) => {
1220
1192
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1221
1193
  return de_DeleteBackendEnvironmentCommandError(output, context);
1222
1194
  }
1223
- const contents = map({
1195
+ const contents = (0, smithy_client_1.map)({
1224
1196
  $metadata: deserializeMetadata(output),
1225
1197
  });
1226
1198
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1227
- if (data.backendEnvironment != null) {
1228
- contents.backendEnvironment = de_BackendEnvironment(data.backendEnvironment, context);
1229
- }
1199
+ const doc = (0, smithy_client_1.take)(data, {
1200
+ backendEnvironment: (_) => de_BackendEnvironment(_, context),
1201
+ });
1202
+ Object.assign(contents, doc);
1230
1203
  return contents;
1231
1204
  };
1232
1205
  exports.de_DeleteBackendEnvironmentCommand = de_DeleteBackendEnvironmentCommand;
@@ -1254,10 +1227,9 @@ const de_DeleteBackendEnvironmentCommandError = async (output, context) => {
1254
1227
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1255
1228
  default:
1256
1229
  const parsedBody = parsedOutput.body;
1257
- (0, smithy_client_1.throwDefaultError)({
1230
+ return throwDefaultError({
1258
1231
  output,
1259
1232
  parsedBody,
1260
- exceptionCtor: AmplifyServiceException_1.AmplifyServiceException,
1261
1233
  errorCode,
1262
1234
  });
1263
1235
  }
@@ -1266,13 +1238,14 @@ const de_DeleteBranchCommand = async (output, context) => {
1266
1238
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1267
1239
  return de_DeleteBranchCommandError(output, context);
1268
1240
  }
1269
- const contents = map({
1241
+ const contents = (0, smithy_client_1.map)({
1270
1242
  $metadata: deserializeMetadata(output),
1271
1243
  });
1272
1244
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1273
- if (data.branch != null) {
1274
- contents.branch = de_Branch(data.branch, context);
1275
- }
1245
+ const doc = (0, smithy_client_1.take)(data, {
1246
+ branch: (_) => de_Branch(_, context),
1247
+ });
1248
+ Object.assign(contents, doc);
1276
1249
  return contents;
1277
1250
  };
1278
1251
  exports.de_DeleteBranchCommand = de_DeleteBranchCommand;
@@ -1300,10 +1273,9 @@ const de_DeleteBranchCommandError = async (output, context) => {
1300
1273
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1301
1274
  default:
1302
1275
  const parsedBody = parsedOutput.body;
1303
- (0, smithy_client_1.throwDefaultError)({
1276
+ return throwDefaultError({
1304
1277
  output,
1305
1278
  parsedBody,
1306
- exceptionCtor: AmplifyServiceException_1.AmplifyServiceException,
1307
1279
  errorCode,
1308
1280
  });
1309
1281
  }
@@ -1312,13 +1284,14 @@ const de_DeleteDomainAssociationCommand = async (output, context) => {
1312
1284
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1313
1285
  return de_DeleteDomainAssociationCommandError(output, context);
1314
1286
  }
1315
- const contents = map({
1287
+ const contents = (0, smithy_client_1.map)({
1316
1288
  $metadata: deserializeMetadata(output),
1317
1289
  });
1318
1290
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1319
- if (data.domainAssociation != null) {
1320
- contents.domainAssociation = de_DomainAssociation(data.domainAssociation, context);
1321
- }
1291
+ const doc = (0, smithy_client_1.take)(data, {
1292
+ domainAssociation: smithy_client_1._json,
1293
+ });
1294
+ Object.assign(contents, doc);
1322
1295
  return contents;
1323
1296
  };
1324
1297
  exports.de_DeleteDomainAssociationCommand = de_DeleteDomainAssociationCommand;
@@ -1346,10 +1319,9 @@ const de_DeleteDomainAssociationCommandError = async (output, context) => {
1346
1319
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1347
1320
  default:
1348
1321
  const parsedBody = parsedOutput.body;
1349
- (0, smithy_client_1.throwDefaultError)({
1322
+ return throwDefaultError({
1350
1323
  output,
1351
1324
  parsedBody,
1352
- exceptionCtor: AmplifyServiceException_1.AmplifyServiceException,
1353
1325
  errorCode,
1354
1326
  });
1355
1327
  }
@@ -1358,13 +1330,14 @@ const de_DeleteJobCommand = async (output, context) => {
1358
1330
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1359
1331
  return de_DeleteJobCommandError(output, context);
1360
1332
  }
1361
- const contents = map({
1333
+ const contents = (0, smithy_client_1.map)({
1362
1334
  $metadata: deserializeMetadata(output),
1363
1335
  });
1364
1336
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1365
- if (data.jobSummary != null) {
1366
- contents.jobSummary = de_JobSummary(data.jobSummary, context);
1367
- }
1337
+ const doc = (0, smithy_client_1.take)(data, {
1338
+ jobSummary: (_) => de_JobSummary(_, context),
1339
+ });
1340
+ Object.assign(contents, doc);
1368
1341
  return contents;
1369
1342
  };
1370
1343
  exports.de_DeleteJobCommand = de_DeleteJobCommand;
@@ -1392,10 +1365,9 @@ const de_DeleteJobCommandError = async (output, context) => {
1392
1365
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1393
1366
  default:
1394
1367
  const parsedBody = parsedOutput.body;
1395
- (0, smithy_client_1.throwDefaultError)({
1368
+ return throwDefaultError({
1396
1369
  output,
1397
1370
  parsedBody,
1398
- exceptionCtor: AmplifyServiceException_1.AmplifyServiceException,
1399
1371
  errorCode,
1400
1372
  });
1401
1373
  }
@@ -1404,13 +1376,14 @@ const de_DeleteWebhookCommand = async (output, context) => {
1404
1376
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1405
1377
  return de_DeleteWebhookCommandError(output, context);
1406
1378
  }
1407
- const contents = map({
1379
+ const contents = (0, smithy_client_1.map)({
1408
1380
  $metadata: deserializeMetadata(output),
1409
1381
  });
1410
1382
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1411
- if (data.webhook != null) {
1412
- contents.webhook = de_Webhook(data.webhook, context);
1413
- }
1383
+ const doc = (0, smithy_client_1.take)(data, {
1384
+ webhook: (_) => de_Webhook(_, context),
1385
+ });
1386
+ Object.assign(contents, doc);
1414
1387
  return contents;
1415
1388
  };
1416
1389
  exports.de_DeleteWebhookCommand = de_DeleteWebhookCommand;
@@ -1438,10 +1411,9 @@ const de_DeleteWebhookCommandError = async (output, context) => {
1438
1411
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1439
1412
  default:
1440
1413
  const parsedBody = parsedOutput.body;
1441
- (0, smithy_client_1.throwDefaultError)({
1414
+ return throwDefaultError({
1442
1415
  output,
1443
1416
  parsedBody,
1444
- exceptionCtor: AmplifyServiceException_1.AmplifyServiceException,
1445
1417
  errorCode,
1446
1418
  });
1447
1419
  }
@@ -1450,13 +1422,14 @@ const de_GenerateAccessLogsCommand = async (output, context) => {
1450
1422
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1451
1423
  return de_GenerateAccessLogsCommandError(output, context);
1452
1424
  }
1453
- const contents = map({
1425
+ const contents = (0, smithy_client_1.map)({
1454
1426
  $metadata: deserializeMetadata(output),
1455
1427
  });
1456
1428
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1457
- if (data.logUrl != null) {
1458
- contents.logUrl = (0, smithy_client_1.expectString)(data.logUrl);
1459
- }
1429
+ const doc = (0, smithy_client_1.take)(data, {
1430
+ logUrl: smithy_client_1.expectString,
1431
+ });
1432
+ Object.assign(contents, doc);
1460
1433
  return contents;
1461
1434
  };
1462
1435
  exports.de_GenerateAccessLogsCommand = de_GenerateAccessLogsCommand;
@@ -1481,10 +1454,9 @@ const de_GenerateAccessLogsCommandError = async (output, context) => {
1481
1454
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1482
1455
  default:
1483
1456
  const parsedBody = parsedOutput.body;
1484
- (0, smithy_client_1.throwDefaultError)({
1457
+ return throwDefaultError({
1485
1458
  output,
1486
1459
  parsedBody,
1487
- exceptionCtor: AmplifyServiceException_1.AmplifyServiceException,
1488
1460
  errorCode,
1489
1461
  });
1490
1462
  }
@@ -1493,13 +1465,14 @@ const de_GetAppCommand = async (output, context) => {
1493
1465
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1494
1466
  return de_GetAppCommandError(output, context);
1495
1467
  }
1496
- const contents = map({
1468
+ const contents = (0, smithy_client_1.map)({
1497
1469
  $metadata: deserializeMetadata(output),
1498
1470
  });
1499
1471
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1500
- if (data.app != null) {
1501
- contents.app = de_App(data.app, context);
1502
- }
1472
+ const doc = (0, smithy_client_1.take)(data, {
1473
+ app: (_) => de_App(_, context),
1474
+ });
1475
+ Object.assign(contents, doc);
1503
1476
  return contents;
1504
1477
  };
1505
1478
  exports.de_GetAppCommand = de_GetAppCommand;
@@ -1524,10 +1497,9 @@ const de_GetAppCommandError = async (output, context) => {
1524
1497
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1525
1498
  default:
1526
1499
  const parsedBody = parsedOutput.body;
1527
- (0, smithy_client_1.throwDefaultError)({
1500
+ return throwDefaultError({
1528
1501
  output,
1529
1502
  parsedBody,
1530
- exceptionCtor: AmplifyServiceException_1.AmplifyServiceException,
1531
1503
  errorCode,
1532
1504
  });
1533
1505
  }
@@ -1536,16 +1508,15 @@ const de_GetArtifactUrlCommand = async (output, context) => {
1536
1508
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1537
1509
  return de_GetArtifactUrlCommandError(output, context);
1538
1510
  }
1539
- const contents = map({
1511
+ const contents = (0, smithy_client_1.map)({
1540
1512
  $metadata: deserializeMetadata(output),
1541
1513
  });
1542
1514
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1543
- if (data.artifactId != null) {
1544
- contents.artifactId = (0, smithy_client_1.expectString)(data.artifactId);
1545
- }
1546
- if (data.artifactUrl != null) {
1547
- contents.artifactUrl = (0, smithy_client_1.expectString)(data.artifactUrl);
1548
- }
1515
+ const doc = (0, smithy_client_1.take)(data, {
1516
+ artifactId: smithy_client_1.expectString,
1517
+ artifactUrl: smithy_client_1.expectString,
1518
+ });
1519
+ Object.assign(contents, doc);
1549
1520
  return contents;
1550
1521
  };
1551
1522
  exports.de_GetArtifactUrlCommand = de_GetArtifactUrlCommand;
@@ -1573,10 +1544,9 @@ const de_GetArtifactUrlCommandError = async (output, context) => {
1573
1544
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1574
1545
  default:
1575
1546
  const parsedBody = parsedOutput.body;
1576
- (0, smithy_client_1.throwDefaultError)({
1547
+ return throwDefaultError({
1577
1548
  output,
1578
1549
  parsedBody,
1579
- exceptionCtor: AmplifyServiceException_1.AmplifyServiceException,
1580
1550
  errorCode,
1581
1551
  });
1582
1552
  }
@@ -1585,13 +1555,14 @@ const de_GetBackendEnvironmentCommand = async (output, context) => {
1585
1555
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1586
1556
  return de_GetBackendEnvironmentCommandError(output, context);
1587
1557
  }
1588
- const contents = map({
1558
+ const contents = (0, smithy_client_1.map)({
1589
1559
  $metadata: deserializeMetadata(output),
1590
1560
  });
1591
1561
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1592
- if (data.backendEnvironment != null) {
1593
- contents.backendEnvironment = de_BackendEnvironment(data.backendEnvironment, context);
1594
- }
1562
+ const doc = (0, smithy_client_1.take)(data, {
1563
+ backendEnvironment: (_) => de_BackendEnvironment(_, context),
1564
+ });
1565
+ Object.assign(contents, doc);
1595
1566
  return contents;
1596
1567
  };
1597
1568
  exports.de_GetBackendEnvironmentCommand = de_GetBackendEnvironmentCommand;
@@ -1616,10 +1587,9 @@ const de_GetBackendEnvironmentCommandError = async (output, context) => {
1616
1587
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1617
1588
  default:
1618
1589
  const parsedBody = parsedOutput.body;
1619
- (0, smithy_client_1.throwDefaultError)({
1590
+ return throwDefaultError({
1620
1591
  output,
1621
1592
  parsedBody,
1622
- exceptionCtor: AmplifyServiceException_1.AmplifyServiceException,
1623
1593
  errorCode,
1624
1594
  });
1625
1595
  }
@@ -1628,13 +1598,14 @@ const de_GetBranchCommand = async (output, context) => {
1628
1598
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1629
1599
  return de_GetBranchCommandError(output, context);
1630
1600
  }
1631
- const contents = map({
1601
+ const contents = (0, smithy_client_1.map)({
1632
1602
  $metadata: deserializeMetadata(output),
1633
1603
  });
1634
1604
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1635
- if (data.branch != null) {
1636
- contents.branch = de_Branch(data.branch, context);
1637
- }
1605
+ const doc = (0, smithy_client_1.take)(data, {
1606
+ branch: (_) => de_Branch(_, context),
1607
+ });
1608
+ Object.assign(contents, doc);
1638
1609
  return contents;
1639
1610
  };
1640
1611
  exports.de_GetBranchCommand = de_GetBranchCommand;
@@ -1659,10 +1630,9 @@ const de_GetBranchCommandError = async (output, context) => {
1659
1630
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1660
1631
  default:
1661
1632
  const parsedBody = parsedOutput.body;
1662
- (0, smithy_client_1.throwDefaultError)({
1633
+ return throwDefaultError({
1663
1634
  output,
1664
1635
  parsedBody,
1665
- exceptionCtor: AmplifyServiceException_1.AmplifyServiceException,
1666
1636
  errorCode,
1667
1637
  });
1668
1638
  }
@@ -1671,13 +1641,14 @@ const de_GetDomainAssociationCommand = async (output, context) => {
1671
1641
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1672
1642
  return de_GetDomainAssociationCommandError(output, context);
1673
1643
  }
1674
- const contents = map({
1644
+ const contents = (0, smithy_client_1.map)({
1675
1645
  $metadata: deserializeMetadata(output),
1676
1646
  });
1677
1647
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1678
- if (data.domainAssociation != null) {
1679
- contents.domainAssociation = de_DomainAssociation(data.domainAssociation, context);
1680
- }
1648
+ const doc = (0, smithy_client_1.take)(data, {
1649
+ domainAssociation: smithy_client_1._json,
1650
+ });
1651
+ Object.assign(contents, doc);
1681
1652
  return contents;
1682
1653
  };
1683
1654
  exports.de_GetDomainAssociationCommand = de_GetDomainAssociationCommand;
@@ -1702,10 +1673,9 @@ const de_GetDomainAssociationCommandError = async (output, context) => {
1702
1673
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1703
1674
  default:
1704
1675
  const parsedBody = parsedOutput.body;
1705
- (0, smithy_client_1.throwDefaultError)({
1676
+ return throwDefaultError({
1706
1677
  output,
1707
1678
  parsedBody,
1708
- exceptionCtor: AmplifyServiceException_1.AmplifyServiceException,
1709
1679
  errorCode,
1710
1680
  });
1711
1681
  }
@@ -1714,13 +1684,14 @@ const de_GetJobCommand = async (output, context) => {
1714
1684
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1715
1685
  return de_GetJobCommandError(output, context);
1716
1686
  }
1717
- const contents = map({
1687
+ const contents = (0, smithy_client_1.map)({
1718
1688
  $metadata: deserializeMetadata(output),
1719
1689
  });
1720
1690
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1721
- if (data.job != null) {
1722
- contents.job = de_Job(data.job, context);
1723
- }
1691
+ const doc = (0, smithy_client_1.take)(data, {
1692
+ job: (_) => de_Job(_, context),
1693
+ });
1694
+ Object.assign(contents, doc);
1724
1695
  return contents;
1725
1696
  };
1726
1697
  exports.de_GetJobCommand = de_GetJobCommand;
@@ -1748,10 +1719,9 @@ const de_GetJobCommandError = async (output, context) => {
1748
1719
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1749
1720
  default:
1750
1721
  const parsedBody = parsedOutput.body;
1751
- (0, smithy_client_1.throwDefaultError)({
1722
+ return throwDefaultError({
1752
1723
  output,
1753
1724
  parsedBody,
1754
- exceptionCtor: AmplifyServiceException_1.AmplifyServiceException,
1755
1725
  errorCode,
1756
1726
  });
1757
1727
  }
@@ -1760,13 +1730,14 @@ const de_GetWebhookCommand = async (output, context) => {
1760
1730
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1761
1731
  return de_GetWebhookCommandError(output, context);
1762
1732
  }
1763
- const contents = map({
1733
+ const contents = (0, smithy_client_1.map)({
1764
1734
  $metadata: deserializeMetadata(output),
1765
1735
  });
1766
1736
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1767
- if (data.webhook != null) {
1768
- contents.webhook = de_Webhook(data.webhook, context);
1769
- }
1737
+ const doc = (0, smithy_client_1.take)(data, {
1738
+ webhook: (_) => de_Webhook(_, context),
1739
+ });
1740
+ Object.assign(contents, doc);
1770
1741
  return contents;
1771
1742
  };
1772
1743
  exports.de_GetWebhookCommand = de_GetWebhookCommand;
@@ -1794,10 +1765,9 @@ const de_GetWebhookCommandError = async (output, context) => {
1794
1765
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1795
1766
  default:
1796
1767
  const parsedBody = parsedOutput.body;
1797
- (0, smithy_client_1.throwDefaultError)({
1768
+ return throwDefaultError({
1798
1769
  output,
1799
1770
  parsedBody,
1800
- exceptionCtor: AmplifyServiceException_1.AmplifyServiceException,
1801
1771
  errorCode,
1802
1772
  });
1803
1773
  }
@@ -1806,16 +1776,15 @@ const de_ListAppsCommand = async (output, context) => {
1806
1776
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1807
1777
  return de_ListAppsCommandError(output, context);
1808
1778
  }
1809
- const contents = map({
1779
+ const contents = (0, smithy_client_1.map)({
1810
1780
  $metadata: deserializeMetadata(output),
1811
1781
  });
1812
1782
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1813
- if (data.apps != null) {
1814
- contents.apps = de_Apps(data.apps, context);
1815
- }
1816
- if (data.nextToken != null) {
1817
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1818
- }
1783
+ const doc = (0, smithy_client_1.take)(data, {
1784
+ apps: (_) => de_Apps(_, context),
1785
+ nextToken: smithy_client_1.expectString,
1786
+ });
1787
+ Object.assign(contents, doc);
1819
1788
  return contents;
1820
1789
  };
1821
1790
  exports.de_ListAppsCommand = de_ListAppsCommand;
@@ -1837,10 +1806,9 @@ const de_ListAppsCommandError = async (output, context) => {
1837
1806
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1838
1807
  default:
1839
1808
  const parsedBody = parsedOutput.body;
1840
- (0, smithy_client_1.throwDefaultError)({
1809
+ return throwDefaultError({
1841
1810
  output,
1842
1811
  parsedBody,
1843
- exceptionCtor: AmplifyServiceException_1.AmplifyServiceException,
1844
1812
  errorCode,
1845
1813
  });
1846
1814
  }
@@ -1849,16 +1817,15 @@ const de_ListArtifactsCommand = async (output, context) => {
1849
1817
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1850
1818
  return de_ListArtifactsCommandError(output, context);
1851
1819
  }
1852
- const contents = map({
1820
+ const contents = (0, smithy_client_1.map)({
1853
1821
  $metadata: deserializeMetadata(output),
1854
1822
  });
1855
1823
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1856
- if (data.artifacts != null) {
1857
- contents.artifacts = de_Artifacts(data.artifacts, context);
1858
- }
1859
- if (data.nextToken != null) {
1860
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1861
- }
1824
+ const doc = (0, smithy_client_1.take)(data, {
1825
+ artifacts: smithy_client_1._json,
1826
+ nextToken: smithy_client_1.expectString,
1827
+ });
1828
+ Object.assign(contents, doc);
1862
1829
  return contents;
1863
1830
  };
1864
1831
  exports.de_ListArtifactsCommand = de_ListArtifactsCommand;
@@ -1883,10 +1850,9 @@ const de_ListArtifactsCommandError = async (output, context) => {
1883
1850
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1884
1851
  default:
1885
1852
  const parsedBody = parsedOutput.body;
1886
- (0, smithy_client_1.throwDefaultError)({
1853
+ return throwDefaultError({
1887
1854
  output,
1888
1855
  parsedBody,
1889
- exceptionCtor: AmplifyServiceException_1.AmplifyServiceException,
1890
1856
  errorCode,
1891
1857
  });
1892
1858
  }
@@ -1895,16 +1861,15 @@ const de_ListBackendEnvironmentsCommand = async (output, context) => {
1895
1861
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1896
1862
  return de_ListBackendEnvironmentsCommandError(output, context);
1897
1863
  }
1898
- const contents = map({
1864
+ const contents = (0, smithy_client_1.map)({
1899
1865
  $metadata: deserializeMetadata(output),
1900
1866
  });
1901
1867
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1902
- if (data.backendEnvironments != null) {
1903
- contents.backendEnvironments = de_BackendEnvironments(data.backendEnvironments, context);
1904
- }
1905
- if (data.nextToken != null) {
1906
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1907
- }
1868
+ const doc = (0, smithy_client_1.take)(data, {
1869
+ backendEnvironments: (_) => de_BackendEnvironments(_, context),
1870
+ nextToken: smithy_client_1.expectString,
1871
+ });
1872
+ Object.assign(contents, doc);
1908
1873
  return contents;
1909
1874
  };
1910
1875
  exports.de_ListBackendEnvironmentsCommand = de_ListBackendEnvironmentsCommand;
@@ -1926,10 +1891,9 @@ const de_ListBackendEnvironmentsCommandError = async (output, context) => {
1926
1891
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1927
1892
  default:
1928
1893
  const parsedBody = parsedOutput.body;
1929
- (0, smithy_client_1.throwDefaultError)({
1894
+ return throwDefaultError({
1930
1895
  output,
1931
1896
  parsedBody,
1932
- exceptionCtor: AmplifyServiceException_1.AmplifyServiceException,
1933
1897
  errorCode,
1934
1898
  });
1935
1899
  }
@@ -1938,16 +1902,15 @@ const de_ListBranchesCommand = async (output, context) => {
1938
1902
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1939
1903
  return de_ListBranchesCommandError(output, context);
1940
1904
  }
1941
- const contents = map({
1905
+ const contents = (0, smithy_client_1.map)({
1942
1906
  $metadata: deserializeMetadata(output),
1943
1907
  });
1944
1908
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1945
- if (data.branches != null) {
1946
- contents.branches = de_Branches(data.branches, context);
1947
- }
1948
- if (data.nextToken != null) {
1949
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1950
- }
1909
+ const doc = (0, smithy_client_1.take)(data, {
1910
+ branches: (_) => de_Branches(_, context),
1911
+ nextToken: smithy_client_1.expectString,
1912
+ });
1913
+ Object.assign(contents, doc);
1951
1914
  return contents;
1952
1915
  };
1953
1916
  exports.de_ListBranchesCommand = de_ListBranchesCommand;
@@ -1969,10 +1932,9 @@ const de_ListBranchesCommandError = async (output, context) => {
1969
1932
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1970
1933
  default:
1971
1934
  const parsedBody = parsedOutput.body;
1972
- (0, smithy_client_1.throwDefaultError)({
1935
+ return throwDefaultError({
1973
1936
  output,
1974
1937
  parsedBody,
1975
- exceptionCtor: AmplifyServiceException_1.AmplifyServiceException,
1976
1938
  errorCode,
1977
1939
  });
1978
1940
  }
@@ -1981,16 +1943,15 @@ const de_ListDomainAssociationsCommand = async (output, context) => {
1981
1943
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1982
1944
  return de_ListDomainAssociationsCommandError(output, context);
1983
1945
  }
1984
- const contents = map({
1946
+ const contents = (0, smithy_client_1.map)({
1985
1947
  $metadata: deserializeMetadata(output),
1986
1948
  });
1987
1949
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1988
- if (data.domainAssociations != null) {
1989
- contents.domainAssociations = de_DomainAssociations(data.domainAssociations, context);
1990
- }
1991
- if (data.nextToken != null) {
1992
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1993
- }
1950
+ const doc = (0, smithy_client_1.take)(data, {
1951
+ domainAssociations: smithy_client_1._json,
1952
+ nextToken: smithy_client_1.expectString,
1953
+ });
1954
+ Object.assign(contents, doc);
1994
1955
  return contents;
1995
1956
  };
1996
1957
  exports.de_ListDomainAssociationsCommand = de_ListDomainAssociationsCommand;
@@ -2012,10 +1973,9 @@ const de_ListDomainAssociationsCommandError = async (output, context) => {
2012
1973
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2013
1974
  default:
2014
1975
  const parsedBody = parsedOutput.body;
2015
- (0, smithy_client_1.throwDefaultError)({
1976
+ return throwDefaultError({
2016
1977
  output,
2017
1978
  parsedBody,
2018
- exceptionCtor: AmplifyServiceException_1.AmplifyServiceException,
2019
1979
  errorCode,
2020
1980
  });
2021
1981
  }
@@ -2024,16 +1984,15 @@ const de_ListJobsCommand = async (output, context) => {
2024
1984
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2025
1985
  return de_ListJobsCommandError(output, context);
2026
1986
  }
2027
- const contents = map({
1987
+ const contents = (0, smithy_client_1.map)({
2028
1988
  $metadata: deserializeMetadata(output),
2029
1989
  });
2030
1990
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2031
- if (data.jobSummaries != null) {
2032
- contents.jobSummaries = de_JobSummaries(data.jobSummaries, context);
2033
- }
2034
- if (data.nextToken != null) {
2035
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
2036
- }
1991
+ const doc = (0, smithy_client_1.take)(data, {
1992
+ jobSummaries: (_) => de_JobSummaries(_, context),
1993
+ nextToken: smithy_client_1.expectString,
1994
+ });
1995
+ Object.assign(contents, doc);
2037
1996
  return contents;
2038
1997
  };
2039
1998
  exports.de_ListJobsCommand = de_ListJobsCommand;
@@ -2058,10 +2017,9 @@ const de_ListJobsCommandError = async (output, context) => {
2058
2017
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2059
2018
  default:
2060
2019
  const parsedBody = parsedOutput.body;
2061
- (0, smithy_client_1.throwDefaultError)({
2020
+ return throwDefaultError({
2062
2021
  output,
2063
2022
  parsedBody,
2064
- exceptionCtor: AmplifyServiceException_1.AmplifyServiceException,
2065
2023
  errorCode,
2066
2024
  });
2067
2025
  }
@@ -2070,13 +2028,14 @@ const de_ListTagsForResourceCommand = async (output, context) => {
2070
2028
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2071
2029
  return de_ListTagsForResourceCommandError(output, context);
2072
2030
  }
2073
- const contents = map({
2031
+ const contents = (0, smithy_client_1.map)({
2074
2032
  $metadata: deserializeMetadata(output),
2075
2033
  });
2076
2034
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2077
- if (data.tags != null) {
2078
- contents.tags = de_TagMap(data.tags, context);
2079
- }
2035
+ const doc = (0, smithy_client_1.take)(data, {
2036
+ tags: smithy_client_1._json,
2037
+ });
2038
+ Object.assign(contents, doc);
2080
2039
  return contents;
2081
2040
  };
2082
2041
  exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
@@ -2098,10 +2057,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
2098
2057
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2099
2058
  default:
2100
2059
  const parsedBody = parsedOutput.body;
2101
- (0, smithy_client_1.throwDefaultError)({
2060
+ return throwDefaultError({
2102
2061
  output,
2103
2062
  parsedBody,
2104
- exceptionCtor: AmplifyServiceException_1.AmplifyServiceException,
2105
2063
  errorCode,
2106
2064
  });
2107
2065
  }
@@ -2110,16 +2068,15 @@ const de_ListWebhooksCommand = async (output, context) => {
2110
2068
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2111
2069
  return de_ListWebhooksCommandError(output, context);
2112
2070
  }
2113
- const contents = map({
2071
+ const contents = (0, smithy_client_1.map)({
2114
2072
  $metadata: deserializeMetadata(output),
2115
2073
  });
2116
2074
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2117
- if (data.nextToken != null) {
2118
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
2119
- }
2120
- if (data.webhooks != null) {
2121
- contents.webhooks = de_Webhooks(data.webhooks, context);
2122
- }
2075
+ const doc = (0, smithy_client_1.take)(data, {
2076
+ nextToken: smithy_client_1.expectString,
2077
+ webhooks: (_) => de_Webhooks(_, context),
2078
+ });
2079
+ Object.assign(contents, doc);
2123
2080
  return contents;
2124
2081
  };
2125
2082
  exports.de_ListWebhooksCommand = de_ListWebhooksCommand;
@@ -2144,10 +2101,9 @@ const de_ListWebhooksCommandError = async (output, context) => {
2144
2101
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2145
2102
  default:
2146
2103
  const parsedBody = parsedOutput.body;
2147
- (0, smithy_client_1.throwDefaultError)({
2104
+ return throwDefaultError({
2148
2105
  output,
2149
2106
  parsedBody,
2150
- exceptionCtor: AmplifyServiceException_1.AmplifyServiceException,
2151
2107
  errorCode,
2152
2108
  });
2153
2109
  }
@@ -2156,13 +2112,14 @@ const de_StartDeploymentCommand = async (output, context) => {
2156
2112
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2157
2113
  return de_StartDeploymentCommandError(output, context);
2158
2114
  }
2159
- const contents = map({
2115
+ const contents = (0, smithy_client_1.map)({
2160
2116
  $metadata: deserializeMetadata(output),
2161
2117
  });
2162
2118
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2163
- if (data.jobSummary != null) {
2164
- contents.jobSummary = de_JobSummary(data.jobSummary, context);
2165
- }
2119
+ const doc = (0, smithy_client_1.take)(data, {
2120
+ jobSummary: (_) => de_JobSummary(_, context),
2121
+ });
2122
+ Object.assign(contents, doc);
2166
2123
  return contents;
2167
2124
  };
2168
2125
  exports.de_StartDeploymentCommand = de_StartDeploymentCommand;
@@ -2190,10 +2147,9 @@ const de_StartDeploymentCommandError = async (output, context) => {
2190
2147
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2191
2148
  default:
2192
2149
  const parsedBody = parsedOutput.body;
2193
- (0, smithy_client_1.throwDefaultError)({
2150
+ return throwDefaultError({
2194
2151
  output,
2195
2152
  parsedBody,
2196
- exceptionCtor: AmplifyServiceException_1.AmplifyServiceException,
2197
2153
  errorCode,
2198
2154
  });
2199
2155
  }
@@ -2202,13 +2158,14 @@ const de_StartJobCommand = async (output, context) => {
2202
2158
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2203
2159
  return de_StartJobCommandError(output, context);
2204
2160
  }
2205
- const contents = map({
2161
+ const contents = (0, smithy_client_1.map)({
2206
2162
  $metadata: deserializeMetadata(output),
2207
2163
  });
2208
2164
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2209
- if (data.jobSummary != null) {
2210
- contents.jobSummary = de_JobSummary(data.jobSummary, context);
2211
- }
2165
+ const doc = (0, smithy_client_1.take)(data, {
2166
+ jobSummary: (_) => de_JobSummary(_, context),
2167
+ });
2168
+ Object.assign(contents, doc);
2212
2169
  return contents;
2213
2170
  };
2214
2171
  exports.de_StartJobCommand = de_StartJobCommand;
@@ -2236,10 +2193,9 @@ const de_StartJobCommandError = async (output, context) => {
2236
2193
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2237
2194
  default:
2238
2195
  const parsedBody = parsedOutput.body;
2239
- (0, smithy_client_1.throwDefaultError)({
2196
+ return throwDefaultError({
2240
2197
  output,
2241
2198
  parsedBody,
2242
- exceptionCtor: AmplifyServiceException_1.AmplifyServiceException,
2243
2199
  errorCode,
2244
2200
  });
2245
2201
  }
@@ -2248,13 +2204,14 @@ const de_StopJobCommand = async (output, context) => {
2248
2204
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2249
2205
  return de_StopJobCommandError(output, context);
2250
2206
  }
2251
- const contents = map({
2207
+ const contents = (0, smithy_client_1.map)({
2252
2208
  $metadata: deserializeMetadata(output),
2253
2209
  });
2254
2210
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2255
- if (data.jobSummary != null) {
2256
- contents.jobSummary = de_JobSummary(data.jobSummary, context);
2257
- }
2211
+ const doc = (0, smithy_client_1.take)(data, {
2212
+ jobSummary: (_) => de_JobSummary(_, context),
2213
+ });
2214
+ Object.assign(contents, doc);
2258
2215
  return contents;
2259
2216
  };
2260
2217
  exports.de_StopJobCommand = de_StopJobCommand;
@@ -2282,10 +2239,9 @@ const de_StopJobCommandError = async (output, context) => {
2282
2239
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2283
2240
  default:
2284
2241
  const parsedBody = parsedOutput.body;
2285
- (0, smithy_client_1.throwDefaultError)({
2242
+ return throwDefaultError({
2286
2243
  output,
2287
2244
  parsedBody,
2288
- exceptionCtor: AmplifyServiceException_1.AmplifyServiceException,
2289
2245
  errorCode,
2290
2246
  });
2291
2247
  }
@@ -2294,7 +2250,7 @@ const de_TagResourceCommand = async (output, context) => {
2294
2250
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2295
2251
  return de_TagResourceCommandError(output, context);
2296
2252
  }
2297
- const contents = map({
2253
+ const contents = (0, smithy_client_1.map)({
2298
2254
  $metadata: deserializeMetadata(output),
2299
2255
  });
2300
2256
  await collectBody(output.body, context);
@@ -2319,10 +2275,9 @@ const de_TagResourceCommandError = async (output, context) => {
2319
2275
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2320
2276
  default:
2321
2277
  const parsedBody = parsedOutput.body;
2322
- (0, smithy_client_1.throwDefaultError)({
2278
+ return throwDefaultError({
2323
2279
  output,
2324
2280
  parsedBody,
2325
- exceptionCtor: AmplifyServiceException_1.AmplifyServiceException,
2326
2281
  errorCode,
2327
2282
  });
2328
2283
  }
@@ -2331,7 +2286,7 @@ const de_UntagResourceCommand = async (output, context) => {
2331
2286
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2332
2287
  return de_UntagResourceCommandError(output, context);
2333
2288
  }
2334
- const contents = map({
2289
+ const contents = (0, smithy_client_1.map)({
2335
2290
  $metadata: deserializeMetadata(output),
2336
2291
  });
2337
2292
  await collectBody(output.body, context);
@@ -2356,10 +2311,9 @@ const de_UntagResourceCommandError = async (output, context) => {
2356
2311
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2357
2312
  default:
2358
2313
  const parsedBody = parsedOutput.body;
2359
- (0, smithy_client_1.throwDefaultError)({
2314
+ return throwDefaultError({
2360
2315
  output,
2361
2316
  parsedBody,
2362
- exceptionCtor: AmplifyServiceException_1.AmplifyServiceException,
2363
2317
  errorCode,
2364
2318
  });
2365
2319
  }
@@ -2368,13 +2322,14 @@ const de_UpdateAppCommand = async (output, context) => {
2368
2322
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2369
2323
  return de_UpdateAppCommandError(output, context);
2370
2324
  }
2371
- const contents = map({
2325
+ const contents = (0, smithy_client_1.map)({
2372
2326
  $metadata: deserializeMetadata(output),
2373
2327
  });
2374
2328
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2375
- if (data.app != null) {
2376
- contents.app = de_App(data.app, context);
2377
- }
2329
+ const doc = (0, smithy_client_1.take)(data, {
2330
+ app: (_) => de_App(_, context),
2331
+ });
2332
+ Object.assign(contents, doc);
2378
2333
  return contents;
2379
2334
  };
2380
2335
  exports.de_UpdateAppCommand = de_UpdateAppCommand;
@@ -2399,10 +2354,9 @@ const de_UpdateAppCommandError = async (output, context) => {
2399
2354
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2400
2355
  default:
2401
2356
  const parsedBody = parsedOutput.body;
2402
- (0, smithy_client_1.throwDefaultError)({
2357
+ return throwDefaultError({
2403
2358
  output,
2404
2359
  parsedBody,
2405
- exceptionCtor: AmplifyServiceException_1.AmplifyServiceException,
2406
2360
  errorCode,
2407
2361
  });
2408
2362
  }
@@ -2411,13 +2365,14 @@ const de_UpdateBranchCommand = async (output, context) => {
2411
2365
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2412
2366
  return de_UpdateBranchCommandError(output, context);
2413
2367
  }
2414
- const contents = map({
2368
+ const contents = (0, smithy_client_1.map)({
2415
2369
  $metadata: deserializeMetadata(output),
2416
2370
  });
2417
2371
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2418
- if (data.branch != null) {
2419
- contents.branch = de_Branch(data.branch, context);
2420
- }
2372
+ const doc = (0, smithy_client_1.take)(data, {
2373
+ branch: (_) => de_Branch(_, context),
2374
+ });
2375
+ Object.assign(contents, doc);
2421
2376
  return contents;
2422
2377
  };
2423
2378
  exports.de_UpdateBranchCommand = de_UpdateBranchCommand;
@@ -2445,10 +2400,9 @@ const de_UpdateBranchCommandError = async (output, context) => {
2445
2400
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2446
2401
  default:
2447
2402
  const parsedBody = parsedOutput.body;
2448
- (0, smithy_client_1.throwDefaultError)({
2403
+ return throwDefaultError({
2449
2404
  output,
2450
2405
  parsedBody,
2451
- exceptionCtor: AmplifyServiceException_1.AmplifyServiceException,
2452
2406
  errorCode,
2453
2407
  });
2454
2408
  }
@@ -2457,13 +2411,14 @@ const de_UpdateDomainAssociationCommand = async (output, context) => {
2457
2411
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2458
2412
  return de_UpdateDomainAssociationCommandError(output, context);
2459
2413
  }
2460
- const contents = map({
2414
+ const contents = (0, smithy_client_1.map)({
2461
2415
  $metadata: deserializeMetadata(output),
2462
2416
  });
2463
2417
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2464
- if (data.domainAssociation != null) {
2465
- contents.domainAssociation = de_DomainAssociation(data.domainAssociation, context);
2466
- }
2418
+ const doc = (0, smithy_client_1.take)(data, {
2419
+ domainAssociation: smithy_client_1._json,
2420
+ });
2421
+ Object.assign(contents, doc);
2467
2422
  return contents;
2468
2423
  };
2469
2424
  exports.de_UpdateDomainAssociationCommand = de_UpdateDomainAssociationCommand;
@@ -2491,10 +2446,9 @@ const de_UpdateDomainAssociationCommandError = async (output, context) => {
2491
2446
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2492
2447
  default:
2493
2448
  const parsedBody = parsedOutput.body;
2494
- (0, smithy_client_1.throwDefaultError)({
2449
+ return throwDefaultError({
2495
2450
  output,
2496
2451
  parsedBody,
2497
- exceptionCtor: AmplifyServiceException_1.AmplifyServiceException,
2498
2452
  errorCode,
2499
2453
  });
2500
2454
  }
@@ -2503,13 +2457,14 @@ const de_UpdateWebhookCommand = async (output, context) => {
2503
2457
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2504
2458
  return de_UpdateWebhookCommandError(output, context);
2505
2459
  }
2506
- const contents = map({
2460
+ const contents = (0, smithy_client_1.map)({
2507
2461
  $metadata: deserializeMetadata(output),
2508
2462
  });
2509
2463
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2510
- if (data.webhook != null) {
2511
- contents.webhook = de_Webhook(data.webhook, context);
2512
- }
2464
+ const doc = (0, smithy_client_1.take)(data, {
2465
+ webhook: (_) => de_Webhook(_, context),
2466
+ });
2467
+ Object.assign(contents, doc);
2513
2468
  return contents;
2514
2469
  };
2515
2470
  exports.de_UpdateWebhookCommand = de_UpdateWebhookCommand;
@@ -2537,21 +2492,21 @@ const de_UpdateWebhookCommandError = async (output, context) => {
2537
2492
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2538
2493
  default:
2539
2494
  const parsedBody = parsedOutput.body;
2540
- (0, smithy_client_1.throwDefaultError)({
2495
+ return throwDefaultError({
2541
2496
  output,
2542
2497
  parsedBody,
2543
- exceptionCtor: AmplifyServiceException_1.AmplifyServiceException,
2544
2498
  errorCode,
2545
2499
  });
2546
2500
  }
2547
2501
  };
2548
- const map = smithy_client_1.map;
2502
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(AmplifyServiceException_1.AmplifyServiceException);
2549
2503
  const de_BadRequestExceptionRes = async (parsedOutput, context) => {
2550
- const contents = map({});
2504
+ const contents = (0, smithy_client_1.map)({});
2551
2505
  const data = parsedOutput.body;
2552
- if (data.message != null) {
2553
- contents.message = (0, smithy_client_1.expectString)(data.message);
2554
- }
2506
+ const doc = (0, smithy_client_1.take)(data, {
2507
+ message: smithy_client_1.expectString,
2508
+ });
2509
+ Object.assign(contents, doc);
2555
2510
  const exception = new models_0_1.BadRequestException({
2556
2511
  $metadata: deserializeMetadata(parsedOutput),
2557
2512
  ...contents,
@@ -2559,11 +2514,12 @@ const de_BadRequestExceptionRes = async (parsedOutput, context) => {
2559
2514
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2560
2515
  };
2561
2516
  const de_DependentServiceFailureExceptionRes = async (parsedOutput, context) => {
2562
- const contents = map({});
2517
+ const contents = (0, smithy_client_1.map)({});
2563
2518
  const data = parsedOutput.body;
2564
- if (data.message != null) {
2565
- contents.message = (0, smithy_client_1.expectString)(data.message);
2566
- }
2519
+ const doc = (0, smithy_client_1.take)(data, {
2520
+ message: smithy_client_1.expectString,
2521
+ });
2522
+ Object.assign(contents, doc);
2567
2523
  const exception = new models_0_1.DependentServiceFailureException({
2568
2524
  $metadata: deserializeMetadata(parsedOutput),
2569
2525
  ...contents,
@@ -2571,11 +2527,12 @@ const de_DependentServiceFailureExceptionRes = async (parsedOutput, context) =>
2571
2527
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2572
2528
  };
2573
2529
  const de_InternalFailureExceptionRes = async (parsedOutput, context) => {
2574
- const contents = map({});
2530
+ const contents = (0, smithy_client_1.map)({});
2575
2531
  const data = parsedOutput.body;
2576
- if (data.message != null) {
2577
- contents.message = (0, smithy_client_1.expectString)(data.message);
2578
- }
2532
+ const doc = (0, smithy_client_1.take)(data, {
2533
+ message: smithy_client_1.expectString,
2534
+ });
2535
+ Object.assign(contents, doc);
2579
2536
  const exception = new models_0_1.InternalFailureException({
2580
2537
  $metadata: deserializeMetadata(parsedOutput),
2581
2538
  ...contents,
@@ -2583,11 +2540,12 @@ const de_InternalFailureExceptionRes = async (parsedOutput, context) => {
2583
2540
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2584
2541
  };
2585
2542
  const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
2586
- const contents = map({});
2543
+ const contents = (0, smithy_client_1.map)({});
2587
2544
  const data = parsedOutput.body;
2588
- if (data.message != null) {
2589
- contents.message = (0, smithy_client_1.expectString)(data.message);
2590
- }
2545
+ const doc = (0, smithy_client_1.take)(data, {
2546
+ message: smithy_client_1.expectString,
2547
+ });
2548
+ Object.assign(contents, doc);
2591
2549
  const exception = new models_0_1.LimitExceededException({
2592
2550
  $metadata: deserializeMetadata(parsedOutput),
2593
2551
  ...contents,
@@ -2595,11 +2553,12 @@ const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
2595
2553
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2596
2554
  };
2597
2555
  const de_NotFoundExceptionRes = async (parsedOutput, context) => {
2598
- const contents = map({});
2556
+ const contents = (0, smithy_client_1.map)({});
2599
2557
  const data = parsedOutput.body;
2600
- if (data.message != null) {
2601
- contents.message = (0, smithy_client_1.expectString)(data.message);
2602
- }
2558
+ const doc = (0, smithy_client_1.take)(data, {
2559
+ message: smithy_client_1.expectString,
2560
+ });
2561
+ Object.assign(contents, doc);
2603
2562
  const exception = new models_0_1.NotFoundException({
2604
2563
  $metadata: deserializeMetadata(parsedOutput),
2605
2564
  ...contents,
@@ -2607,14 +2566,13 @@ const de_NotFoundExceptionRes = async (parsedOutput, context) => {
2607
2566
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2608
2567
  };
2609
2568
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
2610
- const contents = map({});
2569
+ const contents = (0, smithy_client_1.map)({});
2611
2570
  const data = parsedOutput.body;
2612
- if (data.code != null) {
2613
- contents.code = (0, smithy_client_1.expectString)(data.code);
2614
- }
2615
- if (data.message != null) {
2616
- contents.message = (0, smithy_client_1.expectString)(data.message);
2617
- }
2571
+ const doc = (0, smithy_client_1.take)(data, {
2572
+ code: smithy_client_1.expectString,
2573
+ message: smithy_client_1.expectString,
2574
+ });
2575
+ Object.assign(contents, doc);
2618
2576
  const exception = new models_0_1.ResourceNotFoundException({
2619
2577
  $metadata: deserializeMetadata(parsedOutput),
2620
2578
  ...contents,
@@ -2622,472 +2580,184 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
2622
2580
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2623
2581
  };
2624
2582
  const de_UnauthorizedExceptionRes = async (parsedOutput, context) => {
2625
- const contents = map({});
2583
+ const contents = (0, smithy_client_1.map)({});
2626
2584
  const data = parsedOutput.body;
2627
- if (data.message != null) {
2628
- contents.message = (0, smithy_client_1.expectString)(data.message);
2629
- }
2585
+ const doc = (0, smithy_client_1.take)(data, {
2586
+ message: smithy_client_1.expectString,
2587
+ });
2588
+ Object.assign(contents, doc);
2630
2589
  const exception = new models_0_1.UnauthorizedException({
2631
2590
  $metadata: deserializeMetadata(parsedOutput),
2632
2591
  ...contents,
2633
2592
  });
2634
2593
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2635
2594
  };
2636
- const se_AutoBranchCreationConfig = (input, context) => {
2637
- return {
2638
- ...(input.basicAuthCredentials != null && { basicAuthCredentials: input.basicAuthCredentials }),
2639
- ...(input.buildSpec != null && { buildSpec: input.buildSpec }),
2640
- ...(input.enableAutoBuild != null && { enableAutoBuild: input.enableAutoBuild }),
2641
- ...(input.enableBasicAuth != null && { enableBasicAuth: input.enableBasicAuth }),
2642
- ...(input.enablePerformanceMode != null && { enablePerformanceMode: input.enablePerformanceMode }),
2643
- ...(input.enablePullRequestPreview != null && { enablePullRequestPreview: input.enablePullRequestPreview }),
2644
- ...(input.environmentVariables != null && {
2645
- environmentVariables: se_EnvironmentVariables(input.environmentVariables, context),
2646
- }),
2647
- ...(input.framework != null && { framework: input.framework }),
2648
- ...(input.pullRequestEnvironmentName != null && { pullRequestEnvironmentName: input.pullRequestEnvironmentName }),
2649
- ...(input.stage != null && { stage: input.stage }),
2650
- };
2651
- };
2652
- const se_AutoBranchCreationPatterns = (input, context) => {
2653
- return input
2654
- .filter((e) => e != null)
2655
- .map((entry) => {
2656
- return entry;
2657
- });
2658
- };
2659
- const se_AutoSubDomainCreationPatterns = (input, context) => {
2660
- return input
2661
- .filter((e) => e != null)
2662
- .map((entry) => {
2663
- return entry;
2664
- });
2665
- };
2666
- const se_CustomRule = (input, context) => {
2667
- return {
2668
- ...(input.condition != null && { condition: input.condition }),
2669
- ...(input.source != null && { source: input.source }),
2670
- ...(input.status != null && { status: input.status }),
2671
- ...(input.target != null && { target: input.target }),
2672
- };
2673
- };
2674
- const se_CustomRules = (input, context) => {
2675
- return input
2676
- .filter((e) => e != null)
2677
- .map((entry) => {
2678
- return se_CustomRule(entry, context);
2679
- });
2680
- };
2681
- const se_EnvironmentVariables = (input, context) => {
2682
- return Object.entries(input).reduce((acc, [key, value]) => {
2683
- if (value === null) {
2684
- return acc;
2685
- }
2686
- acc[key] = value;
2687
- return acc;
2688
- }, {});
2689
- };
2690
- const se_FileMap = (input, context) => {
2691
- return Object.entries(input).reduce((acc, [key, value]) => {
2692
- if (value === null) {
2693
- return acc;
2694
- }
2695
- acc[key] = value;
2696
- return acc;
2697
- }, {});
2698
- };
2699
- const se_SubDomainSetting = (input, context) => {
2700
- return {
2701
- ...(input.branchName != null && { branchName: input.branchName }),
2702
- ...(input.prefix != null && { prefix: input.prefix }),
2703
- };
2704
- };
2705
- const se_SubDomainSettings = (input, context) => {
2706
- return input
2707
- .filter((e) => e != null)
2708
- .map((entry) => {
2709
- return se_SubDomainSetting(entry, context);
2710
- });
2711
- };
2712
- const se_TagMap = (input, context) => {
2713
- return Object.entries(input).reduce((acc, [key, value]) => {
2714
- if (value === null) {
2715
- return acc;
2716
- }
2717
- acc[key] = value;
2718
- return acc;
2719
- }, {});
2720
- };
2721
2595
  const de_App = (output, context) => {
2722
- return {
2723
- appArn: (0, smithy_client_1.expectString)(output.appArn),
2724
- appId: (0, smithy_client_1.expectString)(output.appId),
2725
- autoBranchCreationConfig: output.autoBranchCreationConfig != null
2726
- ? de_AutoBranchCreationConfig(output.autoBranchCreationConfig, context)
2727
- : undefined,
2728
- autoBranchCreationPatterns: output.autoBranchCreationPatterns != null
2729
- ? de_AutoBranchCreationPatterns(output.autoBranchCreationPatterns, context)
2730
- : undefined,
2731
- basicAuthCredentials: (0, smithy_client_1.expectString)(output.basicAuthCredentials),
2732
- buildSpec: (0, smithy_client_1.expectString)(output.buildSpec),
2733
- createTime: output.createTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createTime))) : undefined,
2734
- customHeaders: (0, smithy_client_1.expectString)(output.customHeaders),
2735
- customRules: output.customRules != null ? de_CustomRules(output.customRules, context) : undefined,
2736
- defaultDomain: (0, smithy_client_1.expectString)(output.defaultDomain),
2737
- description: (0, smithy_client_1.expectString)(output.description),
2738
- enableAutoBranchCreation: (0, smithy_client_1.expectBoolean)(output.enableAutoBranchCreation),
2739
- enableBasicAuth: (0, smithy_client_1.expectBoolean)(output.enableBasicAuth),
2740
- enableBranchAutoBuild: (0, smithy_client_1.expectBoolean)(output.enableBranchAutoBuild),
2741
- enableBranchAutoDeletion: (0, smithy_client_1.expectBoolean)(output.enableBranchAutoDeletion),
2742
- environmentVariables: output.environmentVariables != null ? de_EnvironmentVariables(output.environmentVariables, context) : undefined,
2743
- iamServiceRoleArn: (0, smithy_client_1.expectString)(output.iamServiceRoleArn),
2744
- name: (0, smithy_client_1.expectString)(output.name),
2745
- platform: (0, smithy_client_1.expectString)(output.platform),
2746
- productionBranch: output.productionBranch != null ? de_ProductionBranch(output.productionBranch, context) : undefined,
2747
- repository: (0, smithy_client_1.expectString)(output.repository),
2748
- repositoryCloneMethod: (0, smithy_client_1.expectString)(output.repositoryCloneMethod),
2749
- tags: output.tags != null ? de_TagMap(output.tags, context) : undefined,
2750
- updateTime: output.updateTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.updateTime))) : undefined,
2751
- };
2596
+ return (0, smithy_client_1.take)(output, {
2597
+ appArn: smithy_client_1.expectString,
2598
+ appId: smithy_client_1.expectString,
2599
+ autoBranchCreationConfig: smithy_client_1._json,
2600
+ autoBranchCreationPatterns: smithy_client_1._json,
2601
+ basicAuthCredentials: smithy_client_1.expectString,
2602
+ buildSpec: smithy_client_1.expectString,
2603
+ createTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2604
+ customHeaders: smithy_client_1.expectString,
2605
+ customRules: smithy_client_1._json,
2606
+ defaultDomain: smithy_client_1.expectString,
2607
+ description: smithy_client_1.expectString,
2608
+ enableAutoBranchCreation: smithy_client_1.expectBoolean,
2609
+ enableBasicAuth: smithy_client_1.expectBoolean,
2610
+ enableBranchAutoBuild: smithy_client_1.expectBoolean,
2611
+ enableBranchAutoDeletion: smithy_client_1.expectBoolean,
2612
+ environmentVariables: smithy_client_1._json,
2613
+ iamServiceRoleArn: smithy_client_1.expectString,
2614
+ name: smithy_client_1.expectString,
2615
+ platform: smithy_client_1.expectString,
2616
+ productionBranch: (_) => de_ProductionBranch(_, context),
2617
+ repository: smithy_client_1.expectString,
2618
+ repositoryCloneMethod: smithy_client_1.expectString,
2619
+ tags: smithy_client_1._json,
2620
+ updateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2621
+ });
2752
2622
  };
2753
2623
  const de_Apps = (output, context) => {
2754
2624
  const retVal = (output || [])
2755
2625
  .filter((e) => e != null)
2756
2626
  .map((entry) => {
2757
- if (entry === null) {
2758
- return null;
2759
- }
2760
2627
  return de_App(entry, context);
2761
2628
  });
2762
2629
  return retVal;
2763
2630
  };
2764
- const de_Artifact = (output, context) => {
2765
- return {
2766
- artifactFileName: (0, smithy_client_1.expectString)(output.artifactFileName),
2767
- artifactId: (0, smithy_client_1.expectString)(output.artifactId),
2768
- };
2769
- };
2770
- const de_Artifacts = (output, context) => {
2771
- const retVal = (output || [])
2772
- .filter((e) => e != null)
2773
- .map((entry) => {
2774
- if (entry === null) {
2775
- return null;
2776
- }
2777
- return de_Artifact(entry, context);
2778
- });
2779
- return retVal;
2780
- };
2781
- const de_AssociatedResources = (output, context) => {
2782
- const retVal = (output || [])
2783
- .filter((e) => e != null)
2784
- .map((entry) => {
2785
- if (entry === null) {
2786
- return null;
2787
- }
2788
- return (0, smithy_client_1.expectString)(entry);
2789
- });
2790
- return retVal;
2791
- };
2792
- const de_AutoBranchCreationConfig = (output, context) => {
2793
- return {
2794
- basicAuthCredentials: (0, smithy_client_1.expectString)(output.basicAuthCredentials),
2795
- buildSpec: (0, smithy_client_1.expectString)(output.buildSpec),
2796
- enableAutoBuild: (0, smithy_client_1.expectBoolean)(output.enableAutoBuild),
2797
- enableBasicAuth: (0, smithy_client_1.expectBoolean)(output.enableBasicAuth),
2798
- enablePerformanceMode: (0, smithy_client_1.expectBoolean)(output.enablePerformanceMode),
2799
- enablePullRequestPreview: (0, smithy_client_1.expectBoolean)(output.enablePullRequestPreview),
2800
- environmentVariables: output.environmentVariables != null ? de_EnvironmentVariables(output.environmentVariables, context) : undefined,
2801
- framework: (0, smithy_client_1.expectString)(output.framework),
2802
- pullRequestEnvironmentName: (0, smithy_client_1.expectString)(output.pullRequestEnvironmentName),
2803
- stage: (0, smithy_client_1.expectString)(output.stage),
2804
- };
2805
- };
2806
- const de_AutoBranchCreationPatterns = (output, context) => {
2807
- const retVal = (output || [])
2808
- .filter((e) => e != null)
2809
- .map((entry) => {
2810
- if (entry === null) {
2811
- return null;
2812
- }
2813
- return (0, smithy_client_1.expectString)(entry);
2814
- });
2815
- return retVal;
2816
- };
2817
- const de_AutoSubDomainCreationPatterns = (output, context) => {
2818
- const retVal = (output || [])
2819
- .filter((e) => e != null)
2820
- .map((entry) => {
2821
- if (entry === null) {
2822
- return null;
2823
- }
2824
- return (0, smithy_client_1.expectString)(entry);
2825
- });
2826
- return retVal;
2827
- };
2828
2631
  const de_BackendEnvironment = (output, context) => {
2829
- return {
2830
- backendEnvironmentArn: (0, smithy_client_1.expectString)(output.backendEnvironmentArn),
2831
- createTime: output.createTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createTime))) : undefined,
2832
- deploymentArtifacts: (0, smithy_client_1.expectString)(output.deploymentArtifacts),
2833
- environmentName: (0, smithy_client_1.expectString)(output.environmentName),
2834
- stackName: (0, smithy_client_1.expectString)(output.stackName),
2835
- updateTime: output.updateTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.updateTime))) : undefined,
2836
- };
2632
+ return (0, smithy_client_1.take)(output, {
2633
+ backendEnvironmentArn: smithy_client_1.expectString,
2634
+ createTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2635
+ deploymentArtifacts: smithy_client_1.expectString,
2636
+ environmentName: smithy_client_1.expectString,
2637
+ stackName: smithy_client_1.expectString,
2638
+ updateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2639
+ });
2837
2640
  };
2838
2641
  const de_BackendEnvironments = (output, context) => {
2839
2642
  const retVal = (output || [])
2840
2643
  .filter((e) => e != null)
2841
2644
  .map((entry) => {
2842
- if (entry === null) {
2843
- return null;
2844
- }
2845
2645
  return de_BackendEnvironment(entry, context);
2846
2646
  });
2847
2647
  return retVal;
2848
2648
  };
2849
2649
  const de_Branch = (output, context) => {
2850
- return {
2851
- activeJobId: (0, smithy_client_1.expectString)(output.activeJobId),
2852
- associatedResources: output.associatedResources != null ? de_AssociatedResources(output.associatedResources, context) : undefined,
2853
- backendEnvironmentArn: (0, smithy_client_1.expectString)(output.backendEnvironmentArn),
2854
- basicAuthCredentials: (0, smithy_client_1.expectString)(output.basicAuthCredentials),
2855
- branchArn: (0, smithy_client_1.expectString)(output.branchArn),
2856
- branchName: (0, smithy_client_1.expectString)(output.branchName),
2857
- buildSpec: (0, smithy_client_1.expectString)(output.buildSpec),
2858
- createTime: output.createTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createTime))) : undefined,
2859
- customDomains: output.customDomains != null ? de_CustomDomains(output.customDomains, context) : undefined,
2860
- description: (0, smithy_client_1.expectString)(output.description),
2861
- destinationBranch: (0, smithy_client_1.expectString)(output.destinationBranch),
2862
- displayName: (0, smithy_client_1.expectString)(output.displayName),
2863
- enableAutoBuild: (0, smithy_client_1.expectBoolean)(output.enableAutoBuild),
2864
- enableBasicAuth: (0, smithy_client_1.expectBoolean)(output.enableBasicAuth),
2865
- enableNotification: (0, smithy_client_1.expectBoolean)(output.enableNotification),
2866
- enablePerformanceMode: (0, smithy_client_1.expectBoolean)(output.enablePerformanceMode),
2867
- enablePullRequestPreview: (0, smithy_client_1.expectBoolean)(output.enablePullRequestPreview),
2868
- environmentVariables: output.environmentVariables != null ? de_EnvironmentVariables(output.environmentVariables, context) : undefined,
2869
- framework: (0, smithy_client_1.expectString)(output.framework),
2870
- pullRequestEnvironmentName: (0, smithy_client_1.expectString)(output.pullRequestEnvironmentName),
2871
- sourceBranch: (0, smithy_client_1.expectString)(output.sourceBranch),
2872
- stage: (0, smithy_client_1.expectString)(output.stage),
2873
- tags: output.tags != null ? de_TagMap(output.tags, context) : undefined,
2874
- thumbnailUrl: (0, smithy_client_1.expectString)(output.thumbnailUrl),
2875
- totalNumberOfJobs: (0, smithy_client_1.expectString)(output.totalNumberOfJobs),
2876
- ttl: (0, smithy_client_1.expectString)(output.ttl),
2877
- updateTime: output.updateTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.updateTime))) : undefined,
2878
- };
2650
+ return (0, smithy_client_1.take)(output, {
2651
+ activeJobId: smithy_client_1.expectString,
2652
+ associatedResources: smithy_client_1._json,
2653
+ backendEnvironmentArn: smithy_client_1.expectString,
2654
+ basicAuthCredentials: smithy_client_1.expectString,
2655
+ branchArn: smithy_client_1.expectString,
2656
+ branchName: smithy_client_1.expectString,
2657
+ buildSpec: smithy_client_1.expectString,
2658
+ createTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2659
+ customDomains: smithy_client_1._json,
2660
+ description: smithy_client_1.expectString,
2661
+ destinationBranch: smithy_client_1.expectString,
2662
+ displayName: smithy_client_1.expectString,
2663
+ enableAutoBuild: smithy_client_1.expectBoolean,
2664
+ enableBasicAuth: smithy_client_1.expectBoolean,
2665
+ enableNotification: smithy_client_1.expectBoolean,
2666
+ enablePerformanceMode: smithy_client_1.expectBoolean,
2667
+ enablePullRequestPreview: smithy_client_1.expectBoolean,
2668
+ environmentVariables: smithy_client_1._json,
2669
+ framework: smithy_client_1.expectString,
2670
+ pullRequestEnvironmentName: smithy_client_1.expectString,
2671
+ sourceBranch: smithy_client_1.expectString,
2672
+ stage: smithy_client_1.expectString,
2673
+ tags: smithy_client_1._json,
2674
+ thumbnailUrl: smithy_client_1.expectString,
2675
+ totalNumberOfJobs: smithy_client_1.expectString,
2676
+ ttl: smithy_client_1.expectString,
2677
+ updateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2678
+ });
2879
2679
  };
2880
2680
  const de_Branches = (output, context) => {
2881
2681
  const retVal = (output || [])
2882
2682
  .filter((e) => e != null)
2883
2683
  .map((entry) => {
2884
- if (entry === null) {
2885
- return null;
2886
- }
2887
2684
  return de_Branch(entry, context);
2888
2685
  });
2889
2686
  return retVal;
2890
2687
  };
2891
- const de_CustomDomains = (output, context) => {
2892
- const retVal = (output || [])
2893
- .filter((e) => e != null)
2894
- .map((entry) => {
2895
- if (entry === null) {
2896
- return null;
2897
- }
2898
- return (0, smithy_client_1.expectString)(entry);
2899
- });
2900
- return retVal;
2901
- };
2902
- const de_CustomRule = (output, context) => {
2903
- return {
2904
- condition: (0, smithy_client_1.expectString)(output.condition),
2905
- source: (0, smithy_client_1.expectString)(output.source),
2906
- status: (0, smithy_client_1.expectString)(output.status),
2907
- target: (0, smithy_client_1.expectString)(output.target),
2908
- };
2909
- };
2910
- const de_CustomRules = (output, context) => {
2911
- const retVal = (output || [])
2912
- .filter((e) => e != null)
2913
- .map((entry) => {
2914
- if (entry === null) {
2915
- return null;
2916
- }
2917
- return de_CustomRule(entry, context);
2918
- });
2919
- return retVal;
2920
- };
2921
- const de_DomainAssociation = (output, context) => {
2922
- return {
2923
- autoSubDomainCreationPatterns: output.autoSubDomainCreationPatterns != null
2924
- ? de_AutoSubDomainCreationPatterns(output.autoSubDomainCreationPatterns, context)
2925
- : undefined,
2926
- autoSubDomainIAMRole: (0, smithy_client_1.expectString)(output.autoSubDomainIAMRole),
2927
- certificateVerificationDNSRecord: (0, smithy_client_1.expectString)(output.certificateVerificationDNSRecord),
2928
- domainAssociationArn: (0, smithy_client_1.expectString)(output.domainAssociationArn),
2929
- domainName: (0, smithy_client_1.expectString)(output.domainName),
2930
- domainStatus: (0, smithy_client_1.expectString)(output.domainStatus),
2931
- enableAutoSubDomain: (0, smithy_client_1.expectBoolean)(output.enableAutoSubDomain),
2932
- statusReason: (0, smithy_client_1.expectString)(output.statusReason),
2933
- subDomains: output.subDomains != null ? de_SubDomains(output.subDomains, context) : undefined,
2934
- };
2935
- };
2936
- const de_DomainAssociations = (output, context) => {
2937
- const retVal = (output || [])
2938
- .filter((e) => e != null)
2939
- .map((entry) => {
2940
- if (entry === null) {
2941
- return null;
2942
- }
2943
- return de_DomainAssociation(entry, context);
2944
- });
2945
- return retVal;
2946
- };
2947
- const de_EnvironmentVariables = (output, context) => {
2948
- return Object.entries(output).reduce((acc, [key, value]) => {
2949
- if (value === null) {
2950
- return acc;
2951
- }
2952
- acc[key] = (0, smithy_client_1.expectString)(value);
2953
- return acc;
2954
- }, {});
2955
- };
2956
- const de_FileUploadUrls = (output, context) => {
2957
- return Object.entries(output).reduce((acc, [key, value]) => {
2958
- if (value === null) {
2959
- return acc;
2960
- }
2961
- acc[key] = (0, smithy_client_1.expectString)(value);
2962
- return acc;
2963
- }, {});
2964
- };
2965
2688
  const de_Job = (output, context) => {
2966
- return {
2967
- steps: output.steps != null ? de_Steps(output.steps, context) : undefined,
2968
- summary: output.summary != null ? de_JobSummary(output.summary, context) : undefined,
2969
- };
2689
+ return (0, smithy_client_1.take)(output, {
2690
+ steps: (_) => de_Steps(_, context),
2691
+ summary: (_) => de_JobSummary(_, context),
2692
+ });
2970
2693
  };
2971
2694
  const de_JobSummaries = (output, context) => {
2972
2695
  const retVal = (output || [])
2973
2696
  .filter((e) => e != null)
2974
2697
  .map((entry) => {
2975
- if (entry === null) {
2976
- return null;
2977
- }
2978
2698
  return de_JobSummary(entry, context);
2979
2699
  });
2980
2700
  return retVal;
2981
2701
  };
2982
2702
  const de_JobSummary = (output, context) => {
2983
- return {
2984
- commitId: (0, smithy_client_1.expectString)(output.commitId),
2985
- commitMessage: (0, smithy_client_1.expectString)(output.commitMessage),
2986
- commitTime: output.commitTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.commitTime))) : undefined,
2987
- endTime: output.endTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.endTime))) : undefined,
2988
- jobArn: (0, smithy_client_1.expectString)(output.jobArn),
2989
- jobId: (0, smithy_client_1.expectString)(output.jobId),
2990
- jobType: (0, smithy_client_1.expectString)(output.jobType),
2991
- startTime: output.startTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.startTime))) : undefined,
2992
- status: (0, smithy_client_1.expectString)(output.status),
2993
- };
2703
+ return (0, smithy_client_1.take)(output, {
2704
+ commitId: smithy_client_1.expectString,
2705
+ commitMessage: smithy_client_1.expectString,
2706
+ commitTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2707
+ endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2708
+ jobArn: smithy_client_1.expectString,
2709
+ jobId: smithy_client_1.expectString,
2710
+ jobType: smithy_client_1.expectString,
2711
+ startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2712
+ status: smithy_client_1.expectString,
2713
+ });
2994
2714
  };
2995
2715
  const de_ProductionBranch = (output, context) => {
2996
- return {
2997
- branchName: (0, smithy_client_1.expectString)(output.branchName),
2998
- lastDeployTime: output.lastDeployTime != null
2999
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastDeployTime)))
3000
- : undefined,
3001
- status: (0, smithy_client_1.expectString)(output.status),
3002
- thumbnailUrl: (0, smithy_client_1.expectString)(output.thumbnailUrl),
3003
- };
3004
- };
3005
- const de_Screenshots = (output, context) => {
3006
- return Object.entries(output).reduce((acc, [key, value]) => {
3007
- if (value === null) {
3008
- return acc;
3009
- }
3010
- acc[key] = (0, smithy_client_1.expectString)(value);
3011
- return acc;
3012
- }, {});
2716
+ return (0, smithy_client_1.take)(output, {
2717
+ branchName: smithy_client_1.expectString,
2718
+ lastDeployTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2719
+ status: smithy_client_1.expectString,
2720
+ thumbnailUrl: smithy_client_1.expectString,
2721
+ });
3013
2722
  };
3014
2723
  const de_Step = (output, context) => {
3015
- return {
3016
- artifactsUrl: (0, smithy_client_1.expectString)(output.artifactsUrl),
3017
- context: (0, smithy_client_1.expectString)(output.context),
3018
- endTime: output.endTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.endTime))) : undefined,
3019
- logUrl: (0, smithy_client_1.expectString)(output.logUrl),
3020
- screenshots: output.screenshots != null ? de_Screenshots(output.screenshots, context) : undefined,
3021
- startTime: output.startTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.startTime))) : undefined,
3022
- status: (0, smithy_client_1.expectString)(output.status),
3023
- statusReason: (0, smithy_client_1.expectString)(output.statusReason),
3024
- stepName: (0, smithy_client_1.expectString)(output.stepName),
3025
- testArtifactsUrl: (0, smithy_client_1.expectString)(output.testArtifactsUrl),
3026
- testConfigUrl: (0, smithy_client_1.expectString)(output.testConfigUrl),
3027
- };
2724
+ return (0, smithy_client_1.take)(output, {
2725
+ artifactsUrl: smithy_client_1.expectString,
2726
+ context: smithy_client_1.expectString,
2727
+ endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2728
+ logUrl: smithy_client_1.expectString,
2729
+ screenshots: smithy_client_1._json,
2730
+ startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2731
+ status: smithy_client_1.expectString,
2732
+ statusReason: smithy_client_1.expectString,
2733
+ stepName: smithy_client_1.expectString,
2734
+ testArtifactsUrl: smithy_client_1.expectString,
2735
+ testConfigUrl: smithy_client_1.expectString,
2736
+ });
3028
2737
  };
3029
2738
  const de_Steps = (output, context) => {
3030
2739
  const retVal = (output || [])
3031
2740
  .filter((e) => e != null)
3032
2741
  .map((entry) => {
3033
- if (entry === null) {
3034
- return null;
3035
- }
3036
2742
  return de_Step(entry, context);
3037
2743
  });
3038
2744
  return retVal;
3039
2745
  };
3040
- const de_SubDomain = (output, context) => {
3041
- return {
3042
- dnsRecord: (0, smithy_client_1.expectString)(output.dnsRecord),
3043
- subDomainSetting: output.subDomainSetting != null ? de_SubDomainSetting(output.subDomainSetting, context) : undefined,
3044
- verified: (0, smithy_client_1.expectBoolean)(output.verified),
3045
- };
3046
- };
3047
- const de_SubDomains = (output, context) => {
3048
- const retVal = (output || [])
3049
- .filter((e) => e != null)
3050
- .map((entry) => {
3051
- if (entry === null) {
3052
- return null;
3053
- }
3054
- return de_SubDomain(entry, context);
3055
- });
3056
- return retVal;
3057
- };
3058
- const de_SubDomainSetting = (output, context) => {
3059
- return {
3060
- branchName: (0, smithy_client_1.expectString)(output.branchName),
3061
- prefix: (0, smithy_client_1.expectString)(output.prefix),
3062
- };
3063
- };
3064
- const de_TagMap = (output, context) => {
3065
- return Object.entries(output).reduce((acc, [key, value]) => {
3066
- if (value === null) {
3067
- return acc;
3068
- }
3069
- acc[key] = (0, smithy_client_1.expectString)(value);
3070
- return acc;
3071
- }, {});
3072
- };
3073
2746
  const de_Webhook = (output, context) => {
3074
- return {
3075
- branchName: (0, smithy_client_1.expectString)(output.branchName),
3076
- createTime: output.createTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createTime))) : undefined,
3077
- description: (0, smithy_client_1.expectString)(output.description),
3078
- updateTime: output.updateTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.updateTime))) : undefined,
3079
- webhookArn: (0, smithy_client_1.expectString)(output.webhookArn),
3080
- webhookId: (0, smithy_client_1.expectString)(output.webhookId),
3081
- webhookUrl: (0, smithy_client_1.expectString)(output.webhookUrl),
3082
- };
2747
+ return (0, smithy_client_1.take)(output, {
2748
+ branchName: smithy_client_1.expectString,
2749
+ createTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2750
+ description: smithy_client_1.expectString,
2751
+ updateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2752
+ webhookArn: smithy_client_1.expectString,
2753
+ webhookId: smithy_client_1.expectString,
2754
+ webhookUrl: smithy_client_1.expectString,
2755
+ });
3083
2756
  };
3084
2757
  const de_Webhooks = (output, context) => {
3085
2758
  const retVal = (output || [])
3086
2759
  .filter((e) => e != null)
3087
2760
  .map((entry) => {
3088
- if (entry === null) {
3089
- return null;
3090
- }
3091
2761
  return de_Webhook(entry, context);
3092
2762
  });
3093
2763
  return retVal;