@aws-sdk/client-amplifybackend 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.
@@ -16,9 +16,9 @@ const se_CloneBackendCommand = async (input, context) => {
16
16
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppId", () => input.AppId, "{AppId}", false);
17
17
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "BackendEnvironmentName", () => input.BackendEnvironmentName, "{BackendEnvironmentName}", false);
18
18
  let body;
19
- body = JSON.stringify({
20
- ...(input.TargetEnvironmentName != null && { targetEnvironmentName: input.TargetEnvironmentName }),
21
- });
19
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
20
+ targetEnvironmentName: [, , `TargetEnvironmentName`],
21
+ }));
22
22
  return new protocol_http_1.HttpRequest({
23
23
  protocol,
24
24
  hostname,
@@ -37,13 +37,13 @@ const se_CreateBackendCommand = async (input, context) => {
37
37
  };
38
38
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/backend";
39
39
  let body;
40
- body = JSON.stringify({
41
- ...(input.AppId != null && { appId: input.AppId }),
42
- ...(input.AppName != null && { appName: input.AppName }),
43
- ...(input.BackendEnvironmentName != null && { backendEnvironmentName: input.BackendEnvironmentName }),
44
- ...(input.ResourceConfig != null && { resourceConfig: se_ResourceConfig(input.ResourceConfig, context) }),
45
- ...(input.ResourceName != null && { resourceName: input.ResourceName }),
46
- });
40
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
41
+ appId: [, , `AppId`],
42
+ appName: [, , `AppName`],
43
+ backendEnvironmentName: [, , `BackendEnvironmentName`],
44
+ resourceConfig: [, (_) => (0, smithy_client_1._json)(_), `ResourceConfig`],
45
+ resourceName: [, , `ResourceName`],
46
+ }));
47
47
  return new protocol_http_1.HttpRequest({
48
48
  protocol,
49
49
  hostname,
@@ -63,11 +63,11 @@ const se_CreateBackendAPICommand = async (input, context) => {
63
63
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/backend/{AppId}/api";
64
64
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppId", () => input.AppId, "{AppId}", false);
65
65
  let body;
66
- body = JSON.stringify({
67
- ...(input.BackendEnvironmentName != null && { backendEnvironmentName: input.BackendEnvironmentName }),
68
- ...(input.ResourceConfig != null && { resourceConfig: se_BackendAPIResourceConfig(input.ResourceConfig, context) }),
69
- ...(input.ResourceName != null && { resourceName: input.ResourceName }),
70
- });
66
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
67
+ backendEnvironmentName: [, , `BackendEnvironmentName`],
68
+ resourceConfig: [, (_) => se_BackendAPIResourceConfig(_, context), `ResourceConfig`],
69
+ resourceName: [, , `ResourceName`],
70
+ }));
71
71
  return new protocol_http_1.HttpRequest({
72
72
  protocol,
73
73
  hostname,
@@ -87,13 +87,11 @@ const se_CreateBackendAuthCommand = async (input, context) => {
87
87
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/backend/{AppId}/auth";
88
88
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppId", () => input.AppId, "{AppId}", false);
89
89
  let body;
90
- body = JSON.stringify({
91
- ...(input.BackendEnvironmentName != null && { backendEnvironmentName: input.BackendEnvironmentName }),
92
- ...(input.ResourceConfig != null && {
93
- resourceConfig: se_CreateBackendAuthResourceConfig(input.ResourceConfig, context),
94
- }),
95
- ...(input.ResourceName != null && { resourceName: input.ResourceName }),
96
- });
90
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
91
+ backendEnvironmentName: [, , `BackendEnvironmentName`],
92
+ resourceConfig: [, (_) => se_CreateBackendAuthResourceConfig(_, context), `ResourceConfig`],
93
+ resourceName: [, , `ResourceName`],
94
+ }));
97
95
  return new protocol_http_1.HttpRequest({
98
96
  protocol,
99
97
  hostname,
@@ -113,9 +111,9 @@ const se_CreateBackendConfigCommand = async (input, context) => {
113
111
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/backend/{AppId}/config";
114
112
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppId", () => input.AppId, "{AppId}", false);
115
113
  let body;
116
- body = JSON.stringify({
117
- ...(input.BackendManagerAppId != null && { backendManagerAppId: input.BackendManagerAppId }),
118
- });
114
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
115
+ backendManagerAppId: [, , `BackendManagerAppId`],
116
+ }));
119
117
  return new protocol_http_1.HttpRequest({
120
118
  protocol,
121
119
  hostname,
@@ -135,13 +133,11 @@ const se_CreateBackendStorageCommand = async (input, context) => {
135
133
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/backend/{AppId}/storage";
136
134
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppId", () => input.AppId, "{AppId}", false);
137
135
  let body;
138
- body = JSON.stringify({
139
- ...(input.BackendEnvironmentName != null && { backendEnvironmentName: input.BackendEnvironmentName }),
140
- ...(input.ResourceConfig != null && {
141
- resourceConfig: se_CreateBackendStorageResourceConfig(input.ResourceConfig, context),
142
- }),
143
- ...(input.ResourceName != null && { resourceName: input.ResourceName }),
144
- });
136
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
137
+ backendEnvironmentName: [, , `BackendEnvironmentName`],
138
+ resourceConfig: [, (_) => se_CreateBackendStorageResourceConfig(_, context), `ResourceConfig`],
139
+ resourceName: [, , `ResourceName`],
140
+ }));
145
141
  return new protocol_http_1.HttpRequest({
146
142
  protocol,
147
143
  hostname,
@@ -199,10 +195,10 @@ const se_DeleteBackendAPICommand = async (input, context) => {
199
195
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppId", () => input.AppId, "{AppId}", false);
200
196
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "BackendEnvironmentName", () => input.BackendEnvironmentName, "{BackendEnvironmentName}", false);
201
197
  let body;
202
- body = JSON.stringify({
203
- ...(input.ResourceConfig != null && { resourceConfig: se_BackendAPIResourceConfig(input.ResourceConfig, context) }),
204
- ...(input.ResourceName != null && { resourceName: input.ResourceName }),
205
- });
198
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
199
+ resourceConfig: [, (_) => se_BackendAPIResourceConfig(_, context), `ResourceConfig`],
200
+ resourceName: [, , `ResourceName`],
201
+ }));
206
202
  return new protocol_http_1.HttpRequest({
207
203
  protocol,
208
204
  hostname,
@@ -224,9 +220,9 @@ const se_DeleteBackendAuthCommand = async (input, context) => {
224
220
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppId", () => input.AppId, "{AppId}", false);
225
221
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "BackendEnvironmentName", () => input.BackendEnvironmentName, "{BackendEnvironmentName}", false);
226
222
  let body;
227
- body = JSON.stringify({
228
- ...(input.ResourceName != null && { resourceName: input.ResourceName }),
229
- });
223
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
224
+ resourceName: [, , `ResourceName`],
225
+ }));
230
226
  return new protocol_http_1.HttpRequest({
231
227
  protocol,
232
228
  hostname,
@@ -248,10 +244,10 @@ const se_DeleteBackendStorageCommand = async (input, context) => {
248
244
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppId", () => input.AppId, "{AppId}", false);
249
245
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "BackendEnvironmentName", () => input.BackendEnvironmentName, "{BackendEnvironmentName}", false);
250
246
  let body;
251
- body = JSON.stringify({
252
- ...(input.ResourceName != null && { resourceName: input.ResourceName }),
253
- ...(input.ServiceName != null && { serviceName: input.ServiceName }),
254
- });
247
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
248
+ resourceName: [, , `ResourceName`],
249
+ serviceName: [, , `ServiceName`],
250
+ }));
255
251
  return new protocol_http_1.HttpRequest({
256
252
  protocol,
257
253
  hostname,
@@ -292,9 +288,9 @@ const se_GenerateBackendAPIModelsCommand = async (input, context) => {
292
288
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppId", () => input.AppId, "{AppId}", false);
293
289
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "BackendEnvironmentName", () => input.BackendEnvironmentName, "{BackendEnvironmentName}", false);
294
290
  let body;
295
- body = JSON.stringify({
296
- ...(input.ResourceName != null && { resourceName: input.ResourceName }),
297
- });
291
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
292
+ resourceName: [, , `ResourceName`],
293
+ }));
298
294
  return new protocol_http_1.HttpRequest({
299
295
  protocol,
300
296
  hostname,
@@ -314,9 +310,9 @@ const se_GetBackendCommand = async (input, context) => {
314
310
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/backend/{AppId}/details";
315
311
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppId", () => input.AppId, "{AppId}", false);
316
312
  let body;
317
- body = JSON.stringify({
318
- ...(input.BackendEnvironmentName != null && { backendEnvironmentName: input.BackendEnvironmentName }),
319
- });
313
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
314
+ backendEnvironmentName: [, , `BackendEnvironmentName`],
315
+ }));
320
316
  return new protocol_http_1.HttpRequest({
321
317
  protocol,
322
318
  hostname,
@@ -338,10 +334,10 @@ const se_GetBackendAPICommand = async (input, context) => {
338
334
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppId", () => input.AppId, "{AppId}", false);
339
335
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "BackendEnvironmentName", () => input.BackendEnvironmentName, "{BackendEnvironmentName}", false);
340
336
  let body;
341
- body = JSON.stringify({
342
- ...(input.ResourceConfig != null && { resourceConfig: se_BackendAPIResourceConfig(input.ResourceConfig, context) }),
343
- ...(input.ResourceName != null && { resourceName: input.ResourceName }),
344
- });
337
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
338
+ resourceConfig: [, (_) => se_BackendAPIResourceConfig(_, context), `ResourceConfig`],
339
+ resourceName: [, , `ResourceName`],
340
+ }));
345
341
  return new protocol_http_1.HttpRequest({
346
342
  protocol,
347
343
  hostname,
@@ -363,9 +359,9 @@ const se_GetBackendAPIModelsCommand = async (input, context) => {
363
359
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppId", () => input.AppId, "{AppId}", false);
364
360
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "BackendEnvironmentName", () => input.BackendEnvironmentName, "{BackendEnvironmentName}", false);
365
361
  let body;
366
- body = JSON.stringify({
367
- ...(input.ResourceName != null && { resourceName: input.ResourceName }),
368
- });
362
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
363
+ resourceName: [, , `ResourceName`],
364
+ }));
369
365
  return new protocol_http_1.HttpRequest({
370
366
  protocol,
371
367
  hostname,
@@ -387,9 +383,9 @@ const se_GetBackendAuthCommand = async (input, context) => {
387
383
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppId", () => input.AppId, "{AppId}", false);
388
384
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "BackendEnvironmentName", () => input.BackendEnvironmentName, "{BackendEnvironmentName}", false);
389
385
  let body;
390
- body = JSON.stringify({
391
- ...(input.ResourceName != null && { resourceName: input.ResourceName }),
392
- });
386
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
387
+ resourceName: [, , `ResourceName`],
388
+ }));
393
389
  return new protocol_http_1.HttpRequest({
394
390
  protocol,
395
391
  hostname,
@@ -431,9 +427,9 @@ const se_GetBackendStorageCommand = async (input, context) => {
431
427
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppId", () => input.AppId, "{AppId}", false);
432
428
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "BackendEnvironmentName", () => input.BackendEnvironmentName, "{BackendEnvironmentName}", false);
433
429
  let body;
434
- body = JSON.stringify({
435
- ...(input.ResourceName != null && { resourceName: input.ResourceName }),
436
- });
430
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
431
+ resourceName: [, , `ResourceName`],
432
+ }));
437
433
  return new protocol_http_1.HttpRequest({
438
434
  protocol,
439
435
  hostname,
@@ -473,12 +469,12 @@ const se_ImportBackendAuthCommand = async (input, context) => {
473
469
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppId", () => input.AppId, "{AppId}", false);
474
470
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "BackendEnvironmentName", () => input.BackendEnvironmentName, "{BackendEnvironmentName}", false);
475
471
  let body;
476
- body = JSON.stringify({
477
- ...(input.IdentityPoolId != null && { identityPoolId: input.IdentityPoolId }),
478
- ...(input.NativeClientId != null && { nativeClientId: input.NativeClientId }),
479
- ...(input.UserPoolId != null && { userPoolId: input.UserPoolId }),
480
- ...(input.WebClientId != null && { webClientId: input.WebClientId }),
481
- });
472
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
473
+ identityPoolId: [, , `IdentityPoolId`],
474
+ nativeClientId: [, , `NativeClientId`],
475
+ userPoolId: [, , `UserPoolId`],
476
+ webClientId: [, , `WebClientId`],
477
+ }));
482
478
  return new protocol_http_1.HttpRequest({
483
479
  protocol,
484
480
  hostname,
@@ -500,10 +496,10 @@ const se_ImportBackendStorageCommand = async (input, context) => {
500
496
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppId", () => input.AppId, "{AppId}", false);
501
497
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "BackendEnvironmentName", () => input.BackendEnvironmentName, "{BackendEnvironmentName}", false);
502
498
  let body;
503
- body = JSON.stringify({
504
- ...(input.BucketName != null && { bucketName: input.BucketName }),
505
- ...(input.ServiceName != null && { serviceName: input.ServiceName }),
506
- });
499
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
500
+ bucketName: [, , `BucketName`],
501
+ serviceName: [, , `ServiceName`],
502
+ }));
507
503
  return new protocol_http_1.HttpRequest({
508
504
  protocol,
509
505
  hostname,
@@ -525,13 +521,13 @@ const se_ListBackendJobsCommand = async (input, context) => {
525
521
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppId", () => input.AppId, "{AppId}", false);
526
522
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "BackendEnvironmentName", () => input.BackendEnvironmentName, "{BackendEnvironmentName}", false);
527
523
  let body;
528
- body = JSON.stringify({
529
- ...(input.JobId != null && { jobId: input.JobId }),
530
- ...(input.MaxResults != null && { maxResults: input.MaxResults }),
531
- ...(input.NextToken != null && { nextToken: input.NextToken }),
532
- ...(input.Operation != null && { operation: input.Operation }),
533
- ...(input.Status != null && { status: input.Status }),
534
- });
524
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
525
+ jobId: [, , `JobId`],
526
+ maxResults: [, , `MaxResults`],
527
+ nextToken: [, , `NextToken`],
528
+ operation: [, , `Operation`],
529
+ status: [, , `Status`],
530
+ }));
535
531
  return new protocol_http_1.HttpRequest({
536
532
  protocol,
537
533
  hostname,
@@ -550,9 +546,9 @@ const se_ListS3BucketsCommand = async (input, context) => {
550
546
  };
551
547
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/s3Buckets";
552
548
  let body;
553
- body = JSON.stringify({
554
- ...(input.NextToken != null && { nextToken: input.NextToken }),
555
- });
549
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
550
+ nextToken: [, , `NextToken`],
551
+ }));
556
552
  return new protocol_http_1.HttpRequest({
557
553
  protocol,
558
554
  hostname,
@@ -572,9 +568,9 @@ const se_RemoveAllBackendsCommand = async (input, context) => {
572
568
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/backend/{AppId}/remove";
573
569
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppId", () => input.AppId, "{AppId}", false);
574
570
  let body;
575
- body = JSON.stringify({
576
- ...(input.CleanAmplifyApp != null && { cleanAmplifyApp: input.CleanAmplifyApp }),
577
- });
571
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
572
+ cleanAmplifyApp: [, , `CleanAmplifyApp`],
573
+ }));
578
574
  return new protocol_http_1.HttpRequest({
579
575
  protocol,
580
576
  hostname,
@@ -613,10 +609,10 @@ const se_UpdateBackendAPICommand = async (input, context) => {
613
609
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppId", () => input.AppId, "{AppId}", false);
614
610
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "BackendEnvironmentName", () => input.BackendEnvironmentName, "{BackendEnvironmentName}", false);
615
611
  let body;
616
- body = JSON.stringify({
617
- ...(input.ResourceConfig != null && { resourceConfig: se_BackendAPIResourceConfig(input.ResourceConfig, context) }),
618
- ...(input.ResourceName != null && { resourceName: input.ResourceName }),
619
- });
612
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
613
+ resourceConfig: [, (_) => se_BackendAPIResourceConfig(_, context), `ResourceConfig`],
614
+ resourceName: [, , `ResourceName`],
615
+ }));
620
616
  return new protocol_http_1.HttpRequest({
621
617
  protocol,
622
618
  hostname,
@@ -638,12 +634,10 @@ const se_UpdateBackendAuthCommand = async (input, context) => {
638
634
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppId", () => input.AppId, "{AppId}", false);
639
635
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "BackendEnvironmentName", () => input.BackendEnvironmentName, "{BackendEnvironmentName}", false);
640
636
  let body;
641
- body = JSON.stringify({
642
- ...(input.ResourceConfig != null && {
643
- resourceConfig: se_UpdateBackendAuthResourceConfig(input.ResourceConfig, context),
644
- }),
645
- ...(input.ResourceName != null && { resourceName: input.ResourceName }),
646
- });
637
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
638
+ resourceConfig: [, (_) => se_UpdateBackendAuthResourceConfig(_, context), `ResourceConfig`],
639
+ resourceName: [, , `ResourceName`],
640
+ }));
647
641
  return new protocol_http_1.HttpRequest({
648
642
  protocol,
649
643
  hostname,
@@ -663,9 +657,9 @@ const se_UpdateBackendConfigCommand = async (input, context) => {
663
657
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/backend/{AppId}/config/update";
664
658
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppId", () => input.AppId, "{AppId}", false);
665
659
  let body;
666
- body = JSON.stringify({
667
- ...(input.LoginAuthConfig != null && { loginAuthConfig: se_LoginAuthConfigReqObj(input.LoginAuthConfig, context) }),
668
- });
660
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
661
+ loginAuthConfig: [, (_) => se_LoginAuthConfigReqObj(_, context), `LoginAuthConfig`],
662
+ }));
669
663
  return new protocol_http_1.HttpRequest({
670
664
  protocol,
671
665
  hostname,
@@ -688,10 +682,10 @@ const se_UpdateBackendJobCommand = async (input, context) => {
688
682
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "BackendEnvironmentName", () => input.BackendEnvironmentName, "{BackendEnvironmentName}", false);
689
683
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "JobId", () => input.JobId, "{JobId}", false);
690
684
  let body;
691
- body = JSON.stringify({
692
- ...(input.Operation != null && { operation: input.Operation }),
693
- ...(input.Status != null && { status: input.Status }),
694
- });
685
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
686
+ operation: [, , `Operation`],
687
+ status: [, , `Status`],
688
+ }));
695
689
  return new protocol_http_1.HttpRequest({
696
690
  protocol,
697
691
  hostname,
@@ -713,12 +707,10 @@ const se_UpdateBackendStorageCommand = async (input, context) => {
713
707
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppId", () => input.AppId, "{AppId}", false);
714
708
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "BackendEnvironmentName", () => input.BackendEnvironmentName, "{BackendEnvironmentName}", false);
715
709
  let body;
716
- body = JSON.stringify({
717
- ...(input.ResourceConfig != null && {
718
- resourceConfig: se_UpdateBackendStorageResourceConfig(input.ResourceConfig, context),
719
- }),
720
- ...(input.ResourceName != null && { resourceName: input.ResourceName }),
721
- });
710
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
711
+ resourceConfig: [, (_) => se_UpdateBackendStorageResourceConfig(_, context), `ResourceConfig`],
712
+ resourceName: [, , `ResourceName`],
713
+ }));
722
714
  return new protocol_http_1.HttpRequest({
723
715
  protocol,
724
716
  hostname,
@@ -734,28 +726,19 @@ const de_CloneBackendCommand = async (output, context) => {
734
726
  if (output.statusCode !== 200 && output.statusCode >= 300) {
735
727
  return de_CloneBackendCommandError(output, context);
736
728
  }
737
- const contents = map({
729
+ const contents = (0, smithy_client_1.map)({
738
730
  $metadata: deserializeMetadata(output),
739
731
  });
740
732
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
741
- if (data.appId != null) {
742
- contents.AppId = (0, smithy_client_1.expectString)(data.appId);
743
- }
744
- if (data.backendEnvironmentName != null) {
745
- contents.BackendEnvironmentName = (0, smithy_client_1.expectString)(data.backendEnvironmentName);
746
- }
747
- if (data.error != null) {
748
- contents.Error = (0, smithy_client_1.expectString)(data.error);
749
- }
750
- if (data.jobId != null) {
751
- contents.JobId = (0, smithy_client_1.expectString)(data.jobId);
752
- }
753
- if (data.operation != null) {
754
- contents.Operation = (0, smithy_client_1.expectString)(data.operation);
755
- }
756
- if (data.status != null) {
757
- contents.Status = (0, smithy_client_1.expectString)(data.status);
758
- }
733
+ const doc = (0, smithy_client_1.take)(data, {
734
+ AppId: [, smithy_client_1.expectString, `appId`],
735
+ BackendEnvironmentName: [, smithy_client_1.expectString, `backendEnvironmentName`],
736
+ Error: [, smithy_client_1.expectString, `error`],
737
+ JobId: [, smithy_client_1.expectString, `jobId`],
738
+ Operation: [, smithy_client_1.expectString, `operation`],
739
+ Status: [, smithy_client_1.expectString, `status`],
740
+ });
741
+ Object.assign(contents, doc);
759
742
  return contents;
760
743
  };
761
744
  exports.de_CloneBackendCommand = de_CloneBackendCommand;
@@ -780,10 +763,9 @@ const de_CloneBackendCommandError = async (output, context) => {
780
763
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
781
764
  default:
782
765
  const parsedBody = parsedOutput.body;
783
- (0, smithy_client_1.throwDefaultError)({
766
+ return throwDefaultError({
784
767
  output,
785
768
  parsedBody,
786
- exceptionCtor: AmplifyBackendServiceException_1.AmplifyBackendServiceException,
787
769
  errorCode,
788
770
  });
789
771
  }
@@ -792,28 +774,19 @@ const de_CreateBackendCommand = async (output, context) => {
792
774
  if (output.statusCode !== 200 && output.statusCode >= 300) {
793
775
  return de_CreateBackendCommandError(output, context);
794
776
  }
795
- const contents = map({
777
+ const contents = (0, smithy_client_1.map)({
796
778
  $metadata: deserializeMetadata(output),
797
779
  });
798
780
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
799
- if (data.appId != null) {
800
- contents.AppId = (0, smithy_client_1.expectString)(data.appId);
801
- }
802
- if (data.backendEnvironmentName != null) {
803
- contents.BackendEnvironmentName = (0, smithy_client_1.expectString)(data.backendEnvironmentName);
804
- }
805
- if (data.error != null) {
806
- contents.Error = (0, smithy_client_1.expectString)(data.error);
807
- }
808
- if (data.jobId != null) {
809
- contents.JobId = (0, smithy_client_1.expectString)(data.jobId);
810
- }
811
- if (data.operation != null) {
812
- contents.Operation = (0, smithy_client_1.expectString)(data.operation);
813
- }
814
- if (data.status != null) {
815
- contents.Status = (0, smithy_client_1.expectString)(data.status);
816
- }
781
+ const doc = (0, smithy_client_1.take)(data, {
782
+ AppId: [, smithy_client_1.expectString, `appId`],
783
+ BackendEnvironmentName: [, smithy_client_1.expectString, `backendEnvironmentName`],
784
+ Error: [, smithy_client_1.expectString, `error`],
785
+ JobId: [, smithy_client_1.expectString, `jobId`],
786
+ Operation: [, smithy_client_1.expectString, `operation`],
787
+ Status: [, smithy_client_1.expectString, `status`],
788
+ });
789
+ Object.assign(contents, doc);
817
790
  return contents;
818
791
  };
819
792
  exports.de_CreateBackendCommand = de_CreateBackendCommand;
@@ -838,10 +811,9 @@ const de_CreateBackendCommandError = async (output, context) => {
838
811
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
839
812
  default:
840
813
  const parsedBody = parsedOutput.body;
841
- (0, smithy_client_1.throwDefaultError)({
814
+ return throwDefaultError({
842
815
  output,
843
816
  parsedBody,
844
- exceptionCtor: AmplifyBackendServiceException_1.AmplifyBackendServiceException,
845
817
  errorCode,
846
818
  });
847
819
  }
@@ -850,28 +822,19 @@ const de_CreateBackendAPICommand = async (output, context) => {
850
822
  if (output.statusCode !== 200 && output.statusCode >= 300) {
851
823
  return de_CreateBackendAPICommandError(output, context);
852
824
  }
853
- const contents = map({
825
+ const contents = (0, smithy_client_1.map)({
854
826
  $metadata: deserializeMetadata(output),
855
827
  });
856
828
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
857
- if (data.appId != null) {
858
- contents.AppId = (0, smithy_client_1.expectString)(data.appId);
859
- }
860
- if (data.backendEnvironmentName != null) {
861
- contents.BackendEnvironmentName = (0, smithy_client_1.expectString)(data.backendEnvironmentName);
862
- }
863
- if (data.error != null) {
864
- contents.Error = (0, smithy_client_1.expectString)(data.error);
865
- }
866
- if (data.jobId != null) {
867
- contents.JobId = (0, smithy_client_1.expectString)(data.jobId);
868
- }
869
- if (data.operation != null) {
870
- contents.Operation = (0, smithy_client_1.expectString)(data.operation);
871
- }
872
- if (data.status != null) {
873
- contents.Status = (0, smithy_client_1.expectString)(data.status);
874
- }
829
+ const doc = (0, smithy_client_1.take)(data, {
830
+ AppId: [, smithy_client_1.expectString, `appId`],
831
+ BackendEnvironmentName: [, smithy_client_1.expectString, `backendEnvironmentName`],
832
+ Error: [, smithy_client_1.expectString, `error`],
833
+ JobId: [, smithy_client_1.expectString, `jobId`],
834
+ Operation: [, smithy_client_1.expectString, `operation`],
835
+ Status: [, smithy_client_1.expectString, `status`],
836
+ });
837
+ Object.assign(contents, doc);
875
838
  return contents;
876
839
  };
877
840
  exports.de_CreateBackendAPICommand = de_CreateBackendAPICommand;
@@ -896,10 +859,9 @@ const de_CreateBackendAPICommandError = async (output, context) => {
896
859
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
897
860
  default:
898
861
  const parsedBody = parsedOutput.body;
899
- (0, smithy_client_1.throwDefaultError)({
862
+ return throwDefaultError({
900
863
  output,
901
864
  parsedBody,
902
- exceptionCtor: AmplifyBackendServiceException_1.AmplifyBackendServiceException,
903
865
  errorCode,
904
866
  });
905
867
  }
@@ -908,28 +870,19 @@ const de_CreateBackendAuthCommand = async (output, context) => {
908
870
  if (output.statusCode !== 200 && output.statusCode >= 300) {
909
871
  return de_CreateBackendAuthCommandError(output, context);
910
872
  }
911
- const contents = map({
873
+ const contents = (0, smithy_client_1.map)({
912
874
  $metadata: deserializeMetadata(output),
913
875
  });
914
876
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
915
- if (data.appId != null) {
916
- contents.AppId = (0, smithy_client_1.expectString)(data.appId);
917
- }
918
- if (data.backendEnvironmentName != null) {
919
- contents.BackendEnvironmentName = (0, smithy_client_1.expectString)(data.backendEnvironmentName);
920
- }
921
- if (data.error != null) {
922
- contents.Error = (0, smithy_client_1.expectString)(data.error);
923
- }
924
- if (data.jobId != null) {
925
- contents.JobId = (0, smithy_client_1.expectString)(data.jobId);
926
- }
927
- if (data.operation != null) {
928
- contents.Operation = (0, smithy_client_1.expectString)(data.operation);
929
- }
930
- if (data.status != null) {
931
- contents.Status = (0, smithy_client_1.expectString)(data.status);
932
- }
877
+ const doc = (0, smithy_client_1.take)(data, {
878
+ AppId: [, smithy_client_1.expectString, `appId`],
879
+ BackendEnvironmentName: [, smithy_client_1.expectString, `backendEnvironmentName`],
880
+ Error: [, smithy_client_1.expectString, `error`],
881
+ JobId: [, smithy_client_1.expectString, `jobId`],
882
+ Operation: [, smithy_client_1.expectString, `operation`],
883
+ Status: [, smithy_client_1.expectString, `status`],
884
+ });
885
+ Object.assign(contents, doc);
933
886
  return contents;
934
887
  };
935
888
  exports.de_CreateBackendAuthCommand = de_CreateBackendAuthCommand;
@@ -954,10 +907,9 @@ const de_CreateBackendAuthCommandError = async (output, context) => {
954
907
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
955
908
  default:
956
909
  const parsedBody = parsedOutput.body;
957
- (0, smithy_client_1.throwDefaultError)({
910
+ return throwDefaultError({
958
911
  output,
959
912
  parsedBody,
960
- exceptionCtor: AmplifyBackendServiceException_1.AmplifyBackendServiceException,
961
913
  errorCode,
962
914
  });
963
915
  }
@@ -966,22 +918,17 @@ const de_CreateBackendConfigCommand = async (output, context) => {
966
918
  if (output.statusCode !== 200 && output.statusCode >= 300) {
967
919
  return de_CreateBackendConfigCommandError(output, context);
968
920
  }
969
- const contents = map({
921
+ const contents = (0, smithy_client_1.map)({
970
922
  $metadata: deserializeMetadata(output),
971
923
  });
972
924
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
973
- if (data.appId != null) {
974
- contents.AppId = (0, smithy_client_1.expectString)(data.appId);
975
- }
976
- if (data.backendEnvironmentName != null) {
977
- contents.BackendEnvironmentName = (0, smithy_client_1.expectString)(data.backendEnvironmentName);
978
- }
979
- if (data.jobId != null) {
980
- contents.JobId = (0, smithy_client_1.expectString)(data.jobId);
981
- }
982
- if (data.status != null) {
983
- contents.Status = (0, smithy_client_1.expectString)(data.status);
984
- }
925
+ const doc = (0, smithy_client_1.take)(data, {
926
+ AppId: [, smithy_client_1.expectString, `appId`],
927
+ BackendEnvironmentName: [, smithy_client_1.expectString, `backendEnvironmentName`],
928
+ JobId: [, smithy_client_1.expectString, `jobId`],
929
+ Status: [, smithy_client_1.expectString, `status`],
930
+ });
931
+ Object.assign(contents, doc);
985
932
  return contents;
986
933
  };
987
934
  exports.de_CreateBackendConfigCommand = de_CreateBackendConfigCommand;
@@ -1006,10 +953,9 @@ const de_CreateBackendConfigCommandError = async (output, context) => {
1006
953
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1007
954
  default:
1008
955
  const parsedBody = parsedOutput.body;
1009
- (0, smithy_client_1.throwDefaultError)({
956
+ return throwDefaultError({
1010
957
  output,
1011
958
  parsedBody,
1012
- exceptionCtor: AmplifyBackendServiceException_1.AmplifyBackendServiceException,
1013
959
  errorCode,
1014
960
  });
1015
961
  }
@@ -1018,22 +964,17 @@ const de_CreateBackendStorageCommand = async (output, context) => {
1018
964
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1019
965
  return de_CreateBackendStorageCommandError(output, context);
1020
966
  }
1021
- const contents = map({
967
+ const contents = (0, smithy_client_1.map)({
1022
968
  $metadata: deserializeMetadata(output),
1023
969
  });
1024
970
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1025
- if (data.appId != null) {
1026
- contents.AppId = (0, smithy_client_1.expectString)(data.appId);
1027
- }
1028
- if (data.backendEnvironmentName != null) {
1029
- contents.BackendEnvironmentName = (0, smithy_client_1.expectString)(data.backendEnvironmentName);
1030
- }
1031
- if (data.jobId != null) {
1032
- contents.JobId = (0, smithy_client_1.expectString)(data.jobId);
1033
- }
1034
- if (data.status != null) {
1035
- contents.Status = (0, smithy_client_1.expectString)(data.status);
1036
- }
971
+ const doc = (0, smithy_client_1.take)(data, {
972
+ AppId: [, smithy_client_1.expectString, `appId`],
973
+ BackendEnvironmentName: [, smithy_client_1.expectString, `backendEnvironmentName`],
974
+ JobId: [, smithy_client_1.expectString, `jobId`],
975
+ Status: [, smithy_client_1.expectString, `status`],
976
+ });
977
+ Object.assign(contents, doc);
1037
978
  return contents;
1038
979
  };
1039
980
  exports.de_CreateBackendStorageCommand = de_CreateBackendStorageCommand;
@@ -1058,10 +999,9 @@ const de_CreateBackendStorageCommandError = async (output, context) => {
1058
999
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1059
1000
  default:
1060
1001
  const parsedBody = parsedOutput.body;
1061
- (0, smithy_client_1.throwDefaultError)({
1002
+ return throwDefaultError({
1062
1003
  output,
1063
1004
  parsedBody,
1064
- exceptionCtor: AmplifyBackendServiceException_1.AmplifyBackendServiceException,
1065
1005
  errorCode,
1066
1006
  });
1067
1007
  }
@@ -1070,22 +1010,17 @@ const de_CreateTokenCommand = async (output, context) => {
1070
1010
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1071
1011
  return de_CreateTokenCommandError(output, context);
1072
1012
  }
1073
- const contents = map({
1013
+ const contents = (0, smithy_client_1.map)({
1074
1014
  $metadata: deserializeMetadata(output),
1075
1015
  });
1076
1016
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1077
- if (data.appId != null) {
1078
- contents.AppId = (0, smithy_client_1.expectString)(data.appId);
1079
- }
1080
- if (data.challengeCode != null) {
1081
- contents.ChallengeCode = (0, smithy_client_1.expectString)(data.challengeCode);
1082
- }
1083
- if (data.sessionId != null) {
1084
- contents.SessionId = (0, smithy_client_1.expectString)(data.sessionId);
1085
- }
1086
- if (data.ttl != null) {
1087
- contents.Ttl = (0, smithy_client_1.expectString)(data.ttl);
1088
- }
1017
+ const doc = (0, smithy_client_1.take)(data, {
1018
+ AppId: [, smithy_client_1.expectString, `appId`],
1019
+ ChallengeCode: [, smithy_client_1.expectString, `challengeCode`],
1020
+ SessionId: [, smithy_client_1.expectString, `sessionId`],
1021
+ Ttl: [, smithy_client_1.expectString, `ttl`],
1022
+ });
1023
+ Object.assign(contents, doc);
1089
1024
  return contents;
1090
1025
  };
1091
1026
  exports.de_CreateTokenCommand = de_CreateTokenCommand;
@@ -1110,10 +1045,9 @@ const de_CreateTokenCommandError = async (output, context) => {
1110
1045
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1111
1046
  default:
1112
1047
  const parsedBody = parsedOutput.body;
1113
- (0, smithy_client_1.throwDefaultError)({
1048
+ return throwDefaultError({
1114
1049
  output,
1115
1050
  parsedBody,
1116
- exceptionCtor: AmplifyBackendServiceException_1.AmplifyBackendServiceException,
1117
1051
  errorCode,
1118
1052
  });
1119
1053
  }
@@ -1122,28 +1056,19 @@ const de_DeleteBackendCommand = async (output, context) => {
1122
1056
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1123
1057
  return de_DeleteBackendCommandError(output, context);
1124
1058
  }
1125
- const contents = map({
1059
+ const contents = (0, smithy_client_1.map)({
1126
1060
  $metadata: deserializeMetadata(output),
1127
1061
  });
1128
1062
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1129
- if (data.appId != null) {
1130
- contents.AppId = (0, smithy_client_1.expectString)(data.appId);
1131
- }
1132
- if (data.backendEnvironmentName != null) {
1133
- contents.BackendEnvironmentName = (0, smithy_client_1.expectString)(data.backendEnvironmentName);
1134
- }
1135
- if (data.error != null) {
1136
- contents.Error = (0, smithy_client_1.expectString)(data.error);
1137
- }
1138
- if (data.jobId != null) {
1139
- contents.JobId = (0, smithy_client_1.expectString)(data.jobId);
1140
- }
1141
- if (data.operation != null) {
1142
- contents.Operation = (0, smithy_client_1.expectString)(data.operation);
1143
- }
1144
- if (data.status != null) {
1145
- contents.Status = (0, smithy_client_1.expectString)(data.status);
1146
- }
1063
+ const doc = (0, smithy_client_1.take)(data, {
1064
+ AppId: [, smithy_client_1.expectString, `appId`],
1065
+ BackendEnvironmentName: [, smithy_client_1.expectString, `backendEnvironmentName`],
1066
+ Error: [, smithy_client_1.expectString, `error`],
1067
+ JobId: [, smithy_client_1.expectString, `jobId`],
1068
+ Operation: [, smithy_client_1.expectString, `operation`],
1069
+ Status: [, smithy_client_1.expectString, `status`],
1070
+ });
1071
+ Object.assign(contents, doc);
1147
1072
  return contents;
1148
1073
  };
1149
1074
  exports.de_DeleteBackendCommand = de_DeleteBackendCommand;
@@ -1168,10 +1093,9 @@ const de_DeleteBackendCommandError = async (output, context) => {
1168
1093
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1169
1094
  default:
1170
1095
  const parsedBody = parsedOutput.body;
1171
- (0, smithy_client_1.throwDefaultError)({
1096
+ return throwDefaultError({
1172
1097
  output,
1173
1098
  parsedBody,
1174
- exceptionCtor: AmplifyBackendServiceException_1.AmplifyBackendServiceException,
1175
1099
  errorCode,
1176
1100
  });
1177
1101
  }
@@ -1180,28 +1104,19 @@ const de_DeleteBackendAPICommand = async (output, context) => {
1180
1104
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1181
1105
  return de_DeleteBackendAPICommandError(output, context);
1182
1106
  }
1183
- const contents = map({
1107
+ const contents = (0, smithy_client_1.map)({
1184
1108
  $metadata: deserializeMetadata(output),
1185
1109
  });
1186
1110
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1187
- if (data.appId != null) {
1188
- contents.AppId = (0, smithy_client_1.expectString)(data.appId);
1189
- }
1190
- if (data.backendEnvironmentName != null) {
1191
- contents.BackendEnvironmentName = (0, smithy_client_1.expectString)(data.backendEnvironmentName);
1192
- }
1193
- if (data.error != null) {
1194
- contents.Error = (0, smithy_client_1.expectString)(data.error);
1195
- }
1196
- if (data.jobId != null) {
1197
- contents.JobId = (0, smithy_client_1.expectString)(data.jobId);
1198
- }
1199
- if (data.operation != null) {
1200
- contents.Operation = (0, smithy_client_1.expectString)(data.operation);
1201
- }
1202
- if (data.status != null) {
1203
- contents.Status = (0, smithy_client_1.expectString)(data.status);
1204
- }
1111
+ const doc = (0, smithy_client_1.take)(data, {
1112
+ AppId: [, smithy_client_1.expectString, `appId`],
1113
+ BackendEnvironmentName: [, smithy_client_1.expectString, `backendEnvironmentName`],
1114
+ Error: [, smithy_client_1.expectString, `error`],
1115
+ JobId: [, smithy_client_1.expectString, `jobId`],
1116
+ Operation: [, smithy_client_1.expectString, `operation`],
1117
+ Status: [, smithy_client_1.expectString, `status`],
1118
+ });
1119
+ Object.assign(contents, doc);
1205
1120
  return contents;
1206
1121
  };
1207
1122
  exports.de_DeleteBackendAPICommand = de_DeleteBackendAPICommand;
@@ -1226,10 +1141,9 @@ const de_DeleteBackendAPICommandError = async (output, context) => {
1226
1141
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1227
1142
  default:
1228
1143
  const parsedBody = parsedOutput.body;
1229
- (0, smithy_client_1.throwDefaultError)({
1144
+ return throwDefaultError({
1230
1145
  output,
1231
1146
  parsedBody,
1232
- exceptionCtor: AmplifyBackendServiceException_1.AmplifyBackendServiceException,
1233
1147
  errorCode,
1234
1148
  });
1235
1149
  }
@@ -1238,28 +1152,19 @@ const de_DeleteBackendAuthCommand = async (output, context) => {
1238
1152
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1239
1153
  return de_DeleteBackendAuthCommandError(output, context);
1240
1154
  }
1241
- const contents = map({
1155
+ const contents = (0, smithy_client_1.map)({
1242
1156
  $metadata: deserializeMetadata(output),
1243
1157
  });
1244
1158
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1245
- if (data.appId != null) {
1246
- contents.AppId = (0, smithy_client_1.expectString)(data.appId);
1247
- }
1248
- if (data.backendEnvironmentName != null) {
1249
- contents.BackendEnvironmentName = (0, smithy_client_1.expectString)(data.backendEnvironmentName);
1250
- }
1251
- if (data.error != null) {
1252
- contents.Error = (0, smithy_client_1.expectString)(data.error);
1253
- }
1254
- if (data.jobId != null) {
1255
- contents.JobId = (0, smithy_client_1.expectString)(data.jobId);
1256
- }
1257
- if (data.operation != null) {
1258
- contents.Operation = (0, smithy_client_1.expectString)(data.operation);
1259
- }
1260
- if (data.status != null) {
1261
- contents.Status = (0, smithy_client_1.expectString)(data.status);
1262
- }
1159
+ const doc = (0, smithy_client_1.take)(data, {
1160
+ AppId: [, smithy_client_1.expectString, `appId`],
1161
+ BackendEnvironmentName: [, smithy_client_1.expectString, `backendEnvironmentName`],
1162
+ Error: [, smithy_client_1.expectString, `error`],
1163
+ JobId: [, smithy_client_1.expectString, `jobId`],
1164
+ Operation: [, smithy_client_1.expectString, `operation`],
1165
+ Status: [, smithy_client_1.expectString, `status`],
1166
+ });
1167
+ Object.assign(contents, doc);
1263
1168
  return contents;
1264
1169
  };
1265
1170
  exports.de_DeleteBackendAuthCommand = de_DeleteBackendAuthCommand;
@@ -1284,10 +1189,9 @@ const de_DeleteBackendAuthCommandError = async (output, context) => {
1284
1189
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1285
1190
  default:
1286
1191
  const parsedBody = parsedOutput.body;
1287
- (0, smithy_client_1.throwDefaultError)({
1192
+ return throwDefaultError({
1288
1193
  output,
1289
1194
  parsedBody,
1290
- exceptionCtor: AmplifyBackendServiceException_1.AmplifyBackendServiceException,
1291
1195
  errorCode,
1292
1196
  });
1293
1197
  }
@@ -1296,22 +1200,17 @@ const de_DeleteBackendStorageCommand = async (output, context) => {
1296
1200
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1297
1201
  return de_DeleteBackendStorageCommandError(output, context);
1298
1202
  }
1299
- const contents = map({
1203
+ const contents = (0, smithy_client_1.map)({
1300
1204
  $metadata: deserializeMetadata(output),
1301
1205
  });
1302
1206
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1303
- if (data.appId != null) {
1304
- contents.AppId = (0, smithy_client_1.expectString)(data.appId);
1305
- }
1306
- if (data.backendEnvironmentName != null) {
1307
- contents.BackendEnvironmentName = (0, smithy_client_1.expectString)(data.backendEnvironmentName);
1308
- }
1309
- if (data.jobId != null) {
1310
- contents.JobId = (0, smithy_client_1.expectString)(data.jobId);
1311
- }
1312
- if (data.status != null) {
1313
- contents.Status = (0, smithy_client_1.expectString)(data.status);
1314
- }
1207
+ const doc = (0, smithy_client_1.take)(data, {
1208
+ AppId: [, smithy_client_1.expectString, `appId`],
1209
+ BackendEnvironmentName: [, smithy_client_1.expectString, `backendEnvironmentName`],
1210
+ JobId: [, smithy_client_1.expectString, `jobId`],
1211
+ Status: [, smithy_client_1.expectString, `status`],
1212
+ });
1213
+ Object.assign(contents, doc);
1315
1214
  return contents;
1316
1215
  };
1317
1216
  exports.de_DeleteBackendStorageCommand = de_DeleteBackendStorageCommand;
@@ -1336,10 +1235,9 @@ const de_DeleteBackendStorageCommandError = async (output, context) => {
1336
1235
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1337
1236
  default:
1338
1237
  const parsedBody = parsedOutput.body;
1339
- (0, smithy_client_1.throwDefaultError)({
1238
+ return throwDefaultError({
1340
1239
  output,
1341
1240
  parsedBody,
1342
- exceptionCtor: AmplifyBackendServiceException_1.AmplifyBackendServiceException,
1343
1241
  errorCode,
1344
1242
  });
1345
1243
  }
@@ -1348,13 +1246,14 @@ const de_DeleteTokenCommand = async (output, context) => {
1348
1246
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1349
1247
  return de_DeleteTokenCommandError(output, context);
1350
1248
  }
1351
- const contents = map({
1249
+ const contents = (0, smithy_client_1.map)({
1352
1250
  $metadata: deserializeMetadata(output),
1353
1251
  });
1354
1252
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1355
- if (data.isSuccess != null) {
1356
- contents.IsSuccess = (0, smithy_client_1.expectBoolean)(data.isSuccess);
1357
- }
1253
+ const doc = (0, smithy_client_1.take)(data, {
1254
+ IsSuccess: [, smithy_client_1.expectBoolean, `isSuccess`],
1255
+ });
1256
+ Object.assign(contents, doc);
1358
1257
  return contents;
1359
1258
  };
1360
1259
  exports.de_DeleteTokenCommand = de_DeleteTokenCommand;
@@ -1379,10 +1278,9 @@ const de_DeleteTokenCommandError = async (output, context) => {
1379
1278
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1380
1279
  default:
1381
1280
  const parsedBody = parsedOutput.body;
1382
- (0, smithy_client_1.throwDefaultError)({
1281
+ return throwDefaultError({
1383
1282
  output,
1384
1283
  parsedBody,
1385
- exceptionCtor: AmplifyBackendServiceException_1.AmplifyBackendServiceException,
1386
1284
  errorCode,
1387
1285
  });
1388
1286
  }
@@ -1391,28 +1289,19 @@ const de_GenerateBackendAPIModelsCommand = async (output, context) => {
1391
1289
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1392
1290
  return de_GenerateBackendAPIModelsCommandError(output, context);
1393
1291
  }
1394
- const contents = map({
1292
+ const contents = (0, smithy_client_1.map)({
1395
1293
  $metadata: deserializeMetadata(output),
1396
1294
  });
1397
1295
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1398
- if (data.appId != null) {
1399
- contents.AppId = (0, smithy_client_1.expectString)(data.appId);
1400
- }
1401
- if (data.backendEnvironmentName != null) {
1402
- contents.BackendEnvironmentName = (0, smithy_client_1.expectString)(data.backendEnvironmentName);
1403
- }
1404
- if (data.error != null) {
1405
- contents.Error = (0, smithy_client_1.expectString)(data.error);
1406
- }
1407
- if (data.jobId != null) {
1408
- contents.JobId = (0, smithy_client_1.expectString)(data.jobId);
1409
- }
1410
- if (data.operation != null) {
1411
- contents.Operation = (0, smithy_client_1.expectString)(data.operation);
1412
- }
1413
- if (data.status != null) {
1414
- contents.Status = (0, smithy_client_1.expectString)(data.status);
1415
- }
1296
+ const doc = (0, smithy_client_1.take)(data, {
1297
+ AppId: [, smithy_client_1.expectString, `appId`],
1298
+ BackendEnvironmentName: [, smithy_client_1.expectString, `backendEnvironmentName`],
1299
+ Error: [, smithy_client_1.expectString, `error`],
1300
+ JobId: [, smithy_client_1.expectString, `jobId`],
1301
+ Operation: [, smithy_client_1.expectString, `operation`],
1302
+ Status: [, smithy_client_1.expectString, `status`],
1303
+ });
1304
+ Object.assign(contents, doc);
1416
1305
  return contents;
1417
1306
  };
1418
1307
  exports.de_GenerateBackendAPIModelsCommand = de_GenerateBackendAPIModelsCommand;
@@ -1437,10 +1326,9 @@ const de_GenerateBackendAPIModelsCommandError = async (output, context) => {
1437
1326
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1438
1327
  default:
1439
1328
  const parsedBody = parsedOutput.body;
1440
- (0, smithy_client_1.throwDefaultError)({
1329
+ return throwDefaultError({
1441
1330
  output,
1442
1331
  parsedBody,
1443
- exceptionCtor: AmplifyBackendServiceException_1.AmplifyBackendServiceException,
1444
1332
  errorCode,
1445
1333
  });
1446
1334
  }
@@ -1449,31 +1337,20 @@ const de_GetBackendCommand = async (output, context) => {
1449
1337
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1450
1338
  return de_GetBackendCommandError(output, context);
1451
1339
  }
1452
- const contents = map({
1340
+ const contents = (0, smithy_client_1.map)({
1453
1341
  $metadata: deserializeMetadata(output),
1454
1342
  });
1455
1343
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1456
- if (data.amplifyFeatureFlags != null) {
1457
- contents.AmplifyFeatureFlags = (0, smithy_client_1.expectString)(data.amplifyFeatureFlags);
1458
- }
1459
- if (data.amplifyMetaConfig != null) {
1460
- contents.AmplifyMetaConfig = (0, smithy_client_1.expectString)(data.amplifyMetaConfig);
1461
- }
1462
- if (data.appId != null) {
1463
- contents.AppId = (0, smithy_client_1.expectString)(data.appId);
1464
- }
1465
- if (data.appName != null) {
1466
- contents.AppName = (0, smithy_client_1.expectString)(data.appName);
1467
- }
1468
- if (data.backendEnvironmentList != null) {
1469
- contents.BackendEnvironmentList = de_ListOf__string(data.backendEnvironmentList, context);
1470
- }
1471
- if (data.backendEnvironmentName != null) {
1472
- contents.BackendEnvironmentName = (0, smithy_client_1.expectString)(data.backendEnvironmentName);
1473
- }
1474
- if (data.error != null) {
1475
- contents.Error = (0, smithy_client_1.expectString)(data.error);
1476
- }
1344
+ const doc = (0, smithy_client_1.take)(data, {
1345
+ AmplifyFeatureFlags: [, smithy_client_1.expectString, `amplifyFeatureFlags`],
1346
+ AmplifyMetaConfig: [, smithy_client_1.expectString, `amplifyMetaConfig`],
1347
+ AppId: [, smithy_client_1.expectString, `appId`],
1348
+ AppName: [, smithy_client_1.expectString, `appName`],
1349
+ BackendEnvironmentList: [, smithy_client_1._json, `backendEnvironmentList`],
1350
+ BackendEnvironmentName: [, smithy_client_1.expectString, `backendEnvironmentName`],
1351
+ Error: [, smithy_client_1.expectString, `error`],
1352
+ });
1353
+ Object.assign(contents, doc);
1477
1354
  return contents;
1478
1355
  };
1479
1356
  exports.de_GetBackendCommand = de_GetBackendCommand;
@@ -1498,10 +1375,9 @@ const de_GetBackendCommandError = async (output, context) => {
1498
1375
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1499
1376
  default:
1500
1377
  const parsedBody = parsedOutput.body;
1501
- (0, smithy_client_1.throwDefaultError)({
1378
+ return throwDefaultError({
1502
1379
  output,
1503
1380
  parsedBody,
1504
- exceptionCtor: AmplifyBackendServiceException_1.AmplifyBackendServiceException,
1505
1381
  errorCode,
1506
1382
  });
1507
1383
  }
@@ -1510,25 +1386,18 @@ const de_GetBackendAPICommand = async (output, context) => {
1510
1386
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1511
1387
  return de_GetBackendAPICommandError(output, context);
1512
1388
  }
1513
- const contents = map({
1389
+ const contents = (0, smithy_client_1.map)({
1514
1390
  $metadata: deserializeMetadata(output),
1515
1391
  });
1516
1392
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1517
- if (data.appId != null) {
1518
- contents.AppId = (0, smithy_client_1.expectString)(data.appId);
1519
- }
1520
- if (data.backendEnvironmentName != null) {
1521
- contents.BackendEnvironmentName = (0, smithy_client_1.expectString)(data.backendEnvironmentName);
1522
- }
1523
- if (data.error != null) {
1524
- contents.Error = (0, smithy_client_1.expectString)(data.error);
1525
- }
1526
- if (data.resourceConfig != null) {
1527
- contents.ResourceConfig = de_BackendAPIResourceConfig(data.resourceConfig, context);
1528
- }
1529
- if (data.resourceName != null) {
1530
- contents.ResourceName = (0, smithy_client_1.expectString)(data.resourceName);
1531
- }
1393
+ const doc = (0, smithy_client_1.take)(data, {
1394
+ AppId: [, smithy_client_1.expectString, `appId`],
1395
+ BackendEnvironmentName: [, smithy_client_1.expectString, `backendEnvironmentName`],
1396
+ Error: [, smithy_client_1.expectString, `error`],
1397
+ ResourceConfig: [, (_) => de_BackendAPIResourceConfig(_, context), `resourceConfig`],
1398
+ ResourceName: [, smithy_client_1.expectString, `resourceName`],
1399
+ });
1400
+ Object.assign(contents, doc);
1532
1401
  return contents;
1533
1402
  };
1534
1403
  exports.de_GetBackendAPICommand = de_GetBackendAPICommand;
@@ -1553,10 +1422,9 @@ const de_GetBackendAPICommandError = async (output, context) => {
1553
1422
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1554
1423
  default:
1555
1424
  const parsedBody = parsedOutput.body;
1556
- (0, smithy_client_1.throwDefaultError)({
1425
+ return throwDefaultError({
1557
1426
  output,
1558
1427
  parsedBody,
1559
- exceptionCtor: AmplifyBackendServiceException_1.AmplifyBackendServiceException,
1560
1428
  errorCode,
1561
1429
  });
1562
1430
  }
@@ -1565,19 +1433,16 @@ const de_GetBackendAPIModelsCommand = async (output, context) => {
1565
1433
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1566
1434
  return de_GetBackendAPIModelsCommandError(output, context);
1567
1435
  }
1568
- const contents = map({
1436
+ const contents = (0, smithy_client_1.map)({
1569
1437
  $metadata: deserializeMetadata(output),
1570
1438
  });
1571
1439
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1572
- if (data.modelIntrospectionSchema != null) {
1573
- contents.ModelIntrospectionSchema = (0, smithy_client_1.expectString)(data.modelIntrospectionSchema);
1574
- }
1575
- if (data.models != null) {
1576
- contents.Models = (0, smithy_client_1.expectString)(data.models);
1577
- }
1578
- if (data.status != null) {
1579
- contents.Status = (0, smithy_client_1.expectString)(data.status);
1580
- }
1440
+ const doc = (0, smithy_client_1.take)(data, {
1441
+ ModelIntrospectionSchema: [, smithy_client_1.expectString, `modelIntrospectionSchema`],
1442
+ Models: [, smithy_client_1.expectString, `models`],
1443
+ Status: [, smithy_client_1.expectString, `status`],
1444
+ });
1445
+ Object.assign(contents, doc);
1581
1446
  return contents;
1582
1447
  };
1583
1448
  exports.de_GetBackendAPIModelsCommand = de_GetBackendAPIModelsCommand;
@@ -1602,10 +1467,9 @@ const de_GetBackendAPIModelsCommandError = async (output, context) => {
1602
1467
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1603
1468
  default:
1604
1469
  const parsedBody = parsedOutput.body;
1605
- (0, smithy_client_1.throwDefaultError)({
1470
+ return throwDefaultError({
1606
1471
  output,
1607
1472
  parsedBody,
1608
- exceptionCtor: AmplifyBackendServiceException_1.AmplifyBackendServiceException,
1609
1473
  errorCode,
1610
1474
  });
1611
1475
  }
@@ -1614,25 +1478,18 @@ const de_GetBackendAuthCommand = async (output, context) => {
1614
1478
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1615
1479
  return de_GetBackendAuthCommandError(output, context);
1616
1480
  }
1617
- const contents = map({
1481
+ const contents = (0, smithy_client_1.map)({
1618
1482
  $metadata: deserializeMetadata(output),
1619
1483
  });
1620
1484
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1621
- if (data.appId != null) {
1622
- contents.AppId = (0, smithy_client_1.expectString)(data.appId);
1623
- }
1624
- if (data.backendEnvironmentName != null) {
1625
- contents.BackendEnvironmentName = (0, smithy_client_1.expectString)(data.backendEnvironmentName);
1626
- }
1627
- if (data.error != null) {
1628
- contents.Error = (0, smithy_client_1.expectString)(data.error);
1629
- }
1630
- if (data.resourceConfig != null) {
1631
- contents.ResourceConfig = de_CreateBackendAuthResourceConfig(data.resourceConfig, context);
1632
- }
1633
- if (data.resourceName != null) {
1634
- contents.ResourceName = (0, smithy_client_1.expectString)(data.resourceName);
1635
- }
1485
+ const doc = (0, smithy_client_1.take)(data, {
1486
+ AppId: [, smithy_client_1.expectString, `appId`],
1487
+ BackendEnvironmentName: [, smithy_client_1.expectString, `backendEnvironmentName`],
1488
+ Error: [, smithy_client_1.expectString, `error`],
1489
+ ResourceConfig: [, (_) => de_CreateBackendAuthResourceConfig(_, context), `resourceConfig`],
1490
+ ResourceName: [, smithy_client_1.expectString, `resourceName`],
1491
+ });
1492
+ Object.assign(contents, doc);
1636
1493
  return contents;
1637
1494
  };
1638
1495
  exports.de_GetBackendAuthCommand = de_GetBackendAuthCommand;
@@ -1657,10 +1514,9 @@ const de_GetBackendAuthCommandError = async (output, context) => {
1657
1514
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1658
1515
  default:
1659
1516
  const parsedBody = parsedOutput.body;
1660
- (0, smithy_client_1.throwDefaultError)({
1517
+ return throwDefaultError({
1661
1518
  output,
1662
1519
  parsedBody,
1663
- exceptionCtor: AmplifyBackendServiceException_1.AmplifyBackendServiceException,
1664
1520
  errorCode,
1665
1521
  });
1666
1522
  }
@@ -1669,34 +1525,21 @@ const de_GetBackendJobCommand = async (output, context) => {
1669
1525
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1670
1526
  return de_GetBackendJobCommandError(output, context);
1671
1527
  }
1672
- const contents = map({
1528
+ const contents = (0, smithy_client_1.map)({
1673
1529
  $metadata: deserializeMetadata(output),
1674
1530
  });
1675
1531
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1676
- if (data.appId != null) {
1677
- contents.AppId = (0, smithy_client_1.expectString)(data.appId);
1678
- }
1679
- if (data.backendEnvironmentName != null) {
1680
- contents.BackendEnvironmentName = (0, smithy_client_1.expectString)(data.backendEnvironmentName);
1681
- }
1682
- if (data.createTime != null) {
1683
- contents.CreateTime = (0, smithy_client_1.expectString)(data.createTime);
1684
- }
1685
- if (data.error != null) {
1686
- contents.Error = (0, smithy_client_1.expectString)(data.error);
1687
- }
1688
- if (data.jobId != null) {
1689
- contents.JobId = (0, smithy_client_1.expectString)(data.jobId);
1690
- }
1691
- if (data.operation != null) {
1692
- contents.Operation = (0, smithy_client_1.expectString)(data.operation);
1693
- }
1694
- if (data.status != null) {
1695
- contents.Status = (0, smithy_client_1.expectString)(data.status);
1696
- }
1697
- if (data.updateTime != null) {
1698
- contents.UpdateTime = (0, smithy_client_1.expectString)(data.updateTime);
1699
- }
1532
+ const doc = (0, smithy_client_1.take)(data, {
1533
+ AppId: [, smithy_client_1.expectString, `appId`],
1534
+ BackendEnvironmentName: [, smithy_client_1.expectString, `backendEnvironmentName`],
1535
+ CreateTime: [, smithy_client_1.expectString, `createTime`],
1536
+ Error: [, smithy_client_1.expectString, `error`],
1537
+ JobId: [, smithy_client_1.expectString, `jobId`],
1538
+ Operation: [, smithy_client_1.expectString, `operation`],
1539
+ Status: [, smithy_client_1.expectString, `status`],
1540
+ UpdateTime: [, smithy_client_1.expectString, `updateTime`],
1541
+ });
1542
+ Object.assign(contents, doc);
1700
1543
  return contents;
1701
1544
  };
1702
1545
  exports.de_GetBackendJobCommand = de_GetBackendJobCommand;
@@ -1721,10 +1564,9 @@ const de_GetBackendJobCommandError = async (output, context) => {
1721
1564
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1722
1565
  default:
1723
1566
  const parsedBody = parsedOutput.body;
1724
- (0, smithy_client_1.throwDefaultError)({
1567
+ return throwDefaultError({
1725
1568
  output,
1726
1569
  parsedBody,
1727
- exceptionCtor: AmplifyBackendServiceException_1.AmplifyBackendServiceException,
1728
1570
  errorCode,
1729
1571
  });
1730
1572
  }
@@ -1733,22 +1575,17 @@ const de_GetBackendStorageCommand = async (output, context) => {
1733
1575
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1734
1576
  return de_GetBackendStorageCommandError(output, context);
1735
1577
  }
1736
- const contents = map({
1578
+ const contents = (0, smithy_client_1.map)({
1737
1579
  $metadata: deserializeMetadata(output),
1738
1580
  });
1739
1581
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1740
- if (data.appId != null) {
1741
- contents.AppId = (0, smithy_client_1.expectString)(data.appId);
1742
- }
1743
- if (data.backendEnvironmentName != null) {
1744
- contents.BackendEnvironmentName = (0, smithy_client_1.expectString)(data.backendEnvironmentName);
1745
- }
1746
- if (data.resourceConfig != null) {
1747
- contents.ResourceConfig = de_GetBackendStorageResourceConfig(data.resourceConfig, context);
1748
- }
1749
- if (data.resourceName != null) {
1750
- contents.ResourceName = (0, smithy_client_1.expectString)(data.resourceName);
1751
- }
1582
+ const doc = (0, smithy_client_1.take)(data, {
1583
+ AppId: [, smithy_client_1.expectString, `appId`],
1584
+ BackendEnvironmentName: [, smithy_client_1.expectString, `backendEnvironmentName`],
1585
+ ResourceConfig: [, (_) => de_GetBackendStorageResourceConfig(_, context), `resourceConfig`],
1586
+ ResourceName: [, smithy_client_1.expectString, `resourceName`],
1587
+ });
1588
+ Object.assign(contents, doc);
1752
1589
  return contents;
1753
1590
  };
1754
1591
  exports.de_GetBackendStorageCommand = de_GetBackendStorageCommand;
@@ -1773,10 +1610,9 @@ const de_GetBackendStorageCommandError = async (output, context) => {
1773
1610
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1774
1611
  default:
1775
1612
  const parsedBody = parsedOutput.body;
1776
- (0, smithy_client_1.throwDefaultError)({
1613
+ return throwDefaultError({
1777
1614
  output,
1778
1615
  parsedBody,
1779
- exceptionCtor: AmplifyBackendServiceException_1.AmplifyBackendServiceException,
1780
1616
  errorCode,
1781
1617
  });
1782
1618
  }
@@ -1785,22 +1621,17 @@ const de_GetTokenCommand = async (output, context) => {
1785
1621
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1786
1622
  return de_GetTokenCommandError(output, context);
1787
1623
  }
1788
- const contents = map({
1624
+ const contents = (0, smithy_client_1.map)({
1789
1625
  $metadata: deserializeMetadata(output),
1790
1626
  });
1791
1627
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1792
- if (data.appId != null) {
1793
- contents.AppId = (0, smithy_client_1.expectString)(data.appId);
1794
- }
1795
- if (data.challengeCode != null) {
1796
- contents.ChallengeCode = (0, smithy_client_1.expectString)(data.challengeCode);
1797
- }
1798
- if (data.sessionId != null) {
1799
- contents.SessionId = (0, smithy_client_1.expectString)(data.sessionId);
1800
- }
1801
- if (data.ttl != null) {
1802
- contents.Ttl = (0, smithy_client_1.expectString)(data.ttl);
1803
- }
1628
+ const doc = (0, smithy_client_1.take)(data, {
1629
+ AppId: [, smithy_client_1.expectString, `appId`],
1630
+ ChallengeCode: [, smithy_client_1.expectString, `challengeCode`],
1631
+ SessionId: [, smithy_client_1.expectString, `sessionId`],
1632
+ Ttl: [, smithy_client_1.expectString, `ttl`],
1633
+ });
1634
+ Object.assign(contents, doc);
1804
1635
  return contents;
1805
1636
  };
1806
1637
  exports.de_GetTokenCommand = de_GetTokenCommand;
@@ -1825,10 +1656,9 @@ const de_GetTokenCommandError = async (output, context) => {
1825
1656
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1826
1657
  default:
1827
1658
  const parsedBody = parsedOutput.body;
1828
- (0, smithy_client_1.throwDefaultError)({
1659
+ return throwDefaultError({
1829
1660
  output,
1830
1661
  parsedBody,
1831
- exceptionCtor: AmplifyBackendServiceException_1.AmplifyBackendServiceException,
1832
1662
  errorCode,
1833
1663
  });
1834
1664
  }
@@ -1837,28 +1667,19 @@ const de_ImportBackendAuthCommand = async (output, context) => {
1837
1667
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1838
1668
  return de_ImportBackendAuthCommandError(output, context);
1839
1669
  }
1840
- const contents = map({
1670
+ const contents = (0, smithy_client_1.map)({
1841
1671
  $metadata: deserializeMetadata(output),
1842
1672
  });
1843
1673
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1844
- if (data.appId != null) {
1845
- contents.AppId = (0, smithy_client_1.expectString)(data.appId);
1846
- }
1847
- if (data.backendEnvironmentName != null) {
1848
- contents.BackendEnvironmentName = (0, smithy_client_1.expectString)(data.backendEnvironmentName);
1849
- }
1850
- if (data.error != null) {
1851
- contents.Error = (0, smithy_client_1.expectString)(data.error);
1852
- }
1853
- if (data.jobId != null) {
1854
- contents.JobId = (0, smithy_client_1.expectString)(data.jobId);
1855
- }
1856
- if (data.operation != null) {
1857
- contents.Operation = (0, smithy_client_1.expectString)(data.operation);
1858
- }
1859
- if (data.status != null) {
1860
- contents.Status = (0, smithy_client_1.expectString)(data.status);
1861
- }
1674
+ const doc = (0, smithy_client_1.take)(data, {
1675
+ AppId: [, smithy_client_1.expectString, `appId`],
1676
+ BackendEnvironmentName: [, smithy_client_1.expectString, `backendEnvironmentName`],
1677
+ Error: [, smithy_client_1.expectString, `error`],
1678
+ JobId: [, smithy_client_1.expectString, `jobId`],
1679
+ Operation: [, smithy_client_1.expectString, `operation`],
1680
+ Status: [, smithy_client_1.expectString, `status`],
1681
+ });
1682
+ Object.assign(contents, doc);
1862
1683
  return contents;
1863
1684
  };
1864
1685
  exports.de_ImportBackendAuthCommand = de_ImportBackendAuthCommand;
@@ -1883,10 +1704,9 @@ const de_ImportBackendAuthCommandError = async (output, context) => {
1883
1704
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1884
1705
  default:
1885
1706
  const parsedBody = parsedOutput.body;
1886
- (0, smithy_client_1.throwDefaultError)({
1707
+ return throwDefaultError({
1887
1708
  output,
1888
1709
  parsedBody,
1889
- exceptionCtor: AmplifyBackendServiceException_1.AmplifyBackendServiceException,
1890
1710
  errorCode,
1891
1711
  });
1892
1712
  }
@@ -1895,22 +1715,17 @@ const de_ImportBackendStorageCommand = async (output, context) => {
1895
1715
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1896
1716
  return de_ImportBackendStorageCommandError(output, context);
1897
1717
  }
1898
- const contents = map({
1718
+ const contents = (0, smithy_client_1.map)({
1899
1719
  $metadata: deserializeMetadata(output),
1900
1720
  });
1901
1721
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1902
- if (data.appId != null) {
1903
- contents.AppId = (0, smithy_client_1.expectString)(data.appId);
1904
- }
1905
- if (data.backendEnvironmentName != null) {
1906
- contents.BackendEnvironmentName = (0, smithy_client_1.expectString)(data.backendEnvironmentName);
1907
- }
1908
- if (data.jobId != null) {
1909
- contents.JobId = (0, smithy_client_1.expectString)(data.jobId);
1910
- }
1911
- if (data.status != null) {
1912
- contents.Status = (0, smithy_client_1.expectString)(data.status);
1913
- }
1722
+ const doc = (0, smithy_client_1.take)(data, {
1723
+ AppId: [, smithy_client_1.expectString, `appId`],
1724
+ BackendEnvironmentName: [, smithy_client_1.expectString, `backendEnvironmentName`],
1725
+ JobId: [, smithy_client_1.expectString, `jobId`],
1726
+ Status: [, smithy_client_1.expectString, `status`],
1727
+ });
1728
+ Object.assign(contents, doc);
1914
1729
  return contents;
1915
1730
  };
1916
1731
  exports.de_ImportBackendStorageCommand = de_ImportBackendStorageCommand;
@@ -1935,10 +1750,9 @@ const de_ImportBackendStorageCommandError = async (output, context) => {
1935
1750
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1936
1751
  default:
1937
1752
  const parsedBody = parsedOutput.body;
1938
- (0, smithy_client_1.throwDefaultError)({
1753
+ return throwDefaultError({
1939
1754
  output,
1940
1755
  parsedBody,
1941
- exceptionCtor: AmplifyBackendServiceException_1.AmplifyBackendServiceException,
1942
1756
  errorCode,
1943
1757
  });
1944
1758
  }
@@ -1947,16 +1761,15 @@ const de_ListBackendJobsCommand = async (output, context) => {
1947
1761
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1948
1762
  return de_ListBackendJobsCommandError(output, context);
1949
1763
  }
1950
- const contents = map({
1764
+ const contents = (0, smithy_client_1.map)({
1951
1765
  $metadata: deserializeMetadata(output),
1952
1766
  });
1953
1767
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1954
- if (data.jobs != null) {
1955
- contents.Jobs = de_ListOfBackendJobRespObj(data.jobs, context);
1956
- }
1957
- if (data.nextToken != null) {
1958
- contents.NextToken = (0, smithy_client_1.expectString)(data.nextToken);
1959
- }
1768
+ const doc = (0, smithy_client_1.take)(data, {
1769
+ Jobs: [, (_) => de_ListOfBackendJobRespObj(_, context), `jobs`],
1770
+ NextToken: [, smithy_client_1.expectString, `nextToken`],
1771
+ });
1772
+ Object.assign(contents, doc);
1960
1773
  return contents;
1961
1774
  };
1962
1775
  exports.de_ListBackendJobsCommand = de_ListBackendJobsCommand;
@@ -1981,10 +1794,9 @@ const de_ListBackendJobsCommandError = async (output, context) => {
1981
1794
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1982
1795
  default:
1983
1796
  const parsedBody = parsedOutput.body;
1984
- (0, smithy_client_1.throwDefaultError)({
1797
+ return throwDefaultError({
1985
1798
  output,
1986
1799
  parsedBody,
1987
- exceptionCtor: AmplifyBackendServiceException_1.AmplifyBackendServiceException,
1988
1800
  errorCode,
1989
1801
  });
1990
1802
  }
@@ -1993,16 +1805,15 @@ const de_ListS3BucketsCommand = async (output, context) => {
1993
1805
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1994
1806
  return de_ListS3BucketsCommandError(output, context);
1995
1807
  }
1996
- const contents = map({
1808
+ const contents = (0, smithy_client_1.map)({
1997
1809
  $metadata: deserializeMetadata(output),
1998
1810
  });
1999
1811
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2000
- if (data.buckets != null) {
2001
- contents.Buckets = de_ListOfS3BucketInfo(data.buckets, context);
2002
- }
2003
- if (data.nextToken != null) {
2004
- contents.NextToken = (0, smithy_client_1.expectString)(data.nextToken);
2005
- }
1812
+ const doc = (0, smithy_client_1.take)(data, {
1813
+ Buckets: [, (_) => de_ListOfS3BucketInfo(_, context), `buckets`],
1814
+ NextToken: [, smithy_client_1.expectString, `nextToken`],
1815
+ });
1816
+ Object.assign(contents, doc);
2006
1817
  return contents;
2007
1818
  };
2008
1819
  exports.de_ListS3BucketsCommand = de_ListS3BucketsCommand;
@@ -2027,10 +1838,9 @@ const de_ListS3BucketsCommandError = async (output, context) => {
2027
1838
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2028
1839
  default:
2029
1840
  const parsedBody = parsedOutput.body;
2030
- (0, smithy_client_1.throwDefaultError)({
1841
+ return throwDefaultError({
2031
1842
  output,
2032
1843
  parsedBody,
2033
- exceptionCtor: AmplifyBackendServiceException_1.AmplifyBackendServiceException,
2034
1844
  errorCode,
2035
1845
  });
2036
1846
  }
@@ -2039,25 +1849,18 @@ const de_RemoveAllBackendsCommand = async (output, context) => {
2039
1849
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2040
1850
  return de_RemoveAllBackendsCommandError(output, context);
2041
1851
  }
2042
- const contents = map({
1852
+ const contents = (0, smithy_client_1.map)({
2043
1853
  $metadata: deserializeMetadata(output),
2044
1854
  });
2045
1855
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2046
- if (data.appId != null) {
2047
- contents.AppId = (0, smithy_client_1.expectString)(data.appId);
2048
- }
2049
- if (data.error != null) {
2050
- contents.Error = (0, smithy_client_1.expectString)(data.error);
2051
- }
2052
- if (data.jobId != null) {
2053
- contents.JobId = (0, smithy_client_1.expectString)(data.jobId);
2054
- }
2055
- if (data.operation != null) {
2056
- contents.Operation = (0, smithy_client_1.expectString)(data.operation);
2057
- }
2058
- if (data.status != null) {
2059
- contents.Status = (0, smithy_client_1.expectString)(data.status);
2060
- }
1856
+ const doc = (0, smithy_client_1.take)(data, {
1857
+ AppId: [, smithy_client_1.expectString, `appId`],
1858
+ Error: [, smithy_client_1.expectString, `error`],
1859
+ JobId: [, smithy_client_1.expectString, `jobId`],
1860
+ Operation: [, smithy_client_1.expectString, `operation`],
1861
+ Status: [, smithy_client_1.expectString, `status`],
1862
+ });
1863
+ Object.assign(contents, doc);
2061
1864
  return contents;
2062
1865
  };
2063
1866
  exports.de_RemoveAllBackendsCommand = de_RemoveAllBackendsCommand;
@@ -2082,10 +1885,9 @@ const de_RemoveAllBackendsCommandError = async (output, context) => {
2082
1885
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2083
1886
  default:
2084
1887
  const parsedBody = parsedOutput.body;
2085
- (0, smithy_client_1.throwDefaultError)({
1888
+ return throwDefaultError({
2086
1889
  output,
2087
1890
  parsedBody,
2088
- exceptionCtor: AmplifyBackendServiceException_1.AmplifyBackendServiceException,
2089
1891
  errorCode,
2090
1892
  });
2091
1893
  }
@@ -2094,13 +1896,14 @@ const de_RemoveBackendConfigCommand = async (output, context) => {
2094
1896
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2095
1897
  return de_RemoveBackendConfigCommandError(output, context);
2096
1898
  }
2097
- const contents = map({
1899
+ const contents = (0, smithy_client_1.map)({
2098
1900
  $metadata: deserializeMetadata(output),
2099
1901
  });
2100
1902
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2101
- if (data.error != null) {
2102
- contents.Error = (0, smithy_client_1.expectString)(data.error);
2103
- }
1903
+ const doc = (0, smithy_client_1.take)(data, {
1904
+ Error: [, smithy_client_1.expectString, `error`],
1905
+ });
1906
+ Object.assign(contents, doc);
2104
1907
  return contents;
2105
1908
  };
2106
1909
  exports.de_RemoveBackendConfigCommand = de_RemoveBackendConfigCommand;
@@ -2125,10 +1928,9 @@ const de_RemoveBackendConfigCommandError = async (output, context) => {
2125
1928
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2126
1929
  default:
2127
1930
  const parsedBody = parsedOutput.body;
2128
- (0, smithy_client_1.throwDefaultError)({
1931
+ return throwDefaultError({
2129
1932
  output,
2130
1933
  parsedBody,
2131
- exceptionCtor: AmplifyBackendServiceException_1.AmplifyBackendServiceException,
2132
1934
  errorCode,
2133
1935
  });
2134
1936
  }
@@ -2137,28 +1939,19 @@ const de_UpdateBackendAPICommand = async (output, context) => {
2137
1939
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2138
1940
  return de_UpdateBackendAPICommandError(output, context);
2139
1941
  }
2140
- const contents = map({
1942
+ const contents = (0, smithy_client_1.map)({
2141
1943
  $metadata: deserializeMetadata(output),
2142
1944
  });
2143
1945
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2144
- if (data.appId != null) {
2145
- contents.AppId = (0, smithy_client_1.expectString)(data.appId);
2146
- }
2147
- if (data.backendEnvironmentName != null) {
2148
- contents.BackendEnvironmentName = (0, smithy_client_1.expectString)(data.backendEnvironmentName);
2149
- }
2150
- if (data.error != null) {
2151
- contents.Error = (0, smithy_client_1.expectString)(data.error);
2152
- }
2153
- if (data.jobId != null) {
2154
- contents.JobId = (0, smithy_client_1.expectString)(data.jobId);
2155
- }
2156
- if (data.operation != null) {
2157
- contents.Operation = (0, smithy_client_1.expectString)(data.operation);
2158
- }
2159
- if (data.status != null) {
2160
- contents.Status = (0, smithy_client_1.expectString)(data.status);
2161
- }
1946
+ const doc = (0, smithy_client_1.take)(data, {
1947
+ AppId: [, smithy_client_1.expectString, `appId`],
1948
+ BackendEnvironmentName: [, smithy_client_1.expectString, `backendEnvironmentName`],
1949
+ Error: [, smithy_client_1.expectString, `error`],
1950
+ JobId: [, smithy_client_1.expectString, `jobId`],
1951
+ Operation: [, smithy_client_1.expectString, `operation`],
1952
+ Status: [, smithy_client_1.expectString, `status`],
1953
+ });
1954
+ Object.assign(contents, doc);
2162
1955
  return contents;
2163
1956
  };
2164
1957
  exports.de_UpdateBackendAPICommand = de_UpdateBackendAPICommand;
@@ -2183,10 +1976,9 @@ const de_UpdateBackendAPICommandError = async (output, context) => {
2183
1976
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2184
1977
  default:
2185
1978
  const parsedBody = parsedOutput.body;
2186
- (0, smithy_client_1.throwDefaultError)({
1979
+ return throwDefaultError({
2187
1980
  output,
2188
1981
  parsedBody,
2189
- exceptionCtor: AmplifyBackendServiceException_1.AmplifyBackendServiceException,
2190
1982
  errorCode,
2191
1983
  });
2192
1984
  }
@@ -2195,28 +1987,19 @@ const de_UpdateBackendAuthCommand = async (output, context) => {
2195
1987
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2196
1988
  return de_UpdateBackendAuthCommandError(output, context);
2197
1989
  }
2198
- const contents = map({
1990
+ const contents = (0, smithy_client_1.map)({
2199
1991
  $metadata: deserializeMetadata(output),
2200
1992
  });
2201
1993
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2202
- if (data.appId != null) {
2203
- contents.AppId = (0, smithy_client_1.expectString)(data.appId);
2204
- }
2205
- if (data.backendEnvironmentName != null) {
2206
- contents.BackendEnvironmentName = (0, smithy_client_1.expectString)(data.backendEnvironmentName);
2207
- }
2208
- if (data.error != null) {
2209
- contents.Error = (0, smithy_client_1.expectString)(data.error);
2210
- }
2211
- if (data.jobId != null) {
2212
- contents.JobId = (0, smithy_client_1.expectString)(data.jobId);
2213
- }
2214
- if (data.operation != null) {
2215
- contents.Operation = (0, smithy_client_1.expectString)(data.operation);
2216
- }
2217
- if (data.status != null) {
2218
- contents.Status = (0, smithy_client_1.expectString)(data.status);
2219
- }
1994
+ const doc = (0, smithy_client_1.take)(data, {
1995
+ AppId: [, smithy_client_1.expectString, `appId`],
1996
+ BackendEnvironmentName: [, smithy_client_1.expectString, `backendEnvironmentName`],
1997
+ Error: [, smithy_client_1.expectString, `error`],
1998
+ JobId: [, smithy_client_1.expectString, `jobId`],
1999
+ Operation: [, smithy_client_1.expectString, `operation`],
2000
+ Status: [, smithy_client_1.expectString, `status`],
2001
+ });
2002
+ Object.assign(contents, doc);
2220
2003
  return contents;
2221
2004
  };
2222
2005
  exports.de_UpdateBackendAuthCommand = de_UpdateBackendAuthCommand;
@@ -2241,10 +2024,9 @@ const de_UpdateBackendAuthCommandError = async (output, context) => {
2241
2024
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2242
2025
  default:
2243
2026
  const parsedBody = parsedOutput.body;
2244
- (0, smithy_client_1.throwDefaultError)({
2027
+ return throwDefaultError({
2245
2028
  output,
2246
2029
  parsedBody,
2247
- exceptionCtor: AmplifyBackendServiceException_1.AmplifyBackendServiceException,
2248
2030
  errorCode,
2249
2031
  });
2250
2032
  }
@@ -2253,22 +2035,17 @@ const de_UpdateBackendConfigCommand = async (output, context) => {
2253
2035
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2254
2036
  return de_UpdateBackendConfigCommandError(output, context);
2255
2037
  }
2256
- const contents = map({
2038
+ const contents = (0, smithy_client_1.map)({
2257
2039
  $metadata: deserializeMetadata(output),
2258
2040
  });
2259
2041
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2260
- if (data.appId != null) {
2261
- contents.AppId = (0, smithy_client_1.expectString)(data.appId);
2262
- }
2263
- if (data.backendManagerAppId != null) {
2264
- contents.BackendManagerAppId = (0, smithy_client_1.expectString)(data.backendManagerAppId);
2265
- }
2266
- if (data.error != null) {
2267
- contents.Error = (0, smithy_client_1.expectString)(data.error);
2268
- }
2269
- if (data.loginAuthConfig != null) {
2270
- contents.LoginAuthConfig = de_LoginAuthConfigReqObj(data.loginAuthConfig, context);
2271
- }
2042
+ const doc = (0, smithy_client_1.take)(data, {
2043
+ AppId: [, smithy_client_1.expectString, `appId`],
2044
+ BackendManagerAppId: [, smithy_client_1.expectString, `backendManagerAppId`],
2045
+ Error: [, smithy_client_1.expectString, `error`],
2046
+ LoginAuthConfig: [, (_) => de_LoginAuthConfigReqObj(_, context), `loginAuthConfig`],
2047
+ });
2048
+ Object.assign(contents, doc);
2272
2049
  return contents;
2273
2050
  };
2274
2051
  exports.de_UpdateBackendConfigCommand = de_UpdateBackendConfigCommand;
@@ -2293,10 +2070,9 @@ const de_UpdateBackendConfigCommandError = async (output, context) => {
2293
2070
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2294
2071
  default:
2295
2072
  const parsedBody = parsedOutput.body;
2296
- (0, smithy_client_1.throwDefaultError)({
2073
+ return throwDefaultError({
2297
2074
  output,
2298
2075
  parsedBody,
2299
- exceptionCtor: AmplifyBackendServiceException_1.AmplifyBackendServiceException,
2300
2076
  errorCode,
2301
2077
  });
2302
2078
  }
@@ -2305,34 +2081,21 @@ const de_UpdateBackendJobCommand = async (output, context) => {
2305
2081
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2306
2082
  return de_UpdateBackendJobCommandError(output, context);
2307
2083
  }
2308
- const contents = map({
2084
+ const contents = (0, smithy_client_1.map)({
2309
2085
  $metadata: deserializeMetadata(output),
2310
2086
  });
2311
2087
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2312
- if (data.appId != null) {
2313
- contents.AppId = (0, smithy_client_1.expectString)(data.appId);
2314
- }
2315
- if (data.backendEnvironmentName != null) {
2316
- contents.BackendEnvironmentName = (0, smithy_client_1.expectString)(data.backendEnvironmentName);
2317
- }
2318
- if (data.createTime != null) {
2319
- contents.CreateTime = (0, smithy_client_1.expectString)(data.createTime);
2320
- }
2321
- if (data.error != null) {
2322
- contents.Error = (0, smithy_client_1.expectString)(data.error);
2323
- }
2324
- if (data.jobId != null) {
2325
- contents.JobId = (0, smithy_client_1.expectString)(data.jobId);
2326
- }
2327
- if (data.operation != null) {
2328
- contents.Operation = (0, smithy_client_1.expectString)(data.operation);
2329
- }
2330
- if (data.status != null) {
2331
- contents.Status = (0, smithy_client_1.expectString)(data.status);
2332
- }
2333
- if (data.updateTime != null) {
2334
- contents.UpdateTime = (0, smithy_client_1.expectString)(data.updateTime);
2335
- }
2088
+ const doc = (0, smithy_client_1.take)(data, {
2089
+ AppId: [, smithy_client_1.expectString, `appId`],
2090
+ BackendEnvironmentName: [, smithy_client_1.expectString, `backendEnvironmentName`],
2091
+ CreateTime: [, smithy_client_1.expectString, `createTime`],
2092
+ Error: [, smithy_client_1.expectString, `error`],
2093
+ JobId: [, smithy_client_1.expectString, `jobId`],
2094
+ Operation: [, smithy_client_1.expectString, `operation`],
2095
+ Status: [, smithy_client_1.expectString, `status`],
2096
+ UpdateTime: [, smithy_client_1.expectString, `updateTime`],
2097
+ });
2098
+ Object.assign(contents, doc);
2336
2099
  return contents;
2337
2100
  };
2338
2101
  exports.de_UpdateBackendJobCommand = de_UpdateBackendJobCommand;
@@ -2357,10 +2120,9 @@ const de_UpdateBackendJobCommandError = async (output, context) => {
2357
2120
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2358
2121
  default:
2359
2122
  const parsedBody = parsedOutput.body;
2360
- (0, smithy_client_1.throwDefaultError)({
2123
+ return throwDefaultError({
2361
2124
  output,
2362
2125
  parsedBody,
2363
- exceptionCtor: AmplifyBackendServiceException_1.AmplifyBackendServiceException,
2364
2126
  errorCode,
2365
2127
  });
2366
2128
  }
@@ -2369,22 +2131,17 @@ const de_UpdateBackendStorageCommand = async (output, context) => {
2369
2131
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2370
2132
  return de_UpdateBackendStorageCommandError(output, context);
2371
2133
  }
2372
- const contents = map({
2134
+ const contents = (0, smithy_client_1.map)({
2373
2135
  $metadata: deserializeMetadata(output),
2374
2136
  });
2375
2137
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2376
- if (data.appId != null) {
2377
- contents.AppId = (0, smithy_client_1.expectString)(data.appId);
2378
- }
2379
- if (data.backendEnvironmentName != null) {
2380
- contents.BackendEnvironmentName = (0, smithy_client_1.expectString)(data.backendEnvironmentName);
2381
- }
2382
- if (data.jobId != null) {
2383
- contents.JobId = (0, smithy_client_1.expectString)(data.jobId);
2384
- }
2385
- if (data.status != null) {
2386
- contents.Status = (0, smithy_client_1.expectString)(data.status);
2387
- }
2138
+ const doc = (0, smithy_client_1.take)(data, {
2139
+ AppId: [, smithy_client_1.expectString, `appId`],
2140
+ BackendEnvironmentName: [, smithy_client_1.expectString, `backendEnvironmentName`],
2141
+ JobId: [, smithy_client_1.expectString, `jobId`],
2142
+ Status: [, smithy_client_1.expectString, `status`],
2143
+ });
2144
+ Object.assign(contents, doc);
2388
2145
  return contents;
2389
2146
  };
2390
2147
  exports.de_UpdateBackendStorageCommand = de_UpdateBackendStorageCommand;
@@ -2409,21 +2166,21 @@ const de_UpdateBackendStorageCommandError = async (output, context) => {
2409
2166
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2410
2167
  default:
2411
2168
  const parsedBody = parsedOutput.body;
2412
- (0, smithy_client_1.throwDefaultError)({
2169
+ return throwDefaultError({
2413
2170
  output,
2414
2171
  parsedBody,
2415
- exceptionCtor: AmplifyBackendServiceException_1.AmplifyBackendServiceException,
2416
2172
  errorCode,
2417
2173
  });
2418
2174
  }
2419
2175
  };
2420
- const map = smithy_client_1.map;
2176
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(AmplifyBackendServiceException_1.AmplifyBackendServiceException);
2421
2177
  const de_BadRequestExceptionRes = async (parsedOutput, context) => {
2422
- const contents = map({});
2178
+ const contents = (0, smithy_client_1.map)({});
2423
2179
  const data = parsedOutput.body;
2424
- if (data.message != null) {
2425
- contents.Message = (0, smithy_client_1.expectString)(data.message);
2426
- }
2180
+ const doc = (0, smithy_client_1.take)(data, {
2181
+ Message: [, smithy_client_1.expectString, `message`],
2182
+ });
2183
+ Object.assign(contents, doc);
2427
2184
  const exception = new models_0_1.BadRequestException({
2428
2185
  $metadata: deserializeMetadata(parsedOutput),
2429
2186
  ...contents,
@@ -2431,11 +2188,12 @@ const de_BadRequestExceptionRes = async (parsedOutput, context) => {
2431
2188
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2432
2189
  };
2433
2190
  const de_GatewayTimeoutExceptionRes = async (parsedOutput, context) => {
2434
- const contents = map({});
2191
+ const contents = (0, smithy_client_1.map)({});
2435
2192
  const data = parsedOutput.body;
2436
- if (data.message != null) {
2437
- contents.Message = (0, smithy_client_1.expectString)(data.message);
2438
- }
2193
+ const doc = (0, smithy_client_1.take)(data, {
2194
+ Message: [, smithy_client_1.expectString, `message`],
2195
+ });
2196
+ Object.assign(contents, doc);
2439
2197
  const exception = new models_0_1.GatewayTimeoutException({
2440
2198
  $metadata: deserializeMetadata(parsedOutput),
2441
2199
  ...contents,
@@ -2443,14 +2201,13 @@ const de_GatewayTimeoutExceptionRes = async (parsedOutput, context) => {
2443
2201
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2444
2202
  };
2445
2203
  const de_NotFoundExceptionRes = async (parsedOutput, context) => {
2446
- const contents = map({});
2204
+ const contents = (0, smithy_client_1.map)({});
2447
2205
  const data = parsedOutput.body;
2448
- if (data.message != null) {
2449
- contents.Message = (0, smithy_client_1.expectString)(data.message);
2450
- }
2451
- if (data.resourceType != null) {
2452
- contents.ResourceType = (0, smithy_client_1.expectString)(data.resourceType);
2453
- }
2206
+ const doc = (0, smithy_client_1.take)(data, {
2207
+ Message: [, smithy_client_1.expectString, `message`],
2208
+ ResourceType: [, smithy_client_1.expectString, `resourceType`],
2209
+ });
2210
+ Object.assign(contents, doc);
2454
2211
  const exception = new models_0_1.NotFoundException({
2455
2212
  $metadata: deserializeMetadata(parsedOutput),
2456
2213
  ...contents,
@@ -2458,14 +2215,13 @@ const de_NotFoundExceptionRes = async (parsedOutput, context) => {
2458
2215
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2459
2216
  };
2460
2217
  const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
2461
- const contents = map({});
2218
+ const contents = (0, smithy_client_1.map)({});
2462
2219
  const data = parsedOutput.body;
2463
- if (data.limitType != null) {
2464
- contents.LimitType = (0, smithy_client_1.expectString)(data.limitType);
2465
- }
2466
- if (data.message != null) {
2467
- contents.Message = (0, smithy_client_1.expectString)(data.message);
2468
- }
2220
+ const doc = (0, smithy_client_1.take)(data, {
2221
+ LimitType: [, smithy_client_1.expectString, `limitType`],
2222
+ Message: [, smithy_client_1.expectString, `message`],
2223
+ });
2224
+ Object.assign(contents, doc);
2469
2225
  const exception = new models_0_1.TooManyRequestsException({
2470
2226
  $metadata: deserializeMetadata(parsedOutput),
2471
2227
  ...contents,
@@ -2473,178 +2229,131 @@ const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
2473
2229
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2474
2230
  };
2475
2231
  const se_BackendAPIAppSyncAuthSettings = (input, context) => {
2476
- return {
2477
- ...(input.CognitoUserPoolId != null && { cognitoUserPoolId: input.CognitoUserPoolId }),
2478
- ...(input.Description != null && { description: input.Description }),
2479
- ...(input.ExpirationTime != null && { expirationTime: (0, smithy_client_1.serializeFloat)(input.ExpirationTime) }),
2480
- ...(input.OpenIDAuthTTL != null && { openIDAuthTTL: input.OpenIDAuthTTL }),
2481
- ...(input.OpenIDClientId != null && { openIDClientId: input.OpenIDClientId }),
2482
- ...(input.OpenIDIatTTL != null && { openIDIatTTL: input.OpenIDIatTTL }),
2483
- ...(input.OpenIDIssueURL != null && { openIDIssueURL: input.OpenIDIssueURL }),
2484
- ...(input.OpenIDProviderName != null && { openIDProviderName: input.OpenIDProviderName }),
2485
- };
2232
+ return (0, smithy_client_1.take)(input, {
2233
+ cognitoUserPoolId: [, , `CognitoUserPoolId`],
2234
+ description: [, , `Description`],
2235
+ expirationTime: [, smithy_client_1.serializeFloat, `ExpirationTime`],
2236
+ openIDAuthTTL: [, , `OpenIDAuthTTL`],
2237
+ openIDClientId: [, , `OpenIDClientId`],
2238
+ openIDIatTTL: [, , `OpenIDIatTTL`],
2239
+ openIDIssueURL: [, , `OpenIDIssueURL`],
2240
+ openIDProviderName: [, , `OpenIDProviderName`],
2241
+ });
2486
2242
  };
2487
2243
  const se_BackendAPIAuthType = (input, context) => {
2488
- return {
2489
- ...(input.Mode != null && { mode: input.Mode }),
2490
- ...(input.Settings != null && { settings: se_BackendAPIAppSyncAuthSettings(input.Settings, context) }),
2491
- };
2244
+ return (0, smithy_client_1.take)(input, {
2245
+ mode: [, , `Mode`],
2246
+ settings: [, (_) => se_BackendAPIAppSyncAuthSettings(_, context), `Settings`],
2247
+ });
2492
2248
  };
2493
2249
  const se_BackendAPIConflictResolution = (input, context) => {
2494
- return {
2495
- ...(input.ResolutionStrategy != null && { resolutionStrategy: input.ResolutionStrategy }),
2496
- };
2250
+ return (0, smithy_client_1.take)(input, {
2251
+ resolutionStrategy: [, , `ResolutionStrategy`],
2252
+ });
2497
2253
  };
2498
2254
  const se_BackendAPIResourceConfig = (input, context) => {
2499
- return {
2500
- ...(input.AdditionalAuthTypes != null && {
2501
- additionalAuthTypes: se_ListOfBackendAPIAuthType(input.AdditionalAuthTypes, context),
2502
- }),
2503
- ...(input.ApiName != null && { apiName: input.ApiName }),
2504
- ...(input.ConflictResolution != null && {
2505
- conflictResolution: se_BackendAPIConflictResolution(input.ConflictResolution, context),
2506
- }),
2507
- ...(input.DefaultAuthType != null && { defaultAuthType: se_BackendAPIAuthType(input.DefaultAuthType, context) }),
2508
- ...(input.Service != null && { service: input.Service }),
2509
- ...(input.TransformSchema != null && { transformSchema: input.TransformSchema }),
2510
- };
2255
+ return (0, smithy_client_1.take)(input, {
2256
+ additionalAuthTypes: [, (_) => se_ListOfBackendAPIAuthType(_, context), `AdditionalAuthTypes`],
2257
+ apiName: [, , `ApiName`],
2258
+ conflictResolution: [, (_) => se_BackendAPIConflictResolution(_, context), `ConflictResolution`],
2259
+ defaultAuthType: [, (_) => se_BackendAPIAuthType(_, context), `DefaultAuthType`],
2260
+ service: [, , `Service`],
2261
+ transformSchema: [, , `TransformSchema`],
2262
+ });
2511
2263
  };
2512
2264
  const se_BackendAuthAppleProviderConfig = (input, context) => {
2513
- return {
2514
- ...(input.ClientId != null && { client_id: input.ClientId }),
2515
- ...(input.KeyId != null && { key_id: input.KeyId }),
2516
- ...(input.PrivateKey != null && { private_key: input.PrivateKey }),
2517
- ...(input.TeamId != null && { team_id: input.TeamId }),
2518
- };
2265
+ return (0, smithy_client_1.take)(input, {
2266
+ client_id: [, , `ClientId`],
2267
+ key_id: [, , `KeyId`],
2268
+ private_key: [, , `PrivateKey`],
2269
+ team_id: [, , `TeamId`],
2270
+ });
2519
2271
  };
2520
2272
  const se_BackendAuthSocialProviderConfig = (input, context) => {
2521
- return {
2522
- ...(input.ClientId != null && { client_id: input.ClientId }),
2523
- ...(input.ClientSecret != null && { client_secret: input.ClientSecret }),
2524
- };
2273
+ return (0, smithy_client_1.take)(input, {
2274
+ client_id: [, , `ClientId`],
2275
+ client_secret: [, , `ClientSecret`],
2276
+ });
2525
2277
  };
2526
2278
  const se_BackendStoragePermissions = (input, context) => {
2527
- return {
2528
- ...(input.Authenticated != null && { authenticated: se_ListOfAuthenticatedElement(input.Authenticated, context) }),
2529
- ...(input.UnAuthenticated != null && {
2530
- unAuthenticated: se_ListOfUnAuthenticatedElement(input.UnAuthenticated, context),
2531
- }),
2532
- };
2279
+ return (0, smithy_client_1.take)(input, {
2280
+ authenticated: [, smithy_client_1._json, `Authenticated`],
2281
+ unAuthenticated: [, smithy_client_1._json, `UnAuthenticated`],
2282
+ });
2533
2283
  };
2534
2284
  const se_CreateBackendAuthForgotPasswordConfig = (input, context) => {
2535
- return {
2536
- ...(input.DeliveryMethod != null && { deliveryMethod: input.DeliveryMethod }),
2537
- ...(input.EmailSettings != null && { emailSettings: se_EmailSettings(input.EmailSettings, context) }),
2538
- ...(input.SmsSettings != null && { smsSettings: se_SmsSettings(input.SmsSettings, context) }),
2539
- };
2285
+ return (0, smithy_client_1.take)(input, {
2286
+ deliveryMethod: [, , `DeliveryMethod`],
2287
+ emailSettings: [, (_) => se_EmailSettings(_, context), `EmailSettings`],
2288
+ smsSettings: [, (_) => se_SmsSettings(_, context), `SmsSettings`],
2289
+ });
2540
2290
  };
2541
2291
  const se_CreateBackendAuthIdentityPoolConfig = (input, context) => {
2542
- return {
2543
- ...(input.IdentityPoolName != null && { identityPoolName: input.IdentityPoolName }),
2544
- ...(input.UnauthenticatedLogin != null && { unauthenticatedLogin: input.UnauthenticatedLogin }),
2545
- };
2292
+ return (0, smithy_client_1.take)(input, {
2293
+ identityPoolName: [, , `IdentityPoolName`],
2294
+ unauthenticatedLogin: [, , `UnauthenticatedLogin`],
2295
+ });
2546
2296
  };
2547
2297
  const se_CreateBackendAuthMFAConfig = (input, context) => {
2548
- return {
2549
- ...(input.MFAMode != null && { MFAMode: input.MFAMode }),
2550
- ...(input.Settings != null && { settings: se_Settings(input.Settings, context) }),
2551
- };
2298
+ return (0, smithy_client_1.take)(input, {
2299
+ MFAMode: [],
2300
+ settings: [, (_) => se_Settings(_, context), `Settings`],
2301
+ });
2552
2302
  };
2553
2303
  const se_CreateBackendAuthOAuthConfig = (input, context) => {
2554
- return {
2555
- ...(input.DomainPrefix != null && { domainPrefix: input.DomainPrefix }),
2556
- ...(input.OAuthGrantType != null && { oAuthGrantType: input.OAuthGrantType }),
2557
- ...(input.OAuthScopes != null && { oAuthScopes: se_ListOfOAuthScopesElement(input.OAuthScopes, context) }),
2558
- ...(input.RedirectSignInURIs != null && {
2559
- redirectSignInURIs: se_ListOf__string(input.RedirectSignInURIs, context),
2560
- }),
2561
- ...(input.RedirectSignOutURIs != null && {
2562
- redirectSignOutURIs: se_ListOf__string(input.RedirectSignOutURIs, context),
2563
- }),
2564
- ...(input.SocialProviderSettings != null && {
2565
- socialProviderSettings: se_SocialProviderSettings(input.SocialProviderSettings, context),
2566
- }),
2567
- };
2304
+ return (0, smithy_client_1.take)(input, {
2305
+ domainPrefix: [, , `DomainPrefix`],
2306
+ oAuthGrantType: [, , `OAuthGrantType`],
2307
+ oAuthScopes: [, smithy_client_1._json, `OAuthScopes`],
2308
+ redirectSignInURIs: [, smithy_client_1._json, `RedirectSignInURIs`],
2309
+ redirectSignOutURIs: [, smithy_client_1._json, `RedirectSignOutURIs`],
2310
+ socialProviderSettings: [, (_) => se_SocialProviderSettings(_, context), `SocialProviderSettings`],
2311
+ });
2568
2312
  };
2569
2313
  const se_CreateBackendAuthPasswordPolicyConfig = (input, context) => {
2570
- return {
2571
- ...(input.AdditionalConstraints != null && {
2572
- additionalConstraints: se_ListOfAdditionalConstraintsElement(input.AdditionalConstraints, context),
2573
- }),
2574
- ...(input.MinimumLength != null && { minimumLength: (0, smithy_client_1.serializeFloat)(input.MinimumLength) }),
2575
- };
2314
+ return (0, smithy_client_1.take)(input, {
2315
+ additionalConstraints: [, smithy_client_1._json, `AdditionalConstraints`],
2316
+ minimumLength: [, smithy_client_1.serializeFloat, `MinimumLength`],
2317
+ });
2576
2318
  };
2577
2319
  const se_CreateBackendAuthResourceConfig = (input, context) => {
2578
- return {
2579
- ...(input.AuthResources != null && { authResources: input.AuthResources }),
2580
- ...(input.IdentityPoolConfigs != null && {
2581
- identityPoolConfigs: se_CreateBackendAuthIdentityPoolConfig(input.IdentityPoolConfigs, context),
2582
- }),
2583
- ...(input.Service != null && { service: input.Service }),
2584
- ...(input.UserPoolConfigs != null && {
2585
- userPoolConfigs: se_CreateBackendAuthUserPoolConfig(input.UserPoolConfigs, context),
2586
- }),
2587
- };
2320
+ return (0, smithy_client_1.take)(input, {
2321
+ authResources: [, , `AuthResources`],
2322
+ identityPoolConfigs: [, (_) => se_CreateBackendAuthIdentityPoolConfig(_, context), `IdentityPoolConfigs`],
2323
+ service: [, , `Service`],
2324
+ userPoolConfigs: [, (_) => se_CreateBackendAuthUserPoolConfig(_, context), `UserPoolConfigs`],
2325
+ });
2588
2326
  };
2589
2327
  const se_CreateBackendAuthUserPoolConfig = (input, context) => {
2590
- return {
2591
- ...(input.ForgotPassword != null && {
2592
- forgotPassword: se_CreateBackendAuthForgotPasswordConfig(input.ForgotPassword, context),
2593
- }),
2594
- ...(input.Mfa != null && { mfa: se_CreateBackendAuthMFAConfig(input.Mfa, context) }),
2595
- ...(input.OAuth != null && { oAuth: se_CreateBackendAuthOAuthConfig(input.OAuth, context) }),
2596
- ...(input.PasswordPolicy != null && {
2597
- passwordPolicy: se_CreateBackendAuthPasswordPolicyConfig(input.PasswordPolicy, context),
2598
- }),
2599
- ...(input.RequiredSignUpAttributes != null && {
2600
- requiredSignUpAttributes: se_ListOfRequiredSignUpAttributesElement(input.RequiredSignUpAttributes, context),
2601
- }),
2602
- ...(input.SignInMethod != null && { signInMethod: input.SignInMethod }),
2603
- ...(input.UserPoolName != null && { userPoolName: input.UserPoolName }),
2604
- ...(input.VerificationMessage != null && {
2605
- verificationMessage: se_CreateBackendAuthVerificationMessageConfig(input.VerificationMessage, context),
2606
- }),
2607
- };
2328
+ return (0, smithy_client_1.take)(input, {
2329
+ forgotPassword: [, (_) => se_CreateBackendAuthForgotPasswordConfig(_, context), `ForgotPassword`],
2330
+ mfa: [, (_) => se_CreateBackendAuthMFAConfig(_, context), `Mfa`],
2331
+ oAuth: [, (_) => se_CreateBackendAuthOAuthConfig(_, context), `OAuth`],
2332
+ passwordPolicy: [, (_) => se_CreateBackendAuthPasswordPolicyConfig(_, context), `PasswordPolicy`],
2333
+ requiredSignUpAttributes: [, smithy_client_1._json, `RequiredSignUpAttributes`],
2334
+ signInMethod: [, , `SignInMethod`],
2335
+ userPoolName: [, , `UserPoolName`],
2336
+ verificationMessage: [, (_) => se_CreateBackendAuthVerificationMessageConfig(_, context), `VerificationMessage`],
2337
+ });
2608
2338
  };
2609
2339
  const se_CreateBackendAuthVerificationMessageConfig = (input, context) => {
2610
- return {
2611
- ...(input.DeliveryMethod != null && { deliveryMethod: input.DeliveryMethod }),
2612
- ...(input.EmailSettings != null && { emailSettings: se_EmailSettings(input.EmailSettings, context) }),
2613
- ...(input.SmsSettings != null && { smsSettings: se_SmsSettings(input.SmsSettings, context) }),
2614
- };
2615
- };
2616
- const se_CreateBackendStorageResourceConfig = (input, context) => {
2617
- return {
2618
- ...(input.BucketName != null && { bucketName: input.BucketName }),
2619
- ...(input.Permissions != null && { permissions: se_BackendStoragePermissions(input.Permissions, context) }),
2620
- ...(input.ServiceName != null && { serviceName: input.ServiceName }),
2621
- };
2622
- };
2623
- const se_EmailSettings = (input, context) => {
2624
- return {
2625
- ...(input.EmailMessage != null && { emailMessage: input.EmailMessage }),
2626
- ...(input.EmailSubject != null && { emailSubject: input.EmailSubject }),
2627
- };
2628
- };
2629
- const se_ListOf__string = (input, context) => {
2630
- return input
2631
- .filter((e) => e != null)
2632
- .map((entry) => {
2633
- return entry;
2340
+ return (0, smithy_client_1.take)(input, {
2341
+ deliveryMethod: [, , `DeliveryMethod`],
2342
+ emailSettings: [, (_) => se_EmailSettings(_, context), `EmailSettings`],
2343
+ smsSettings: [, (_) => se_SmsSettings(_, context), `SmsSettings`],
2634
2344
  });
2635
2345
  };
2636
- const se_ListOfAdditionalConstraintsElement = (input, context) => {
2637
- return input
2638
- .filter((e) => e != null)
2639
- .map((entry) => {
2640
- return entry;
2346
+ const se_CreateBackendStorageResourceConfig = (input, context) => {
2347
+ return (0, smithy_client_1.take)(input, {
2348
+ bucketName: [, , `BucketName`],
2349
+ permissions: [, (_) => se_BackendStoragePermissions(_, context), `Permissions`],
2350
+ serviceName: [, , `ServiceName`],
2641
2351
  });
2642
2352
  };
2643
- const se_ListOfAuthenticatedElement = (input, context) => {
2644
- return input
2645
- .filter((e) => e != null)
2646
- .map((entry) => {
2647
- return entry;
2353
+ const se_EmailSettings = (input, context) => {
2354
+ return (0, smithy_client_1.take)(input, {
2355
+ emailMessage: [, , `EmailMessage`],
2356
+ emailSubject: [, , `EmailSubject`],
2648
2357
  });
2649
2358
  };
2650
2359
  const se_ListOfBackendAPIAuthType = (input, context) => {
@@ -2654,347 +2363,242 @@ const se_ListOfBackendAPIAuthType = (input, context) => {
2654
2363
  return se_BackendAPIAuthType(entry, context);
2655
2364
  });
2656
2365
  };
2657
- const se_ListOfMfaTypesElement = (input, context) => {
2658
- return input
2659
- .filter((e) => e != null)
2660
- .map((entry) => {
2661
- return entry;
2662
- });
2663
- };
2664
- const se_ListOfOAuthScopesElement = (input, context) => {
2665
- return input
2666
- .filter((e) => e != null)
2667
- .map((entry) => {
2668
- return entry;
2669
- });
2670
- };
2671
- const se_ListOfRequiredSignUpAttributesElement = (input, context) => {
2672
- return input
2673
- .filter((e) => e != null)
2674
- .map((entry) => {
2675
- return entry;
2676
- });
2677
- };
2678
- const se_ListOfUnAuthenticatedElement = (input, context) => {
2679
- return input
2680
- .filter((e) => e != null)
2681
- .map((entry) => {
2682
- return entry;
2683
- });
2684
- };
2685
2366
  const se_LoginAuthConfigReqObj = (input, context) => {
2686
- return {
2687
- ...(input.AwsCognitoIdentityPoolId != null && { aws_cognito_identity_pool_id: input.AwsCognitoIdentityPoolId }),
2688
- ...(input.AwsCognitoRegion != null && { aws_cognito_region: input.AwsCognitoRegion }),
2689
- ...(input.AwsUserPoolsId != null && { aws_user_pools_id: input.AwsUserPoolsId }),
2690
- ...(input.AwsUserPoolsWebClientId != null && { aws_user_pools_web_client_id: input.AwsUserPoolsWebClientId }),
2691
- };
2692
- };
2693
- const se_ResourceConfig = (input, context) => {
2694
- return {};
2367
+ return (0, smithy_client_1.take)(input, {
2368
+ aws_cognito_identity_pool_id: [, , `AwsCognitoIdentityPoolId`],
2369
+ aws_cognito_region: [, , `AwsCognitoRegion`],
2370
+ aws_user_pools_id: [, , `AwsUserPoolsId`],
2371
+ aws_user_pools_web_client_id: [, , `AwsUserPoolsWebClientId`],
2372
+ });
2695
2373
  };
2696
2374
  const se_Settings = (input, context) => {
2697
- return {
2698
- ...(input.MfaTypes != null && { mfaTypes: se_ListOfMfaTypesElement(input.MfaTypes, context) }),
2699
- ...(input.SmsMessage != null && { smsMessage: input.SmsMessage }),
2700
- };
2375
+ return (0, smithy_client_1.take)(input, {
2376
+ mfaTypes: [, smithy_client_1._json, `MfaTypes`],
2377
+ smsMessage: [, , `SmsMessage`],
2378
+ });
2701
2379
  };
2702
2380
  const se_SmsSettings = (input, context) => {
2703
- return {
2704
- ...(input.SmsMessage != null && { smsMessage: input.SmsMessage }),
2705
- };
2381
+ return (0, smithy_client_1.take)(input, {
2382
+ smsMessage: [, , `SmsMessage`],
2383
+ });
2706
2384
  };
2707
2385
  const se_SocialProviderSettings = (input, context) => {
2708
- return {
2709
- ...(input.Facebook != null && { Facebook: se_BackendAuthSocialProviderConfig(input.Facebook, context) }),
2710
- ...(input.Google != null && { Google: se_BackendAuthSocialProviderConfig(input.Google, context) }),
2711
- ...(input.LoginWithAmazon != null && {
2712
- LoginWithAmazon: se_BackendAuthSocialProviderConfig(input.LoginWithAmazon, context),
2713
- }),
2714
- ...(input.SignInWithApple != null && {
2715
- SignInWithApple: se_BackendAuthAppleProviderConfig(input.SignInWithApple, context),
2716
- }),
2717
- };
2386
+ return (0, smithy_client_1.take)(input, {
2387
+ Facebook: (_) => se_BackendAuthSocialProviderConfig(_, context),
2388
+ Google: (_) => se_BackendAuthSocialProviderConfig(_, context),
2389
+ LoginWithAmazon: (_) => se_BackendAuthSocialProviderConfig(_, context),
2390
+ SignInWithApple: (_) => se_BackendAuthAppleProviderConfig(_, context),
2391
+ });
2718
2392
  };
2719
2393
  const se_UpdateBackendAuthForgotPasswordConfig = (input, context) => {
2720
- return {
2721
- ...(input.DeliveryMethod != null && { deliveryMethod: input.DeliveryMethod }),
2722
- ...(input.EmailSettings != null && { emailSettings: se_EmailSettings(input.EmailSettings, context) }),
2723
- ...(input.SmsSettings != null && { smsSettings: se_SmsSettings(input.SmsSettings, context) }),
2724
- };
2394
+ return (0, smithy_client_1.take)(input, {
2395
+ deliveryMethod: [, , `DeliveryMethod`],
2396
+ emailSettings: [, (_) => se_EmailSettings(_, context), `EmailSettings`],
2397
+ smsSettings: [, (_) => se_SmsSettings(_, context), `SmsSettings`],
2398
+ });
2725
2399
  };
2726
2400
  const se_UpdateBackendAuthIdentityPoolConfig = (input, context) => {
2727
- return {
2728
- ...(input.UnauthenticatedLogin != null && { unauthenticatedLogin: input.UnauthenticatedLogin }),
2729
- };
2401
+ return (0, smithy_client_1.take)(input, {
2402
+ unauthenticatedLogin: [, , `UnauthenticatedLogin`],
2403
+ });
2730
2404
  };
2731
2405
  const se_UpdateBackendAuthMFAConfig = (input, context) => {
2732
- return {
2733
- ...(input.MFAMode != null && { MFAMode: input.MFAMode }),
2734
- ...(input.Settings != null && { settings: se_Settings(input.Settings, context) }),
2735
- };
2406
+ return (0, smithy_client_1.take)(input, {
2407
+ MFAMode: [],
2408
+ settings: [, (_) => se_Settings(_, context), `Settings`],
2409
+ });
2736
2410
  };
2737
2411
  const se_UpdateBackendAuthOAuthConfig = (input, context) => {
2738
- return {
2739
- ...(input.DomainPrefix != null && { domainPrefix: input.DomainPrefix }),
2740
- ...(input.OAuthGrantType != null && { oAuthGrantType: input.OAuthGrantType }),
2741
- ...(input.OAuthScopes != null && { oAuthScopes: se_ListOfOAuthScopesElement(input.OAuthScopes, context) }),
2742
- ...(input.RedirectSignInURIs != null && {
2743
- redirectSignInURIs: se_ListOf__string(input.RedirectSignInURIs, context),
2744
- }),
2745
- ...(input.RedirectSignOutURIs != null && {
2746
- redirectSignOutURIs: se_ListOf__string(input.RedirectSignOutURIs, context),
2747
- }),
2748
- ...(input.SocialProviderSettings != null && {
2749
- socialProviderSettings: se_SocialProviderSettings(input.SocialProviderSettings, context),
2750
- }),
2751
- };
2412
+ return (0, smithy_client_1.take)(input, {
2413
+ domainPrefix: [, , `DomainPrefix`],
2414
+ oAuthGrantType: [, , `OAuthGrantType`],
2415
+ oAuthScopes: [, smithy_client_1._json, `OAuthScopes`],
2416
+ redirectSignInURIs: [, smithy_client_1._json, `RedirectSignInURIs`],
2417
+ redirectSignOutURIs: [, smithy_client_1._json, `RedirectSignOutURIs`],
2418
+ socialProviderSettings: [, (_) => se_SocialProviderSettings(_, context), `SocialProviderSettings`],
2419
+ });
2752
2420
  };
2753
2421
  const se_UpdateBackendAuthPasswordPolicyConfig = (input, context) => {
2754
- return {
2755
- ...(input.AdditionalConstraints != null && {
2756
- additionalConstraints: se_ListOfAdditionalConstraintsElement(input.AdditionalConstraints, context),
2757
- }),
2758
- ...(input.MinimumLength != null && { minimumLength: (0, smithy_client_1.serializeFloat)(input.MinimumLength) }),
2759
- };
2422
+ return (0, smithy_client_1.take)(input, {
2423
+ additionalConstraints: [, smithy_client_1._json, `AdditionalConstraints`],
2424
+ minimumLength: [, smithy_client_1.serializeFloat, `MinimumLength`],
2425
+ });
2760
2426
  };
2761
2427
  const se_UpdateBackendAuthResourceConfig = (input, context) => {
2762
- return {
2763
- ...(input.AuthResources != null && { authResources: input.AuthResources }),
2764
- ...(input.IdentityPoolConfigs != null && {
2765
- identityPoolConfigs: se_UpdateBackendAuthIdentityPoolConfig(input.IdentityPoolConfigs, context),
2766
- }),
2767
- ...(input.Service != null && { service: input.Service }),
2768
- ...(input.UserPoolConfigs != null && {
2769
- userPoolConfigs: se_UpdateBackendAuthUserPoolConfig(input.UserPoolConfigs, context),
2770
- }),
2771
- };
2428
+ return (0, smithy_client_1.take)(input, {
2429
+ authResources: [, , `AuthResources`],
2430
+ identityPoolConfigs: [, (_) => se_UpdateBackendAuthIdentityPoolConfig(_, context), `IdentityPoolConfigs`],
2431
+ service: [, , `Service`],
2432
+ userPoolConfigs: [, (_) => se_UpdateBackendAuthUserPoolConfig(_, context), `UserPoolConfigs`],
2433
+ });
2772
2434
  };
2773
2435
  const se_UpdateBackendAuthUserPoolConfig = (input, context) => {
2774
- return {
2775
- ...(input.ForgotPassword != null && {
2776
- forgotPassword: se_UpdateBackendAuthForgotPasswordConfig(input.ForgotPassword, context),
2777
- }),
2778
- ...(input.Mfa != null && { mfa: se_UpdateBackendAuthMFAConfig(input.Mfa, context) }),
2779
- ...(input.OAuth != null && { oAuth: se_UpdateBackendAuthOAuthConfig(input.OAuth, context) }),
2780
- ...(input.PasswordPolicy != null && {
2781
- passwordPolicy: se_UpdateBackendAuthPasswordPolicyConfig(input.PasswordPolicy, context),
2782
- }),
2783
- ...(input.VerificationMessage != null && {
2784
- verificationMessage: se_UpdateBackendAuthVerificationMessageConfig(input.VerificationMessage, context),
2785
- }),
2786
- };
2436
+ return (0, smithy_client_1.take)(input, {
2437
+ forgotPassword: [, (_) => se_UpdateBackendAuthForgotPasswordConfig(_, context), `ForgotPassword`],
2438
+ mfa: [, (_) => se_UpdateBackendAuthMFAConfig(_, context), `Mfa`],
2439
+ oAuth: [, (_) => se_UpdateBackendAuthOAuthConfig(_, context), `OAuth`],
2440
+ passwordPolicy: [, (_) => se_UpdateBackendAuthPasswordPolicyConfig(_, context), `PasswordPolicy`],
2441
+ verificationMessage: [, (_) => se_UpdateBackendAuthVerificationMessageConfig(_, context), `VerificationMessage`],
2442
+ });
2787
2443
  };
2788
2444
  const se_UpdateBackendAuthVerificationMessageConfig = (input, context) => {
2789
- return {
2790
- ...(input.DeliveryMethod != null && { deliveryMethod: input.DeliveryMethod }),
2791
- ...(input.EmailSettings != null && { emailSettings: se_EmailSettings(input.EmailSettings, context) }),
2792
- ...(input.SmsSettings != null && { smsSettings: se_SmsSettings(input.SmsSettings, context) }),
2793
- };
2445
+ return (0, smithy_client_1.take)(input, {
2446
+ deliveryMethod: [, , `DeliveryMethod`],
2447
+ emailSettings: [, (_) => se_EmailSettings(_, context), `EmailSettings`],
2448
+ smsSettings: [, (_) => se_SmsSettings(_, context), `SmsSettings`],
2449
+ });
2794
2450
  };
2795
2451
  const se_UpdateBackendStorageResourceConfig = (input, context) => {
2796
- return {
2797
- ...(input.Permissions != null && { permissions: se_BackendStoragePermissions(input.Permissions, context) }),
2798
- ...(input.ServiceName != null && { serviceName: input.ServiceName }),
2799
- };
2452
+ return (0, smithy_client_1.take)(input, {
2453
+ permissions: [, (_) => se_BackendStoragePermissions(_, context), `Permissions`],
2454
+ serviceName: [, , `ServiceName`],
2455
+ });
2800
2456
  };
2801
2457
  const de_BackendAPIAppSyncAuthSettings = (output, context) => {
2802
- return {
2803
- CognitoUserPoolId: (0, smithy_client_1.expectString)(output.cognitoUserPoolId),
2804
- Description: (0, smithy_client_1.expectString)(output.description),
2805
- ExpirationTime: (0, smithy_client_1.limitedParseDouble)(output.expirationTime),
2806
- OpenIDAuthTTL: (0, smithy_client_1.expectString)(output.openIDAuthTTL),
2807
- OpenIDClientId: (0, smithy_client_1.expectString)(output.openIDClientId),
2808
- OpenIDIatTTL: (0, smithy_client_1.expectString)(output.openIDIatTTL),
2809
- OpenIDIssueURL: (0, smithy_client_1.expectString)(output.openIDIssueURL),
2810
- OpenIDProviderName: (0, smithy_client_1.expectString)(output.openIDProviderName),
2811
- };
2458
+ return (0, smithy_client_1.take)(output, {
2459
+ CognitoUserPoolId: [, smithy_client_1.expectString, `cognitoUserPoolId`],
2460
+ Description: [, smithy_client_1.expectString, `description`],
2461
+ ExpirationTime: [, smithy_client_1.limitedParseDouble, `expirationTime`],
2462
+ OpenIDAuthTTL: [, smithy_client_1.expectString, `openIDAuthTTL`],
2463
+ OpenIDClientId: [, smithy_client_1.expectString, `openIDClientId`],
2464
+ OpenIDIatTTL: [, smithy_client_1.expectString, `openIDIatTTL`],
2465
+ OpenIDIssueURL: [, smithy_client_1.expectString, `openIDIssueURL`],
2466
+ OpenIDProviderName: [, smithy_client_1.expectString, `openIDProviderName`],
2467
+ });
2812
2468
  };
2813
2469
  const de_BackendAPIAuthType = (output, context) => {
2814
- return {
2815
- Mode: (0, smithy_client_1.expectString)(output.mode),
2816
- Settings: output.settings != null ? de_BackendAPIAppSyncAuthSettings(output.settings, context) : undefined,
2817
- };
2470
+ return (0, smithy_client_1.take)(output, {
2471
+ Mode: [, smithy_client_1.expectString, `mode`],
2472
+ Settings: (_) => [, de_BackendAPIAppSyncAuthSettings(_, context), `settings`],
2473
+ });
2818
2474
  };
2819
2475
  const de_BackendAPIConflictResolution = (output, context) => {
2820
- return {
2821
- ResolutionStrategy: (0, smithy_client_1.expectString)(output.resolutionStrategy),
2822
- };
2476
+ return (0, smithy_client_1.take)(output, {
2477
+ ResolutionStrategy: [, smithy_client_1.expectString, `resolutionStrategy`],
2478
+ });
2823
2479
  };
2824
2480
  const de_BackendAPIResourceConfig = (output, context) => {
2825
- return {
2826
- AdditionalAuthTypes: output.additionalAuthTypes != null ? de_ListOfBackendAPIAuthType(output.additionalAuthTypes, context) : undefined,
2827
- ApiName: (0, smithy_client_1.expectString)(output.apiName),
2828
- ConflictResolution: output.conflictResolution != null
2829
- ? de_BackendAPIConflictResolution(output.conflictResolution, context)
2830
- : undefined,
2831
- DefaultAuthType: output.defaultAuthType != null ? de_BackendAPIAuthType(output.defaultAuthType, context) : undefined,
2832
- Service: (0, smithy_client_1.expectString)(output.service),
2833
- TransformSchema: (0, smithy_client_1.expectString)(output.transformSchema),
2834
- };
2481
+ return (0, smithy_client_1.take)(output, {
2482
+ AdditionalAuthTypes: (_) => [, de_ListOfBackendAPIAuthType(_, context), `additionalAuthTypes`],
2483
+ ApiName: [, smithy_client_1.expectString, `apiName`],
2484
+ ConflictResolution: (_) => [, de_BackendAPIConflictResolution(_, context), `conflictResolution`],
2485
+ DefaultAuthType: (_) => [, de_BackendAPIAuthType(_, context), `defaultAuthType`],
2486
+ Service: [, smithy_client_1.expectString, `service`],
2487
+ TransformSchema: [, smithy_client_1.expectString, `transformSchema`],
2488
+ });
2835
2489
  };
2836
2490
  const de_BackendAuthAppleProviderConfig = (output, context) => {
2837
- return {
2838
- ClientId: (0, smithy_client_1.expectString)(output.client_id),
2839
- KeyId: (0, smithy_client_1.expectString)(output.key_id),
2840
- PrivateKey: (0, smithy_client_1.expectString)(output.private_key),
2841
- TeamId: (0, smithy_client_1.expectString)(output.team_id),
2842
- };
2491
+ return (0, smithy_client_1.take)(output, {
2492
+ ClientId: [, smithy_client_1.expectString, `client_id`],
2493
+ KeyId: [, smithy_client_1.expectString, `key_id`],
2494
+ PrivateKey: [, smithy_client_1.expectString, `private_key`],
2495
+ TeamId: [, smithy_client_1.expectString, `team_id`],
2496
+ });
2843
2497
  };
2844
2498
  const de_BackendAuthSocialProviderConfig = (output, context) => {
2845
- return {
2846
- ClientId: (0, smithy_client_1.expectString)(output.client_id),
2847
- ClientSecret: (0, smithy_client_1.expectString)(output.client_secret),
2848
- };
2499
+ return (0, smithy_client_1.take)(output, {
2500
+ ClientId: [, smithy_client_1.expectString, `client_id`],
2501
+ ClientSecret: [, smithy_client_1.expectString, `client_secret`],
2502
+ });
2849
2503
  };
2850
2504
  const de_BackendJobRespObj = (output, context) => {
2851
- return {
2852
- AppId: (0, smithy_client_1.expectString)(output.appId),
2853
- BackendEnvironmentName: (0, smithy_client_1.expectString)(output.backendEnvironmentName),
2854
- CreateTime: (0, smithy_client_1.expectString)(output.createTime),
2855
- Error: (0, smithy_client_1.expectString)(output.error),
2856
- JobId: (0, smithy_client_1.expectString)(output.jobId),
2857
- Operation: (0, smithy_client_1.expectString)(output.operation),
2858
- Status: (0, smithy_client_1.expectString)(output.status),
2859
- UpdateTime: (0, smithy_client_1.expectString)(output.updateTime),
2860
- };
2505
+ return (0, smithy_client_1.take)(output, {
2506
+ AppId: [, smithy_client_1.expectString, `appId`],
2507
+ BackendEnvironmentName: [, smithy_client_1.expectString, `backendEnvironmentName`],
2508
+ CreateTime: [, smithy_client_1.expectString, `createTime`],
2509
+ Error: [, smithy_client_1.expectString, `error`],
2510
+ JobId: [, smithy_client_1.expectString, `jobId`],
2511
+ Operation: [, smithy_client_1.expectString, `operation`],
2512
+ Status: [, smithy_client_1.expectString, `status`],
2513
+ UpdateTime: [, smithy_client_1.expectString, `updateTime`],
2514
+ });
2861
2515
  };
2862
2516
  const de_BackendStoragePermissions = (output, context) => {
2863
- return {
2864
- Authenticated: output.authenticated != null ? de_ListOfAuthenticatedElement(output.authenticated, context) : undefined,
2865
- UnAuthenticated: output.unAuthenticated != null ? de_ListOfUnAuthenticatedElement(output.unAuthenticated, context) : undefined,
2866
- };
2517
+ return (0, smithy_client_1.take)(output, {
2518
+ Authenticated: [, smithy_client_1._json, `authenticated`],
2519
+ UnAuthenticated: [, smithy_client_1._json, `unAuthenticated`],
2520
+ });
2867
2521
  };
2868
2522
  const de_CreateBackendAuthForgotPasswordConfig = (output, context) => {
2869
- return {
2870
- DeliveryMethod: (0, smithy_client_1.expectString)(output.deliveryMethod),
2871
- EmailSettings: output.emailSettings != null ? de_EmailSettings(output.emailSettings, context) : undefined,
2872
- SmsSettings: output.smsSettings != null ? de_SmsSettings(output.smsSettings, context) : undefined,
2873
- };
2523
+ return (0, smithy_client_1.take)(output, {
2524
+ DeliveryMethod: [, smithy_client_1.expectString, `deliveryMethod`],
2525
+ EmailSettings: (_) => [, de_EmailSettings(_, context), `emailSettings`],
2526
+ SmsSettings: (_) => [, de_SmsSettings(_, context), `smsSettings`],
2527
+ });
2874
2528
  };
2875
2529
  const de_CreateBackendAuthIdentityPoolConfig = (output, context) => {
2876
- return {
2877
- IdentityPoolName: (0, smithy_client_1.expectString)(output.identityPoolName),
2878
- UnauthenticatedLogin: (0, smithy_client_1.expectBoolean)(output.unauthenticatedLogin),
2879
- };
2530
+ return (0, smithy_client_1.take)(output, {
2531
+ IdentityPoolName: [, smithy_client_1.expectString, `identityPoolName`],
2532
+ UnauthenticatedLogin: [, smithy_client_1.expectBoolean, `unauthenticatedLogin`],
2533
+ });
2880
2534
  };
2881
2535
  const de_CreateBackendAuthMFAConfig = (output, context) => {
2882
- return {
2883
- MFAMode: (0, smithy_client_1.expectString)(output.MFAMode),
2884
- Settings: output.settings != null ? de_Settings(output.settings, context) : undefined,
2885
- };
2536
+ return (0, smithy_client_1.take)(output, {
2537
+ MFAMode: smithy_client_1.expectString,
2538
+ Settings: (_) => [, de_Settings(_, context), `settings`],
2539
+ });
2886
2540
  };
2887
2541
  const de_CreateBackendAuthOAuthConfig = (output, context) => {
2888
- return {
2889
- DomainPrefix: (0, smithy_client_1.expectString)(output.domainPrefix),
2890
- OAuthGrantType: (0, smithy_client_1.expectString)(output.oAuthGrantType),
2891
- OAuthScopes: output.oAuthScopes != null ? de_ListOfOAuthScopesElement(output.oAuthScopes, context) : undefined,
2892
- RedirectSignInURIs: output.redirectSignInURIs != null ? de_ListOf__string(output.redirectSignInURIs, context) : undefined,
2893
- RedirectSignOutURIs: output.redirectSignOutURIs != null ? de_ListOf__string(output.redirectSignOutURIs, context) : undefined,
2894
- SocialProviderSettings: output.socialProviderSettings != null
2895
- ? de_SocialProviderSettings(output.socialProviderSettings, context)
2896
- : undefined,
2897
- };
2542
+ return (0, smithy_client_1.take)(output, {
2543
+ DomainPrefix: [, smithy_client_1.expectString, `domainPrefix`],
2544
+ OAuthGrantType: [, smithy_client_1.expectString, `oAuthGrantType`],
2545
+ OAuthScopes: [, smithy_client_1._json, `oAuthScopes`],
2546
+ RedirectSignInURIs: [, smithy_client_1._json, `redirectSignInURIs`],
2547
+ RedirectSignOutURIs: [, smithy_client_1._json, `redirectSignOutURIs`],
2548
+ SocialProviderSettings: (_) => [, de_SocialProviderSettings(_, context), `socialProviderSettings`],
2549
+ });
2898
2550
  };
2899
2551
  const de_CreateBackendAuthPasswordPolicyConfig = (output, context) => {
2900
- return {
2901
- AdditionalConstraints: output.additionalConstraints != null
2902
- ? de_ListOfAdditionalConstraintsElement(output.additionalConstraints, context)
2903
- : undefined,
2904
- MinimumLength: (0, smithy_client_1.limitedParseDouble)(output.minimumLength),
2905
- };
2552
+ return (0, smithy_client_1.take)(output, {
2553
+ AdditionalConstraints: [, smithy_client_1._json, `additionalConstraints`],
2554
+ MinimumLength: [, smithy_client_1.limitedParseDouble, `minimumLength`],
2555
+ });
2906
2556
  };
2907
2557
  const de_CreateBackendAuthResourceConfig = (output, context) => {
2908
- return {
2909
- AuthResources: (0, smithy_client_1.expectString)(output.authResources),
2910
- IdentityPoolConfigs: output.identityPoolConfigs != null
2911
- ? de_CreateBackendAuthIdentityPoolConfig(output.identityPoolConfigs, context)
2912
- : undefined,
2913
- Service: (0, smithy_client_1.expectString)(output.service),
2914
- UserPoolConfigs: output.userPoolConfigs != null ? de_CreateBackendAuthUserPoolConfig(output.userPoolConfigs, context) : undefined,
2915
- };
2558
+ return (0, smithy_client_1.take)(output, {
2559
+ AuthResources: [, smithy_client_1.expectString, `authResources`],
2560
+ IdentityPoolConfigs: (_) => [, de_CreateBackendAuthIdentityPoolConfig(_, context), `identityPoolConfigs`],
2561
+ Service: [, smithy_client_1.expectString, `service`],
2562
+ UserPoolConfigs: (_) => [, de_CreateBackendAuthUserPoolConfig(_, context), `userPoolConfigs`],
2563
+ });
2916
2564
  };
2917
2565
  const de_CreateBackendAuthUserPoolConfig = (output, context) => {
2918
- return {
2919
- ForgotPassword: output.forgotPassword != null
2920
- ? de_CreateBackendAuthForgotPasswordConfig(output.forgotPassword, context)
2921
- : undefined,
2922
- Mfa: output.mfa != null ? de_CreateBackendAuthMFAConfig(output.mfa, context) : undefined,
2923
- OAuth: output.oAuth != null ? de_CreateBackendAuthOAuthConfig(output.oAuth, context) : undefined,
2924
- PasswordPolicy: output.passwordPolicy != null
2925
- ? de_CreateBackendAuthPasswordPolicyConfig(output.passwordPolicy, context)
2926
- : undefined,
2927
- RequiredSignUpAttributes: output.requiredSignUpAttributes != null
2928
- ? de_ListOfRequiredSignUpAttributesElement(output.requiredSignUpAttributes, context)
2929
- : undefined,
2930
- SignInMethod: (0, smithy_client_1.expectString)(output.signInMethod),
2931
- UserPoolName: (0, smithy_client_1.expectString)(output.userPoolName),
2932
- VerificationMessage: output.verificationMessage != null
2933
- ? de_CreateBackendAuthVerificationMessageConfig(output.verificationMessage, context)
2934
- : undefined,
2935
- };
2566
+ return (0, smithy_client_1.take)(output, {
2567
+ ForgotPassword: (_) => [, de_CreateBackendAuthForgotPasswordConfig(_, context), `forgotPassword`],
2568
+ Mfa: (_) => [, de_CreateBackendAuthMFAConfig(_, context), `mfa`],
2569
+ OAuth: (_) => [, de_CreateBackendAuthOAuthConfig(_, context), `oAuth`],
2570
+ PasswordPolicy: (_) => [, de_CreateBackendAuthPasswordPolicyConfig(_, context), `passwordPolicy`],
2571
+ RequiredSignUpAttributes: [, smithy_client_1._json, `requiredSignUpAttributes`],
2572
+ SignInMethod: [, smithy_client_1.expectString, `signInMethod`],
2573
+ UserPoolName: [, smithy_client_1.expectString, `userPoolName`],
2574
+ VerificationMessage: (_) => [, de_CreateBackendAuthVerificationMessageConfig(_, context), `verificationMessage`],
2575
+ });
2936
2576
  };
2937
2577
  const de_CreateBackendAuthVerificationMessageConfig = (output, context) => {
2938
- return {
2939
- DeliveryMethod: (0, smithy_client_1.expectString)(output.deliveryMethod),
2940
- EmailSettings: output.emailSettings != null ? de_EmailSettings(output.emailSettings, context) : undefined,
2941
- SmsSettings: output.smsSettings != null ? de_SmsSettings(output.smsSettings, context) : undefined,
2942
- };
2578
+ return (0, smithy_client_1.take)(output, {
2579
+ DeliveryMethod: [, smithy_client_1.expectString, `deliveryMethod`],
2580
+ EmailSettings: (_) => [, de_EmailSettings(_, context), `emailSettings`],
2581
+ SmsSettings: (_) => [, de_SmsSettings(_, context), `smsSettings`],
2582
+ });
2943
2583
  };
2944
2584
  const de_EmailSettings = (output, context) => {
2945
- return {
2946
- EmailMessage: (0, smithy_client_1.expectString)(output.emailMessage),
2947
- EmailSubject: (0, smithy_client_1.expectString)(output.emailSubject),
2948
- };
2949
- };
2950
- const de_GetBackendStorageResourceConfig = (output, context) => {
2951
- return {
2952
- BucketName: (0, smithy_client_1.expectString)(output.bucketName),
2953
- Imported: (0, smithy_client_1.expectBoolean)(output.imported),
2954
- Permissions: output.permissions != null ? de_BackendStoragePermissions(output.permissions, context) : undefined,
2955
- ServiceName: (0, smithy_client_1.expectString)(output.serviceName),
2956
- };
2957
- };
2958
- const de_ListOf__string = (output, context) => {
2959
- const retVal = (output || [])
2960
- .filter((e) => e != null)
2961
- .map((entry) => {
2962
- if (entry === null) {
2963
- return null;
2964
- }
2965
- return (0, smithy_client_1.expectString)(entry);
2585
+ return (0, smithy_client_1.take)(output, {
2586
+ EmailMessage: [, smithy_client_1.expectString, `emailMessage`],
2587
+ EmailSubject: [, smithy_client_1.expectString, `emailSubject`],
2966
2588
  });
2967
- return retVal;
2968
2589
  };
2969
- const de_ListOfAdditionalConstraintsElement = (output, context) => {
2970
- const retVal = (output || [])
2971
- .filter((e) => e != null)
2972
- .map((entry) => {
2973
- if (entry === null) {
2974
- return null;
2975
- }
2976
- return (0, smithy_client_1.expectString)(entry);
2977
- });
2978
- return retVal;
2979
- };
2980
- const de_ListOfAuthenticatedElement = (output, context) => {
2981
- const retVal = (output || [])
2982
- .filter((e) => e != null)
2983
- .map((entry) => {
2984
- if (entry === null) {
2985
- return null;
2986
- }
2987
- return (0, smithy_client_1.expectString)(entry);
2590
+ const de_GetBackendStorageResourceConfig = (output, context) => {
2591
+ return (0, smithy_client_1.take)(output, {
2592
+ BucketName: [, smithy_client_1.expectString, `bucketName`],
2593
+ Imported: [, smithy_client_1.expectBoolean, `imported`],
2594
+ Permissions: (_) => [, de_BackendStoragePermissions(_, context), `permissions`],
2595
+ ServiceName: [, smithy_client_1.expectString, `serviceName`],
2988
2596
  });
2989
- return retVal;
2990
2597
  };
2991
2598
  const de_ListOfBackendAPIAuthType = (output, context) => {
2992
2599
  const retVal = (output || [])
2993
2600
  .filter((e) => e != null)
2994
2601
  .map((entry) => {
2995
- if (entry === null) {
2996
- return null;
2997
- }
2998
2602
  return de_BackendAPIAuthType(entry, context);
2999
2603
  });
3000
2604
  return retVal;
@@ -3003,100 +2607,50 @@ const de_ListOfBackendJobRespObj = (output, context) => {
3003
2607
  const retVal = (output || [])
3004
2608
  .filter((e) => e != null)
3005
2609
  .map((entry) => {
3006
- if (entry === null) {
3007
- return null;
3008
- }
3009
2610
  return de_BackendJobRespObj(entry, context);
3010
2611
  });
3011
2612
  return retVal;
3012
2613
  };
3013
- const de_ListOfMfaTypesElement = (output, context) => {
3014
- const retVal = (output || [])
3015
- .filter((e) => e != null)
3016
- .map((entry) => {
3017
- if (entry === null) {
3018
- return null;
3019
- }
3020
- return (0, smithy_client_1.expectString)(entry);
3021
- });
3022
- return retVal;
3023
- };
3024
- const de_ListOfOAuthScopesElement = (output, context) => {
3025
- const retVal = (output || [])
3026
- .filter((e) => e != null)
3027
- .map((entry) => {
3028
- if (entry === null) {
3029
- return null;
3030
- }
3031
- return (0, smithy_client_1.expectString)(entry);
3032
- });
3033
- return retVal;
3034
- };
3035
- const de_ListOfRequiredSignUpAttributesElement = (output, context) => {
3036
- const retVal = (output || [])
3037
- .filter((e) => e != null)
3038
- .map((entry) => {
3039
- if (entry === null) {
3040
- return null;
3041
- }
3042
- return (0, smithy_client_1.expectString)(entry);
3043
- });
3044
- return retVal;
3045
- };
3046
2614
  const de_ListOfS3BucketInfo = (output, context) => {
3047
2615
  const retVal = (output || [])
3048
2616
  .filter((e) => e != null)
3049
2617
  .map((entry) => {
3050
- if (entry === null) {
3051
- return null;
3052
- }
3053
2618
  return de_S3BucketInfo(entry, context);
3054
2619
  });
3055
2620
  return retVal;
3056
2621
  };
3057
- const de_ListOfUnAuthenticatedElement = (output, context) => {
3058
- const retVal = (output || [])
3059
- .filter((e) => e != null)
3060
- .map((entry) => {
3061
- if (entry === null) {
3062
- return null;
3063
- }
3064
- return (0, smithy_client_1.expectString)(entry);
3065
- });
3066
- return retVal;
3067
- };
3068
2622
  const de_LoginAuthConfigReqObj = (output, context) => {
3069
- return {
3070
- AwsCognitoIdentityPoolId: (0, smithy_client_1.expectString)(output.aws_cognito_identity_pool_id),
3071
- AwsCognitoRegion: (0, smithy_client_1.expectString)(output.aws_cognito_region),
3072
- AwsUserPoolsId: (0, smithy_client_1.expectString)(output.aws_user_pools_id),
3073
- AwsUserPoolsWebClientId: (0, smithy_client_1.expectString)(output.aws_user_pools_web_client_id),
3074
- };
2623
+ return (0, smithy_client_1.take)(output, {
2624
+ AwsCognitoIdentityPoolId: [, smithy_client_1.expectString, `aws_cognito_identity_pool_id`],
2625
+ AwsCognitoRegion: [, smithy_client_1.expectString, `aws_cognito_region`],
2626
+ AwsUserPoolsId: [, smithy_client_1.expectString, `aws_user_pools_id`],
2627
+ AwsUserPoolsWebClientId: [, smithy_client_1.expectString, `aws_user_pools_web_client_id`],
2628
+ });
3075
2629
  };
3076
2630
  const de_S3BucketInfo = (output, context) => {
3077
- return {
3078
- CreationDate: (0, smithy_client_1.expectString)(output.creationDate),
3079
- Name: (0, smithy_client_1.expectString)(output.name),
3080
- };
2631
+ return (0, smithy_client_1.take)(output, {
2632
+ CreationDate: [, smithy_client_1.expectString, `creationDate`],
2633
+ Name: [, smithy_client_1.expectString, `name`],
2634
+ });
3081
2635
  };
3082
2636
  const de_Settings = (output, context) => {
3083
- return {
3084
- MfaTypes: output.mfaTypes != null ? de_ListOfMfaTypesElement(output.mfaTypes, context) : undefined,
3085
- SmsMessage: (0, smithy_client_1.expectString)(output.smsMessage),
3086
- };
2637
+ return (0, smithy_client_1.take)(output, {
2638
+ MfaTypes: [, smithy_client_1._json, `mfaTypes`],
2639
+ SmsMessage: [, smithy_client_1.expectString, `smsMessage`],
2640
+ });
3087
2641
  };
3088
2642
  const de_SmsSettings = (output, context) => {
3089
- return {
3090
- SmsMessage: (0, smithy_client_1.expectString)(output.smsMessage),
3091
- };
2643
+ return (0, smithy_client_1.take)(output, {
2644
+ SmsMessage: [, smithy_client_1.expectString, `smsMessage`],
2645
+ });
3092
2646
  };
3093
2647
  const de_SocialProviderSettings = (output, context) => {
3094
- return {
3095
- Facebook: output.Facebook != null ? de_BackendAuthSocialProviderConfig(output.Facebook, context) : undefined,
3096
- Google: output.Google != null ? de_BackendAuthSocialProviderConfig(output.Google, context) : undefined,
3097
- LoginWithAmazon: output.LoginWithAmazon != null ? de_BackendAuthSocialProviderConfig(output.LoginWithAmazon, context) : undefined,
3098
- SignInWithApple: output.SignInWithApple != null ? de_BackendAuthAppleProviderConfig(output.SignInWithApple, context) : undefined,
3099
- };
2648
+ return (0, smithy_client_1.take)(output, {
2649
+ Facebook: (_) => de_BackendAuthSocialProviderConfig(_, context),
2650
+ Google: (_) => de_BackendAuthSocialProviderConfig(_, context),
2651
+ LoginWithAmazon: (_) => de_BackendAuthSocialProviderConfig(_, context),
2652
+ SignInWithApple: (_) => de_BackendAuthAppleProviderConfig(_, context),
2653
+ });
3100
2654
  };
3101
2655
  const deserializeMetadata = (output) => ({
3102
2656
  httpStatusCode: output.statusCode,