@aws-sdk/client-securitylake 3.312.0 → 3.315.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
- import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, expectUnion as __expectUnion, map as __map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, strictParseInt32 as __strictParseInt32, throwDefaultError, } from "@aws-sdk/smithy-client";
3
- import { AccessDeniedException, AccountNotFoundException, BucketNotFoundException, ConcurrentModificationException, ConflictException, ConflictSourceNamesException, ConflictSubscriptionException, EventBridgeException, InternalServerException, InvalidInputException, ResourceNotFoundException, S3Exception, ServiceQuotaExceededException, SourceType, ThrottlingException, ValidationException, } from "../models/models_0";
2
+ import { _json, decorateServiceException as __decorateServiceException, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@aws-sdk/smithy-client";
3
+ import { AccessDeniedException, AccountNotFoundException, BucketNotFoundException, ConcurrentModificationException, ConflictException, ConflictSourceNamesException, ConflictSubscriptionException, EventBridgeException, InternalServerException, InvalidInputException, ResourceNotFoundException, S3Exception, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
4
4
  import { SecurityLakeServiceException as __BaseException } from "../models/SecurityLakeServiceException";
5
5
  export const se_CreateAwsLogSourceCommand = async (input, context) => {
6
6
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
@@ -9,18 +9,12 @@ export const se_CreateAwsLogSourceCommand = async (input, context) => {
9
9
  };
10
10
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/logsources/aws";
11
11
  let body;
12
- body = JSON.stringify({
13
- ...(input.enableAllDimensions != null && {
14
- enableAllDimensions: se_AllDimensionsMap(input.enableAllDimensions, context),
15
- }),
16
- ...(input.enableSingleDimension != null && {
17
- enableSingleDimension: se_InputSet(input.enableSingleDimension, context),
18
- }),
19
- ...(input.enableTwoDimensions != null && {
20
- enableTwoDimensions: se_TwoDimensionsMap(input.enableTwoDimensions, context),
21
- }),
22
- ...(input.inputOrder != null && { inputOrder: se_DimensionSet(input.inputOrder, context) }),
23
- });
12
+ body = JSON.stringify(take(input, {
13
+ enableAllDimensions: (_) => _json(_),
14
+ enableSingleDimension: (_) => _json(_),
15
+ enableTwoDimensions: (_) => _json(_),
16
+ inputOrder: (_) => _json(_),
17
+ }));
24
18
  return new __HttpRequest({
25
19
  protocol,
26
20
  hostname,
@@ -38,12 +32,12 @@ export const se_CreateCustomLogSourceCommand = async (input, context) => {
38
32
  };
39
33
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/logsources/custom";
40
34
  let body;
41
- body = JSON.stringify({
42
- ...(input.customSourceName != null && { customSourceName: input.customSourceName }),
43
- ...(input.eventClass != null && { eventClass: input.eventClass }),
44
- ...(input.glueInvocationRoleArn != null && { glueInvocationRoleArn: input.glueInvocationRoleArn }),
45
- ...(input.logProviderAccountId != null && { logProviderAccountId: input.logProviderAccountId }),
46
- });
35
+ body = JSON.stringify(take(input, {
36
+ customSourceName: [],
37
+ eventClass: [],
38
+ glueInvocationRoleArn: [],
39
+ logProviderAccountId: [],
40
+ }));
47
41
  return new __HttpRequest({
48
42
  protocol,
49
43
  hostname,
@@ -61,14 +55,12 @@ export const se_CreateDatalakeCommand = async (input, context) => {
61
55
  };
62
56
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/datalake";
63
57
  let body;
64
- body = JSON.stringify({
65
- ...(input.configurations != null && {
66
- configurations: se_LakeConfigurationRequestMap(input.configurations, context),
67
- }),
68
- ...(input.enableAll != null && { enableAll: input.enableAll }),
69
- ...(input.metaStoreManagerRoleArn != null && { metaStoreManagerRoleArn: input.metaStoreManagerRoleArn }),
70
- ...(input.regions != null && { regions: se_RegionSet(input.regions, context) }),
71
- });
58
+ body = JSON.stringify(take(input, {
59
+ configurations: (_) => _json(_),
60
+ enableAll: [],
61
+ metaStoreManagerRoleArn: [],
62
+ regions: (_) => _json(_),
63
+ }));
72
64
  return new __HttpRequest({
73
65
  protocol,
74
66
  hostname,
@@ -86,11 +78,9 @@ export const se_CreateDatalakeAutoEnableCommand = async (input, context) => {
86
78
  };
87
79
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/datalake/autoenable";
88
80
  let body;
89
- body = JSON.stringify({
90
- ...(input.configurationForNewAccounts != null && {
91
- configurationForNewAccounts: se_AutoEnableNewRegionConfigurationList(input.configurationForNewAccounts, context),
92
- }),
93
- });
81
+ body = JSON.stringify(take(input, {
82
+ configurationForNewAccounts: (_) => _json(_),
83
+ }));
94
84
  return new __HttpRequest({
95
85
  protocol,
96
86
  hostname,
@@ -108,9 +98,9 @@ export const se_CreateDatalakeDelegatedAdminCommand = async (input, context) =>
108
98
  };
109
99
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/datalake/delegate";
110
100
  let body;
111
- body = JSON.stringify({
112
- ...(input.account != null && { account: input.account }),
113
- });
101
+ body = JSON.stringify(take(input, {
102
+ account: [],
103
+ }));
114
104
  return new __HttpRequest({
115
105
  protocol,
116
106
  hostname,
@@ -128,10 +118,10 @@ export const se_CreateDatalakeExceptionsSubscriptionCommand = async (input, cont
128
118
  };
129
119
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/datalake/exceptions/subscription";
130
120
  let body;
131
- body = JSON.stringify({
132
- ...(input.notificationEndpoint != null && { notificationEndpoint: input.notificationEndpoint }),
133
- ...(input.subscriptionProtocol != null && { subscriptionProtocol: input.subscriptionProtocol }),
134
- });
121
+ body = JSON.stringify(take(input, {
122
+ notificationEndpoint: [],
123
+ subscriptionProtocol: [],
124
+ }));
135
125
  return new __HttpRequest({
136
126
  protocol,
137
127
  hostname,
@@ -149,14 +139,14 @@ export const se_CreateSubscriberCommand = async (input, context) => {
149
139
  };
150
140
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/subscribers";
151
141
  let body;
152
- body = JSON.stringify({
153
- ...(input.accessTypes != null && { accessTypes: se_AccessTypeList(input.accessTypes, context) }),
154
- ...(input.accountId != null && { accountId: input.accountId }),
155
- ...(input.externalId != null && { externalId: input.externalId }),
156
- ...(input.sourceTypes != null && { sourceTypes: se_SourceTypeList(input.sourceTypes, context) }),
157
- ...(input.subscriberDescription != null && { subscriberDescription: input.subscriberDescription }),
158
- ...(input.subscriberName != null && { subscriberName: input.subscriberName }),
159
- });
142
+ body = JSON.stringify(take(input, {
143
+ accessTypes: (_) => _json(_),
144
+ accountId: [],
145
+ externalId: [],
146
+ sourceTypes: (_) => _json(_),
147
+ subscriberDescription: [],
148
+ subscriberName: [],
149
+ }));
160
150
  return new __HttpRequest({
161
151
  protocol,
162
152
  hostname,
@@ -176,14 +166,14 @@ export const se_CreateSubscriptionNotificationConfigurationCommand = async (inpu
176
166
  "/subscription-notifications/{subscriptionId}";
177
167
  resolvedPath = __resolvedPath(resolvedPath, input, "subscriptionId", () => input.subscriptionId, "{subscriptionId}", false);
178
168
  let body;
179
- body = JSON.stringify({
180
- ...(input.createSqs != null && { createSqs: input.createSqs }),
181
- ...(input.httpsApiKeyName != null && { httpsApiKeyName: input.httpsApiKeyName }),
182
- ...(input.httpsApiKeyValue != null && { httpsApiKeyValue: input.httpsApiKeyValue }),
183
- ...(input.httpsMethod != null && { httpsMethod: input.httpsMethod }),
184
- ...(input.roleArn != null && { roleArn: input.roleArn }),
185
- ...(input.subscriptionEndpoint != null && { subscriptionEndpoint: input.subscriptionEndpoint }),
186
- });
169
+ body = JSON.stringify(take(input, {
170
+ createSqs: [],
171
+ httpsApiKeyName: [],
172
+ httpsApiKeyValue: [],
173
+ httpsMethod: [],
174
+ roleArn: [],
175
+ subscriptionEndpoint: [],
176
+ }));
187
177
  return new __HttpRequest({
188
178
  protocol,
189
179
  hostname,
@@ -201,18 +191,12 @@ export const se_DeleteAwsLogSourceCommand = async (input, context) => {
201
191
  };
202
192
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/logsources/aws/delete";
203
193
  let body;
204
- body = JSON.stringify({
205
- ...(input.disableAllDimensions != null && {
206
- disableAllDimensions: se_AllDimensionsMap(input.disableAllDimensions, context),
207
- }),
208
- ...(input.disableSingleDimension != null && {
209
- disableSingleDimension: se_InputSet(input.disableSingleDimension, context),
210
- }),
211
- ...(input.disableTwoDimensions != null && {
212
- disableTwoDimensions: se_TwoDimensionsMap(input.disableTwoDimensions, context),
213
- }),
214
- ...(input.inputOrder != null && { inputOrder: se_DimensionSet(input.inputOrder, context) }),
215
- });
194
+ body = JSON.stringify(take(input, {
195
+ disableAllDimensions: (_) => _json(_),
196
+ disableSingleDimension: (_) => _json(_),
197
+ disableTwoDimensions: (_) => _json(_),
198
+ inputOrder: (_) => _json(_),
199
+ }));
216
200
  return new __HttpRequest({
217
201
  protocol,
218
202
  hostname,
@@ -267,11 +251,9 @@ export const se_DeleteDatalakeAutoEnableCommand = async (input, context) => {
267
251
  };
268
252
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/datalake/autoenable/delete";
269
253
  let body;
270
- body = JSON.stringify({
271
- ...(input.removeFromConfigurationForNewAccounts != null && {
272
- removeFromConfigurationForNewAccounts: se_AutoEnableNewRegionConfigurationList(input.removeFromConfigurationForNewAccounts, context),
273
- }),
274
- });
254
+ body = JSON.stringify(take(input, {
255
+ removeFromConfigurationForNewAccounts: (_) => _json(_),
256
+ }));
275
257
  return new __HttpRequest({
276
258
  protocol,
277
259
  hostname,
@@ -431,11 +413,11 @@ export const se_GetDatalakeStatusCommand = async (input, context) => {
431
413
  };
432
414
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/datalake/status";
433
415
  let body;
434
- body = JSON.stringify({
435
- ...(input.accountSet != null && { accountSet: se_InputSet(input.accountSet, context) }),
436
- ...(input.maxAccountResults != null && { maxAccountResults: input.maxAccountResults }),
437
- ...(input.nextToken != null && { nextToken: input.nextToken }),
438
- });
416
+ body = JSON.stringify(take(input, {
417
+ accountSet: (_) => _json(_),
418
+ maxAccountResults: [],
419
+ nextToken: [],
420
+ }));
439
421
  return new __HttpRequest({
440
422
  protocol,
441
423
  hostname,
@@ -469,11 +451,11 @@ export const se_ListDatalakeExceptionsCommand = async (input, context) => {
469
451
  };
470
452
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/datalake/exceptions";
471
453
  let body;
472
- body = JSON.stringify({
473
- ...(input.maxFailures != null && { maxFailures: input.maxFailures }),
474
- ...(input.nextToken != null && { nextToken: input.nextToken }),
475
- ...(input.regionSet != null && { regionSet: se_RegionSet(input.regionSet, context) }),
476
- });
454
+ body = JSON.stringify(take(input, {
455
+ maxFailures: [],
456
+ nextToken: [],
457
+ regionSet: (_) => _json(_),
458
+ }));
477
459
  return new __HttpRequest({
478
460
  protocol,
479
461
  hostname,
@@ -491,18 +473,14 @@ export const se_ListLogSourcesCommand = async (input, context) => {
491
473
  };
492
474
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/logsources/list";
493
475
  let body;
494
- body = JSON.stringify({
495
- ...(input.inputOrder != null && { inputOrder: se_DimensionSet(input.inputOrder, context) }),
496
- ...(input.listAllDimensions != null && {
497
- listAllDimensions: se_AllDimensionsMap(input.listAllDimensions, context),
498
- }),
499
- ...(input.listSingleDimension != null && { listSingleDimension: se_InputSet(input.listSingleDimension, context) }),
500
- ...(input.listTwoDimensions != null && {
501
- listTwoDimensions: se_TwoDimensionsMap(input.listTwoDimensions, context),
502
- }),
503
- ...(input.maxResults != null && { maxResults: input.maxResults }),
504
- ...(input.nextToken != null && { nextToken: input.nextToken }),
505
- });
476
+ body = JSON.stringify(take(input, {
477
+ inputOrder: (_) => _json(_),
478
+ listAllDimensions: (_) => _json(_),
479
+ listSingleDimension: (_) => _json(_),
480
+ listTwoDimensions: (_) => _json(_),
481
+ maxResults: [],
482
+ nextToken: [],
483
+ }));
506
484
  return new __HttpRequest({
507
485
  protocol,
508
486
  hostname,
@@ -540,11 +518,9 @@ export const se_UpdateDatalakeCommand = async (input, context) => {
540
518
  };
541
519
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/datalake";
542
520
  let body;
543
- body = JSON.stringify({
544
- ...(input.configurations != null && {
545
- configurations: se_LakeConfigurationRequestMap(input.configurations, context),
546
- }),
547
- });
521
+ body = JSON.stringify(take(input, {
522
+ configurations: (_) => _json(_),
523
+ }));
548
524
  return new __HttpRequest({
549
525
  protocol,
550
526
  hostname,
@@ -562,9 +538,9 @@ export const se_UpdateDatalakeExceptionsExpiryCommand = async (input, context) =
562
538
  };
563
539
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/datalake/exceptions/expiry";
564
540
  let body;
565
- body = JSON.stringify({
566
- ...(input.exceptionMessageExpiry != null && { exceptionMessageExpiry: input.exceptionMessageExpiry }),
567
- });
541
+ body = JSON.stringify(take(input, {
542
+ exceptionMessageExpiry: [],
543
+ }));
568
544
  return new __HttpRequest({
569
545
  protocol,
570
546
  hostname,
@@ -582,10 +558,10 @@ export const se_UpdateDatalakeExceptionsSubscriptionCommand = async (input, cont
582
558
  };
583
559
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/datalake/exceptions/subscription";
584
560
  let body;
585
- body = JSON.stringify({
586
- ...(input.notificationEndpoint != null && { notificationEndpoint: input.notificationEndpoint }),
587
- ...(input.subscriptionProtocol != null && { subscriptionProtocol: input.subscriptionProtocol }),
588
- });
561
+ body = JSON.stringify(take(input, {
562
+ notificationEndpoint: [],
563
+ subscriptionProtocol: [],
564
+ }));
589
565
  return new __HttpRequest({
590
566
  protocol,
591
567
  hostname,
@@ -604,12 +580,12 @@ export const se_UpdateSubscriberCommand = async (input, context) => {
604
580
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/subscribers/{id}";
605
581
  resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
606
582
  let body;
607
- body = JSON.stringify({
608
- ...(input.externalId != null && { externalId: input.externalId }),
609
- ...(input.sourceTypes != null && { sourceTypes: se_SourceTypeList(input.sourceTypes, context) }),
610
- ...(input.subscriberDescription != null && { subscriberDescription: input.subscriberDescription }),
611
- ...(input.subscriberName != null && { subscriberName: input.subscriberName }),
612
- });
583
+ body = JSON.stringify(take(input, {
584
+ externalId: [],
585
+ sourceTypes: (_) => _json(_),
586
+ subscriberDescription: [],
587
+ subscriberName: [],
588
+ }));
613
589
  return new __HttpRequest({
614
590
  protocol,
615
591
  hostname,
@@ -629,14 +605,14 @@ export const se_UpdateSubscriptionNotificationConfigurationCommand = async (inpu
629
605
  "/subscription-notifications/{subscriptionId}";
630
606
  resolvedPath = __resolvedPath(resolvedPath, input, "subscriptionId", () => input.subscriptionId, "{subscriptionId}", false);
631
607
  let body;
632
- body = JSON.stringify({
633
- ...(input.createSqs != null && { createSqs: input.createSqs }),
634
- ...(input.httpsApiKeyName != null && { httpsApiKeyName: input.httpsApiKeyName }),
635
- ...(input.httpsApiKeyValue != null && { httpsApiKeyValue: input.httpsApiKeyValue }),
636
- ...(input.httpsMethod != null && { httpsMethod: input.httpsMethod }),
637
- ...(input.roleArn != null && { roleArn: input.roleArn }),
638
- ...(input.subscriptionEndpoint != null && { subscriptionEndpoint: input.subscriptionEndpoint }),
639
- });
608
+ body = JSON.stringify(take(input, {
609
+ createSqs: [],
610
+ httpsApiKeyName: [],
611
+ httpsApiKeyValue: [],
612
+ httpsMethod: [],
613
+ roleArn: [],
614
+ subscriptionEndpoint: [],
615
+ }));
640
616
  return new __HttpRequest({
641
617
  protocol,
642
618
  hostname,
@@ -655,12 +631,11 @@ export const de_CreateAwsLogSourceCommand = async (output, context) => {
655
631
  $metadata: deserializeMetadata(output),
656
632
  });
657
633
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
658
- if (data.failed != null) {
659
- contents.failed = de_AccountList(data.failed, context);
660
- }
661
- if (data.processing != null) {
662
- contents.processing = de_AccountList(data.processing, context);
663
- }
634
+ const doc = take(data, {
635
+ failed: _json,
636
+ processing: _json,
637
+ });
638
+ Object.assign(contents, doc);
664
639
  return contents;
665
640
  };
666
641
  const de_CreateAwsLogSourceCommandError = async (output, context) => {
@@ -690,10 +665,9 @@ const de_CreateAwsLogSourceCommandError = async (output, context) => {
690
665
  throw await de_ValidationExceptionRes(parsedOutput, context);
691
666
  default:
692
667
  const parsedBody = parsedOutput.body;
693
- throwDefaultError({
668
+ return throwDefaultError({
694
669
  output,
695
670
  parsedBody,
696
- exceptionCtor: __BaseException,
697
671
  errorCode,
698
672
  });
699
673
  }
@@ -706,21 +680,14 @@ export const de_CreateCustomLogSourceCommand = async (output, context) => {
706
680
  $metadata: deserializeMetadata(output),
707
681
  });
708
682
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
709
- if (data.customDataLocation != null) {
710
- contents.customDataLocation = __expectString(data.customDataLocation);
711
- }
712
- if (data.glueCrawlerName != null) {
713
- contents.glueCrawlerName = __expectString(data.glueCrawlerName);
714
- }
715
- if (data.glueDatabaseName != null) {
716
- contents.glueDatabaseName = __expectString(data.glueDatabaseName);
717
- }
718
- if (data.glueTableName != null) {
719
- contents.glueTableName = __expectString(data.glueTableName);
720
- }
721
- if (data.logProviderAccessRoleArn != null) {
722
- contents.logProviderAccessRoleArn = __expectString(data.logProviderAccessRoleArn);
723
- }
683
+ const doc = take(data, {
684
+ customDataLocation: __expectString,
685
+ glueCrawlerName: __expectString,
686
+ glueDatabaseName: __expectString,
687
+ glueTableName: __expectString,
688
+ logProviderAccessRoleArn: __expectString,
689
+ });
690
+ Object.assign(contents, doc);
724
691
  return contents;
725
692
  };
726
693
  const de_CreateCustomLogSourceCommandError = async (output, context) => {
@@ -753,10 +720,9 @@ const de_CreateCustomLogSourceCommandError = async (output, context) => {
753
720
  throw await de_ValidationExceptionRes(parsedOutput, context);
754
721
  default:
755
722
  const parsedBody = parsedOutput.body;
756
- throwDefaultError({
723
+ return throwDefaultError({
757
724
  output,
758
725
  parsedBody,
759
- exceptionCtor: __BaseException,
760
726
  errorCode,
761
727
  });
762
728
  }
@@ -801,10 +767,9 @@ const de_CreateDatalakeCommandError = async (output, context) => {
801
767
  throw await de_ValidationExceptionRes(parsedOutput, context);
802
768
  default:
803
769
  const parsedBody = parsedOutput.body;
804
- throwDefaultError({
770
+ return throwDefaultError({
805
771
  output,
806
772
  parsedBody,
807
- exceptionCtor: __BaseException,
808
773
  errorCode,
809
774
  });
810
775
  }
@@ -840,10 +805,9 @@ const de_CreateDatalakeAutoEnableCommandError = async (output, context) => {
840
805
  throw await de_ValidationExceptionRes(parsedOutput, context);
841
806
  default:
842
807
  const parsedBody = parsedOutput.body;
843
- throwDefaultError({
808
+ return throwDefaultError({
844
809
  output,
845
810
  parsedBody,
846
- exceptionCtor: __BaseException,
847
811
  errorCode,
848
812
  });
849
813
  }
@@ -879,10 +843,9 @@ const de_CreateDatalakeDelegatedAdminCommandError = async (output, context) => {
879
843
  throw await de_ValidationExceptionRes(parsedOutput, context);
880
844
  default:
881
845
  const parsedBody = parsedOutput.body;
882
- throwDefaultError({
846
+ return throwDefaultError({
883
847
  output,
884
848
  parsedBody,
885
- exceptionCtor: __BaseException,
886
849
  errorCode,
887
850
  });
888
851
  }
@@ -918,10 +881,9 @@ const de_CreateDatalakeExceptionsSubscriptionCommandError = async (output, conte
918
881
  throw await de_ValidationExceptionRes(parsedOutput, context);
919
882
  default:
920
883
  const parsedBody = parsedOutput.body;
921
- throwDefaultError({
884
+ return throwDefaultError({
922
885
  output,
923
886
  parsedBody,
924
- exceptionCtor: __BaseException,
925
887
  errorCode,
926
888
  });
927
889
  }
@@ -934,24 +896,15 @@ export const de_CreateSubscriberCommand = async (output, context) => {
934
896
  $metadata: deserializeMetadata(output),
935
897
  });
936
898
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
937
- if (data.resourceShareArn != null) {
938
- contents.resourceShareArn = __expectString(data.resourceShareArn);
939
- }
940
- if (data.resourceShareName != null) {
941
- contents.resourceShareName = __expectString(data.resourceShareName);
942
- }
943
- if (data.roleArn != null) {
944
- contents.roleArn = __expectString(data.roleArn);
945
- }
946
- if (data.s3BucketArn != null) {
947
- contents.s3BucketArn = __expectString(data.s3BucketArn);
948
- }
949
- if (data.snsArn != null) {
950
- contents.snsArn = __expectString(data.snsArn);
951
- }
952
- if (data.subscriptionId != null) {
953
- contents.subscriptionId = __expectString(data.subscriptionId);
954
- }
899
+ const doc = take(data, {
900
+ resourceShareArn: __expectString,
901
+ resourceShareName: __expectString,
902
+ roleArn: __expectString,
903
+ s3BucketArn: __expectString,
904
+ snsArn: __expectString,
905
+ subscriptionId: __expectString,
906
+ });
907
+ Object.assign(contents, doc);
955
908
  return contents;
956
909
  };
957
910
  const de_CreateSubscriberCommandError = async (output, context) => {
@@ -987,10 +940,9 @@ const de_CreateSubscriberCommandError = async (output, context) => {
987
940
  throw await de_ValidationExceptionRes(parsedOutput, context);
988
941
  default:
989
942
  const parsedBody = parsedOutput.body;
990
- throwDefaultError({
943
+ return throwDefaultError({
991
944
  output,
992
945
  parsedBody,
993
- exceptionCtor: __BaseException,
994
946
  errorCode,
995
947
  });
996
948
  }
@@ -1003,9 +955,10 @@ export const de_CreateSubscriptionNotificationConfigurationCommand = async (outp
1003
955
  $metadata: deserializeMetadata(output),
1004
956
  });
1005
957
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1006
- if (data.queueArn != null) {
1007
- contents.queueArn = __expectString(data.queueArn);
1008
- }
958
+ const doc = take(data, {
959
+ queueArn: __expectString,
960
+ });
961
+ Object.assign(contents, doc);
1009
962
  return contents;
1010
963
  };
1011
964
  const de_CreateSubscriptionNotificationConfigurationCommandError = async (output, context) => {
@@ -1038,10 +991,9 @@ const de_CreateSubscriptionNotificationConfigurationCommandError = async (output
1038
991
  throw await de_ValidationExceptionRes(parsedOutput, context);
1039
992
  default:
1040
993
  const parsedBody = parsedOutput.body;
1041
- throwDefaultError({
994
+ return throwDefaultError({
1042
995
  output,
1043
996
  parsedBody,
1044
- exceptionCtor: __BaseException,
1045
997
  errorCode,
1046
998
  });
1047
999
  }
@@ -1054,12 +1006,11 @@ export const de_DeleteAwsLogSourceCommand = async (output, context) => {
1054
1006
  $metadata: deserializeMetadata(output),
1055
1007
  });
1056
1008
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1057
- if (data.failed != null) {
1058
- contents.failed = de_AccountList(data.failed, context);
1059
- }
1060
- if (data.processing != null) {
1061
- contents.processing = de_AccountList(data.processing, context);
1062
- }
1009
+ const doc = take(data, {
1010
+ failed: _json,
1011
+ processing: _json,
1012
+ });
1013
+ Object.assign(contents, doc);
1063
1014
  return contents;
1064
1015
  };
1065
1016
  const de_DeleteAwsLogSourceCommandError = async (output, context) => {
@@ -1083,10 +1034,9 @@ const de_DeleteAwsLogSourceCommandError = async (output, context) => {
1083
1034
  throw await de_ValidationExceptionRes(parsedOutput, context);
1084
1035
  default:
1085
1036
  const parsedBody = parsedOutput.body;
1086
- throwDefaultError({
1037
+ return throwDefaultError({
1087
1038
  output,
1088
1039
  parsedBody,
1089
- exceptionCtor: __BaseException,
1090
1040
  errorCode,
1091
1041
  });
1092
1042
  }
@@ -1099,9 +1049,10 @@ export const de_DeleteCustomLogSourceCommand = async (output, context) => {
1099
1049
  $metadata: deserializeMetadata(output),
1100
1050
  });
1101
1051
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1102
- if (data.customDataLocation != null) {
1103
- contents.customDataLocation = __expectString(data.customDataLocation);
1104
- }
1052
+ const doc = take(data, {
1053
+ customDataLocation: __expectString,
1054
+ });
1055
+ Object.assign(contents, doc);
1105
1056
  return contents;
1106
1057
  };
1107
1058
  const de_DeleteCustomLogSourceCommandError = async (output, context) => {
@@ -1134,10 +1085,9 @@ const de_DeleteCustomLogSourceCommandError = async (output, context) => {
1134
1085
  throw await de_ValidationExceptionRes(parsedOutput, context);
1135
1086
  default:
1136
1087
  const parsedBody = parsedOutput.body;
1137
- throwDefaultError({
1088
+ return throwDefaultError({
1138
1089
  output,
1139
1090
  parsedBody,
1140
- exceptionCtor: __BaseException,
1141
1091
  errorCode,
1142
1092
  });
1143
1093
  }
@@ -1182,10 +1132,9 @@ const de_DeleteDatalakeCommandError = async (output, context) => {
1182
1132
  throw await de_ValidationExceptionRes(parsedOutput, context);
1183
1133
  default:
1184
1134
  const parsedBody = parsedOutput.body;
1185
- throwDefaultError({
1135
+ return throwDefaultError({
1186
1136
  output,
1187
1137
  parsedBody,
1188
- exceptionCtor: __BaseException,
1189
1138
  errorCode,
1190
1139
  });
1191
1140
  }
@@ -1221,10 +1170,9 @@ const de_DeleteDatalakeAutoEnableCommandError = async (output, context) => {
1221
1170
  throw await de_ValidationExceptionRes(parsedOutput, context);
1222
1171
  default:
1223
1172
  const parsedBody = parsedOutput.body;
1224
- throwDefaultError({
1173
+ return throwDefaultError({
1225
1174
  output,
1226
1175
  parsedBody,
1227
- exceptionCtor: __BaseException,
1228
1176
  errorCode,
1229
1177
  });
1230
1178
  }
@@ -1260,10 +1208,9 @@ const de_DeleteDatalakeDelegatedAdminCommandError = async (output, context) => {
1260
1208
  throw await de_ValidationExceptionRes(parsedOutput, context);
1261
1209
  default:
1262
1210
  const parsedBody = parsedOutput.body;
1263
- throwDefaultError({
1211
+ return throwDefaultError({
1264
1212
  output,
1265
1213
  parsedBody,
1266
- exceptionCtor: __BaseException,
1267
1214
  errorCode,
1268
1215
  });
1269
1216
  }
@@ -1276,9 +1223,10 @@ export const de_DeleteDatalakeExceptionsSubscriptionCommand = async (output, con
1276
1223
  $metadata: deserializeMetadata(output),
1277
1224
  });
1278
1225
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1279
- if (data.status != null) {
1280
- contents.status = __expectString(data.status);
1281
- }
1226
+ const doc = take(data, {
1227
+ status: __expectString,
1228
+ });
1229
+ Object.assign(contents, doc);
1282
1230
  return contents;
1283
1231
  };
1284
1232
  const de_DeleteDatalakeExceptionsSubscriptionCommandError = async (output, context) => {
@@ -1302,10 +1250,9 @@ const de_DeleteDatalakeExceptionsSubscriptionCommandError = async (output, conte
1302
1250
  throw await de_ValidationExceptionRes(parsedOutput, context);
1303
1251
  default:
1304
1252
  const parsedBody = parsedOutput.body;
1305
- throwDefaultError({
1253
+ return throwDefaultError({
1306
1254
  output,
1307
1255
  parsedBody,
1308
- exceptionCtor: __BaseException,
1309
1256
  errorCode,
1310
1257
  });
1311
1258
  }
@@ -1353,10 +1300,9 @@ const de_DeleteSubscriberCommandError = async (output, context) => {
1353
1300
  throw await de_ValidationExceptionRes(parsedOutput, context);
1354
1301
  default:
1355
1302
  const parsedBody = parsedOutput.body;
1356
- throwDefaultError({
1303
+ return throwDefaultError({
1357
1304
  output,
1358
1305
  parsedBody,
1359
- exceptionCtor: __BaseException,
1360
1306
  errorCode,
1361
1307
  });
1362
1308
  }
@@ -1401,10 +1347,9 @@ const de_DeleteSubscriptionNotificationConfigurationCommandError = async (output
1401
1347
  throw await de_ValidationExceptionRes(parsedOutput, context);
1402
1348
  default:
1403
1349
  const parsedBody = parsedOutput.body;
1404
- throwDefaultError({
1350
+ return throwDefaultError({
1405
1351
  output,
1406
1352
  parsedBody,
1407
- exceptionCtor: __BaseException,
1408
1353
  errorCode,
1409
1354
  });
1410
1355
  }
@@ -1417,9 +1362,10 @@ export const de_GetDatalakeCommand = async (output, context) => {
1417
1362
  $metadata: deserializeMetadata(output),
1418
1363
  });
1419
1364
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1420
- if (data.configurations != null) {
1421
- contents.configurations = de_LakeConfigurationResponseMap(data.configurations, context);
1422
- }
1365
+ const doc = take(data, {
1366
+ configurations: _json,
1367
+ });
1368
+ Object.assign(contents, doc);
1423
1369
  return contents;
1424
1370
  };
1425
1371
  const de_GetDatalakeCommandError = async (output, context) => {
@@ -1446,10 +1392,9 @@ const de_GetDatalakeCommandError = async (output, context) => {
1446
1392
  throw await de_ValidationExceptionRes(parsedOutput, context);
1447
1393
  default:
1448
1394
  const parsedBody = parsedOutput.body;
1449
- throwDefaultError({
1395
+ return throwDefaultError({
1450
1396
  output,
1451
1397
  parsedBody,
1452
- exceptionCtor: __BaseException,
1453
1398
  errorCode,
1454
1399
  });
1455
1400
  }
@@ -1462,9 +1407,10 @@ export const de_GetDatalakeAutoEnableCommand = async (output, context) => {
1462
1407
  $metadata: deserializeMetadata(output),
1463
1408
  });
1464
1409
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1465
- if (data.autoEnableNewAccounts != null) {
1466
- contents.autoEnableNewAccounts = de_AutoEnableNewRegionConfigurationList(data.autoEnableNewAccounts, context);
1467
- }
1410
+ const doc = take(data, {
1411
+ autoEnableNewAccounts: _json,
1412
+ });
1413
+ Object.assign(contents, doc);
1468
1414
  return contents;
1469
1415
  };
1470
1416
  const de_GetDatalakeAutoEnableCommandError = async (output, context) => {
@@ -1488,10 +1434,9 @@ const de_GetDatalakeAutoEnableCommandError = async (output, context) => {
1488
1434
  throw await de_ValidationExceptionRes(parsedOutput, context);
1489
1435
  default:
1490
1436
  const parsedBody = parsedOutput.body;
1491
- throwDefaultError({
1437
+ return throwDefaultError({
1492
1438
  output,
1493
1439
  parsedBody,
1494
- exceptionCtor: __BaseException,
1495
1440
  errorCode,
1496
1441
  });
1497
1442
  }
@@ -1504,9 +1449,10 @@ export const de_GetDatalakeExceptionsExpiryCommand = async (output, context) =>
1504
1449
  $metadata: deserializeMetadata(output),
1505
1450
  });
1506
1451
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1507
- if (data.exceptionMessageExpiry != null) {
1508
- contents.exceptionMessageExpiry = __expectLong(data.exceptionMessageExpiry);
1509
- }
1452
+ const doc = take(data, {
1453
+ exceptionMessageExpiry: __expectLong,
1454
+ });
1455
+ Object.assign(contents, doc);
1510
1456
  return contents;
1511
1457
  };
1512
1458
  const de_GetDatalakeExceptionsExpiryCommandError = async (output, context) => {
@@ -1530,10 +1476,9 @@ const de_GetDatalakeExceptionsExpiryCommandError = async (output, context) => {
1530
1476
  throw await de_ValidationExceptionRes(parsedOutput, context);
1531
1477
  default:
1532
1478
  const parsedBody = parsedOutput.body;
1533
- throwDefaultError({
1479
+ return throwDefaultError({
1534
1480
  output,
1535
1481
  parsedBody,
1536
- exceptionCtor: __BaseException,
1537
1482
  errorCode,
1538
1483
  });
1539
1484
  }
@@ -1546,9 +1491,10 @@ export const de_GetDatalakeExceptionsSubscriptionCommand = async (output, contex
1546
1491
  $metadata: deserializeMetadata(output),
1547
1492
  });
1548
1493
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1549
- if (data.protocolAndNotificationEndpoint != null) {
1550
- contents.protocolAndNotificationEndpoint = de_ProtocolAndNotificationEndpoint(data.protocolAndNotificationEndpoint, context);
1551
- }
1494
+ const doc = take(data, {
1495
+ protocolAndNotificationEndpoint: _json,
1496
+ });
1497
+ Object.assign(contents, doc);
1552
1498
  return contents;
1553
1499
  };
1554
1500
  const de_GetDatalakeExceptionsSubscriptionCommandError = async (output, context) => {
@@ -1572,10 +1518,9 @@ const de_GetDatalakeExceptionsSubscriptionCommandError = async (output, context)
1572
1518
  throw await de_ValidationExceptionRes(parsedOutput, context);
1573
1519
  default:
1574
1520
  const parsedBody = parsedOutput.body;
1575
- throwDefaultError({
1521
+ return throwDefaultError({
1576
1522
  output,
1577
1523
  parsedBody,
1578
- exceptionCtor: __BaseException,
1579
1524
  errorCode,
1580
1525
  });
1581
1526
  }
@@ -1588,12 +1533,11 @@ export const de_GetDatalakeStatusCommand = async (output, context) => {
1588
1533
  $metadata: deserializeMetadata(output),
1589
1534
  });
1590
1535
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1591
- if (data.accountSourcesList != null) {
1592
- contents.accountSourcesList = de_AccountSourcesList(data.accountSourcesList, context);
1593
- }
1594
- if (data.nextToken != null) {
1595
- contents.nextToken = __expectString(data.nextToken);
1596
- }
1536
+ const doc = take(data, {
1537
+ accountSourcesList: _json,
1538
+ nextToken: __expectString,
1539
+ });
1540
+ Object.assign(contents, doc);
1597
1541
  return contents;
1598
1542
  };
1599
1543
  const de_GetDatalakeStatusCommandError = async (output, context) => {
@@ -1617,10 +1561,9 @@ const de_GetDatalakeStatusCommandError = async (output, context) => {
1617
1561
  throw await de_ValidationExceptionRes(parsedOutput, context);
1618
1562
  default:
1619
1563
  const parsedBody = parsedOutput.body;
1620
- throwDefaultError({
1564
+ return throwDefaultError({
1621
1565
  output,
1622
1566
  parsedBody,
1623
- exceptionCtor: __BaseException,
1624
1567
  errorCode,
1625
1568
  });
1626
1569
  }
@@ -1633,9 +1576,10 @@ export const de_GetSubscriberCommand = async (output, context) => {
1633
1576
  $metadata: deserializeMetadata(output),
1634
1577
  });
1635
1578
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1636
- if (data.subscriber != null) {
1637
- contents.subscriber = de_SubscriberResource(data.subscriber, context);
1638
- }
1579
+ const doc = take(data, {
1580
+ subscriber: (_) => de_SubscriberResource(_, context),
1581
+ });
1582
+ Object.assign(contents, doc);
1639
1583
  return contents;
1640
1584
  };
1641
1585
  const de_GetSubscriberCommandError = async (output, context) => {
@@ -1662,10 +1606,9 @@ const de_GetSubscriberCommandError = async (output, context) => {
1662
1606
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1663
1607
  default:
1664
1608
  const parsedBody = parsedOutput.body;
1665
- throwDefaultError({
1609
+ return throwDefaultError({
1666
1610
  output,
1667
1611
  parsedBody,
1668
- exceptionCtor: __BaseException,
1669
1612
  errorCode,
1670
1613
  });
1671
1614
  }
@@ -1678,12 +1621,11 @@ export const de_ListDatalakeExceptionsCommand = async (output, context) => {
1678
1621
  $metadata: deserializeMetadata(output),
1679
1622
  });
1680
1623
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1681
- if (data.nextToken != null) {
1682
- contents.nextToken = __expectString(data.nextToken);
1683
- }
1684
- if (data.nonRetryableFailures != null) {
1685
- contents.nonRetryableFailures = de_FailuresResponseList(data.nonRetryableFailures, context);
1686
- }
1624
+ const doc = take(data, {
1625
+ nextToken: __expectString,
1626
+ nonRetryableFailures: (_) => de_FailuresResponseList(_, context),
1627
+ });
1628
+ Object.assign(contents, doc);
1687
1629
  return contents;
1688
1630
  };
1689
1631
  const de_ListDatalakeExceptionsCommandError = async (output, context) => {
@@ -1707,10 +1649,9 @@ const de_ListDatalakeExceptionsCommandError = async (output, context) => {
1707
1649
  throw await de_ValidationExceptionRes(parsedOutput, context);
1708
1650
  default:
1709
1651
  const parsedBody = parsedOutput.body;
1710
- throwDefaultError({
1652
+ return throwDefaultError({
1711
1653
  output,
1712
1654
  parsedBody,
1713
- exceptionCtor: __BaseException,
1714
1655
  errorCode,
1715
1656
  });
1716
1657
  }
@@ -1723,12 +1664,11 @@ export const de_ListLogSourcesCommand = async (output, context) => {
1723
1664
  $metadata: deserializeMetadata(output),
1724
1665
  });
1725
1666
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1726
- if (data.nextToken != null) {
1727
- contents.nextToken = __expectString(data.nextToken);
1728
- }
1729
- if (data.regionSourceTypesAccountsList != null) {
1730
- contents.regionSourceTypesAccountsList = de_RegionSourceTypesAccountsList(data.regionSourceTypesAccountsList, context);
1731
- }
1667
+ const doc = take(data, {
1668
+ nextToken: __expectString,
1669
+ regionSourceTypesAccountsList: _json,
1670
+ });
1671
+ Object.assign(contents, doc);
1732
1672
  return contents;
1733
1673
  };
1734
1674
  const de_ListLogSourcesCommandError = async (output, context) => {
@@ -1755,10 +1695,9 @@ const de_ListLogSourcesCommandError = async (output, context) => {
1755
1695
  throw await de_ValidationExceptionRes(parsedOutput, context);
1756
1696
  default:
1757
1697
  const parsedBody = parsedOutput.body;
1758
- throwDefaultError({
1698
+ return throwDefaultError({
1759
1699
  output,
1760
1700
  parsedBody,
1761
- exceptionCtor: __BaseException,
1762
1701
  errorCode,
1763
1702
  });
1764
1703
  }
@@ -1771,12 +1710,11 @@ export const de_ListSubscribersCommand = async (output, context) => {
1771
1710
  $metadata: deserializeMetadata(output),
1772
1711
  });
1773
1712
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1774
- if (data.nextToken != null) {
1775
- contents.nextToken = __expectString(data.nextToken);
1776
- }
1777
- if (data.subscribers != null) {
1778
- contents.subscribers = de_SubscriberList(data.subscribers, context);
1779
- }
1713
+ const doc = take(data, {
1714
+ nextToken: __expectString,
1715
+ subscribers: (_) => de_SubscriberList(_, context),
1716
+ });
1717
+ Object.assign(contents, doc);
1780
1718
  return contents;
1781
1719
  };
1782
1720
  const de_ListSubscribersCommandError = async (output, context) => {
@@ -1806,10 +1744,9 @@ const de_ListSubscribersCommandError = async (output, context) => {
1806
1744
  throw await de_ValidationExceptionRes(parsedOutput, context);
1807
1745
  default:
1808
1746
  const parsedBody = parsedOutput.body;
1809
- throwDefaultError({
1747
+ return throwDefaultError({
1810
1748
  output,
1811
1749
  parsedBody,
1812
- exceptionCtor: __BaseException,
1813
1750
  errorCode,
1814
1751
  });
1815
1752
  }
@@ -1848,10 +1785,9 @@ const de_UpdateDatalakeCommandError = async (output, context) => {
1848
1785
  throw await de_ValidationExceptionRes(parsedOutput, context);
1849
1786
  default:
1850
1787
  const parsedBody = parsedOutput.body;
1851
- throwDefaultError({
1788
+ return throwDefaultError({
1852
1789
  output,
1853
1790
  parsedBody,
1854
- exceptionCtor: __BaseException,
1855
1791
  errorCode,
1856
1792
  });
1857
1793
  }
@@ -1887,10 +1823,9 @@ const de_UpdateDatalakeExceptionsExpiryCommandError = async (output, context) =>
1887
1823
  throw await de_ValidationExceptionRes(parsedOutput, context);
1888
1824
  default:
1889
1825
  const parsedBody = parsedOutput.body;
1890
- throwDefaultError({
1826
+ return throwDefaultError({
1891
1827
  output,
1892
1828
  parsedBody,
1893
- exceptionCtor: __BaseException,
1894
1829
  errorCode,
1895
1830
  });
1896
1831
  }
@@ -1926,10 +1861,9 @@ const de_UpdateDatalakeExceptionsSubscriptionCommandError = async (output, conte
1926
1861
  throw await de_ValidationExceptionRes(parsedOutput, context);
1927
1862
  default:
1928
1863
  const parsedBody = parsedOutput.body;
1929
- throwDefaultError({
1864
+ return throwDefaultError({
1930
1865
  output,
1931
1866
  parsedBody,
1932
- exceptionCtor: __BaseException,
1933
1867
  errorCode,
1934
1868
  });
1935
1869
  }
@@ -1942,9 +1876,10 @@ export const de_UpdateSubscriberCommand = async (output, context) => {
1942
1876
  $metadata: deserializeMetadata(output),
1943
1877
  });
1944
1878
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1945
- if (data.subscriber != null) {
1946
- contents.subscriber = de_SubscriberResource(data.subscriber, context);
1947
- }
1879
+ const doc = take(data, {
1880
+ subscriber: (_) => de_SubscriberResource(_, context),
1881
+ });
1882
+ Object.assign(contents, doc);
1948
1883
  return contents;
1949
1884
  };
1950
1885
  const de_UpdateSubscriberCommandError = async (output, context) => {
@@ -1977,10 +1912,9 @@ const de_UpdateSubscriberCommandError = async (output, context) => {
1977
1912
  throw await de_ValidationExceptionRes(parsedOutput, context);
1978
1913
  default:
1979
1914
  const parsedBody = parsedOutput.body;
1980
- throwDefaultError({
1915
+ return throwDefaultError({
1981
1916
  output,
1982
1917
  parsedBody,
1983
- exceptionCtor: __BaseException,
1984
1918
  errorCode,
1985
1919
  });
1986
1920
  }
@@ -1993,9 +1927,10 @@ export const de_UpdateSubscriptionNotificationConfigurationCommand = async (outp
1993
1927
  $metadata: deserializeMetadata(output),
1994
1928
  });
1995
1929
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1996
- if (data.queueArn != null) {
1997
- contents.queueArn = __expectString(data.queueArn);
1998
- }
1930
+ const doc = take(data, {
1931
+ queueArn: __expectString,
1932
+ });
1933
+ Object.assign(contents, doc);
1999
1934
  return contents;
2000
1935
  };
2001
1936
  const de_UpdateSubscriptionNotificationConfigurationCommandError = async (output, context) => {
@@ -2028,24 +1963,22 @@ const de_UpdateSubscriptionNotificationConfigurationCommandError = async (output
2028
1963
  throw await de_ValidationExceptionRes(parsedOutput, context);
2029
1964
  default:
2030
1965
  const parsedBody = parsedOutput.body;
2031
- throwDefaultError({
1966
+ return throwDefaultError({
2032
1967
  output,
2033
1968
  parsedBody,
2034
- exceptionCtor: __BaseException,
2035
1969
  errorCode,
2036
1970
  });
2037
1971
  }
2038
1972
  };
2039
- const map = __map;
1973
+ const throwDefaultError = withBaseException(__BaseException);
2040
1974
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
2041
1975
  const contents = map({});
2042
1976
  const data = parsedOutput.body;
2043
- if (data.errorCode != null) {
2044
- contents.errorCode = __expectString(data.errorCode);
2045
- }
2046
- if (data.message != null) {
2047
- contents.message = __expectString(data.message);
2048
- }
1977
+ const doc = take(data, {
1978
+ errorCode: __expectString,
1979
+ message: __expectString,
1980
+ });
1981
+ Object.assign(contents, doc);
2049
1982
  const exception = new AccessDeniedException({
2050
1983
  $metadata: deserializeMetadata(parsedOutput),
2051
1984
  ...contents,
@@ -2055,9 +1988,10 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
2055
1988
  const de_AccountNotFoundExceptionRes = async (parsedOutput, context) => {
2056
1989
  const contents = map({});
2057
1990
  const data = parsedOutput.body;
2058
- if (data.message != null) {
2059
- contents.message = __expectString(data.message);
2060
- }
1991
+ const doc = take(data, {
1992
+ message: __expectString,
1993
+ });
1994
+ Object.assign(contents, doc);
2061
1995
  const exception = new AccountNotFoundException({
2062
1996
  $metadata: deserializeMetadata(parsedOutput),
2063
1997
  ...contents,
@@ -2067,9 +2001,10 @@ const de_AccountNotFoundExceptionRes = async (parsedOutput, context) => {
2067
2001
  const de_BucketNotFoundExceptionRes = async (parsedOutput, context) => {
2068
2002
  const contents = map({});
2069
2003
  const data = parsedOutput.body;
2070
- if (data.message != null) {
2071
- contents.message = __expectString(data.message);
2072
- }
2004
+ const doc = take(data, {
2005
+ message: __expectString,
2006
+ });
2007
+ Object.assign(contents, doc);
2073
2008
  const exception = new BucketNotFoundException({
2074
2009
  $metadata: deserializeMetadata(parsedOutput),
2075
2010
  ...contents,
@@ -2079,9 +2014,10 @@ const de_BucketNotFoundExceptionRes = async (parsedOutput, context) => {
2079
2014
  const de_ConcurrentModificationExceptionRes = async (parsedOutput, context) => {
2080
2015
  const contents = map({});
2081
2016
  const data = parsedOutput.body;
2082
- if (data.message != null) {
2083
- contents.message = __expectString(data.message);
2084
- }
2017
+ const doc = take(data, {
2018
+ message: __expectString,
2019
+ });
2020
+ Object.assign(contents, doc);
2085
2021
  const exception = new ConcurrentModificationException({
2086
2022
  $metadata: deserializeMetadata(parsedOutput),
2087
2023
  ...contents,
@@ -2091,15 +2027,12 @@ const de_ConcurrentModificationExceptionRes = async (parsedOutput, context) => {
2091
2027
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
2092
2028
  const contents = map({});
2093
2029
  const data = parsedOutput.body;
2094
- if (data.message != null) {
2095
- contents.message = __expectString(data.message);
2096
- }
2097
- if (data.resourceId != null) {
2098
- contents.resourceId = __expectString(data.resourceId);
2099
- }
2100
- if (data.resourceType != null) {
2101
- contents.resourceType = __expectString(data.resourceType);
2102
- }
2030
+ const doc = take(data, {
2031
+ message: __expectString,
2032
+ resourceId: __expectString,
2033
+ resourceType: __expectString,
2034
+ });
2035
+ Object.assign(contents, doc);
2103
2036
  const exception = new ConflictException({
2104
2037
  $metadata: deserializeMetadata(parsedOutput),
2105
2038
  ...contents,
@@ -2109,9 +2042,10 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
2109
2042
  const de_ConflictSourceNamesExceptionRes = async (parsedOutput, context) => {
2110
2043
  const contents = map({});
2111
2044
  const data = parsedOutput.body;
2112
- if (data.message != null) {
2113
- contents.message = __expectString(data.message);
2114
- }
2045
+ const doc = take(data, {
2046
+ message: __expectString,
2047
+ });
2048
+ Object.assign(contents, doc);
2115
2049
  const exception = new ConflictSourceNamesException({
2116
2050
  $metadata: deserializeMetadata(parsedOutput),
2117
2051
  ...contents,
@@ -2121,9 +2055,10 @@ const de_ConflictSourceNamesExceptionRes = async (parsedOutput, context) => {
2121
2055
  const de_ConflictSubscriptionExceptionRes = async (parsedOutput, context) => {
2122
2056
  const contents = map({});
2123
2057
  const data = parsedOutput.body;
2124
- if (data.message != null) {
2125
- contents.message = __expectString(data.message);
2126
- }
2058
+ const doc = take(data, {
2059
+ message: __expectString,
2060
+ });
2061
+ Object.assign(contents, doc);
2127
2062
  const exception = new ConflictSubscriptionException({
2128
2063
  $metadata: deserializeMetadata(parsedOutput),
2129
2064
  ...contents,
@@ -2133,9 +2068,10 @@ const de_ConflictSubscriptionExceptionRes = async (parsedOutput, context) => {
2133
2068
  const de_EventBridgeExceptionRes = async (parsedOutput, context) => {
2134
2069
  const contents = map({});
2135
2070
  const data = parsedOutput.body;
2136
- if (data.message != null) {
2137
- contents.message = __expectString(data.message);
2138
- }
2071
+ const doc = take(data, {
2072
+ message: __expectString,
2073
+ });
2074
+ Object.assign(contents, doc);
2139
2075
  const exception = new EventBridgeException({
2140
2076
  $metadata: deserializeMetadata(parsedOutput),
2141
2077
  ...contents,
@@ -2150,9 +2086,10 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
2150
2086
  ],
2151
2087
  });
2152
2088
  const data = parsedOutput.body;
2153
- if (data.message != null) {
2154
- contents.message = __expectString(data.message);
2155
- }
2089
+ const doc = take(data, {
2090
+ message: __expectString,
2091
+ });
2092
+ Object.assign(contents, doc);
2156
2093
  const exception = new InternalServerException({
2157
2094
  $metadata: deserializeMetadata(parsedOutput),
2158
2095
  ...contents,
@@ -2162,9 +2099,10 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
2162
2099
  const de_InvalidInputExceptionRes = async (parsedOutput, context) => {
2163
2100
  const contents = map({});
2164
2101
  const data = parsedOutput.body;
2165
- if (data.message != null) {
2166
- contents.message = __expectString(data.message);
2167
- }
2102
+ const doc = take(data, {
2103
+ message: __expectString,
2104
+ });
2105
+ Object.assign(contents, doc);
2168
2106
  const exception = new InvalidInputException({
2169
2107
  $metadata: deserializeMetadata(parsedOutput),
2170
2108
  ...contents,
@@ -2174,15 +2112,12 @@ const de_InvalidInputExceptionRes = async (parsedOutput, context) => {
2174
2112
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
2175
2113
  const contents = map({});
2176
2114
  const data = parsedOutput.body;
2177
- if (data.message != null) {
2178
- contents.message = __expectString(data.message);
2179
- }
2180
- if (data.resourceId != null) {
2181
- contents.resourceId = __expectString(data.resourceId);
2182
- }
2183
- if (data.resourceType != null) {
2184
- contents.resourceType = __expectString(data.resourceType);
2185
- }
2115
+ const doc = take(data, {
2116
+ message: __expectString,
2117
+ resourceId: __expectString,
2118
+ resourceType: __expectString,
2119
+ });
2120
+ Object.assign(contents, doc);
2186
2121
  const exception = new ResourceNotFoundException({
2187
2122
  $metadata: deserializeMetadata(parsedOutput),
2188
2123
  ...contents,
@@ -2192,9 +2127,10 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
2192
2127
  const de_S3ExceptionRes = async (parsedOutput, context) => {
2193
2128
  const contents = map({});
2194
2129
  const data = parsedOutput.body;
2195
- if (data.message != null) {
2196
- contents.message = __expectString(data.message);
2197
- }
2130
+ const doc = take(data, {
2131
+ message: __expectString,
2132
+ });
2133
+ Object.assign(contents, doc);
2198
2134
  const exception = new S3Exception({
2199
2135
  $metadata: deserializeMetadata(parsedOutput),
2200
2136
  ...contents,
@@ -2204,21 +2140,14 @@ const de_S3ExceptionRes = async (parsedOutput, context) => {
2204
2140
  const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
2205
2141
  const contents = map({});
2206
2142
  const data = parsedOutput.body;
2207
- if (data.message != null) {
2208
- contents.message = __expectString(data.message);
2209
- }
2210
- if (data.quotaCode != null) {
2211
- contents.quotaCode = __expectString(data.quotaCode);
2212
- }
2213
- if (data.resourceId != null) {
2214
- contents.resourceId = __expectString(data.resourceId);
2215
- }
2216
- if (data.resourceType != null) {
2217
- contents.resourceType = __expectString(data.resourceType);
2218
- }
2219
- if (data.serviceCode != null) {
2220
- contents.serviceCode = __expectString(data.serviceCode);
2221
- }
2143
+ const doc = take(data, {
2144
+ message: __expectString,
2145
+ quotaCode: __expectString,
2146
+ resourceId: __expectString,
2147
+ resourceType: __expectString,
2148
+ serviceCode: __expectString,
2149
+ });
2150
+ Object.assign(contents, doc);
2222
2151
  const exception = new ServiceQuotaExceededException({
2223
2152
  $metadata: deserializeMetadata(parsedOutput),
2224
2153
  ...contents,
@@ -2233,15 +2162,12 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
2233
2162
  ],
2234
2163
  });
2235
2164
  const data = parsedOutput.body;
2236
- if (data.message != null) {
2237
- contents.message = __expectString(data.message);
2238
- }
2239
- if (data.quotaCode != null) {
2240
- contents.quotaCode = __expectString(data.quotaCode);
2241
- }
2242
- if (data.serviceCode != null) {
2243
- contents.serviceCode = __expectString(data.serviceCode);
2244
- }
2165
+ const doc = take(data, {
2166
+ message: __expectString,
2167
+ quotaCode: __expectString,
2168
+ serviceCode: __expectString,
2169
+ });
2170
+ Object.assign(contents, doc);
2245
2171
  const exception = new ThrottlingException({
2246
2172
  $metadata: deserializeMetadata(parsedOutput),
2247
2173
  ...contents,
@@ -2251,460 +2177,75 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
2251
2177
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
2252
2178
  const contents = map({});
2253
2179
  const data = parsedOutput.body;
2254
- if (data.fieldList != null) {
2255
- contents.fieldList = de_ValidationExceptionFieldList(data.fieldList, context);
2256
- }
2257
- if (data.message != null) {
2258
- contents.message = __expectString(data.message);
2259
- }
2260
- if (data.reason != null) {
2261
- contents.reason = __expectString(data.reason);
2262
- }
2180
+ const doc = take(data, {
2181
+ fieldList: _json,
2182
+ message: __expectString,
2183
+ reason: __expectString,
2184
+ });
2185
+ Object.assign(contents, doc);
2263
2186
  const exception = new ValidationException({
2264
2187
  $metadata: deserializeMetadata(parsedOutput),
2265
2188
  ...contents,
2266
2189
  });
2267
2190
  return __decorateServiceException(exception, parsedOutput.body);
2268
2191
  };
2269
- const se_AccessTypeList = (input, context) => {
2270
- return input
2271
- .filter((e) => e != null)
2272
- .map((entry) => {
2273
- return entry;
2274
- });
2275
- };
2276
- const se_AllDimensionsMap = (input, context) => {
2277
- return Object.entries(input).reduce((acc, [key, value]) => {
2278
- if (value === null) {
2279
- return acc;
2280
- }
2281
- acc[key] = se_TwoDimensionsMap(value, context);
2282
- return acc;
2283
- }, {});
2284
- };
2285
- const se_AutoEnableNewRegionConfiguration = (input, context) => {
2286
- return {
2287
- ...(input.region != null && { region: input.region }),
2288
- ...(input.sources != null && { sources: se_AwsSourceTypeList(input.sources, context) }),
2289
- };
2290
- };
2291
- const se_AutoEnableNewRegionConfigurationList = (input, context) => {
2292
- return input
2293
- .filter((e) => e != null)
2294
- .map((entry) => {
2295
- return se_AutoEnableNewRegionConfiguration(entry, context);
2296
- });
2297
- };
2298
- const se_AwsSourceTypeList = (input, context) => {
2299
- return input
2300
- .filter((e) => e != null)
2301
- .map((entry) => {
2302
- return entry;
2303
- });
2304
- };
2305
- const se_DimensionSet = (input, context) => {
2306
- return input
2307
- .filter((e) => e != null)
2308
- .map((entry) => {
2309
- return entry;
2310
- });
2311
- };
2312
- const se_InputSet = (input, context) => {
2313
- return input
2314
- .filter((e) => e != null)
2315
- .map((entry) => {
2316
- return entry;
2317
- });
2318
- };
2319
- const se_LakeConfigurationRequest = (input, context) => {
2320
- return {
2321
- ...(input.encryptionKey != null && { encryptionKey: input.encryptionKey }),
2322
- ...(input.replicationDestinationRegions != null && {
2323
- replicationDestinationRegions: se_RegionSet(input.replicationDestinationRegions, context),
2324
- }),
2325
- ...(input.replicationRoleArn != null && { replicationRoleArn: input.replicationRoleArn }),
2326
- ...(input.retentionSettings != null && {
2327
- retentionSettings: se_RetentionSettingList(input.retentionSettings, context),
2328
- }),
2329
- ...(input.tagsMap != null && { tagsMap: se_TagsMap(input.tagsMap, context) }),
2330
- };
2331
- };
2332
- const se_LakeConfigurationRequestMap = (input, context) => {
2333
- return Object.entries(input).reduce((acc, [key, value]) => {
2334
- if (value === null) {
2335
- return acc;
2336
- }
2337
- acc[key] = se_LakeConfigurationRequest(value, context);
2338
- return acc;
2339
- }, {});
2340
- };
2341
- const se_RegionSet = (input, context) => {
2342
- return input
2343
- .filter((e) => e != null)
2344
- .map((entry) => {
2345
- return entry;
2346
- });
2347
- };
2348
- const se_RetentionSetting = (input, context) => {
2349
- return {
2350
- ...(input.retentionPeriod != null && { retentionPeriod: input.retentionPeriod }),
2351
- ...(input.storageClass != null && { storageClass: input.storageClass }),
2352
- };
2353
- };
2354
- const se_RetentionSettingList = (input, context) => {
2355
- return input
2356
- .filter((e) => e != null)
2357
- .map((entry) => {
2358
- return se_RetentionSetting(entry, context);
2359
- });
2360
- };
2361
- const se_SourceType = (input, context) => {
2362
- return SourceType.visit(input, {
2363
- awsSourceType: (value) => ({ awsSourceType: value }),
2364
- customSourceType: (value) => ({ customSourceType: value }),
2365
- _: (name, value) => ({ name: value }),
2366
- });
2367
- };
2368
- const se_SourceTypeList = (input, context) => {
2369
- return input
2370
- .filter((e) => e != null)
2371
- .map((entry) => {
2372
- return se_SourceType(entry, context);
2373
- });
2374
- };
2375
- const se_TagsMap = (input, context) => {
2376
- return Object.entries(input).reduce((acc, [key, value]) => {
2377
- if (value === null) {
2378
- return acc;
2379
- }
2380
- acc[key] = value;
2381
- return acc;
2382
- }, {});
2383
- };
2384
- const se_TwoDimensionsMap = (input, context) => {
2385
- return Object.entries(input).reduce((acc, [key, value]) => {
2386
- if (value === null) {
2387
- return acc;
2388
- }
2389
- acc[key] = se_ValueSet(value, context);
2390
- return acc;
2391
- }, {});
2392
- };
2393
- const se_ValueSet = (input, context) => {
2394
- return input
2395
- .filter((e) => e != null)
2396
- .map((entry) => {
2397
- return entry;
2398
- });
2399
- };
2400
- const de_AccessTypeList = (output, context) => {
2401
- const retVal = (output || [])
2402
- .filter((e) => e != null)
2403
- .map((entry) => {
2404
- if (entry === null) {
2405
- return null;
2406
- }
2407
- return __expectString(entry);
2408
- });
2409
- return retVal;
2410
- };
2411
- const de_AccountList = (output, context) => {
2412
- const retVal = (output || [])
2413
- .filter((e) => e != null)
2414
- .map((entry) => {
2415
- if (entry === null) {
2416
- return null;
2417
- }
2418
- return __expectString(entry);
2419
- });
2420
- return retVal;
2421
- };
2422
- const de_AccountSources = (output, context) => {
2423
- return {
2424
- account: __expectString(output.account),
2425
- eventClass: __expectString(output.eventClass),
2426
- logsStatus: output.logsStatus != null ? de_LogsStatusList(output.logsStatus, context) : undefined,
2427
- sourceType: __expectString(output.sourceType),
2428
- };
2429
- };
2430
- const de_AccountSourcesList = (output, context) => {
2431
- const retVal = (output || [])
2432
- .filter((e) => e != null)
2433
- .map((entry) => {
2434
- if (entry === null) {
2435
- return null;
2436
- }
2437
- return de_AccountSources(entry, context);
2438
- });
2439
- return retVal;
2440
- };
2441
- const de_AllDimensionsMap = (output, context) => {
2442
- return Object.entries(output).reduce((acc, [key, value]) => {
2443
- if (value === null) {
2444
- return acc;
2445
- }
2446
- acc[key] = de_TwoDimensionsMap(value, context);
2447
- return acc;
2448
- }, {});
2449
- };
2450
- const de_AutoEnableNewRegionConfiguration = (output, context) => {
2451
- return {
2452
- region: __expectString(output.region),
2453
- sources: output.sources != null ? de_AwsSourceTypeList(output.sources, context) : undefined,
2454
- };
2455
- };
2456
- const de_AutoEnableNewRegionConfigurationList = (output, context) => {
2457
- const retVal = (output || [])
2458
- .filter((e) => e != null)
2459
- .map((entry) => {
2460
- if (entry === null) {
2461
- return null;
2462
- }
2463
- return de_AutoEnableNewRegionConfiguration(entry, context);
2464
- });
2465
- return retVal;
2466
- };
2467
- const de_AwsSourceTypeList = (output, context) => {
2468
- const retVal = (output || [])
2469
- .filter((e) => e != null)
2470
- .map((entry) => {
2471
- if (entry === null) {
2472
- return null;
2473
- }
2474
- return __expectString(entry);
2475
- });
2476
- return retVal;
2477
- };
2478
2192
  const de_Failures = (output, context) => {
2479
- return {
2480
- exceptionMessage: __expectString(output.exceptionMessage),
2481
- remediation: __expectString(output.remediation),
2482
- timestamp: output.timestamp != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.timestamp)) : undefined,
2483
- };
2193
+ return take(output, {
2194
+ exceptionMessage: __expectString,
2195
+ remediation: __expectString,
2196
+ timestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2197
+ });
2484
2198
  };
2485
2199
  const de_Failureslist = (output, context) => {
2486
2200
  const retVal = (output || [])
2487
2201
  .filter((e) => e != null)
2488
2202
  .map((entry) => {
2489
- if (entry === null) {
2490
- return null;
2491
- }
2492
2203
  return de_Failures(entry, context);
2493
2204
  });
2494
2205
  return retVal;
2495
2206
  };
2496
2207
  const de_FailuresResponse = (output, context) => {
2497
- return {
2498
- failures: output.failures != null ? de_Failureslist(output.failures, context) : undefined,
2499
- region: __expectString(output.region),
2500
- };
2208
+ return take(output, {
2209
+ failures: (_) => de_Failureslist(_, context),
2210
+ region: __expectString,
2211
+ });
2501
2212
  };
2502
2213
  const de_FailuresResponseList = (output, context) => {
2503
2214
  const retVal = (output || [])
2504
2215
  .filter((e) => e != null)
2505
2216
  .map((entry) => {
2506
- if (entry === null) {
2507
- return null;
2508
- }
2509
2217
  return de_FailuresResponse(entry, context);
2510
2218
  });
2511
2219
  return retVal;
2512
2220
  };
2513
- const de_LakeConfigurationResponse = (output, context) => {
2514
- return {
2515
- encryptionKey: __expectString(output.encryptionKey),
2516
- replicationDestinationRegions: output.replicationDestinationRegions != null
2517
- ? de_RegionSet(output.replicationDestinationRegions, context)
2518
- : undefined,
2519
- replicationRoleArn: __expectString(output.replicationRoleArn),
2520
- retentionSettings: output.retentionSettings != null ? de_RetentionSettingList(output.retentionSettings, context) : undefined,
2521
- s3BucketArn: __expectString(output.s3BucketArn),
2522
- status: __expectString(output.status),
2523
- tagsMap: output.tagsMap != null ? de_TagsMap(output.tagsMap, context) : undefined,
2524
- updateStatus: output.updateStatus != null ? de_UpdateStatus(output.updateStatus, context) : undefined,
2525
- };
2526
- };
2527
- const de_LakeConfigurationResponseMap = (output, context) => {
2528
- return Object.entries(output).reduce((acc, [key, value]) => {
2529
- if (value === null) {
2530
- return acc;
2531
- }
2532
- acc[key] = de_LakeConfigurationResponse(value, context);
2533
- return acc;
2534
- }, {});
2535
- };
2536
- const de_LastUpdateFailure = (output, context) => {
2537
- return {
2538
- code: __expectString(output.code),
2539
- reason: __expectString(output.reason),
2540
- };
2541
- };
2542
- const de_LogsStatus = (output, context) => {
2543
- return {
2544
- healthStatus: __expectString(output.healthStatus),
2545
- pathToLogs: __expectString(output.pathToLogs),
2546
- };
2547
- };
2548
- const de_LogsStatusList = (output, context) => {
2549
- const retVal = (output || [])
2550
- .filter((e) => e != null)
2551
- .map((entry) => {
2552
- if (entry === null) {
2553
- return null;
2554
- }
2555
- return de_LogsStatus(entry, context);
2556
- });
2557
- return retVal;
2558
- };
2559
- const de_ProtocolAndNotificationEndpoint = (output, context) => {
2560
- return {
2561
- endpoint: __expectString(output.endpoint),
2562
- protocol: __expectString(output.protocol),
2563
- };
2564
- };
2565
- const de_RegionSet = (output, context) => {
2566
- const retVal = (output || [])
2567
- .filter((e) => e != null)
2568
- .map((entry) => {
2569
- if (entry === null) {
2570
- return null;
2571
- }
2572
- return __expectString(entry);
2573
- });
2574
- return retVal;
2575
- };
2576
- const de_RegionSourceTypesAccountsList = (output, context) => {
2577
- const retVal = (output || [])
2578
- .filter((e) => e != null)
2579
- .map((entry) => {
2580
- if (entry === null) {
2581
- return null;
2582
- }
2583
- return de_AllDimensionsMap(entry, context);
2584
- });
2585
- return retVal;
2586
- };
2587
- const de_RetentionSetting = (output, context) => {
2588
- return {
2589
- retentionPeriod: __expectInt32(output.retentionPeriod),
2590
- storageClass: __expectString(output.storageClass),
2591
- };
2592
- };
2593
- const de_RetentionSettingList = (output, context) => {
2594
- const retVal = (output || [])
2595
- .filter((e) => e != null)
2596
- .map((entry) => {
2597
- if (entry === null) {
2598
- return null;
2599
- }
2600
- return de_RetentionSetting(entry, context);
2601
- });
2602
- return retVal;
2603
- };
2604
- const de_SourceType = (output, context) => {
2605
- if (__expectString(output.awsSourceType) !== undefined) {
2606
- return { awsSourceType: __expectString(output.awsSourceType) };
2607
- }
2608
- if (__expectString(output.customSourceType) !== undefined) {
2609
- return { customSourceType: __expectString(output.customSourceType) };
2610
- }
2611
- return { $unknown: Object.entries(output)[0] };
2612
- };
2613
- const de_SourceTypeList = (output, context) => {
2614
- const retVal = (output || [])
2615
- .filter((e) => e != null)
2616
- .map((entry) => {
2617
- if (entry === null) {
2618
- return null;
2619
- }
2620
- return de_SourceType(__expectUnion(entry), context);
2621
- });
2622
- return retVal;
2623
- };
2624
2221
  const de_SubscriberList = (output, context) => {
2625
2222
  const retVal = (output || [])
2626
2223
  .filter((e) => e != null)
2627
2224
  .map((entry) => {
2628
- if (entry === null) {
2629
- return null;
2630
- }
2631
2225
  return de_SubscriberResource(entry, context);
2632
2226
  });
2633
2227
  return retVal;
2634
2228
  };
2635
2229
  const de_SubscriberResource = (output, context) => {
2636
- return {
2637
- accessTypes: output.accessTypes != null ? de_AccessTypeList(output.accessTypes, context) : undefined,
2638
- accountId: __expectString(output.accountId),
2639
- createdAt: output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined,
2640
- externalId: __expectString(output.externalId),
2641
- resourceShareArn: __expectString(output.resourceShareArn),
2642
- resourceShareName: __expectString(output.resourceShareName),
2643
- roleArn: __expectString(output.roleArn),
2644
- s3BucketArn: __expectString(output.s3BucketArn),
2645
- snsArn: __expectString(output.snsArn),
2646
- sourceTypes: output.sourceTypes != null ? de_SourceTypeList(output.sourceTypes, context) : undefined,
2647
- subscriberDescription: __expectString(output.subscriberDescription),
2648
- subscriberName: __expectString(output.subscriberName),
2649
- subscriptionEndpoint: __expectString(output.subscriptionEndpoint),
2650
- subscriptionId: __expectString(output.subscriptionId),
2651
- subscriptionProtocol: __expectString(output.subscriptionProtocol),
2652
- subscriptionStatus: __expectString(output.subscriptionStatus),
2653
- updatedAt: output.updatedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.updatedAt)) : undefined,
2654
- };
2655
- };
2656
- const de_TagsMap = (output, context) => {
2657
- return Object.entries(output).reduce((acc, [key, value]) => {
2658
- if (value === null) {
2659
- return acc;
2660
- }
2661
- acc[key] = __expectString(value);
2662
- return acc;
2663
- }, {});
2664
- };
2665
- const de_TwoDimensionsMap = (output, context) => {
2666
- return Object.entries(output).reduce((acc, [key, value]) => {
2667
- if (value === null) {
2668
- return acc;
2669
- }
2670
- acc[key] = de_ValueSet(value, context);
2671
- return acc;
2672
- }, {});
2673
- };
2674
- const de_UpdateStatus = (output, context) => {
2675
- return {
2676
- lastUpdateFailure: output.lastUpdateFailure != null ? de_LastUpdateFailure(output.lastUpdateFailure, context) : undefined,
2677
- lastUpdateRequestId: __expectString(output.lastUpdateRequestId),
2678
- lastUpdateStatus: __expectString(output.lastUpdateStatus),
2679
- };
2680
- };
2681
- const de_ValidationExceptionField = (output, context) => {
2682
- return {
2683
- message: __expectString(output.message),
2684
- name: __expectString(output.name),
2685
- };
2686
- };
2687
- const de_ValidationExceptionFieldList = (output, context) => {
2688
- const retVal = (output || [])
2689
- .filter((e) => e != null)
2690
- .map((entry) => {
2691
- if (entry === null) {
2692
- return null;
2693
- }
2694
- return de_ValidationExceptionField(entry, context);
2230
+ return take(output, {
2231
+ accessTypes: _json,
2232
+ accountId: __expectString,
2233
+ createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2234
+ externalId: __expectString,
2235
+ resourceShareArn: __expectString,
2236
+ resourceShareName: __expectString,
2237
+ roleArn: __expectString,
2238
+ s3BucketArn: __expectString,
2239
+ snsArn: __expectString,
2240
+ sourceTypes: _json,
2241
+ subscriberDescription: __expectString,
2242
+ subscriberName: __expectString,
2243
+ subscriptionEndpoint: __expectString,
2244
+ subscriptionId: __expectString,
2245
+ subscriptionProtocol: __expectString,
2246
+ subscriptionStatus: __expectString,
2247
+ updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2695
2248
  });
2696
- return retVal;
2697
- };
2698
- const de_ValueSet = (output, context) => {
2699
- const retVal = (output || [])
2700
- .filter((e) => e != null)
2701
- .map((entry) => {
2702
- if (entry === null) {
2703
- return null;
2704
- }
2705
- return __expectString(entry);
2706
- });
2707
- return retVal;
2708
2249
  };
2709
2250
  const deserializeMetadata = (output) => ({
2710
2251
  httpStatusCode: output.statusCode,