@aws-sdk/client-opensearch 3.312.0 → 3.316.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -32,10 +32,10 @@ const se_AddTagsCommand = async (input, context) => {
32
32
  };
33
33
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/tags";
34
34
  let body;
35
- body = JSON.stringify({
36
- ...(input.ARN != null && { ARN: input.ARN }),
37
- ...(input.TagList != null && { TagList: se_TagList(input.TagList, context) }),
38
- });
35
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
36
+ ARN: [],
37
+ TagList: (_) => (0, smithy_client_1._json)(_),
38
+ }));
39
39
  return new protocol_http_1.HttpRequest({
40
40
  protocol,
41
41
  hostname,
@@ -75,9 +75,9 @@ const se_AuthorizeVpcEndpointAccessCommand = async (input, context) => {
75
75
  "/2021-01-01/opensearch/domain/{DomainName}/authorizeVpcEndpointAccess";
76
76
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
77
77
  let body;
78
- body = JSON.stringify({
79
- ...(input.Account != null && { Account: input.Account }),
80
- });
78
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
79
+ Account: [],
80
+ }));
81
81
  return new protocol_http_1.HttpRequest({
82
82
  protocol,
83
83
  hostname,
@@ -97,9 +97,9 @@ const se_CancelServiceSoftwareUpdateCommand = async (input, context) => {
97
97
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
98
98
  "/2021-01-01/opensearch/serviceSoftwareUpdate/cancel";
99
99
  let body;
100
- body = JSON.stringify({
101
- ...(input.DomainName != null && { DomainName: input.DomainName }),
102
- });
100
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
101
+ DomainName: [],
102
+ }));
103
103
  return new protocol_http_1.HttpRequest({
104
104
  protocol,
105
105
  hostname,
@@ -118,40 +118,26 @@ const se_CreateDomainCommand = async (input, context) => {
118
118
  };
119
119
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/opensearch/domain";
120
120
  let body;
121
- body = JSON.stringify({
122
- ...(input.AccessPolicies != null && { AccessPolicies: input.AccessPolicies }),
123
- ...(input.AdvancedOptions != null && { AdvancedOptions: se_AdvancedOptions(input.AdvancedOptions, context) }),
124
- ...(input.AdvancedSecurityOptions != null && {
125
- AdvancedSecurityOptions: se_AdvancedSecurityOptionsInput(input.AdvancedSecurityOptions, context),
126
- }),
127
- ...(input.AutoTuneOptions != null && { AutoTuneOptions: se_AutoTuneOptionsInput(input.AutoTuneOptions, context) }),
128
- ...(input.ClusterConfig != null && { ClusterConfig: se_ClusterConfig(input.ClusterConfig, context) }),
129
- ...(input.CognitoOptions != null && { CognitoOptions: se_CognitoOptions(input.CognitoOptions, context) }),
130
- ...(input.DomainEndpointOptions != null && {
131
- DomainEndpointOptions: se_DomainEndpointOptions(input.DomainEndpointOptions, context),
132
- }),
133
- ...(input.DomainName != null && { DomainName: input.DomainName }),
134
- ...(input.EBSOptions != null && { EBSOptions: se_EBSOptions(input.EBSOptions, context) }),
135
- ...(input.EncryptionAtRestOptions != null && {
136
- EncryptionAtRestOptions: se_EncryptionAtRestOptions(input.EncryptionAtRestOptions, context),
137
- }),
138
- ...(input.EngineVersion != null && { EngineVersion: input.EngineVersion }),
139
- ...(input.LogPublishingOptions != null && {
140
- LogPublishingOptions: se_LogPublishingOptions(input.LogPublishingOptions, context),
141
- }),
142
- ...(input.NodeToNodeEncryptionOptions != null && {
143
- NodeToNodeEncryptionOptions: se_NodeToNodeEncryptionOptions(input.NodeToNodeEncryptionOptions, context),
144
- }),
145
- ...(input.OffPeakWindowOptions != null && {
146
- OffPeakWindowOptions: se_OffPeakWindowOptions(input.OffPeakWindowOptions, context),
147
- }),
148
- ...(input.SnapshotOptions != null && { SnapshotOptions: se_SnapshotOptions(input.SnapshotOptions, context) }),
149
- ...(input.SoftwareUpdateOptions != null && {
150
- SoftwareUpdateOptions: se_SoftwareUpdateOptions(input.SoftwareUpdateOptions, context),
151
- }),
152
- ...(input.TagList != null && { TagList: se_TagList(input.TagList, context) }),
153
- ...(input.VPCOptions != null && { VPCOptions: se_VPCOptions(input.VPCOptions, context) }),
154
- });
121
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
122
+ AccessPolicies: [],
123
+ AdvancedOptions: (_) => (0, smithy_client_1._json)(_),
124
+ AdvancedSecurityOptions: (_) => (0, smithy_client_1._json)(_),
125
+ AutoTuneOptions: (_) => se_AutoTuneOptionsInput(_, context),
126
+ ClusterConfig: (_) => (0, smithy_client_1._json)(_),
127
+ CognitoOptions: (_) => (0, smithy_client_1._json)(_),
128
+ DomainEndpointOptions: (_) => (0, smithy_client_1._json)(_),
129
+ DomainName: [],
130
+ EBSOptions: (_) => (0, smithy_client_1._json)(_),
131
+ EncryptionAtRestOptions: (_) => (0, smithy_client_1._json)(_),
132
+ EngineVersion: [],
133
+ LogPublishingOptions: (_) => (0, smithy_client_1._json)(_),
134
+ NodeToNodeEncryptionOptions: (_) => (0, smithy_client_1._json)(_),
135
+ OffPeakWindowOptions: (_) => (0, smithy_client_1._json)(_),
136
+ SnapshotOptions: (_) => (0, smithy_client_1._json)(_),
137
+ SoftwareUpdateOptions: (_) => (0, smithy_client_1._json)(_),
138
+ TagList: (_) => (0, smithy_client_1._json)(_),
139
+ VPCOptions: (_) => (0, smithy_client_1._json)(_),
140
+ }));
155
141
  return new protocol_http_1.HttpRequest({
156
142
  protocol,
157
143
  hostname,
@@ -171,16 +157,12 @@ const se_CreateOutboundConnectionCommand = async (input, context) => {
171
157
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
172
158
  "/2021-01-01/opensearch/cc/outboundConnection";
173
159
  let body;
174
- body = JSON.stringify({
175
- ...(input.ConnectionAlias != null && { ConnectionAlias: input.ConnectionAlias }),
176
- ...(input.ConnectionMode != null && { ConnectionMode: input.ConnectionMode }),
177
- ...(input.LocalDomainInfo != null && {
178
- LocalDomainInfo: se_DomainInformationContainer(input.LocalDomainInfo, context),
179
- }),
180
- ...(input.RemoteDomainInfo != null && {
181
- RemoteDomainInfo: se_DomainInformationContainer(input.RemoteDomainInfo, context),
182
- }),
183
- });
160
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
161
+ ConnectionAlias: [],
162
+ ConnectionMode: [],
163
+ LocalDomainInfo: (_) => (0, smithy_client_1._json)(_),
164
+ RemoteDomainInfo: (_) => (0, smithy_client_1._json)(_),
165
+ }));
184
166
  return new protocol_http_1.HttpRequest({
185
167
  protocol,
186
168
  hostname,
@@ -199,12 +181,12 @@ const se_CreatePackageCommand = async (input, context) => {
199
181
  };
200
182
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/packages";
201
183
  let body;
202
- body = JSON.stringify({
203
- ...(input.PackageDescription != null && { PackageDescription: input.PackageDescription }),
204
- ...(input.PackageName != null && { PackageName: input.PackageName }),
205
- ...(input.PackageSource != null && { PackageSource: se_PackageSource(input.PackageSource, context) }),
206
- ...(input.PackageType != null && { PackageType: input.PackageType }),
207
- });
184
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
185
+ PackageDescription: [],
186
+ PackageName: [],
187
+ PackageSource: (_) => (0, smithy_client_1._json)(_),
188
+ PackageType: [],
189
+ }));
208
190
  return new protocol_http_1.HttpRequest({
209
191
  protocol,
210
192
  hostname,
@@ -223,11 +205,11 @@ const se_CreateVpcEndpointCommand = async (input, context) => {
223
205
  };
224
206
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/opensearch/vpcEndpoints";
225
207
  let body;
226
- body = JSON.stringify({
227
- ...(input.ClientToken != null && { ClientToken: input.ClientToken }),
228
- ...(input.DomainArn != null && { DomainArn: input.DomainArn }),
229
- ...(input.VpcOptions != null && { VpcOptions: se_VPCOptions(input.VpcOptions, context) }),
230
- });
208
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
209
+ ClientToken: [],
210
+ DomainArn: [],
211
+ VpcOptions: (_) => (0, smithy_client_1._json)(_),
212
+ }));
231
213
  return new protocol_http_1.HttpRequest({
232
214
  protocol,
233
215
  hostname,
@@ -355,10 +337,10 @@ const se_DescribeDomainAutoTunesCommand = async (input, context) => {
355
337
  "/2021-01-01/opensearch/domain/{DomainName}/autoTunes";
356
338
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
357
339
  let body;
358
- body = JSON.stringify({
359
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
360
- ...(input.NextToken != null && { NextToken: input.NextToken }),
361
- });
340
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
341
+ MaxResults: [],
342
+ NextToken: [],
343
+ }));
362
344
  return new protocol_http_1.HttpRequest({
363
345
  protocol,
364
346
  hostname,
@@ -376,7 +358,7 @@ const se_DescribeDomainChangeProgressCommand = async (input, context) => {
376
358
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
377
359
  "/2021-01-01/opensearch/domain/{DomainName}/progress";
378
360
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
379
- const query = map({
361
+ const query = (0, smithy_client_1.map)({
380
362
  changeid: [, input.ChangeId],
381
363
  });
382
364
  let body;
@@ -417,9 +399,9 @@ const se_DescribeDomainsCommand = async (input, context) => {
417
399
  };
418
400
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/opensearch/domain-info";
419
401
  let body;
420
- body = JSON.stringify({
421
- ...(input.DomainNames != null && { DomainNames: se_DomainNameList(input.DomainNames, context) }),
422
- });
402
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
403
+ DomainNames: (_) => (0, smithy_client_1._json)(_),
404
+ }));
423
405
  return new protocol_http_1.HttpRequest({
424
406
  protocol,
425
407
  hostname,
@@ -437,7 +419,7 @@ const se_DescribeDryRunProgressCommand = async (input, context) => {
437
419
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
438
420
  "/2021-01-01/opensearch/domain/{DomainName}/dryRun";
439
421
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
440
- const query = map({
422
+ const query = (0, smithy_client_1.map)({
441
423
  dryRunId: [, input.DryRunId],
442
424
  loadDryRunConfig: [() => input.LoadDryRunConfig !== void 0, () => input.LoadDryRunConfig.toString()],
443
425
  });
@@ -462,11 +444,11 @@ const se_DescribeInboundConnectionsCommand = async (input, context) => {
462
444
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
463
445
  "/2021-01-01/opensearch/cc/inboundConnection/search";
464
446
  let body;
465
- body = JSON.stringify({
466
- ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }),
467
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
468
- ...(input.NextToken != null && { NextToken: input.NextToken }),
469
- });
447
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
448
+ Filters: (_) => (0, smithy_client_1._json)(_),
449
+ MaxResults: [],
450
+ NextToken: [],
451
+ }));
470
452
  return new protocol_http_1.HttpRequest({
471
453
  protocol,
472
454
  hostname,
@@ -485,7 +467,7 @@ const se_DescribeInstanceTypeLimitsCommand = async (input, context) => {
485
467
  "/2021-01-01/opensearch/instanceTypeLimits/{EngineVersion}/{InstanceType}";
486
468
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceType", () => input.InstanceType, "{InstanceType}", false);
487
469
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "EngineVersion", () => input.EngineVersion, "{EngineVersion}", false);
488
- const query = map({
470
+ const query = (0, smithy_client_1.map)({
489
471
  domainName: [, input.DomainName],
490
472
  });
491
473
  let body;
@@ -509,11 +491,11 @@ const se_DescribeOutboundConnectionsCommand = async (input, context) => {
509
491
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
510
492
  "/2021-01-01/opensearch/cc/outboundConnection/search";
511
493
  let body;
512
- body = JSON.stringify({
513
- ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }),
514
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
515
- ...(input.NextToken != null && { NextToken: input.NextToken }),
516
- });
494
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
495
+ Filters: (_) => (0, smithy_client_1._json)(_),
496
+ MaxResults: [],
497
+ NextToken: [],
498
+ }));
517
499
  return new protocol_http_1.HttpRequest({
518
500
  protocol,
519
501
  hostname,
@@ -532,11 +514,11 @@ const se_DescribePackagesCommand = async (input, context) => {
532
514
  };
533
515
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/packages/describe";
534
516
  let body;
535
- body = JSON.stringify({
536
- ...(input.Filters != null && { Filters: se_DescribePackagesFilterList(input.Filters, context) }),
537
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
538
- ...(input.NextToken != null && { NextToken: input.NextToken }),
539
- });
517
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
518
+ Filters: (_) => (0, smithy_client_1._json)(_),
519
+ MaxResults: [],
520
+ NextToken: [],
521
+ }));
540
522
  return new protocol_http_1.HttpRequest({
541
523
  protocol,
542
524
  hostname,
@@ -553,7 +535,7 @@ const se_DescribeReservedInstanceOfferingsCommand = async (input, context) => {
553
535
  const headers = {};
554
536
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
555
537
  "/2021-01-01/opensearch/reservedInstanceOfferings";
556
- const query = map({
538
+ const query = (0, smithy_client_1.map)({
557
539
  offeringId: [, input.ReservedInstanceOfferingId],
558
540
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
559
541
  nextToken: [, input.NextToken],
@@ -575,7 +557,7 @@ const se_DescribeReservedInstancesCommand = async (input, context) => {
575
557
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
576
558
  const headers = {};
577
559
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/opensearch/reservedInstances";
578
- const query = map({
560
+ const query = (0, smithy_client_1.map)({
579
561
  reservationId: [, input.ReservedInstanceId],
580
562
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
581
563
  nextToken: [, input.NextToken],
@@ -601,9 +583,9 @@ const se_DescribeVpcEndpointsCommand = async (input, context) => {
601
583
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
602
584
  "/2021-01-01/opensearch/vpcEndpoints/describe";
603
585
  let body;
604
- body = JSON.stringify({
605
- ...(input.VpcEndpointIds != null && { VpcEndpointIds: se_VpcEndpointIdList(input.VpcEndpointIds, context) }),
606
- });
586
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
587
+ VpcEndpointIds: (_) => (0, smithy_client_1._json)(_),
588
+ }));
607
589
  return new protocol_http_1.HttpRequest({
608
590
  protocol,
609
591
  hostname,
@@ -638,7 +620,7 @@ const se_GetCompatibleVersionsCommand = async (input, context) => {
638
620
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
639
621
  const headers = {};
640
622
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/opensearch/compatibleVersions";
641
- const query = map({
623
+ const query = (0, smithy_client_1.map)({
642
624
  domainName: [, input.DomainName],
643
625
  });
644
626
  let body;
@@ -659,7 +641,7 @@ const se_GetPackageVersionHistoryCommand = async (input, context) => {
659
641
  const headers = {};
660
642
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/packages/{PackageID}/history";
661
643
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "PackageID", () => input.PackageID, "{PackageID}", false);
662
- const query = map({
644
+ const query = (0, smithy_client_1.map)({
663
645
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
664
646
  nextToken: [, input.NextToken],
665
647
  });
@@ -682,7 +664,7 @@ const se_GetUpgradeHistoryCommand = async (input, context) => {
682
664
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
683
665
  "/2021-01-01/opensearch/upgradeDomain/{DomainName}/history";
684
666
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
685
- const query = map({
667
+ const query = (0, smithy_client_1.map)({
686
668
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
687
669
  nextToken: [, input.NextToken],
688
670
  });
@@ -721,7 +703,7 @@ const se_ListDomainNamesCommand = async (input, context) => {
721
703
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
722
704
  const headers = {};
723
705
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/domain";
724
- const query = map({
706
+ const query = (0, smithy_client_1.map)({
725
707
  engineType: [, input.EngineType],
726
708
  });
727
709
  let body;
@@ -742,7 +724,7 @@ const se_ListDomainsForPackageCommand = async (input, context) => {
742
724
  const headers = {};
743
725
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/packages/{PackageID}/domains";
744
726
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "PackageID", () => input.PackageID, "{PackageID}", false);
745
- const query = map({
727
+ const query = (0, smithy_client_1.map)({
746
728
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
747
729
  nextToken: [, input.NextToken],
748
730
  });
@@ -765,7 +747,7 @@ const se_ListInstanceTypeDetailsCommand = async (input, context) => {
765
747
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
766
748
  "/2021-01-01/opensearch/instanceTypeDetails/{EngineVersion}";
767
749
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "EngineVersion", () => input.EngineVersion, "{EngineVersion}", false);
768
- const query = map({
750
+ const query = (0, smithy_client_1.map)({
769
751
  domainName: [, input.DomainName],
770
752
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
771
753
  nextToken: [, input.NextToken],
@@ -788,7 +770,7 @@ const se_ListPackagesForDomainCommand = async (input, context) => {
788
770
  const headers = {};
789
771
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/domain/{DomainName}/packages";
790
772
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
791
- const query = map({
773
+ const query = (0, smithy_client_1.map)({
792
774
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
793
775
  nextToken: [, input.NextToken],
794
776
  });
@@ -811,7 +793,7 @@ const se_ListScheduledActionsCommand = async (input, context) => {
811
793
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
812
794
  "/2021-01-01/opensearch/domain/{DomainName}/scheduledActions";
813
795
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
814
- const query = map({
796
+ const query = (0, smithy_client_1.map)({
815
797
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
816
798
  nextToken: [, input.NextToken],
817
799
  });
@@ -832,7 +814,7 @@ const se_ListTagsCommand = async (input, context) => {
832
814
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
833
815
  const headers = {};
834
816
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/tags";
835
- const query = map({
817
+ const query = (0, smithy_client_1.map)({
836
818
  arn: [, (0, smithy_client_1.expectNonNull)(input.ARN, `ARN`)],
837
819
  });
838
820
  let body;
@@ -852,7 +834,7 @@ const se_ListVersionsCommand = async (input, context) => {
852
834
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
853
835
  const headers = {};
854
836
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/opensearch/versions";
855
- const query = map({
837
+ const query = (0, smithy_client_1.map)({
856
838
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
857
839
  nextToken: [, input.NextToken],
858
840
  });
@@ -875,7 +857,7 @@ const se_ListVpcEndpointAccessCommand = async (input, context) => {
875
857
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
876
858
  "/2021-01-01/opensearch/domain/{DomainName}/listVpcEndpointAccess";
877
859
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
878
- const query = map({
860
+ const query = (0, smithy_client_1.map)({
879
861
  nextToken: [, input.NextToken],
880
862
  });
881
863
  let body;
@@ -895,7 +877,7 @@ const se_ListVpcEndpointsCommand = async (input, context) => {
895
877
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
896
878
  const headers = {};
897
879
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/opensearch/vpcEndpoints";
898
- const query = map({
880
+ const query = (0, smithy_client_1.map)({
899
881
  nextToken: [, input.NextToken],
900
882
  });
901
883
  let body;
@@ -917,7 +899,7 @@ const se_ListVpcEndpointsForDomainCommand = async (input, context) => {
917
899
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
918
900
  "/2021-01-01/opensearch/domain/{DomainName}/vpcEndpoints";
919
901
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
920
- const query = map({
902
+ const query = (0, smithy_client_1.map)({
921
903
  nextToken: [, input.NextToken],
922
904
  });
923
905
  let body;
@@ -941,11 +923,11 @@ const se_PurchaseReservedInstanceOfferingCommand = async (input, context) => {
941
923
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
942
924
  "/2021-01-01/opensearch/purchaseReservedInstanceOffering";
943
925
  let body;
944
- body = JSON.stringify({
945
- ...(input.InstanceCount != null && { InstanceCount: input.InstanceCount }),
946
- ...(input.ReservationName != null && { ReservationName: input.ReservationName }),
947
- ...(input.ReservedInstanceOfferingId != null && { ReservedInstanceOfferingId: input.ReservedInstanceOfferingId }),
948
- });
926
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
927
+ InstanceCount: [],
928
+ ReservationName: [],
929
+ ReservedInstanceOfferingId: [],
930
+ }));
949
931
  return new protocol_http_1.HttpRequest({
950
932
  protocol,
951
933
  hostname,
@@ -982,10 +964,10 @@ const se_RemoveTagsCommand = async (input, context) => {
982
964
  };
983
965
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/tags-removal";
984
966
  let body;
985
- body = JSON.stringify({
986
- ...(input.ARN != null && { ARN: input.ARN }),
987
- ...(input.TagKeys != null && { TagKeys: se_StringList(input.TagKeys, context) }),
988
- });
967
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
968
+ ARN: [],
969
+ TagKeys: (_) => (0, smithy_client_1._json)(_),
970
+ }));
989
971
  return new protocol_http_1.HttpRequest({
990
972
  protocol,
991
973
  hostname,
@@ -1006,9 +988,9 @@ const se_RevokeVpcEndpointAccessCommand = async (input, context) => {
1006
988
  "/2021-01-01/opensearch/domain/{DomainName}/revokeVpcEndpointAccess";
1007
989
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
1008
990
  let body;
1009
- body = JSON.stringify({
1010
- ...(input.Account != null && { Account: input.Account }),
1011
- });
991
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
992
+ Account: [],
993
+ }));
1012
994
  return new protocol_http_1.HttpRequest({
1013
995
  protocol,
1014
996
  hostname,
@@ -1028,11 +1010,11 @@ const se_StartServiceSoftwareUpdateCommand = async (input, context) => {
1028
1010
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1029
1011
  "/2021-01-01/opensearch/serviceSoftwareUpdate/start";
1030
1012
  let body;
1031
- body = JSON.stringify({
1032
- ...(input.DesiredStartTime != null && { DesiredStartTime: input.DesiredStartTime }),
1033
- ...(input.DomainName != null && { DomainName: input.DomainName }),
1034
- ...(input.ScheduleAt != null && { ScheduleAt: input.ScheduleAt }),
1035
- });
1013
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1014
+ DesiredStartTime: [],
1015
+ DomainName: [],
1016
+ ScheduleAt: [],
1017
+ }));
1036
1018
  return new protocol_http_1.HttpRequest({
1037
1019
  protocol,
1038
1020
  hostname,
@@ -1053,39 +1035,25 @@ const se_UpdateDomainConfigCommand = async (input, context) => {
1053
1035
  "/2021-01-01/opensearch/domain/{DomainName}/config";
1054
1036
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
1055
1037
  let body;
1056
- body = JSON.stringify({
1057
- ...(input.AccessPolicies != null && { AccessPolicies: input.AccessPolicies }),
1058
- ...(input.AdvancedOptions != null && { AdvancedOptions: se_AdvancedOptions(input.AdvancedOptions, context) }),
1059
- ...(input.AdvancedSecurityOptions != null && {
1060
- AdvancedSecurityOptions: se_AdvancedSecurityOptionsInput(input.AdvancedSecurityOptions, context),
1061
- }),
1062
- ...(input.AutoTuneOptions != null && { AutoTuneOptions: se_AutoTuneOptions(input.AutoTuneOptions, context) }),
1063
- ...(input.ClusterConfig != null && { ClusterConfig: se_ClusterConfig(input.ClusterConfig, context) }),
1064
- ...(input.CognitoOptions != null && { CognitoOptions: se_CognitoOptions(input.CognitoOptions, context) }),
1065
- ...(input.DomainEndpointOptions != null && {
1066
- DomainEndpointOptions: se_DomainEndpointOptions(input.DomainEndpointOptions, context),
1067
- }),
1068
- ...(input.DryRun != null && { DryRun: input.DryRun }),
1069
- ...(input.DryRunMode != null && { DryRunMode: input.DryRunMode }),
1070
- ...(input.EBSOptions != null && { EBSOptions: se_EBSOptions(input.EBSOptions, context) }),
1071
- ...(input.EncryptionAtRestOptions != null && {
1072
- EncryptionAtRestOptions: se_EncryptionAtRestOptions(input.EncryptionAtRestOptions, context),
1073
- }),
1074
- ...(input.LogPublishingOptions != null && {
1075
- LogPublishingOptions: se_LogPublishingOptions(input.LogPublishingOptions, context),
1076
- }),
1077
- ...(input.NodeToNodeEncryptionOptions != null && {
1078
- NodeToNodeEncryptionOptions: se_NodeToNodeEncryptionOptions(input.NodeToNodeEncryptionOptions, context),
1079
- }),
1080
- ...(input.OffPeakWindowOptions != null && {
1081
- OffPeakWindowOptions: se_OffPeakWindowOptions(input.OffPeakWindowOptions, context),
1082
- }),
1083
- ...(input.SnapshotOptions != null && { SnapshotOptions: se_SnapshotOptions(input.SnapshotOptions, context) }),
1084
- ...(input.SoftwareUpdateOptions != null && {
1085
- SoftwareUpdateOptions: se_SoftwareUpdateOptions(input.SoftwareUpdateOptions, context),
1086
- }),
1087
- ...(input.VPCOptions != null && { VPCOptions: se_VPCOptions(input.VPCOptions, context) }),
1088
- });
1038
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1039
+ AccessPolicies: [],
1040
+ AdvancedOptions: (_) => (0, smithy_client_1._json)(_),
1041
+ AdvancedSecurityOptions: (_) => (0, smithy_client_1._json)(_),
1042
+ AutoTuneOptions: (_) => se_AutoTuneOptions(_, context),
1043
+ ClusterConfig: (_) => (0, smithy_client_1._json)(_),
1044
+ CognitoOptions: (_) => (0, smithy_client_1._json)(_),
1045
+ DomainEndpointOptions: (_) => (0, smithy_client_1._json)(_),
1046
+ DryRun: [],
1047
+ DryRunMode: [],
1048
+ EBSOptions: (_) => (0, smithy_client_1._json)(_),
1049
+ EncryptionAtRestOptions: (_) => (0, smithy_client_1._json)(_),
1050
+ LogPublishingOptions: (_) => (0, smithy_client_1._json)(_),
1051
+ NodeToNodeEncryptionOptions: (_) => (0, smithy_client_1._json)(_),
1052
+ OffPeakWindowOptions: (_) => (0, smithy_client_1._json)(_),
1053
+ SnapshotOptions: (_) => (0, smithy_client_1._json)(_),
1054
+ SoftwareUpdateOptions: (_) => (0, smithy_client_1._json)(_),
1055
+ VPCOptions: (_) => (0, smithy_client_1._json)(_),
1056
+ }));
1089
1057
  return new protocol_http_1.HttpRequest({
1090
1058
  protocol,
1091
1059
  hostname,
@@ -1104,12 +1072,12 @@ const se_UpdatePackageCommand = async (input, context) => {
1104
1072
  };
1105
1073
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/packages/update";
1106
1074
  let body;
1107
- body = JSON.stringify({
1108
- ...(input.CommitMessage != null && { CommitMessage: input.CommitMessage }),
1109
- ...(input.PackageDescription != null && { PackageDescription: input.PackageDescription }),
1110
- ...(input.PackageID != null && { PackageID: input.PackageID }),
1111
- ...(input.PackageSource != null && { PackageSource: se_PackageSource(input.PackageSource, context) }),
1112
- });
1075
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1076
+ CommitMessage: [],
1077
+ PackageDescription: [],
1078
+ PackageID: [],
1079
+ PackageSource: (_) => (0, smithy_client_1._json)(_),
1080
+ }));
1113
1081
  return new protocol_http_1.HttpRequest({
1114
1082
  protocol,
1115
1083
  hostname,
@@ -1130,12 +1098,12 @@ const se_UpdateScheduledActionCommand = async (input, context) => {
1130
1098
  "/2021-01-01/opensearch/domain/{DomainName}/scheduledAction/update";
1131
1099
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
1132
1100
  let body;
1133
- body = JSON.stringify({
1134
- ...(input.ActionID != null && { ActionID: input.ActionID }),
1135
- ...(input.ActionType != null && { ActionType: input.ActionType }),
1136
- ...(input.DesiredStartTime != null && { DesiredStartTime: input.DesiredStartTime }),
1137
- ...(input.ScheduleAt != null && { ScheduleAt: input.ScheduleAt }),
1138
- });
1101
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1102
+ ActionID: [],
1103
+ ActionType: [],
1104
+ DesiredStartTime: [],
1105
+ ScheduleAt: [],
1106
+ }));
1139
1107
  return new protocol_http_1.HttpRequest({
1140
1108
  protocol,
1141
1109
  hostname,
@@ -1155,10 +1123,10 @@ const se_UpdateVpcEndpointCommand = async (input, context) => {
1155
1123
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1156
1124
  "/2021-01-01/opensearch/vpcEndpoints/update";
1157
1125
  let body;
1158
- body = JSON.stringify({
1159
- ...(input.VpcEndpointId != null && { VpcEndpointId: input.VpcEndpointId }),
1160
- ...(input.VpcOptions != null && { VpcOptions: se_VPCOptions(input.VpcOptions, context) }),
1161
- });
1126
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1127
+ VpcEndpointId: [],
1128
+ VpcOptions: (_) => (0, smithy_client_1._json)(_),
1129
+ }));
1162
1130
  return new protocol_http_1.HttpRequest({
1163
1131
  protocol,
1164
1132
  hostname,
@@ -1177,12 +1145,12 @@ const se_UpgradeDomainCommand = async (input, context) => {
1177
1145
  };
1178
1146
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/opensearch/upgradeDomain";
1179
1147
  let body;
1180
- body = JSON.stringify({
1181
- ...(input.AdvancedOptions != null && { AdvancedOptions: se_AdvancedOptions(input.AdvancedOptions, context) }),
1182
- ...(input.DomainName != null && { DomainName: input.DomainName }),
1183
- ...(input.PerformCheckOnly != null && { PerformCheckOnly: input.PerformCheckOnly }),
1184
- ...(input.TargetVersion != null && { TargetVersion: input.TargetVersion }),
1185
- });
1148
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1149
+ AdvancedOptions: (_) => (0, smithy_client_1._json)(_),
1150
+ DomainName: [],
1151
+ PerformCheckOnly: [],
1152
+ TargetVersion: [],
1153
+ }));
1186
1154
  return new protocol_http_1.HttpRequest({
1187
1155
  protocol,
1188
1156
  hostname,
@@ -1198,13 +1166,14 @@ const de_AcceptInboundConnectionCommand = async (output, context) => {
1198
1166
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1199
1167
  return de_AcceptInboundConnectionCommandError(output, context);
1200
1168
  }
1201
- const contents = map({
1169
+ const contents = (0, smithy_client_1.map)({
1202
1170
  $metadata: deserializeMetadata(output),
1203
1171
  });
1204
1172
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1205
- if (data.Connection != null) {
1206
- contents.Connection = de_InboundConnection(data.Connection, context);
1207
- }
1173
+ const doc = (0, smithy_client_1.take)(data, {
1174
+ Connection: smithy_client_1._json,
1175
+ });
1176
+ Object.assign(contents, doc);
1208
1177
  return contents;
1209
1178
  };
1210
1179
  exports.de_AcceptInboundConnectionCommand = de_AcceptInboundConnectionCommand;
@@ -1226,10 +1195,9 @@ const de_AcceptInboundConnectionCommandError = async (output, context) => {
1226
1195
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1227
1196
  default:
1228
1197
  const parsedBody = parsedOutput.body;
1229
- (0, smithy_client_1.throwDefaultError)({
1198
+ return throwDefaultError({
1230
1199
  output,
1231
1200
  parsedBody,
1232
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
1233
1201
  errorCode,
1234
1202
  });
1235
1203
  }
@@ -1238,7 +1206,7 @@ const de_AddTagsCommand = async (output, context) => {
1238
1206
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1239
1207
  return de_AddTagsCommandError(output, context);
1240
1208
  }
1241
- const contents = map({
1209
+ const contents = (0, smithy_client_1.map)({
1242
1210
  $metadata: deserializeMetadata(output),
1243
1211
  });
1244
1212
  await collectBody(output.body, context);
@@ -1266,10 +1234,9 @@ const de_AddTagsCommandError = async (output, context) => {
1266
1234
  throw await de_ValidationExceptionRes(parsedOutput, context);
1267
1235
  default:
1268
1236
  const parsedBody = parsedOutput.body;
1269
- (0, smithy_client_1.throwDefaultError)({
1237
+ return throwDefaultError({
1270
1238
  output,
1271
1239
  parsedBody,
1272
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
1273
1240
  errorCode,
1274
1241
  });
1275
1242
  }
@@ -1278,13 +1245,14 @@ const de_AssociatePackageCommand = async (output, context) => {
1278
1245
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1279
1246
  return de_AssociatePackageCommandError(output, context);
1280
1247
  }
1281
- const contents = map({
1248
+ const contents = (0, smithy_client_1.map)({
1282
1249
  $metadata: deserializeMetadata(output),
1283
1250
  });
1284
1251
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1285
- if (data.DomainPackageDetails != null) {
1286
- contents.DomainPackageDetails = de_DomainPackageDetails(data.DomainPackageDetails, context);
1287
- }
1252
+ const doc = (0, smithy_client_1.take)(data, {
1253
+ DomainPackageDetails: (_) => de_DomainPackageDetails(_, context),
1254
+ });
1255
+ Object.assign(contents, doc);
1288
1256
  return contents;
1289
1257
  };
1290
1258
  exports.de_AssociatePackageCommand = de_AssociatePackageCommand;
@@ -1315,10 +1283,9 @@ const de_AssociatePackageCommandError = async (output, context) => {
1315
1283
  throw await de_ValidationExceptionRes(parsedOutput, context);
1316
1284
  default:
1317
1285
  const parsedBody = parsedOutput.body;
1318
- (0, smithy_client_1.throwDefaultError)({
1286
+ return throwDefaultError({
1319
1287
  output,
1320
1288
  parsedBody,
1321
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
1322
1289
  errorCode,
1323
1290
  });
1324
1291
  }
@@ -1327,13 +1294,14 @@ const de_AuthorizeVpcEndpointAccessCommand = async (output, context) => {
1327
1294
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1328
1295
  return de_AuthorizeVpcEndpointAccessCommandError(output, context);
1329
1296
  }
1330
- const contents = map({
1297
+ const contents = (0, smithy_client_1.map)({
1331
1298
  $metadata: deserializeMetadata(output),
1332
1299
  });
1333
1300
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1334
- if (data.AuthorizedPrincipal != null) {
1335
- contents.AuthorizedPrincipal = de_AuthorizedPrincipal(data.AuthorizedPrincipal, context);
1336
- }
1301
+ const doc = (0, smithy_client_1.take)(data, {
1302
+ AuthorizedPrincipal: smithy_client_1._json,
1303
+ });
1304
+ Object.assign(contents, doc);
1337
1305
  return contents;
1338
1306
  };
1339
1307
  exports.de_AuthorizeVpcEndpointAccessCommand = de_AuthorizeVpcEndpointAccessCommand;
@@ -1364,10 +1332,9 @@ const de_AuthorizeVpcEndpointAccessCommandError = async (output, context) => {
1364
1332
  throw await de_ValidationExceptionRes(parsedOutput, context);
1365
1333
  default:
1366
1334
  const parsedBody = parsedOutput.body;
1367
- (0, smithy_client_1.throwDefaultError)({
1335
+ return throwDefaultError({
1368
1336
  output,
1369
1337
  parsedBody,
1370
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
1371
1338
  errorCode,
1372
1339
  });
1373
1340
  }
@@ -1376,13 +1343,14 @@ const de_CancelServiceSoftwareUpdateCommand = async (output, context) => {
1376
1343
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1377
1344
  return de_CancelServiceSoftwareUpdateCommandError(output, context);
1378
1345
  }
1379
- const contents = map({
1346
+ const contents = (0, smithy_client_1.map)({
1380
1347
  $metadata: deserializeMetadata(output),
1381
1348
  });
1382
1349
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1383
- if (data.ServiceSoftwareOptions != null) {
1384
- contents.ServiceSoftwareOptions = de_ServiceSoftwareOptions(data.ServiceSoftwareOptions, context);
1385
- }
1350
+ const doc = (0, smithy_client_1.take)(data, {
1351
+ ServiceSoftwareOptions: (_) => de_ServiceSoftwareOptions(_, context),
1352
+ });
1353
+ Object.assign(contents, doc);
1386
1354
  return contents;
1387
1355
  };
1388
1356
  exports.de_CancelServiceSoftwareUpdateCommand = de_CancelServiceSoftwareUpdateCommand;
@@ -1407,10 +1375,9 @@ const de_CancelServiceSoftwareUpdateCommandError = async (output, context) => {
1407
1375
  throw await de_ValidationExceptionRes(parsedOutput, context);
1408
1376
  default:
1409
1377
  const parsedBody = parsedOutput.body;
1410
- (0, smithy_client_1.throwDefaultError)({
1378
+ return throwDefaultError({
1411
1379
  output,
1412
1380
  parsedBody,
1413
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
1414
1381
  errorCode,
1415
1382
  });
1416
1383
  }
@@ -1419,13 +1386,14 @@ const de_CreateDomainCommand = async (output, context) => {
1419
1386
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1420
1387
  return de_CreateDomainCommandError(output, context);
1421
1388
  }
1422
- const contents = map({
1389
+ const contents = (0, smithy_client_1.map)({
1423
1390
  $metadata: deserializeMetadata(output),
1424
1391
  });
1425
1392
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1426
- if (data.DomainStatus != null) {
1427
- contents.DomainStatus = de_DomainStatus(data.DomainStatus, context);
1428
- }
1393
+ const doc = (0, smithy_client_1.take)(data, {
1394
+ DomainStatus: (_) => de_DomainStatus(_, context),
1395
+ });
1396
+ Object.assign(contents, doc);
1429
1397
  return contents;
1430
1398
  };
1431
1399
  exports.de_CreateDomainCommand = de_CreateDomainCommand;
@@ -1459,10 +1427,9 @@ const de_CreateDomainCommandError = async (output, context) => {
1459
1427
  throw await de_ValidationExceptionRes(parsedOutput, context);
1460
1428
  default:
1461
1429
  const parsedBody = parsedOutput.body;
1462
- (0, smithy_client_1.throwDefaultError)({
1430
+ return throwDefaultError({
1463
1431
  output,
1464
1432
  parsedBody,
1465
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
1466
1433
  errorCode,
1467
1434
  });
1468
1435
  }
@@ -1471,31 +1438,20 @@ const de_CreateOutboundConnectionCommand = async (output, context) => {
1471
1438
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1472
1439
  return de_CreateOutboundConnectionCommandError(output, context);
1473
1440
  }
1474
- const contents = map({
1441
+ const contents = (0, smithy_client_1.map)({
1475
1442
  $metadata: deserializeMetadata(output),
1476
1443
  });
1477
1444
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1478
- if (data.ConnectionAlias != null) {
1479
- contents.ConnectionAlias = (0, smithy_client_1.expectString)(data.ConnectionAlias);
1480
- }
1481
- if (data.ConnectionId != null) {
1482
- contents.ConnectionId = (0, smithy_client_1.expectString)(data.ConnectionId);
1483
- }
1484
- if (data.ConnectionMode != null) {
1485
- contents.ConnectionMode = (0, smithy_client_1.expectString)(data.ConnectionMode);
1486
- }
1487
- if (data.ConnectionProperties != null) {
1488
- contents.ConnectionProperties = de_ConnectionProperties(data.ConnectionProperties, context);
1489
- }
1490
- if (data.ConnectionStatus != null) {
1491
- contents.ConnectionStatus = de_OutboundConnectionStatus(data.ConnectionStatus, context);
1492
- }
1493
- if (data.LocalDomainInfo != null) {
1494
- contents.LocalDomainInfo = de_DomainInformationContainer(data.LocalDomainInfo, context);
1495
- }
1496
- if (data.RemoteDomainInfo != null) {
1497
- contents.RemoteDomainInfo = de_DomainInformationContainer(data.RemoteDomainInfo, context);
1498
- }
1445
+ const doc = (0, smithy_client_1.take)(data, {
1446
+ ConnectionAlias: smithy_client_1.expectString,
1447
+ ConnectionId: smithy_client_1.expectString,
1448
+ ConnectionMode: smithy_client_1.expectString,
1449
+ ConnectionProperties: smithy_client_1._json,
1450
+ ConnectionStatus: smithy_client_1._json,
1451
+ LocalDomainInfo: smithy_client_1._json,
1452
+ RemoteDomainInfo: smithy_client_1._json,
1453
+ });
1454
+ Object.assign(contents, doc);
1499
1455
  return contents;
1500
1456
  };
1501
1457
  exports.de_CreateOutboundConnectionCommand = de_CreateOutboundConnectionCommand;
@@ -1520,10 +1476,9 @@ const de_CreateOutboundConnectionCommandError = async (output, context) => {
1520
1476
  throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
1521
1477
  default:
1522
1478
  const parsedBody = parsedOutput.body;
1523
- (0, smithy_client_1.throwDefaultError)({
1479
+ return throwDefaultError({
1524
1480
  output,
1525
1481
  parsedBody,
1526
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
1527
1482
  errorCode,
1528
1483
  });
1529
1484
  }
@@ -1532,13 +1487,14 @@ const de_CreatePackageCommand = async (output, context) => {
1532
1487
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1533
1488
  return de_CreatePackageCommandError(output, context);
1534
1489
  }
1535
- const contents = map({
1490
+ const contents = (0, smithy_client_1.map)({
1536
1491
  $metadata: deserializeMetadata(output),
1537
1492
  });
1538
1493
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1539
- if (data.PackageDetails != null) {
1540
- contents.PackageDetails = de_PackageDetails(data.PackageDetails, context);
1541
- }
1494
+ const doc = (0, smithy_client_1.take)(data, {
1495
+ PackageDetails: (_) => de_PackageDetails(_, context),
1496
+ });
1497
+ Object.assign(contents, doc);
1542
1498
  return contents;
1543
1499
  };
1544
1500
  exports.de_CreatePackageCommand = de_CreatePackageCommand;
@@ -1572,10 +1528,9 @@ const de_CreatePackageCommandError = async (output, context) => {
1572
1528
  throw await de_ValidationExceptionRes(parsedOutput, context);
1573
1529
  default:
1574
1530
  const parsedBody = parsedOutput.body;
1575
- (0, smithy_client_1.throwDefaultError)({
1531
+ return throwDefaultError({
1576
1532
  output,
1577
1533
  parsedBody,
1578
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
1579
1534
  errorCode,
1580
1535
  });
1581
1536
  }
@@ -1584,13 +1539,14 @@ const de_CreateVpcEndpointCommand = async (output, context) => {
1584
1539
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1585
1540
  return de_CreateVpcEndpointCommandError(output, context);
1586
1541
  }
1587
- const contents = map({
1542
+ const contents = (0, smithy_client_1.map)({
1588
1543
  $metadata: deserializeMetadata(output),
1589
1544
  });
1590
1545
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1591
- if (data.VpcEndpoint != null) {
1592
- contents.VpcEndpoint = de_VpcEndpoint(data.VpcEndpoint, context);
1593
- }
1546
+ const doc = (0, smithy_client_1.take)(data, {
1547
+ VpcEndpoint: smithy_client_1._json,
1548
+ });
1549
+ Object.assign(contents, doc);
1594
1550
  return contents;
1595
1551
  };
1596
1552
  exports.de_CreateVpcEndpointCommand = de_CreateVpcEndpointCommand;
@@ -1621,10 +1577,9 @@ const de_CreateVpcEndpointCommandError = async (output, context) => {
1621
1577
  throw await de_ValidationExceptionRes(parsedOutput, context);
1622
1578
  default:
1623
1579
  const parsedBody = parsedOutput.body;
1624
- (0, smithy_client_1.throwDefaultError)({
1580
+ return throwDefaultError({
1625
1581
  output,
1626
1582
  parsedBody,
1627
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
1628
1583
  errorCode,
1629
1584
  });
1630
1585
  }
@@ -1633,13 +1588,14 @@ const de_DeleteDomainCommand = async (output, context) => {
1633
1588
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1634
1589
  return de_DeleteDomainCommandError(output, context);
1635
1590
  }
1636
- const contents = map({
1591
+ const contents = (0, smithy_client_1.map)({
1637
1592
  $metadata: deserializeMetadata(output),
1638
1593
  });
1639
1594
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1640
- if (data.DomainStatus != null) {
1641
- contents.DomainStatus = de_DomainStatus(data.DomainStatus, context);
1642
- }
1595
+ const doc = (0, smithy_client_1.take)(data, {
1596
+ DomainStatus: (_) => de_DomainStatus(_, context),
1597
+ });
1598
+ Object.assign(contents, doc);
1643
1599
  return contents;
1644
1600
  };
1645
1601
  exports.de_DeleteDomainCommand = de_DeleteDomainCommand;
@@ -1664,10 +1620,9 @@ const de_DeleteDomainCommandError = async (output, context) => {
1664
1620
  throw await de_ValidationExceptionRes(parsedOutput, context);
1665
1621
  default:
1666
1622
  const parsedBody = parsedOutput.body;
1667
- (0, smithy_client_1.throwDefaultError)({
1623
+ return throwDefaultError({
1668
1624
  output,
1669
1625
  parsedBody,
1670
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
1671
1626
  errorCode,
1672
1627
  });
1673
1628
  }
@@ -1676,13 +1631,14 @@ const de_DeleteInboundConnectionCommand = async (output, context) => {
1676
1631
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1677
1632
  return de_DeleteInboundConnectionCommandError(output, context);
1678
1633
  }
1679
- const contents = map({
1634
+ const contents = (0, smithy_client_1.map)({
1680
1635
  $metadata: deserializeMetadata(output),
1681
1636
  });
1682
1637
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1683
- if (data.Connection != null) {
1684
- contents.Connection = de_InboundConnection(data.Connection, context);
1685
- }
1638
+ const doc = (0, smithy_client_1.take)(data, {
1639
+ Connection: smithy_client_1._json,
1640
+ });
1641
+ Object.assign(contents, doc);
1686
1642
  return contents;
1687
1643
  };
1688
1644
  exports.de_DeleteInboundConnectionCommand = de_DeleteInboundConnectionCommand;
@@ -1701,10 +1657,9 @@ const de_DeleteInboundConnectionCommandError = async (output, context) => {
1701
1657
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1702
1658
  default:
1703
1659
  const parsedBody = parsedOutput.body;
1704
- (0, smithy_client_1.throwDefaultError)({
1660
+ return throwDefaultError({
1705
1661
  output,
1706
1662
  parsedBody,
1707
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
1708
1663
  errorCode,
1709
1664
  });
1710
1665
  }
@@ -1713,13 +1668,14 @@ const de_DeleteOutboundConnectionCommand = async (output, context) => {
1713
1668
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1714
1669
  return de_DeleteOutboundConnectionCommandError(output, context);
1715
1670
  }
1716
- const contents = map({
1671
+ const contents = (0, smithy_client_1.map)({
1717
1672
  $metadata: deserializeMetadata(output),
1718
1673
  });
1719
1674
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1720
- if (data.Connection != null) {
1721
- contents.Connection = de_OutboundConnection(data.Connection, context);
1722
- }
1675
+ const doc = (0, smithy_client_1.take)(data, {
1676
+ Connection: smithy_client_1._json,
1677
+ });
1678
+ Object.assign(contents, doc);
1723
1679
  return contents;
1724
1680
  };
1725
1681
  exports.de_DeleteOutboundConnectionCommand = de_DeleteOutboundConnectionCommand;
@@ -1738,10 +1694,9 @@ const de_DeleteOutboundConnectionCommandError = async (output, context) => {
1738
1694
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1739
1695
  default:
1740
1696
  const parsedBody = parsedOutput.body;
1741
- (0, smithy_client_1.throwDefaultError)({
1697
+ return throwDefaultError({
1742
1698
  output,
1743
1699
  parsedBody,
1744
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
1745
1700
  errorCode,
1746
1701
  });
1747
1702
  }
@@ -1750,13 +1705,14 @@ const de_DeletePackageCommand = async (output, context) => {
1750
1705
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1751
1706
  return de_DeletePackageCommandError(output, context);
1752
1707
  }
1753
- const contents = map({
1708
+ const contents = (0, smithy_client_1.map)({
1754
1709
  $metadata: deserializeMetadata(output),
1755
1710
  });
1756
1711
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1757
- if (data.PackageDetails != null) {
1758
- contents.PackageDetails = de_PackageDetails(data.PackageDetails, context);
1759
- }
1712
+ const doc = (0, smithy_client_1.take)(data, {
1713
+ PackageDetails: (_) => de_PackageDetails(_, context),
1714
+ });
1715
+ Object.assign(contents, doc);
1760
1716
  return contents;
1761
1717
  };
1762
1718
  exports.de_DeletePackageCommand = de_DeletePackageCommand;
@@ -1787,10 +1743,9 @@ const de_DeletePackageCommandError = async (output, context) => {
1787
1743
  throw await de_ValidationExceptionRes(parsedOutput, context);
1788
1744
  default:
1789
1745
  const parsedBody = parsedOutput.body;
1790
- (0, smithy_client_1.throwDefaultError)({
1746
+ return throwDefaultError({
1791
1747
  output,
1792
1748
  parsedBody,
1793
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
1794
1749
  errorCode,
1795
1750
  });
1796
1751
  }
@@ -1799,13 +1754,14 @@ const de_DeleteVpcEndpointCommand = async (output, context) => {
1799
1754
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1800
1755
  return de_DeleteVpcEndpointCommandError(output, context);
1801
1756
  }
1802
- const contents = map({
1757
+ const contents = (0, smithy_client_1.map)({
1803
1758
  $metadata: deserializeMetadata(output),
1804
1759
  });
1805
1760
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1806
- if (data.VpcEndpointSummary != null) {
1807
- contents.VpcEndpointSummary = de_VpcEndpointSummary(data.VpcEndpointSummary, context);
1808
- }
1761
+ const doc = (0, smithy_client_1.take)(data, {
1762
+ VpcEndpointSummary: smithy_client_1._json,
1763
+ });
1764
+ Object.assign(contents, doc);
1809
1765
  return contents;
1810
1766
  };
1811
1767
  exports.de_DeleteVpcEndpointCommand = de_DeleteVpcEndpointCommand;
@@ -1830,10 +1786,9 @@ const de_DeleteVpcEndpointCommandError = async (output, context) => {
1830
1786
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1831
1787
  default:
1832
1788
  const parsedBody = parsedOutput.body;
1833
- (0, smithy_client_1.throwDefaultError)({
1789
+ return throwDefaultError({
1834
1790
  output,
1835
1791
  parsedBody,
1836
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
1837
1792
  errorCode,
1838
1793
  });
1839
1794
  }
@@ -1842,13 +1797,14 @@ const de_DescribeDomainCommand = async (output, context) => {
1842
1797
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1843
1798
  return de_DescribeDomainCommandError(output, context);
1844
1799
  }
1845
- const contents = map({
1800
+ const contents = (0, smithy_client_1.map)({
1846
1801
  $metadata: deserializeMetadata(output),
1847
1802
  });
1848
1803
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1849
- if (data.DomainStatus != null) {
1850
- contents.DomainStatus = de_DomainStatus(data.DomainStatus, context);
1851
- }
1804
+ const doc = (0, smithy_client_1.take)(data, {
1805
+ DomainStatus: (_) => de_DomainStatus(_, context),
1806
+ });
1807
+ Object.assign(contents, doc);
1852
1808
  return contents;
1853
1809
  };
1854
1810
  exports.de_DescribeDomainCommand = de_DescribeDomainCommand;
@@ -1873,10 +1829,9 @@ const de_DescribeDomainCommandError = async (output, context) => {
1873
1829
  throw await de_ValidationExceptionRes(parsedOutput, context);
1874
1830
  default:
1875
1831
  const parsedBody = parsedOutput.body;
1876
- (0, smithy_client_1.throwDefaultError)({
1832
+ return throwDefaultError({
1877
1833
  output,
1878
1834
  parsedBody,
1879
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
1880
1835
  errorCode,
1881
1836
  });
1882
1837
  }
@@ -1885,16 +1840,15 @@ const de_DescribeDomainAutoTunesCommand = async (output, context) => {
1885
1840
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1886
1841
  return de_DescribeDomainAutoTunesCommandError(output, context);
1887
1842
  }
1888
- const contents = map({
1843
+ const contents = (0, smithy_client_1.map)({
1889
1844
  $metadata: deserializeMetadata(output),
1890
1845
  });
1891
1846
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1892
- if (data.AutoTunes != null) {
1893
- contents.AutoTunes = de_AutoTuneList(data.AutoTunes, context);
1894
- }
1895
- if (data.NextToken != null) {
1896
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
1897
- }
1847
+ const doc = (0, smithy_client_1.take)(data, {
1848
+ AutoTunes: (_) => de_AutoTuneList(_, context),
1849
+ NextToken: smithy_client_1.expectString,
1850
+ });
1851
+ Object.assign(contents, doc);
1898
1852
  return contents;
1899
1853
  };
1900
1854
  exports.de_DescribeDomainAutoTunesCommand = de_DescribeDomainAutoTunesCommand;
@@ -1919,10 +1873,9 @@ const de_DescribeDomainAutoTunesCommandError = async (output, context) => {
1919
1873
  throw await de_ValidationExceptionRes(parsedOutput, context);
1920
1874
  default:
1921
1875
  const parsedBody = parsedOutput.body;
1922
- (0, smithy_client_1.throwDefaultError)({
1876
+ return throwDefaultError({
1923
1877
  output,
1924
1878
  parsedBody,
1925
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
1926
1879
  errorCode,
1927
1880
  });
1928
1881
  }
@@ -1931,13 +1884,14 @@ const de_DescribeDomainChangeProgressCommand = async (output, context) => {
1931
1884
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1932
1885
  return de_DescribeDomainChangeProgressCommandError(output, context);
1933
1886
  }
1934
- const contents = map({
1887
+ const contents = (0, smithy_client_1.map)({
1935
1888
  $metadata: deserializeMetadata(output),
1936
1889
  });
1937
1890
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1938
- if (data.ChangeProgressStatus != null) {
1939
- contents.ChangeProgressStatus = de_ChangeProgressStatusDetails(data.ChangeProgressStatus, context);
1940
- }
1891
+ const doc = (0, smithy_client_1.take)(data, {
1892
+ ChangeProgressStatus: (_) => de_ChangeProgressStatusDetails(_, context),
1893
+ });
1894
+ Object.assign(contents, doc);
1941
1895
  return contents;
1942
1896
  };
1943
1897
  exports.de_DescribeDomainChangeProgressCommand = de_DescribeDomainChangeProgressCommand;
@@ -1962,10 +1916,9 @@ const de_DescribeDomainChangeProgressCommandError = async (output, context) => {
1962
1916
  throw await de_ValidationExceptionRes(parsedOutput, context);
1963
1917
  default:
1964
1918
  const parsedBody = parsedOutput.body;
1965
- (0, smithy_client_1.throwDefaultError)({
1919
+ return throwDefaultError({
1966
1920
  output,
1967
1921
  parsedBody,
1968
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
1969
1922
  errorCode,
1970
1923
  });
1971
1924
  }
@@ -1974,13 +1927,14 @@ const de_DescribeDomainConfigCommand = async (output, context) => {
1974
1927
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1975
1928
  return de_DescribeDomainConfigCommandError(output, context);
1976
1929
  }
1977
- const contents = map({
1930
+ const contents = (0, smithy_client_1.map)({
1978
1931
  $metadata: deserializeMetadata(output),
1979
1932
  });
1980
1933
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1981
- if (data.DomainConfig != null) {
1982
- contents.DomainConfig = de_DomainConfig(data.DomainConfig, context);
1983
- }
1934
+ const doc = (0, smithy_client_1.take)(data, {
1935
+ DomainConfig: (_) => de_DomainConfig(_, context),
1936
+ });
1937
+ Object.assign(contents, doc);
1984
1938
  return contents;
1985
1939
  };
1986
1940
  exports.de_DescribeDomainConfigCommand = de_DescribeDomainConfigCommand;
@@ -2005,10 +1959,9 @@ const de_DescribeDomainConfigCommandError = async (output, context) => {
2005
1959
  throw await de_ValidationExceptionRes(parsedOutput, context);
2006
1960
  default:
2007
1961
  const parsedBody = parsedOutput.body;
2008
- (0, smithy_client_1.throwDefaultError)({
1962
+ return throwDefaultError({
2009
1963
  output,
2010
1964
  parsedBody,
2011
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
2012
1965
  errorCode,
2013
1966
  });
2014
1967
  }
@@ -2017,13 +1970,14 @@ const de_DescribeDomainsCommand = async (output, context) => {
2017
1970
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2018
1971
  return de_DescribeDomainsCommandError(output, context);
2019
1972
  }
2020
- const contents = map({
1973
+ const contents = (0, smithy_client_1.map)({
2021
1974
  $metadata: deserializeMetadata(output),
2022
1975
  });
2023
1976
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2024
- if (data.DomainStatusList != null) {
2025
- contents.DomainStatusList = de_DomainStatusList(data.DomainStatusList, context);
2026
- }
1977
+ const doc = (0, smithy_client_1.take)(data, {
1978
+ DomainStatusList: (_) => de_DomainStatusList(_, context),
1979
+ });
1980
+ Object.assign(contents, doc);
2027
1981
  return contents;
2028
1982
  };
2029
1983
  exports.de_DescribeDomainsCommand = de_DescribeDomainsCommand;
@@ -2045,10 +1999,9 @@ const de_DescribeDomainsCommandError = async (output, context) => {
2045
1999
  throw await de_ValidationExceptionRes(parsedOutput, context);
2046
2000
  default:
2047
2001
  const parsedBody = parsedOutput.body;
2048
- (0, smithy_client_1.throwDefaultError)({
2002
+ return throwDefaultError({
2049
2003
  output,
2050
2004
  parsedBody,
2051
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
2052
2005
  errorCode,
2053
2006
  });
2054
2007
  }
@@ -2057,19 +2010,16 @@ const de_DescribeDryRunProgressCommand = async (output, context) => {
2057
2010
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2058
2011
  return de_DescribeDryRunProgressCommandError(output, context);
2059
2012
  }
2060
- const contents = map({
2013
+ const contents = (0, smithy_client_1.map)({
2061
2014
  $metadata: deserializeMetadata(output),
2062
2015
  });
2063
2016
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2064
- if (data.DryRunConfig != null) {
2065
- contents.DryRunConfig = de_DomainStatus(data.DryRunConfig, context);
2066
- }
2067
- if (data.DryRunProgressStatus != null) {
2068
- contents.DryRunProgressStatus = de_DryRunProgressStatus(data.DryRunProgressStatus, context);
2069
- }
2070
- if (data.DryRunResults != null) {
2071
- contents.DryRunResults = de_DryRunResults(data.DryRunResults, context);
2072
- }
2017
+ const doc = (0, smithy_client_1.take)(data, {
2018
+ DryRunConfig: (_) => de_DomainStatus(_, context),
2019
+ DryRunProgressStatus: smithy_client_1._json,
2020
+ DryRunResults: smithy_client_1._json,
2021
+ });
2022
+ Object.assign(contents, doc);
2073
2023
  return contents;
2074
2024
  };
2075
2025
  exports.de_DescribeDryRunProgressCommand = de_DescribeDryRunProgressCommand;
@@ -2097,10 +2047,9 @@ const de_DescribeDryRunProgressCommandError = async (output, context) => {
2097
2047
  throw await de_ValidationExceptionRes(parsedOutput, context);
2098
2048
  default:
2099
2049
  const parsedBody = parsedOutput.body;
2100
- (0, smithy_client_1.throwDefaultError)({
2050
+ return throwDefaultError({
2101
2051
  output,
2102
2052
  parsedBody,
2103
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
2104
2053
  errorCode,
2105
2054
  });
2106
2055
  }
@@ -2109,16 +2058,15 @@ const de_DescribeInboundConnectionsCommand = async (output, context) => {
2109
2058
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2110
2059
  return de_DescribeInboundConnectionsCommandError(output, context);
2111
2060
  }
2112
- const contents = map({
2061
+ const contents = (0, smithy_client_1.map)({
2113
2062
  $metadata: deserializeMetadata(output),
2114
2063
  });
2115
2064
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2116
- if (data.Connections != null) {
2117
- contents.Connections = de_InboundConnections(data.Connections, context);
2118
- }
2119
- if (data.NextToken != null) {
2120
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2121
- }
2065
+ const doc = (0, smithy_client_1.take)(data, {
2066
+ Connections: smithy_client_1._json,
2067
+ NextToken: smithy_client_1.expectString,
2068
+ });
2069
+ Object.assign(contents, doc);
2122
2070
  return contents;
2123
2071
  };
2124
2072
  exports.de_DescribeInboundConnectionsCommand = de_DescribeInboundConnectionsCommand;
@@ -2137,10 +2085,9 @@ const de_DescribeInboundConnectionsCommandError = async (output, context) => {
2137
2085
  throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
2138
2086
  default:
2139
2087
  const parsedBody = parsedOutput.body;
2140
- (0, smithy_client_1.throwDefaultError)({
2088
+ return throwDefaultError({
2141
2089
  output,
2142
2090
  parsedBody,
2143
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
2144
2091
  errorCode,
2145
2092
  });
2146
2093
  }
@@ -2149,13 +2096,14 @@ const de_DescribeInstanceTypeLimitsCommand = async (output, context) => {
2149
2096
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2150
2097
  return de_DescribeInstanceTypeLimitsCommandError(output, context);
2151
2098
  }
2152
- const contents = map({
2099
+ const contents = (0, smithy_client_1.map)({
2153
2100
  $metadata: deserializeMetadata(output),
2154
2101
  });
2155
2102
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2156
- if (data.LimitsByRole != null) {
2157
- contents.LimitsByRole = de_LimitsByRole(data.LimitsByRole, context);
2158
- }
2103
+ const doc = (0, smithy_client_1.take)(data, {
2104
+ LimitsByRole: smithy_client_1._json,
2105
+ });
2106
+ Object.assign(contents, doc);
2159
2107
  return contents;
2160
2108
  };
2161
2109
  exports.de_DescribeInstanceTypeLimitsCommand = de_DescribeInstanceTypeLimitsCommand;
@@ -2186,10 +2134,9 @@ const de_DescribeInstanceTypeLimitsCommandError = async (output, context) => {
2186
2134
  throw await de_ValidationExceptionRes(parsedOutput, context);
2187
2135
  default:
2188
2136
  const parsedBody = parsedOutput.body;
2189
- (0, smithy_client_1.throwDefaultError)({
2137
+ return throwDefaultError({
2190
2138
  output,
2191
2139
  parsedBody,
2192
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
2193
2140
  errorCode,
2194
2141
  });
2195
2142
  }
@@ -2198,16 +2145,15 @@ const de_DescribeOutboundConnectionsCommand = async (output, context) => {
2198
2145
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2199
2146
  return de_DescribeOutboundConnectionsCommandError(output, context);
2200
2147
  }
2201
- const contents = map({
2148
+ const contents = (0, smithy_client_1.map)({
2202
2149
  $metadata: deserializeMetadata(output),
2203
2150
  });
2204
2151
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2205
- if (data.Connections != null) {
2206
- contents.Connections = de_OutboundConnections(data.Connections, context);
2207
- }
2208
- if (data.NextToken != null) {
2209
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2210
- }
2152
+ const doc = (0, smithy_client_1.take)(data, {
2153
+ Connections: smithy_client_1._json,
2154
+ NextToken: smithy_client_1.expectString,
2155
+ });
2156
+ Object.assign(contents, doc);
2211
2157
  return contents;
2212
2158
  };
2213
2159
  exports.de_DescribeOutboundConnectionsCommand = de_DescribeOutboundConnectionsCommand;
@@ -2226,10 +2172,9 @@ const de_DescribeOutboundConnectionsCommandError = async (output, context) => {
2226
2172
  throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
2227
2173
  default:
2228
2174
  const parsedBody = parsedOutput.body;
2229
- (0, smithy_client_1.throwDefaultError)({
2175
+ return throwDefaultError({
2230
2176
  output,
2231
2177
  parsedBody,
2232
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
2233
2178
  errorCode,
2234
2179
  });
2235
2180
  }
@@ -2238,16 +2183,15 @@ const de_DescribePackagesCommand = async (output, context) => {
2238
2183
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2239
2184
  return de_DescribePackagesCommandError(output, context);
2240
2185
  }
2241
- const contents = map({
2186
+ const contents = (0, smithy_client_1.map)({
2242
2187
  $metadata: deserializeMetadata(output),
2243
2188
  });
2244
2189
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2245
- if (data.NextToken != null) {
2246
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2247
- }
2248
- if (data.PackageDetailsList != null) {
2249
- contents.PackageDetailsList = de_PackageDetailsList(data.PackageDetailsList, context);
2250
- }
2190
+ const doc = (0, smithy_client_1.take)(data, {
2191
+ NextToken: smithy_client_1.expectString,
2192
+ PackageDetailsList: (_) => de_PackageDetailsList(_, context),
2193
+ });
2194
+ Object.assign(contents, doc);
2251
2195
  return contents;
2252
2196
  };
2253
2197
  exports.de_DescribePackagesCommand = de_DescribePackagesCommand;
@@ -2275,10 +2219,9 @@ const de_DescribePackagesCommandError = async (output, context) => {
2275
2219
  throw await de_ValidationExceptionRes(parsedOutput, context);
2276
2220
  default:
2277
2221
  const parsedBody = parsedOutput.body;
2278
- (0, smithy_client_1.throwDefaultError)({
2222
+ return throwDefaultError({
2279
2223
  output,
2280
2224
  parsedBody,
2281
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
2282
2225
  errorCode,
2283
2226
  });
2284
2227
  }
@@ -2287,16 +2230,15 @@ const de_DescribeReservedInstanceOfferingsCommand = async (output, context) => {
2287
2230
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2288
2231
  return de_DescribeReservedInstanceOfferingsCommandError(output, context);
2289
2232
  }
2290
- const contents = map({
2233
+ const contents = (0, smithy_client_1.map)({
2291
2234
  $metadata: deserializeMetadata(output),
2292
2235
  });
2293
2236
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2294
- if (data.NextToken != null) {
2295
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2296
- }
2297
- if (data.ReservedInstanceOfferings != null) {
2298
- contents.ReservedInstanceOfferings = de_ReservedInstanceOfferingList(data.ReservedInstanceOfferings, context);
2299
- }
2237
+ const doc = (0, smithy_client_1.take)(data, {
2238
+ NextToken: smithy_client_1.expectString,
2239
+ ReservedInstanceOfferings: (_) => de_ReservedInstanceOfferingList(_, context),
2240
+ });
2241
+ Object.assign(contents, doc);
2300
2242
  return contents;
2301
2243
  };
2302
2244
  exports.de_DescribeReservedInstanceOfferingsCommand = de_DescribeReservedInstanceOfferingsCommand;
@@ -2321,10 +2263,9 @@ const de_DescribeReservedInstanceOfferingsCommandError = async (output, context)
2321
2263
  throw await de_ValidationExceptionRes(parsedOutput, context);
2322
2264
  default:
2323
2265
  const parsedBody = parsedOutput.body;
2324
- (0, smithy_client_1.throwDefaultError)({
2266
+ return throwDefaultError({
2325
2267
  output,
2326
2268
  parsedBody,
2327
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
2328
2269
  errorCode,
2329
2270
  });
2330
2271
  }
@@ -2333,16 +2274,15 @@ const de_DescribeReservedInstancesCommand = async (output, context) => {
2333
2274
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2334
2275
  return de_DescribeReservedInstancesCommandError(output, context);
2335
2276
  }
2336
- const contents = map({
2277
+ const contents = (0, smithy_client_1.map)({
2337
2278
  $metadata: deserializeMetadata(output),
2338
2279
  });
2339
2280
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2340
- if (data.NextToken != null) {
2341
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2342
- }
2343
- if (data.ReservedInstances != null) {
2344
- contents.ReservedInstances = de_ReservedInstanceList(data.ReservedInstances, context);
2345
- }
2281
+ const doc = (0, smithy_client_1.take)(data, {
2282
+ NextToken: smithy_client_1.expectString,
2283
+ ReservedInstances: (_) => de_ReservedInstanceList(_, context),
2284
+ });
2285
+ Object.assign(contents, doc);
2346
2286
  return contents;
2347
2287
  };
2348
2288
  exports.de_DescribeReservedInstancesCommand = de_DescribeReservedInstancesCommand;
@@ -2367,10 +2307,9 @@ const de_DescribeReservedInstancesCommandError = async (output, context) => {
2367
2307
  throw await de_ValidationExceptionRes(parsedOutput, context);
2368
2308
  default:
2369
2309
  const parsedBody = parsedOutput.body;
2370
- (0, smithy_client_1.throwDefaultError)({
2310
+ return throwDefaultError({
2371
2311
  output,
2372
2312
  parsedBody,
2373
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
2374
2313
  errorCode,
2375
2314
  });
2376
2315
  }
@@ -2379,16 +2318,15 @@ const de_DescribeVpcEndpointsCommand = async (output, context) => {
2379
2318
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2380
2319
  return de_DescribeVpcEndpointsCommandError(output, context);
2381
2320
  }
2382
- const contents = map({
2321
+ const contents = (0, smithy_client_1.map)({
2383
2322
  $metadata: deserializeMetadata(output),
2384
2323
  });
2385
2324
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2386
- if (data.VpcEndpointErrors != null) {
2387
- contents.VpcEndpointErrors = de_VpcEndpointErrorList(data.VpcEndpointErrors, context);
2388
- }
2389
- if (data.VpcEndpoints != null) {
2390
- contents.VpcEndpoints = de_VpcEndpoints(data.VpcEndpoints, context);
2391
- }
2325
+ const doc = (0, smithy_client_1.take)(data, {
2326
+ VpcEndpointErrors: smithy_client_1._json,
2327
+ VpcEndpoints: smithy_client_1._json,
2328
+ });
2329
+ Object.assign(contents, doc);
2392
2330
  return contents;
2393
2331
  };
2394
2332
  exports.de_DescribeVpcEndpointsCommand = de_DescribeVpcEndpointsCommand;
@@ -2413,10 +2351,9 @@ const de_DescribeVpcEndpointsCommandError = async (output, context) => {
2413
2351
  throw await de_ValidationExceptionRes(parsedOutput, context);
2414
2352
  default:
2415
2353
  const parsedBody = parsedOutput.body;
2416
- (0, smithy_client_1.throwDefaultError)({
2354
+ return throwDefaultError({
2417
2355
  output,
2418
2356
  parsedBody,
2419
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
2420
2357
  errorCode,
2421
2358
  });
2422
2359
  }
@@ -2425,13 +2362,14 @@ const de_DissociatePackageCommand = async (output, context) => {
2425
2362
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2426
2363
  return de_DissociatePackageCommandError(output, context);
2427
2364
  }
2428
- const contents = map({
2365
+ const contents = (0, smithy_client_1.map)({
2429
2366
  $metadata: deserializeMetadata(output),
2430
2367
  });
2431
2368
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2432
- if (data.DomainPackageDetails != null) {
2433
- contents.DomainPackageDetails = de_DomainPackageDetails(data.DomainPackageDetails, context);
2434
- }
2369
+ const doc = (0, smithy_client_1.take)(data, {
2370
+ DomainPackageDetails: (_) => de_DomainPackageDetails(_, context),
2371
+ });
2372
+ Object.assign(contents, doc);
2435
2373
  return contents;
2436
2374
  };
2437
2375
  exports.de_DissociatePackageCommand = de_DissociatePackageCommand;
@@ -2462,10 +2400,9 @@ const de_DissociatePackageCommandError = async (output, context) => {
2462
2400
  throw await de_ValidationExceptionRes(parsedOutput, context);
2463
2401
  default:
2464
2402
  const parsedBody = parsedOutput.body;
2465
- (0, smithy_client_1.throwDefaultError)({
2403
+ return throwDefaultError({
2466
2404
  output,
2467
2405
  parsedBody,
2468
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
2469
2406
  errorCode,
2470
2407
  });
2471
2408
  }
@@ -2474,13 +2411,14 @@ const de_GetCompatibleVersionsCommand = async (output, context) => {
2474
2411
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2475
2412
  return de_GetCompatibleVersionsCommandError(output, context);
2476
2413
  }
2477
- const contents = map({
2414
+ const contents = (0, smithy_client_1.map)({
2478
2415
  $metadata: deserializeMetadata(output),
2479
2416
  });
2480
2417
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2481
- if (data.CompatibleVersions != null) {
2482
- contents.CompatibleVersions = de_CompatibleVersionsList(data.CompatibleVersions, context);
2483
- }
2418
+ const doc = (0, smithy_client_1.take)(data, {
2419
+ CompatibleVersions: smithy_client_1._json,
2420
+ });
2421
+ Object.assign(contents, doc);
2484
2422
  return contents;
2485
2423
  };
2486
2424
  exports.de_GetCompatibleVersionsCommand = de_GetCompatibleVersionsCommand;
@@ -2508,10 +2446,9 @@ const de_GetCompatibleVersionsCommandError = async (output, context) => {
2508
2446
  throw await de_ValidationExceptionRes(parsedOutput, context);
2509
2447
  default:
2510
2448
  const parsedBody = parsedOutput.body;
2511
- (0, smithy_client_1.throwDefaultError)({
2449
+ return throwDefaultError({
2512
2450
  output,
2513
2451
  parsedBody,
2514
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
2515
2452
  errorCode,
2516
2453
  });
2517
2454
  }
@@ -2520,19 +2457,16 @@ const de_GetPackageVersionHistoryCommand = async (output, context) => {
2520
2457
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2521
2458
  return de_GetPackageVersionHistoryCommandError(output, context);
2522
2459
  }
2523
- const contents = map({
2460
+ const contents = (0, smithy_client_1.map)({
2524
2461
  $metadata: deserializeMetadata(output),
2525
2462
  });
2526
2463
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2527
- if (data.NextToken != null) {
2528
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2529
- }
2530
- if (data.PackageID != null) {
2531
- contents.PackageID = (0, smithy_client_1.expectString)(data.PackageID);
2532
- }
2533
- if (data.PackageVersionHistoryList != null) {
2534
- contents.PackageVersionHistoryList = de_PackageVersionHistoryList(data.PackageVersionHistoryList, context);
2535
- }
2464
+ const doc = (0, smithy_client_1.take)(data, {
2465
+ NextToken: smithy_client_1.expectString,
2466
+ PackageID: smithy_client_1.expectString,
2467
+ PackageVersionHistoryList: (_) => de_PackageVersionHistoryList(_, context),
2468
+ });
2469
+ Object.assign(contents, doc);
2536
2470
  return contents;
2537
2471
  };
2538
2472
  exports.de_GetPackageVersionHistoryCommand = de_GetPackageVersionHistoryCommand;
@@ -2560,10 +2494,9 @@ const de_GetPackageVersionHistoryCommandError = async (output, context) => {
2560
2494
  throw await de_ValidationExceptionRes(parsedOutput, context);
2561
2495
  default:
2562
2496
  const parsedBody = parsedOutput.body;
2563
- (0, smithy_client_1.throwDefaultError)({
2497
+ return throwDefaultError({
2564
2498
  output,
2565
2499
  parsedBody,
2566
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
2567
2500
  errorCode,
2568
2501
  });
2569
2502
  }
@@ -2572,16 +2505,15 @@ const de_GetUpgradeHistoryCommand = async (output, context) => {
2572
2505
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2573
2506
  return de_GetUpgradeHistoryCommandError(output, context);
2574
2507
  }
2575
- const contents = map({
2508
+ const contents = (0, smithy_client_1.map)({
2576
2509
  $metadata: deserializeMetadata(output),
2577
2510
  });
2578
2511
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2579
- if (data.NextToken != null) {
2580
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2581
- }
2582
- if (data.UpgradeHistories != null) {
2583
- contents.UpgradeHistories = de_UpgradeHistoryList(data.UpgradeHistories, context);
2584
- }
2512
+ const doc = (0, smithy_client_1.take)(data, {
2513
+ NextToken: smithy_client_1.expectString,
2514
+ UpgradeHistories: (_) => de_UpgradeHistoryList(_, context),
2515
+ });
2516
+ Object.assign(contents, doc);
2585
2517
  return contents;
2586
2518
  };
2587
2519
  exports.de_GetUpgradeHistoryCommand = de_GetUpgradeHistoryCommand;
@@ -2609,10 +2541,9 @@ const de_GetUpgradeHistoryCommandError = async (output, context) => {
2609
2541
  throw await de_ValidationExceptionRes(parsedOutput, context);
2610
2542
  default:
2611
2543
  const parsedBody = parsedOutput.body;
2612
- (0, smithy_client_1.throwDefaultError)({
2544
+ return throwDefaultError({
2613
2545
  output,
2614
2546
  parsedBody,
2615
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
2616
2547
  errorCode,
2617
2548
  });
2618
2549
  }
@@ -2621,19 +2552,16 @@ const de_GetUpgradeStatusCommand = async (output, context) => {
2621
2552
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2622
2553
  return de_GetUpgradeStatusCommandError(output, context);
2623
2554
  }
2624
- const contents = map({
2555
+ const contents = (0, smithy_client_1.map)({
2625
2556
  $metadata: deserializeMetadata(output),
2626
2557
  });
2627
2558
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2628
- if (data.StepStatus != null) {
2629
- contents.StepStatus = (0, smithy_client_1.expectString)(data.StepStatus);
2630
- }
2631
- if (data.UpgradeName != null) {
2632
- contents.UpgradeName = (0, smithy_client_1.expectString)(data.UpgradeName);
2633
- }
2634
- if (data.UpgradeStep != null) {
2635
- contents.UpgradeStep = (0, smithy_client_1.expectString)(data.UpgradeStep);
2636
- }
2559
+ const doc = (0, smithy_client_1.take)(data, {
2560
+ StepStatus: smithy_client_1.expectString,
2561
+ UpgradeName: smithy_client_1.expectString,
2562
+ UpgradeStep: smithy_client_1.expectString,
2563
+ });
2564
+ Object.assign(contents, doc);
2637
2565
  return contents;
2638
2566
  };
2639
2567
  exports.de_GetUpgradeStatusCommand = de_GetUpgradeStatusCommand;
@@ -2661,10 +2589,9 @@ const de_GetUpgradeStatusCommandError = async (output, context) => {
2661
2589
  throw await de_ValidationExceptionRes(parsedOutput, context);
2662
2590
  default:
2663
2591
  const parsedBody = parsedOutput.body;
2664
- (0, smithy_client_1.throwDefaultError)({
2592
+ return throwDefaultError({
2665
2593
  output,
2666
2594
  parsedBody,
2667
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
2668
2595
  errorCode,
2669
2596
  });
2670
2597
  }
@@ -2673,13 +2600,14 @@ const de_ListDomainNamesCommand = async (output, context) => {
2673
2600
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2674
2601
  return de_ListDomainNamesCommandError(output, context);
2675
2602
  }
2676
- const contents = map({
2603
+ const contents = (0, smithy_client_1.map)({
2677
2604
  $metadata: deserializeMetadata(output),
2678
2605
  });
2679
2606
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2680
- if (data.DomainNames != null) {
2681
- contents.DomainNames = de_DomainInfoList(data.DomainNames, context);
2682
- }
2607
+ const doc = (0, smithy_client_1.take)(data, {
2608
+ DomainNames: smithy_client_1._json,
2609
+ });
2610
+ Object.assign(contents, doc);
2683
2611
  return contents;
2684
2612
  };
2685
2613
  exports.de_ListDomainNamesCommand = de_ListDomainNamesCommand;
@@ -2698,10 +2626,9 @@ const de_ListDomainNamesCommandError = async (output, context) => {
2698
2626
  throw await de_ValidationExceptionRes(parsedOutput, context);
2699
2627
  default:
2700
2628
  const parsedBody = parsedOutput.body;
2701
- (0, smithy_client_1.throwDefaultError)({
2629
+ return throwDefaultError({
2702
2630
  output,
2703
2631
  parsedBody,
2704
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
2705
2632
  errorCode,
2706
2633
  });
2707
2634
  }
@@ -2710,16 +2637,15 @@ const de_ListDomainsForPackageCommand = async (output, context) => {
2710
2637
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2711
2638
  return de_ListDomainsForPackageCommandError(output, context);
2712
2639
  }
2713
- const contents = map({
2640
+ const contents = (0, smithy_client_1.map)({
2714
2641
  $metadata: deserializeMetadata(output),
2715
2642
  });
2716
2643
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2717
- if (data.DomainPackageDetailsList != null) {
2718
- contents.DomainPackageDetailsList = de_DomainPackageDetailsList(data.DomainPackageDetailsList, context);
2719
- }
2720
- if (data.NextToken != null) {
2721
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2722
- }
2644
+ const doc = (0, smithy_client_1.take)(data, {
2645
+ DomainPackageDetailsList: (_) => de_DomainPackageDetailsList(_, context),
2646
+ NextToken: smithy_client_1.expectString,
2647
+ });
2648
+ Object.assign(contents, doc);
2723
2649
  return contents;
2724
2650
  };
2725
2651
  exports.de_ListDomainsForPackageCommand = de_ListDomainsForPackageCommand;
@@ -2747,10 +2673,9 @@ const de_ListDomainsForPackageCommandError = async (output, context) => {
2747
2673
  throw await de_ValidationExceptionRes(parsedOutput, context);
2748
2674
  default:
2749
2675
  const parsedBody = parsedOutput.body;
2750
- (0, smithy_client_1.throwDefaultError)({
2676
+ return throwDefaultError({
2751
2677
  output,
2752
2678
  parsedBody,
2753
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
2754
2679
  errorCode,
2755
2680
  });
2756
2681
  }
@@ -2759,16 +2684,15 @@ const de_ListInstanceTypeDetailsCommand = async (output, context) => {
2759
2684
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2760
2685
  return de_ListInstanceTypeDetailsCommandError(output, context);
2761
2686
  }
2762
- const contents = map({
2687
+ const contents = (0, smithy_client_1.map)({
2763
2688
  $metadata: deserializeMetadata(output),
2764
2689
  });
2765
2690
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2766
- if (data.InstanceTypeDetails != null) {
2767
- contents.InstanceTypeDetails = de_InstanceTypeDetailsList(data.InstanceTypeDetails, context);
2768
- }
2769
- if (data.NextToken != null) {
2770
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2771
- }
2691
+ const doc = (0, smithy_client_1.take)(data, {
2692
+ InstanceTypeDetails: smithy_client_1._json,
2693
+ NextToken: smithy_client_1.expectString,
2694
+ });
2695
+ Object.assign(contents, doc);
2772
2696
  return contents;
2773
2697
  };
2774
2698
  exports.de_ListInstanceTypeDetailsCommand = de_ListInstanceTypeDetailsCommand;
@@ -2793,10 +2717,9 @@ const de_ListInstanceTypeDetailsCommandError = async (output, context) => {
2793
2717
  throw await de_ValidationExceptionRes(parsedOutput, context);
2794
2718
  default:
2795
2719
  const parsedBody = parsedOutput.body;
2796
- (0, smithy_client_1.throwDefaultError)({
2720
+ return throwDefaultError({
2797
2721
  output,
2798
2722
  parsedBody,
2799
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
2800
2723
  errorCode,
2801
2724
  });
2802
2725
  }
@@ -2805,16 +2728,15 @@ const de_ListPackagesForDomainCommand = async (output, context) => {
2805
2728
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2806
2729
  return de_ListPackagesForDomainCommandError(output, context);
2807
2730
  }
2808
- const contents = map({
2731
+ const contents = (0, smithy_client_1.map)({
2809
2732
  $metadata: deserializeMetadata(output),
2810
2733
  });
2811
2734
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2812
- if (data.DomainPackageDetailsList != null) {
2813
- contents.DomainPackageDetailsList = de_DomainPackageDetailsList(data.DomainPackageDetailsList, context);
2814
- }
2815
- if (data.NextToken != null) {
2816
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2817
- }
2735
+ const doc = (0, smithy_client_1.take)(data, {
2736
+ DomainPackageDetailsList: (_) => de_DomainPackageDetailsList(_, context),
2737
+ NextToken: smithy_client_1.expectString,
2738
+ });
2739
+ Object.assign(contents, doc);
2818
2740
  return contents;
2819
2741
  };
2820
2742
  exports.de_ListPackagesForDomainCommand = de_ListPackagesForDomainCommand;
@@ -2842,10 +2764,9 @@ const de_ListPackagesForDomainCommandError = async (output, context) => {
2842
2764
  throw await de_ValidationExceptionRes(parsedOutput, context);
2843
2765
  default:
2844
2766
  const parsedBody = parsedOutput.body;
2845
- (0, smithy_client_1.throwDefaultError)({
2767
+ return throwDefaultError({
2846
2768
  output,
2847
2769
  parsedBody,
2848
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
2849
2770
  errorCode,
2850
2771
  });
2851
2772
  }
@@ -2854,16 +2775,15 @@ const de_ListScheduledActionsCommand = async (output, context) => {
2854
2775
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2855
2776
  return de_ListScheduledActionsCommandError(output, context);
2856
2777
  }
2857
- const contents = map({
2778
+ const contents = (0, smithy_client_1.map)({
2858
2779
  $metadata: deserializeMetadata(output),
2859
2780
  });
2860
2781
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2861
- if (data.NextToken != null) {
2862
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2863
- }
2864
- if (data.ScheduledActions != null) {
2865
- contents.ScheduledActions = de_ScheduledActionsList(data.ScheduledActions, context);
2866
- }
2782
+ const doc = (0, smithy_client_1.take)(data, {
2783
+ NextToken: smithy_client_1.expectString,
2784
+ ScheduledActions: smithy_client_1._json,
2785
+ });
2786
+ Object.assign(contents, doc);
2867
2787
  return contents;
2868
2788
  };
2869
2789
  exports.de_ListScheduledActionsCommand = de_ListScheduledActionsCommand;
@@ -2891,10 +2811,9 @@ const de_ListScheduledActionsCommandError = async (output, context) => {
2891
2811
  throw await de_ValidationExceptionRes(parsedOutput, context);
2892
2812
  default:
2893
2813
  const parsedBody = parsedOutput.body;
2894
- (0, smithy_client_1.throwDefaultError)({
2814
+ return throwDefaultError({
2895
2815
  output,
2896
2816
  parsedBody,
2897
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
2898
2817
  errorCode,
2899
2818
  });
2900
2819
  }
@@ -2903,13 +2822,14 @@ const de_ListTagsCommand = async (output, context) => {
2903
2822
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2904
2823
  return de_ListTagsCommandError(output, context);
2905
2824
  }
2906
- const contents = map({
2825
+ const contents = (0, smithy_client_1.map)({
2907
2826
  $metadata: deserializeMetadata(output),
2908
2827
  });
2909
2828
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2910
- if (data.TagList != null) {
2911
- contents.TagList = de_TagList(data.TagList, context);
2912
- }
2829
+ const doc = (0, smithy_client_1.take)(data, {
2830
+ TagList: smithy_client_1._json,
2831
+ });
2832
+ Object.assign(contents, doc);
2913
2833
  return contents;
2914
2834
  };
2915
2835
  exports.de_ListTagsCommand = de_ListTagsCommand;
@@ -2934,10 +2854,9 @@ const de_ListTagsCommandError = async (output, context) => {
2934
2854
  throw await de_ValidationExceptionRes(parsedOutput, context);
2935
2855
  default:
2936
2856
  const parsedBody = parsedOutput.body;
2937
- (0, smithy_client_1.throwDefaultError)({
2857
+ return throwDefaultError({
2938
2858
  output,
2939
2859
  parsedBody,
2940
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
2941
2860
  errorCode,
2942
2861
  });
2943
2862
  }
@@ -2946,16 +2865,15 @@ const de_ListVersionsCommand = async (output, context) => {
2946
2865
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2947
2866
  return de_ListVersionsCommandError(output, context);
2948
2867
  }
2949
- const contents = map({
2868
+ const contents = (0, smithy_client_1.map)({
2950
2869
  $metadata: deserializeMetadata(output),
2951
2870
  });
2952
2871
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2953
- if (data.NextToken != null) {
2954
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2955
- }
2956
- if (data.Versions != null) {
2957
- contents.Versions = de_VersionList(data.Versions, context);
2958
- }
2872
+ const doc = (0, smithy_client_1.take)(data, {
2873
+ NextToken: smithy_client_1.expectString,
2874
+ Versions: smithy_client_1._json,
2875
+ });
2876
+ Object.assign(contents, doc);
2959
2877
  return contents;
2960
2878
  };
2961
2879
  exports.de_ListVersionsCommand = de_ListVersionsCommand;
@@ -2980,10 +2898,9 @@ const de_ListVersionsCommandError = async (output, context) => {
2980
2898
  throw await de_ValidationExceptionRes(parsedOutput, context);
2981
2899
  default:
2982
2900
  const parsedBody = parsedOutput.body;
2983
- (0, smithy_client_1.throwDefaultError)({
2901
+ return throwDefaultError({
2984
2902
  output,
2985
2903
  parsedBody,
2986
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
2987
2904
  errorCode,
2988
2905
  });
2989
2906
  }
@@ -2992,16 +2909,15 @@ const de_ListVpcEndpointAccessCommand = async (output, context) => {
2992
2909
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2993
2910
  return de_ListVpcEndpointAccessCommandError(output, context);
2994
2911
  }
2995
- const contents = map({
2912
+ const contents = (0, smithy_client_1.map)({
2996
2913
  $metadata: deserializeMetadata(output),
2997
2914
  });
2998
2915
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2999
- if (data.AuthorizedPrincipalList != null) {
3000
- contents.AuthorizedPrincipalList = de_AuthorizedPrincipalList(data.AuthorizedPrincipalList, context);
3001
- }
3002
- if (data.NextToken != null) {
3003
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
3004
- }
2916
+ const doc = (0, smithy_client_1.take)(data, {
2917
+ AuthorizedPrincipalList: smithy_client_1._json,
2918
+ NextToken: smithy_client_1.expectString,
2919
+ });
2920
+ Object.assign(contents, doc);
3005
2921
  return contents;
3006
2922
  };
3007
2923
  exports.de_ListVpcEndpointAccessCommand = de_ListVpcEndpointAccessCommand;
@@ -3026,10 +2942,9 @@ const de_ListVpcEndpointAccessCommandError = async (output, context) => {
3026
2942
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3027
2943
  default:
3028
2944
  const parsedBody = parsedOutput.body;
3029
- (0, smithy_client_1.throwDefaultError)({
2945
+ return throwDefaultError({
3030
2946
  output,
3031
2947
  parsedBody,
3032
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
3033
2948
  errorCode,
3034
2949
  });
3035
2950
  }
@@ -3038,16 +2953,15 @@ const de_ListVpcEndpointsCommand = async (output, context) => {
3038
2953
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3039
2954
  return de_ListVpcEndpointsCommandError(output, context);
3040
2955
  }
3041
- const contents = map({
2956
+ const contents = (0, smithy_client_1.map)({
3042
2957
  $metadata: deserializeMetadata(output),
3043
2958
  });
3044
2959
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3045
- if (data.NextToken != null) {
3046
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
3047
- }
3048
- if (data.VpcEndpointSummaryList != null) {
3049
- contents.VpcEndpointSummaryList = de_VpcEndpointSummaryList(data.VpcEndpointSummaryList, context);
3050
- }
2960
+ const doc = (0, smithy_client_1.take)(data, {
2961
+ NextToken: smithy_client_1.expectString,
2962
+ VpcEndpointSummaryList: smithy_client_1._json,
2963
+ });
2964
+ Object.assign(contents, doc);
3051
2965
  return contents;
3052
2966
  };
3053
2967
  exports.de_ListVpcEndpointsCommand = de_ListVpcEndpointsCommand;
@@ -3069,10 +2983,9 @@ const de_ListVpcEndpointsCommandError = async (output, context) => {
3069
2983
  throw await de_InternalExceptionRes(parsedOutput, context);
3070
2984
  default:
3071
2985
  const parsedBody = parsedOutput.body;
3072
- (0, smithy_client_1.throwDefaultError)({
2986
+ return throwDefaultError({
3073
2987
  output,
3074
2988
  parsedBody,
3075
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
3076
2989
  errorCode,
3077
2990
  });
3078
2991
  }
@@ -3081,16 +2994,15 @@ const de_ListVpcEndpointsForDomainCommand = async (output, context) => {
3081
2994
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3082
2995
  return de_ListVpcEndpointsForDomainCommandError(output, context);
3083
2996
  }
3084
- const contents = map({
2997
+ const contents = (0, smithy_client_1.map)({
3085
2998
  $metadata: deserializeMetadata(output),
3086
2999
  });
3087
3000
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3088
- if (data.NextToken != null) {
3089
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
3090
- }
3091
- if (data.VpcEndpointSummaryList != null) {
3092
- contents.VpcEndpointSummaryList = de_VpcEndpointSummaryList(data.VpcEndpointSummaryList, context);
3093
- }
3001
+ const doc = (0, smithy_client_1.take)(data, {
3002
+ NextToken: smithy_client_1.expectString,
3003
+ VpcEndpointSummaryList: smithy_client_1._json,
3004
+ });
3005
+ Object.assign(contents, doc);
3094
3006
  return contents;
3095
3007
  };
3096
3008
  exports.de_ListVpcEndpointsForDomainCommand = de_ListVpcEndpointsForDomainCommand;
@@ -3115,10 +3027,9 @@ const de_ListVpcEndpointsForDomainCommandError = async (output, context) => {
3115
3027
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3116
3028
  default:
3117
3029
  const parsedBody = parsedOutput.body;
3118
- (0, smithy_client_1.throwDefaultError)({
3030
+ return throwDefaultError({
3119
3031
  output,
3120
3032
  parsedBody,
3121
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
3122
3033
  errorCode,
3123
3034
  });
3124
3035
  }
@@ -3127,16 +3038,15 @@ const de_PurchaseReservedInstanceOfferingCommand = async (output, context) => {
3127
3038
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3128
3039
  return de_PurchaseReservedInstanceOfferingCommandError(output, context);
3129
3040
  }
3130
- const contents = map({
3041
+ const contents = (0, smithy_client_1.map)({
3131
3042
  $metadata: deserializeMetadata(output),
3132
3043
  });
3133
3044
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3134
- if (data.ReservationName != null) {
3135
- contents.ReservationName = (0, smithy_client_1.expectString)(data.ReservationName);
3136
- }
3137
- if (data.ReservedInstanceId != null) {
3138
- contents.ReservedInstanceId = (0, smithy_client_1.expectString)(data.ReservedInstanceId);
3139
- }
3045
+ const doc = (0, smithy_client_1.take)(data, {
3046
+ ReservationName: smithy_client_1.expectString,
3047
+ ReservedInstanceId: smithy_client_1.expectString,
3048
+ });
3049
+ Object.assign(contents, doc);
3140
3050
  return contents;
3141
3051
  };
3142
3052
  exports.de_PurchaseReservedInstanceOfferingCommand = de_PurchaseReservedInstanceOfferingCommand;
@@ -3167,10 +3077,9 @@ const de_PurchaseReservedInstanceOfferingCommandError = async (output, context)
3167
3077
  throw await de_ValidationExceptionRes(parsedOutput, context);
3168
3078
  default:
3169
3079
  const parsedBody = parsedOutput.body;
3170
- (0, smithy_client_1.throwDefaultError)({
3080
+ return throwDefaultError({
3171
3081
  output,
3172
3082
  parsedBody,
3173
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
3174
3083
  errorCode,
3175
3084
  });
3176
3085
  }
@@ -3179,13 +3088,14 @@ const de_RejectInboundConnectionCommand = async (output, context) => {
3179
3088
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3180
3089
  return de_RejectInboundConnectionCommandError(output, context);
3181
3090
  }
3182
- const contents = map({
3091
+ const contents = (0, smithy_client_1.map)({
3183
3092
  $metadata: deserializeMetadata(output),
3184
3093
  });
3185
3094
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3186
- if (data.Connection != null) {
3187
- contents.Connection = de_InboundConnection(data.Connection, context);
3188
- }
3095
+ const doc = (0, smithy_client_1.take)(data, {
3096
+ Connection: smithy_client_1._json,
3097
+ });
3098
+ Object.assign(contents, doc);
3189
3099
  return contents;
3190
3100
  };
3191
3101
  exports.de_RejectInboundConnectionCommand = de_RejectInboundConnectionCommand;
@@ -3204,10 +3114,9 @@ const de_RejectInboundConnectionCommandError = async (output, context) => {
3204
3114
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3205
3115
  default:
3206
3116
  const parsedBody = parsedOutput.body;
3207
- (0, smithy_client_1.throwDefaultError)({
3117
+ return throwDefaultError({
3208
3118
  output,
3209
3119
  parsedBody,
3210
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
3211
3120
  errorCode,
3212
3121
  });
3213
3122
  }
@@ -3216,7 +3125,7 @@ const de_RemoveTagsCommand = async (output, context) => {
3216
3125
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3217
3126
  return de_RemoveTagsCommandError(output, context);
3218
3127
  }
3219
- const contents = map({
3128
+ const contents = (0, smithy_client_1.map)({
3220
3129
  $metadata: deserializeMetadata(output),
3221
3130
  });
3222
3131
  await collectBody(output.body, context);
@@ -3241,10 +3150,9 @@ const de_RemoveTagsCommandError = async (output, context) => {
3241
3150
  throw await de_ValidationExceptionRes(parsedOutput, context);
3242
3151
  default:
3243
3152
  const parsedBody = parsedOutput.body;
3244
- (0, smithy_client_1.throwDefaultError)({
3153
+ return throwDefaultError({
3245
3154
  output,
3246
3155
  parsedBody,
3247
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
3248
3156
  errorCode,
3249
3157
  });
3250
3158
  }
@@ -3253,7 +3161,7 @@ const de_RevokeVpcEndpointAccessCommand = async (output, context) => {
3253
3161
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3254
3162
  return de_RevokeVpcEndpointAccessCommandError(output, context);
3255
3163
  }
3256
- const contents = map({
3164
+ const contents = (0, smithy_client_1.map)({
3257
3165
  $metadata: deserializeMetadata(output),
3258
3166
  });
3259
3167
  await collectBody(output.body, context);
@@ -3284,10 +3192,9 @@ const de_RevokeVpcEndpointAccessCommandError = async (output, context) => {
3284
3192
  throw await de_ValidationExceptionRes(parsedOutput, context);
3285
3193
  default:
3286
3194
  const parsedBody = parsedOutput.body;
3287
- (0, smithy_client_1.throwDefaultError)({
3195
+ return throwDefaultError({
3288
3196
  output,
3289
3197
  parsedBody,
3290
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
3291
3198
  errorCode,
3292
3199
  });
3293
3200
  }
@@ -3296,13 +3203,14 @@ const de_StartServiceSoftwareUpdateCommand = async (output, context) => {
3296
3203
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3297
3204
  return de_StartServiceSoftwareUpdateCommandError(output, context);
3298
3205
  }
3299
- const contents = map({
3206
+ const contents = (0, smithy_client_1.map)({
3300
3207
  $metadata: deserializeMetadata(output),
3301
3208
  });
3302
3209
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3303
- if (data.ServiceSoftwareOptions != null) {
3304
- contents.ServiceSoftwareOptions = de_ServiceSoftwareOptions(data.ServiceSoftwareOptions, context);
3305
- }
3210
+ const doc = (0, smithy_client_1.take)(data, {
3211
+ ServiceSoftwareOptions: (_) => de_ServiceSoftwareOptions(_, context),
3212
+ });
3213
+ Object.assign(contents, doc);
3306
3214
  return contents;
3307
3215
  };
3308
3216
  exports.de_StartServiceSoftwareUpdateCommand = de_StartServiceSoftwareUpdateCommand;
@@ -3327,10 +3235,9 @@ const de_StartServiceSoftwareUpdateCommandError = async (output, context) => {
3327
3235
  throw await de_ValidationExceptionRes(parsedOutput, context);
3328
3236
  default:
3329
3237
  const parsedBody = parsedOutput.body;
3330
- (0, smithy_client_1.throwDefaultError)({
3238
+ return throwDefaultError({
3331
3239
  output,
3332
3240
  parsedBody,
3333
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
3334
3241
  errorCode,
3335
3242
  });
3336
3243
  }
@@ -3339,19 +3246,16 @@ const de_UpdateDomainConfigCommand = async (output, context) => {
3339
3246
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3340
3247
  return de_UpdateDomainConfigCommandError(output, context);
3341
3248
  }
3342
- const contents = map({
3249
+ const contents = (0, smithy_client_1.map)({
3343
3250
  $metadata: deserializeMetadata(output),
3344
3251
  });
3345
3252
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3346
- if (data.DomainConfig != null) {
3347
- contents.DomainConfig = de_DomainConfig(data.DomainConfig, context);
3348
- }
3349
- if (data.DryRunProgressStatus != null) {
3350
- contents.DryRunProgressStatus = de_DryRunProgressStatus(data.DryRunProgressStatus, context);
3351
- }
3352
- if (data.DryRunResults != null) {
3353
- contents.DryRunResults = de_DryRunResults(data.DryRunResults, context);
3354
- }
3253
+ const doc = (0, smithy_client_1.take)(data, {
3254
+ DomainConfig: (_) => de_DomainConfig(_, context),
3255
+ DryRunProgressStatus: smithy_client_1._json,
3256
+ DryRunResults: smithy_client_1._json,
3257
+ });
3258
+ Object.assign(contents, doc);
3355
3259
  return contents;
3356
3260
  };
3357
3261
  exports.de_UpdateDomainConfigCommand = de_UpdateDomainConfigCommand;
@@ -3382,10 +3286,9 @@ const de_UpdateDomainConfigCommandError = async (output, context) => {
3382
3286
  throw await de_ValidationExceptionRes(parsedOutput, context);
3383
3287
  default:
3384
3288
  const parsedBody = parsedOutput.body;
3385
- (0, smithy_client_1.throwDefaultError)({
3289
+ return throwDefaultError({
3386
3290
  output,
3387
3291
  parsedBody,
3388
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
3389
3292
  errorCode,
3390
3293
  });
3391
3294
  }
@@ -3394,13 +3297,14 @@ const de_UpdatePackageCommand = async (output, context) => {
3394
3297
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3395
3298
  return de_UpdatePackageCommandError(output, context);
3396
3299
  }
3397
- const contents = map({
3300
+ const contents = (0, smithy_client_1.map)({
3398
3301
  $metadata: deserializeMetadata(output),
3399
3302
  });
3400
3303
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3401
- if (data.PackageDetails != null) {
3402
- contents.PackageDetails = de_PackageDetails(data.PackageDetails, context);
3403
- }
3304
+ const doc = (0, smithy_client_1.take)(data, {
3305
+ PackageDetails: (_) => de_PackageDetails(_, context),
3306
+ });
3307
+ Object.assign(contents, doc);
3404
3308
  return contents;
3405
3309
  };
3406
3310
  exports.de_UpdatePackageCommand = de_UpdatePackageCommand;
@@ -3431,10 +3335,9 @@ const de_UpdatePackageCommandError = async (output, context) => {
3431
3335
  throw await de_ValidationExceptionRes(parsedOutput, context);
3432
3336
  default:
3433
3337
  const parsedBody = parsedOutput.body;
3434
- (0, smithy_client_1.throwDefaultError)({
3338
+ return throwDefaultError({
3435
3339
  output,
3436
3340
  parsedBody,
3437
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
3438
3341
  errorCode,
3439
3342
  });
3440
3343
  }
@@ -3443,13 +3346,14 @@ const de_UpdateScheduledActionCommand = async (output, context) => {
3443
3346
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3444
3347
  return de_UpdateScheduledActionCommandError(output, context);
3445
3348
  }
3446
- const contents = map({
3349
+ const contents = (0, smithy_client_1.map)({
3447
3350
  $metadata: deserializeMetadata(output),
3448
3351
  });
3449
3352
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3450
- if (data.ScheduledAction != null) {
3451
- contents.ScheduledAction = de_ScheduledAction(data.ScheduledAction, context);
3452
- }
3353
+ const doc = (0, smithy_client_1.take)(data, {
3354
+ ScheduledAction: smithy_client_1._json,
3355
+ });
3356
+ Object.assign(contents, doc);
3453
3357
  return contents;
3454
3358
  };
3455
3359
  exports.de_UpdateScheduledActionCommand = de_UpdateScheduledActionCommand;
@@ -3483,10 +3387,9 @@ const de_UpdateScheduledActionCommandError = async (output, context) => {
3483
3387
  throw await de_ValidationExceptionRes(parsedOutput, context);
3484
3388
  default:
3485
3389
  const parsedBody = parsedOutput.body;
3486
- (0, smithy_client_1.throwDefaultError)({
3390
+ return throwDefaultError({
3487
3391
  output,
3488
3392
  parsedBody,
3489
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
3490
3393
  errorCode,
3491
3394
  });
3492
3395
  }
@@ -3495,13 +3398,14 @@ const de_UpdateVpcEndpointCommand = async (output, context) => {
3495
3398
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3496
3399
  return de_UpdateVpcEndpointCommandError(output, context);
3497
3400
  }
3498
- const contents = map({
3401
+ const contents = (0, smithy_client_1.map)({
3499
3402
  $metadata: deserializeMetadata(output),
3500
3403
  });
3501
3404
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3502
- if (data.VpcEndpoint != null) {
3503
- contents.VpcEndpoint = de_VpcEndpoint(data.VpcEndpoint, context);
3504
- }
3405
+ const doc = (0, smithy_client_1.take)(data, {
3406
+ VpcEndpoint: smithy_client_1._json,
3407
+ });
3408
+ Object.assign(contents, doc);
3505
3409
  return contents;
3506
3410
  };
3507
3411
  exports.de_UpdateVpcEndpointCommand = de_UpdateVpcEndpointCommand;
@@ -3532,10 +3436,9 @@ const de_UpdateVpcEndpointCommandError = async (output, context) => {
3532
3436
  throw await de_ValidationExceptionRes(parsedOutput, context);
3533
3437
  default:
3534
3438
  const parsedBody = parsedOutput.body;
3535
- (0, smithy_client_1.throwDefaultError)({
3439
+ return throwDefaultError({
3536
3440
  output,
3537
3441
  parsedBody,
3538
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
3539
3442
  errorCode,
3540
3443
  });
3541
3444
  }
@@ -3544,28 +3447,19 @@ const de_UpgradeDomainCommand = async (output, context) => {
3544
3447
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3545
3448
  return de_UpgradeDomainCommandError(output, context);
3546
3449
  }
3547
- const contents = map({
3450
+ const contents = (0, smithy_client_1.map)({
3548
3451
  $metadata: deserializeMetadata(output),
3549
3452
  });
3550
3453
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3551
- if (data.AdvancedOptions != null) {
3552
- contents.AdvancedOptions = de_AdvancedOptions(data.AdvancedOptions, context);
3553
- }
3554
- if (data.ChangeProgressDetails != null) {
3555
- contents.ChangeProgressDetails = de_ChangeProgressDetails(data.ChangeProgressDetails, context);
3556
- }
3557
- if (data.DomainName != null) {
3558
- contents.DomainName = (0, smithy_client_1.expectString)(data.DomainName);
3559
- }
3560
- if (data.PerformCheckOnly != null) {
3561
- contents.PerformCheckOnly = (0, smithy_client_1.expectBoolean)(data.PerformCheckOnly);
3562
- }
3563
- if (data.TargetVersion != null) {
3564
- contents.TargetVersion = (0, smithy_client_1.expectString)(data.TargetVersion);
3565
- }
3566
- if (data.UpgradeId != null) {
3567
- contents.UpgradeId = (0, smithy_client_1.expectString)(data.UpgradeId);
3568
- }
3454
+ const doc = (0, smithy_client_1.take)(data, {
3455
+ AdvancedOptions: smithy_client_1._json,
3456
+ ChangeProgressDetails: smithy_client_1._json,
3457
+ DomainName: smithy_client_1.expectString,
3458
+ PerformCheckOnly: smithy_client_1.expectBoolean,
3459
+ TargetVersion: smithy_client_1.expectString,
3460
+ UpgradeId: smithy_client_1.expectString,
3461
+ });
3462
+ Object.assign(contents, doc);
3569
3463
  return contents;
3570
3464
  };
3571
3465
  exports.de_UpgradeDomainCommand = de_UpgradeDomainCommand;
@@ -3596,21 +3490,21 @@ const de_UpgradeDomainCommandError = async (output, context) => {
3596
3490
  throw await de_ValidationExceptionRes(parsedOutput, context);
3597
3491
  default:
3598
3492
  const parsedBody = parsedOutput.body;
3599
- (0, smithy_client_1.throwDefaultError)({
3493
+ return throwDefaultError({
3600
3494
  output,
3601
3495
  parsedBody,
3602
- exceptionCtor: OpenSearchServiceException_1.OpenSearchServiceException,
3603
3496
  errorCode,
3604
3497
  });
3605
3498
  }
3606
3499
  };
3607
- const map = smithy_client_1.map;
3500
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(OpenSearchServiceException_1.OpenSearchServiceException);
3608
3501
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
3609
- const contents = map({});
3502
+ const contents = (0, smithy_client_1.map)({});
3610
3503
  const data = parsedOutput.body;
3611
- if (data.message != null) {
3612
- contents.message = (0, smithy_client_1.expectString)(data.message);
3613
- }
3504
+ const doc = (0, smithy_client_1.take)(data, {
3505
+ message: smithy_client_1.expectString,
3506
+ });
3507
+ Object.assign(contents, doc);
3614
3508
  const exception = new models_0_1.AccessDeniedException({
3615
3509
  $metadata: deserializeMetadata(parsedOutput),
3616
3510
  ...contents,
@@ -3618,11 +3512,12 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
3618
3512
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3619
3513
  };
3620
3514
  const de_BaseExceptionRes = async (parsedOutput, context) => {
3621
- const contents = map({});
3515
+ const contents = (0, smithy_client_1.map)({});
3622
3516
  const data = parsedOutput.body;
3623
- if (data.message != null) {
3624
- contents.message = (0, smithy_client_1.expectString)(data.message);
3625
- }
3517
+ const doc = (0, smithy_client_1.take)(data, {
3518
+ message: smithy_client_1.expectString,
3519
+ });
3520
+ Object.assign(contents, doc);
3626
3521
  const exception = new models_0_1.BaseException({
3627
3522
  $metadata: deserializeMetadata(parsedOutput),
3628
3523
  ...contents,
@@ -3630,11 +3525,12 @@ const de_BaseExceptionRes = async (parsedOutput, context) => {
3630
3525
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3631
3526
  };
3632
3527
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
3633
- const contents = map({});
3528
+ const contents = (0, smithy_client_1.map)({});
3634
3529
  const data = parsedOutput.body;
3635
- if (data.message != null) {
3636
- contents.message = (0, smithy_client_1.expectString)(data.message);
3637
- }
3530
+ const doc = (0, smithy_client_1.take)(data, {
3531
+ message: smithy_client_1.expectString,
3532
+ });
3533
+ Object.assign(contents, doc);
3638
3534
  const exception = new models_0_1.ConflictException({
3639
3535
  $metadata: deserializeMetadata(parsedOutput),
3640
3536
  ...contents,
@@ -3642,11 +3538,12 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
3642
3538
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3643
3539
  };
3644
3540
  const de_DisabledOperationExceptionRes = async (parsedOutput, context) => {
3645
- const contents = map({});
3541
+ const contents = (0, smithy_client_1.map)({});
3646
3542
  const data = parsedOutput.body;
3647
- if (data.message != null) {
3648
- contents.message = (0, smithy_client_1.expectString)(data.message);
3649
- }
3543
+ const doc = (0, smithy_client_1.take)(data, {
3544
+ message: smithy_client_1.expectString,
3545
+ });
3546
+ Object.assign(contents, doc);
3650
3547
  const exception = new models_0_1.DisabledOperationException({
3651
3548
  $metadata: deserializeMetadata(parsedOutput),
3652
3549
  ...contents,
@@ -3654,11 +3551,12 @@ const de_DisabledOperationExceptionRes = async (parsedOutput, context) => {
3654
3551
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3655
3552
  };
3656
3553
  const de_InternalExceptionRes = async (parsedOutput, context) => {
3657
- const contents = map({});
3554
+ const contents = (0, smithy_client_1.map)({});
3658
3555
  const data = parsedOutput.body;
3659
- if (data.message != null) {
3660
- contents.message = (0, smithy_client_1.expectString)(data.message);
3661
- }
3556
+ const doc = (0, smithy_client_1.take)(data, {
3557
+ message: smithy_client_1.expectString,
3558
+ });
3559
+ Object.assign(contents, doc);
3662
3560
  const exception = new models_0_1.InternalException({
3663
3561
  $metadata: deserializeMetadata(parsedOutput),
3664
3562
  ...contents,
@@ -3666,11 +3564,12 @@ const de_InternalExceptionRes = async (parsedOutput, context) => {
3666
3564
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3667
3565
  };
3668
3566
  const de_InvalidPaginationTokenExceptionRes = async (parsedOutput, context) => {
3669
- const contents = map({});
3567
+ const contents = (0, smithy_client_1.map)({});
3670
3568
  const data = parsedOutput.body;
3671
- if (data.message != null) {
3672
- contents.message = (0, smithy_client_1.expectString)(data.message);
3673
- }
3569
+ const doc = (0, smithy_client_1.take)(data, {
3570
+ message: smithy_client_1.expectString,
3571
+ });
3572
+ Object.assign(contents, doc);
3674
3573
  const exception = new models_0_1.InvalidPaginationTokenException({
3675
3574
  $metadata: deserializeMetadata(parsedOutput),
3676
3575
  ...contents,
@@ -3678,11 +3577,12 @@ const de_InvalidPaginationTokenExceptionRes = async (parsedOutput, context) => {
3678
3577
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3679
3578
  };
3680
3579
  const de_InvalidTypeExceptionRes = async (parsedOutput, context) => {
3681
- const contents = map({});
3580
+ const contents = (0, smithy_client_1.map)({});
3682
3581
  const data = parsedOutput.body;
3683
- if (data.message != null) {
3684
- contents.message = (0, smithy_client_1.expectString)(data.message);
3685
- }
3582
+ const doc = (0, smithy_client_1.take)(data, {
3583
+ message: smithy_client_1.expectString,
3584
+ });
3585
+ Object.assign(contents, doc);
3686
3586
  const exception = new models_0_1.InvalidTypeException({
3687
3587
  $metadata: deserializeMetadata(parsedOutput),
3688
3588
  ...contents,
@@ -3690,11 +3590,12 @@ const de_InvalidTypeExceptionRes = async (parsedOutput, context) => {
3690
3590
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3691
3591
  };
3692
3592
  const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
3693
- const contents = map({});
3593
+ const contents = (0, smithy_client_1.map)({});
3694
3594
  const data = parsedOutput.body;
3695
- if (data.message != null) {
3696
- contents.message = (0, smithy_client_1.expectString)(data.message);
3697
- }
3595
+ const doc = (0, smithy_client_1.take)(data, {
3596
+ message: smithy_client_1.expectString,
3597
+ });
3598
+ Object.assign(contents, doc);
3698
3599
  const exception = new models_0_1.LimitExceededException({
3699
3600
  $metadata: deserializeMetadata(parsedOutput),
3700
3601
  ...contents,
@@ -3702,11 +3603,12 @@ const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
3702
3603
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3703
3604
  };
3704
3605
  const de_ResourceAlreadyExistsExceptionRes = async (parsedOutput, context) => {
3705
- const contents = map({});
3606
+ const contents = (0, smithy_client_1.map)({});
3706
3607
  const data = parsedOutput.body;
3707
- if (data.message != null) {
3708
- contents.message = (0, smithy_client_1.expectString)(data.message);
3709
- }
3608
+ const doc = (0, smithy_client_1.take)(data, {
3609
+ message: smithy_client_1.expectString,
3610
+ });
3611
+ Object.assign(contents, doc);
3710
3612
  const exception = new models_0_1.ResourceAlreadyExistsException({
3711
3613
  $metadata: deserializeMetadata(parsedOutput),
3712
3614
  ...contents,
@@ -3714,11 +3616,12 @@ const de_ResourceAlreadyExistsExceptionRes = async (parsedOutput, context) => {
3714
3616
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3715
3617
  };
3716
3618
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
3717
- const contents = map({});
3619
+ const contents = (0, smithy_client_1.map)({});
3718
3620
  const data = parsedOutput.body;
3719
- if (data.message != null) {
3720
- contents.message = (0, smithy_client_1.expectString)(data.message);
3721
- }
3621
+ const doc = (0, smithy_client_1.take)(data, {
3622
+ message: smithy_client_1.expectString,
3623
+ });
3624
+ Object.assign(contents, doc);
3722
3625
  const exception = new models_0_1.ResourceNotFoundException({
3723
3626
  $metadata: deserializeMetadata(parsedOutput),
3724
3627
  ...contents,
@@ -3726,14 +3629,13 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
3726
3629
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3727
3630
  };
3728
3631
  const de_SlotNotAvailableExceptionRes = async (parsedOutput, context) => {
3729
- const contents = map({});
3632
+ const contents = (0, smithy_client_1.map)({});
3730
3633
  const data = parsedOutput.body;
3731
- if (data.SlotSuggestions != null) {
3732
- contents.SlotSuggestions = de_SlotList(data.SlotSuggestions, context);
3733
- }
3734
- if (data.message != null) {
3735
- contents.message = (0, smithy_client_1.expectString)(data.message);
3736
- }
3634
+ const doc = (0, smithy_client_1.take)(data, {
3635
+ SlotSuggestions: smithy_client_1._json,
3636
+ message: smithy_client_1.expectString,
3637
+ });
3638
+ Object.assign(contents, doc);
3737
3639
  const exception = new models_0_1.SlotNotAvailableException({
3738
3640
  $metadata: deserializeMetadata(parsedOutput),
3739
3641
  ...contents,
@@ -3741,47 +3643,24 @@ const de_SlotNotAvailableExceptionRes = async (parsedOutput, context) => {
3741
3643
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3742
3644
  };
3743
3645
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
3744
- const contents = map({});
3646
+ const contents = (0, smithy_client_1.map)({});
3745
3647
  const data = parsedOutput.body;
3746
- if (data.message != null) {
3747
- contents.message = (0, smithy_client_1.expectString)(data.message);
3748
- }
3648
+ const doc = (0, smithy_client_1.take)(data, {
3649
+ message: smithy_client_1.expectString,
3650
+ });
3651
+ Object.assign(contents, doc);
3749
3652
  const exception = new models_0_1.ValidationException({
3750
3653
  $metadata: deserializeMetadata(parsedOutput),
3751
3654
  ...contents,
3752
3655
  });
3753
3656
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3754
3657
  };
3755
- const se_AdvancedOptions = (input, context) => {
3756
- return Object.entries(input).reduce((acc, [key, value]) => {
3757
- if (value === null) {
3758
- return acc;
3759
- }
3760
- acc[key] = value;
3761
- return acc;
3762
- }, {});
3763
- };
3764
- const se_AdvancedSecurityOptionsInput = (input, context) => {
3765
- return {
3766
- ...(input.AnonymousAuthEnabled != null && { AnonymousAuthEnabled: input.AnonymousAuthEnabled }),
3767
- ...(input.Enabled != null && { Enabled: input.Enabled }),
3768
- ...(input.InternalUserDatabaseEnabled != null && {
3769
- InternalUserDatabaseEnabled: input.InternalUserDatabaseEnabled,
3770
- }),
3771
- ...(input.MasterUserOptions != null && {
3772
- MasterUserOptions: se_MasterUserOptions(input.MasterUserOptions, context),
3773
- }),
3774
- ...(input.SAMLOptions != null && { SAMLOptions: se_SAMLOptionsInput(input.SAMLOptions, context) }),
3775
- };
3776
- };
3777
3658
  const se_AutoTuneMaintenanceSchedule = (input, context) => {
3778
- return {
3779
- ...(input.CronExpressionForRecurrence != null && {
3780
- CronExpressionForRecurrence: input.CronExpressionForRecurrence,
3781
- }),
3782
- ...(input.Duration != null && { Duration: se_Duration(input.Duration, context) }),
3783
- ...(input.StartAt != null && { StartAt: Math.round(input.StartAt.getTime() / 1000) }),
3784
- };
3659
+ return (0, smithy_client_1.take)(input, {
3660
+ CronExpressionForRecurrence: [],
3661
+ Duration: smithy_client_1._json,
3662
+ StartAt: (_) => Math.round(_.getTime() / 1000),
3663
+ });
3785
3664
  };
3786
3665
  const se_AutoTuneMaintenanceScheduleList = (input, context) => {
3787
3666
  return input
@@ -3791,1363 +3670,441 @@ const se_AutoTuneMaintenanceScheduleList = (input, context) => {
3791
3670
  });
3792
3671
  };
3793
3672
  const se_AutoTuneOptions = (input, context) => {
3794
- return {
3795
- ...(input.DesiredState != null && { DesiredState: input.DesiredState }),
3796
- ...(input.MaintenanceSchedules != null && {
3797
- MaintenanceSchedules: se_AutoTuneMaintenanceScheduleList(input.MaintenanceSchedules, context),
3798
- }),
3799
- ...(input.RollbackOnDisable != null && { RollbackOnDisable: input.RollbackOnDisable }),
3800
- ...(input.UseOffPeakWindow != null && { UseOffPeakWindow: input.UseOffPeakWindow }),
3801
- };
3673
+ return (0, smithy_client_1.take)(input, {
3674
+ DesiredState: [],
3675
+ MaintenanceSchedules: (_) => se_AutoTuneMaintenanceScheduleList(_, context),
3676
+ RollbackOnDisable: [],
3677
+ UseOffPeakWindow: [],
3678
+ });
3802
3679
  };
3803
3680
  const se_AutoTuneOptionsInput = (input, context) => {
3804
- return {
3805
- ...(input.DesiredState != null && { DesiredState: input.DesiredState }),
3806
- ...(input.MaintenanceSchedules != null && {
3807
- MaintenanceSchedules: se_AutoTuneMaintenanceScheduleList(input.MaintenanceSchedules, context),
3808
- }),
3809
- ...(input.UseOffPeakWindow != null && { UseOffPeakWindow: input.UseOffPeakWindow }),
3810
- };
3681
+ return (0, smithy_client_1.take)(input, {
3682
+ DesiredState: [],
3683
+ MaintenanceSchedules: (_) => se_AutoTuneMaintenanceScheduleList(_, context),
3684
+ UseOffPeakWindow: [],
3685
+ });
3811
3686
  };
3812
- const se_AWSDomainInformation = (input, context) => {
3813
- return {
3814
- ...(input.DomainName != null && { DomainName: input.DomainName }),
3815
- ...(input.OwnerId != null && { OwnerId: input.OwnerId }),
3816
- ...(input.Region != null && { Region: input.Region }),
3817
- };
3687
+ const de_AccessPoliciesStatus = (output, context) => {
3688
+ return (0, smithy_client_1.take)(output, {
3689
+ Options: smithy_client_1.expectString,
3690
+ Status: (_) => de_OptionStatus(_, context),
3691
+ });
3818
3692
  };
3819
- const se_ClusterConfig = (input, context) => {
3820
- return {
3821
- ...(input.ColdStorageOptions != null && {
3822
- ColdStorageOptions: se_ColdStorageOptions(input.ColdStorageOptions, context),
3823
- }),
3824
- ...(input.DedicatedMasterCount != null && { DedicatedMasterCount: input.DedicatedMasterCount }),
3825
- ...(input.DedicatedMasterEnabled != null && { DedicatedMasterEnabled: input.DedicatedMasterEnabled }),
3826
- ...(input.DedicatedMasterType != null && { DedicatedMasterType: input.DedicatedMasterType }),
3827
- ...(input.InstanceCount != null && { InstanceCount: input.InstanceCount }),
3828
- ...(input.InstanceType != null && { InstanceType: input.InstanceType }),
3829
- ...(input.WarmCount != null && { WarmCount: input.WarmCount }),
3830
- ...(input.WarmEnabled != null && { WarmEnabled: input.WarmEnabled }),
3831
- ...(input.WarmType != null && { WarmType: input.WarmType }),
3832
- ...(input.ZoneAwarenessConfig != null && {
3833
- ZoneAwarenessConfig: se_ZoneAwarenessConfig(input.ZoneAwarenessConfig, context),
3834
- }),
3835
- ...(input.ZoneAwarenessEnabled != null && { ZoneAwarenessEnabled: input.ZoneAwarenessEnabled }),
3836
- };
3693
+ const de_AdvancedOptionsStatus = (output, context) => {
3694
+ return (0, smithy_client_1.take)(output, {
3695
+ Options: smithy_client_1._json,
3696
+ Status: (_) => de_OptionStatus(_, context),
3697
+ });
3837
3698
  };
3838
- const se_CognitoOptions = (input, context) => {
3839
- return {
3840
- ...(input.Enabled != null && { Enabled: input.Enabled }),
3841
- ...(input.IdentityPoolId != null && { IdentityPoolId: input.IdentityPoolId }),
3842
- ...(input.RoleArn != null && { RoleArn: input.RoleArn }),
3843
- ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }),
3844
- };
3699
+ const de_AdvancedSecurityOptions = (output, context) => {
3700
+ return (0, smithy_client_1.take)(output, {
3701
+ AnonymousAuthDisableDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3702
+ AnonymousAuthEnabled: smithy_client_1.expectBoolean,
3703
+ Enabled: smithy_client_1.expectBoolean,
3704
+ InternalUserDatabaseEnabled: smithy_client_1.expectBoolean,
3705
+ SAMLOptions: smithy_client_1._json,
3706
+ });
3845
3707
  };
3846
- const se_ColdStorageOptions = (input, context) => {
3847
- return {
3848
- ...(input.Enabled != null && { Enabled: input.Enabled }),
3849
- };
3708
+ const de_AdvancedSecurityOptionsStatus = (output, context) => {
3709
+ return (0, smithy_client_1.take)(output, {
3710
+ Options: (_) => de_AdvancedSecurityOptions(_, context),
3711
+ Status: (_) => de_OptionStatus(_, context),
3712
+ });
3850
3713
  };
3851
- const se_DescribePackagesFilter = (input, context) => {
3852
- return {
3853
- ...(input.Name != null && { Name: input.Name }),
3854
- ...(input.Value != null && { Value: se_DescribePackagesFilterValues(input.Value, context) }),
3855
- };
3714
+ const de_AutoTune = (output, context) => {
3715
+ return (0, smithy_client_1.take)(output, {
3716
+ AutoTuneDetails: (_) => de_AutoTuneDetails(_, context),
3717
+ AutoTuneType: smithy_client_1.expectString,
3718
+ });
3856
3719
  };
3857
- const se_DescribePackagesFilterList = (input, context) => {
3858
- return input
3859
- .filter((e) => e != null)
3860
- .map((entry) => {
3861
- return se_DescribePackagesFilter(entry, context);
3720
+ const de_AutoTuneDetails = (output, context) => {
3721
+ return (0, smithy_client_1.take)(output, {
3722
+ ScheduledAutoTuneDetails: (_) => de_ScheduledAutoTuneDetails(_, context),
3862
3723
  });
3863
3724
  };
3864
- const se_DescribePackagesFilterValues = (input, context) => {
3865
- return input
3725
+ const de_AutoTuneList = (output, context) => {
3726
+ const retVal = (output || [])
3866
3727
  .filter((e) => e != null)
3867
3728
  .map((entry) => {
3868
- return entry;
3869
- });
3870
- };
3871
- const se_DomainEndpointOptions = (input, context) => {
3872
- return {
3873
- ...(input.CustomEndpoint != null && { CustomEndpoint: input.CustomEndpoint }),
3874
- ...(input.CustomEndpointCertificateArn != null && {
3875
- CustomEndpointCertificateArn: input.CustomEndpointCertificateArn,
3876
- }),
3877
- ...(input.CustomEndpointEnabled != null && { CustomEndpointEnabled: input.CustomEndpointEnabled }),
3878
- ...(input.EnforceHTTPS != null && { EnforceHTTPS: input.EnforceHTTPS }),
3879
- ...(input.TLSSecurityPolicy != null && { TLSSecurityPolicy: input.TLSSecurityPolicy }),
3880
- };
3729
+ return de_AutoTune(entry, context);
3730
+ });
3731
+ return retVal;
3881
3732
  };
3882
- const se_DomainInformationContainer = (input, context) => {
3883
- return {
3884
- ...(input.AWSDomainInformation != null && {
3885
- AWSDomainInformation: se_AWSDomainInformation(input.AWSDomainInformation, context),
3886
- }),
3887
- };
3733
+ const de_AutoTuneMaintenanceSchedule = (output, context) => {
3734
+ return (0, smithy_client_1.take)(output, {
3735
+ CronExpressionForRecurrence: smithy_client_1.expectString,
3736
+ Duration: smithy_client_1._json,
3737
+ StartAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3738
+ });
3888
3739
  };
3889
- const se_DomainNameList = (input, context) => {
3890
- return input
3740
+ const de_AutoTuneMaintenanceScheduleList = (output, context) => {
3741
+ const retVal = (output || [])
3891
3742
  .filter((e) => e != null)
3892
3743
  .map((entry) => {
3893
- return entry;
3744
+ return de_AutoTuneMaintenanceSchedule(entry, context);
3894
3745
  });
3746
+ return retVal;
3895
3747
  };
3896
- const se_Duration = (input, context) => {
3897
- return {
3898
- ...(input.Unit != null && { Unit: input.Unit }),
3899
- ...(input.Value != null && { Value: input.Value }),
3900
- };
3748
+ const de_AutoTuneOptions = (output, context) => {
3749
+ return (0, smithy_client_1.take)(output, {
3750
+ DesiredState: smithy_client_1.expectString,
3751
+ MaintenanceSchedules: (_) => de_AutoTuneMaintenanceScheduleList(_, context),
3752
+ RollbackOnDisable: smithy_client_1.expectString,
3753
+ UseOffPeakWindow: smithy_client_1.expectBoolean,
3754
+ });
3901
3755
  };
3902
- const se_EBSOptions = (input, context) => {
3903
- return {
3904
- ...(input.EBSEnabled != null && { EBSEnabled: input.EBSEnabled }),
3905
- ...(input.Iops != null && { Iops: input.Iops }),
3906
- ...(input.Throughput != null && { Throughput: input.Throughput }),
3907
- ...(input.VolumeSize != null && { VolumeSize: input.VolumeSize }),
3908
- ...(input.VolumeType != null && { VolumeType: input.VolumeType }),
3909
- };
3756
+ const de_AutoTuneOptionsStatus = (output, context) => {
3757
+ return (0, smithy_client_1.take)(output, {
3758
+ Options: (_) => de_AutoTuneOptions(_, context),
3759
+ Status: (_) => de_AutoTuneStatus(_, context),
3760
+ });
3910
3761
  };
3911
- const se_EncryptionAtRestOptions = (input, context) => {
3912
- return {
3913
- ...(input.Enabled != null && { Enabled: input.Enabled }),
3914
- ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }),
3915
- };
3762
+ const de_AutoTuneStatus = (output, context) => {
3763
+ return (0, smithy_client_1.take)(output, {
3764
+ CreationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3765
+ ErrorMessage: smithy_client_1.expectString,
3766
+ PendingDeletion: smithy_client_1.expectBoolean,
3767
+ State: smithy_client_1.expectString,
3768
+ UpdateDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3769
+ UpdateVersion: smithy_client_1.expectInt32,
3770
+ });
3916
3771
  };
3917
- const se_Filter = (input, context) => {
3918
- return {
3919
- ...(input.Name != null && { Name: input.Name }),
3920
- ...(input.Values != null && { Values: se_ValueStringList(input.Values, context) }),
3921
- };
3772
+ const de_ChangeProgressStage = (output, context) => {
3773
+ return (0, smithy_client_1.take)(output, {
3774
+ Description: smithy_client_1.expectString,
3775
+ LastUpdated: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3776
+ Name: smithy_client_1.expectString,
3777
+ Status: smithy_client_1.expectString,
3778
+ });
3922
3779
  };
3923
- const se_FilterList = (input, context) => {
3924
- return input
3780
+ const de_ChangeProgressStageList = (output, context) => {
3781
+ const retVal = (output || [])
3925
3782
  .filter((e) => e != null)
3926
3783
  .map((entry) => {
3927
- return se_Filter(entry, context);
3784
+ return de_ChangeProgressStage(entry, context);
3928
3785
  });
3786
+ return retVal;
3929
3787
  };
3930
- const se_LogPublishingOption = (input, context) => {
3931
- return {
3932
- ...(input.CloudWatchLogsLogGroupArn != null && { CloudWatchLogsLogGroupArn: input.CloudWatchLogsLogGroupArn }),
3933
- ...(input.Enabled != null && { Enabled: input.Enabled }),
3934
- };
3788
+ const de_ChangeProgressStatusDetails = (output, context) => {
3789
+ return (0, smithy_client_1.take)(output, {
3790
+ ChangeId: smithy_client_1.expectString,
3791
+ ChangeProgressStages: (_) => de_ChangeProgressStageList(_, context),
3792
+ CompletedProperties: smithy_client_1._json,
3793
+ PendingProperties: smithy_client_1._json,
3794
+ StartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3795
+ Status: smithy_client_1.expectString,
3796
+ TotalNumberOfStages: smithy_client_1.expectInt32,
3797
+ });
3935
3798
  };
3936
- const se_LogPublishingOptions = (input, context) => {
3937
- return Object.entries(input).reduce((acc, [key, value]) => {
3938
- if (value === null) {
3939
- return acc;
3940
- }
3941
- acc[key] = se_LogPublishingOption(value, context);
3942
- return acc;
3943
- }, {});
3944
- };
3945
- const se_MasterUserOptions = (input, context) => {
3946
- return {
3947
- ...(input.MasterUserARN != null && { MasterUserARN: input.MasterUserARN }),
3948
- ...(input.MasterUserName != null && { MasterUserName: input.MasterUserName }),
3949
- ...(input.MasterUserPassword != null && { MasterUserPassword: input.MasterUserPassword }),
3950
- };
3799
+ const de_ClusterConfigStatus = (output, context) => {
3800
+ return (0, smithy_client_1.take)(output, {
3801
+ Options: smithy_client_1._json,
3802
+ Status: (_) => de_OptionStatus(_, context),
3803
+ });
3951
3804
  };
3952
- const se_NodeToNodeEncryptionOptions = (input, context) => {
3953
- return {
3954
- ...(input.Enabled != null && { Enabled: input.Enabled }),
3955
- };
3805
+ const de_CognitoOptionsStatus = (output, context) => {
3806
+ return (0, smithy_client_1.take)(output, {
3807
+ Options: smithy_client_1._json,
3808
+ Status: (_) => de_OptionStatus(_, context),
3809
+ });
3956
3810
  };
3957
- const se_OffPeakWindow = (input, context) => {
3958
- return {
3959
- ...(input.WindowStartTime != null && { WindowStartTime: se_WindowStartTime(input.WindowStartTime, context) }),
3960
- };
3811
+ const de_DomainConfig = (output, context) => {
3812
+ return (0, smithy_client_1.take)(output, {
3813
+ AccessPolicies: (_) => de_AccessPoliciesStatus(_, context),
3814
+ AdvancedOptions: (_) => de_AdvancedOptionsStatus(_, context),
3815
+ AdvancedSecurityOptions: (_) => de_AdvancedSecurityOptionsStatus(_, context),
3816
+ AutoTuneOptions: (_) => de_AutoTuneOptionsStatus(_, context),
3817
+ ChangeProgressDetails: smithy_client_1._json,
3818
+ ClusterConfig: (_) => de_ClusterConfigStatus(_, context),
3819
+ CognitoOptions: (_) => de_CognitoOptionsStatus(_, context),
3820
+ DomainEndpointOptions: (_) => de_DomainEndpointOptionsStatus(_, context),
3821
+ EBSOptions: (_) => de_EBSOptionsStatus(_, context),
3822
+ EncryptionAtRestOptions: (_) => de_EncryptionAtRestOptionsStatus(_, context),
3823
+ EngineVersion: (_) => de_VersionStatus(_, context),
3824
+ LogPublishingOptions: (_) => de_LogPublishingOptionsStatus(_, context),
3825
+ NodeToNodeEncryptionOptions: (_) => de_NodeToNodeEncryptionOptionsStatus(_, context),
3826
+ OffPeakWindowOptions: (_) => de_OffPeakWindowOptionsStatus(_, context),
3827
+ SnapshotOptions: (_) => de_SnapshotOptionsStatus(_, context),
3828
+ SoftwareUpdateOptions: (_) => de_SoftwareUpdateOptionsStatus(_, context),
3829
+ VPCOptions: (_) => de_VPCDerivedInfoStatus(_, context),
3830
+ });
3961
3831
  };
3962
- const se_OffPeakWindowOptions = (input, context) => {
3963
- return {
3964
- ...(input.Enabled != null && { Enabled: input.Enabled }),
3965
- ...(input.OffPeakWindow != null && { OffPeakWindow: se_OffPeakWindow(input.OffPeakWindow, context) }),
3966
- };
3967
- };
3968
- const se_PackageSource = (input, context) => {
3969
- return {
3970
- ...(input.S3BucketName != null && { S3BucketName: input.S3BucketName }),
3971
- ...(input.S3Key != null && { S3Key: input.S3Key }),
3972
- };
3973
- };
3974
- const se_SAMLIdp = (input, context) => {
3975
- return {
3976
- ...(input.EntityId != null && { EntityId: input.EntityId }),
3977
- ...(input.MetadataContent != null && { MetadataContent: input.MetadataContent }),
3978
- };
3979
- };
3980
- const se_SAMLOptionsInput = (input, context) => {
3981
- return {
3982
- ...(input.Enabled != null && { Enabled: input.Enabled }),
3983
- ...(input.Idp != null && { Idp: se_SAMLIdp(input.Idp, context) }),
3984
- ...(input.MasterBackendRole != null && { MasterBackendRole: input.MasterBackendRole }),
3985
- ...(input.MasterUserName != null && { MasterUserName: input.MasterUserName }),
3986
- ...(input.RolesKey != null && { RolesKey: input.RolesKey }),
3987
- ...(input.SessionTimeoutMinutes != null && { SessionTimeoutMinutes: input.SessionTimeoutMinutes }),
3988
- ...(input.SubjectKey != null && { SubjectKey: input.SubjectKey }),
3989
- };
3990
- };
3991
- const se_SnapshotOptions = (input, context) => {
3992
- return {
3993
- ...(input.AutomatedSnapshotStartHour != null && { AutomatedSnapshotStartHour: input.AutomatedSnapshotStartHour }),
3994
- };
3995
- };
3996
- const se_SoftwareUpdateOptions = (input, context) => {
3997
- return {
3998
- ...(input.AutoSoftwareUpdateEnabled != null && { AutoSoftwareUpdateEnabled: input.AutoSoftwareUpdateEnabled }),
3999
- };
4000
- };
4001
- const se_StringList = (input, context) => {
4002
- return input
4003
- .filter((e) => e != null)
4004
- .map((entry) => {
4005
- return entry;
4006
- });
4007
- };
4008
- const se_Tag = (input, context) => {
4009
- return {
4010
- ...(input.Key != null && { Key: input.Key }),
4011
- ...(input.Value != null && { Value: input.Value }),
4012
- };
4013
- };
4014
- const se_TagList = (input, context) => {
4015
- return input
4016
- .filter((e) => e != null)
4017
- .map((entry) => {
4018
- return se_Tag(entry, context);
4019
- });
4020
- };
4021
- const se_ValueStringList = (input, context) => {
4022
- return input
4023
- .filter((e) => e != null)
4024
- .map((entry) => {
4025
- return entry;
4026
- });
4027
- };
4028
- const se_VpcEndpointIdList = (input, context) => {
4029
- return input
4030
- .filter((e) => e != null)
4031
- .map((entry) => {
4032
- return entry;
4033
- });
4034
- };
4035
- const se_VPCOptions = (input, context) => {
4036
- return {
4037
- ...(input.SecurityGroupIds != null && { SecurityGroupIds: se_StringList(input.SecurityGroupIds, context) }),
4038
- ...(input.SubnetIds != null && { SubnetIds: se_StringList(input.SubnetIds, context) }),
4039
- };
4040
- };
4041
- const se_WindowStartTime = (input, context) => {
4042
- return {
4043
- ...(input.Hours != null && { Hours: input.Hours }),
4044
- ...(input.Minutes != null && { Minutes: input.Minutes }),
4045
- };
4046
- };
4047
- const se_ZoneAwarenessConfig = (input, context) => {
4048
- return {
4049
- ...(input.AvailabilityZoneCount != null && { AvailabilityZoneCount: input.AvailabilityZoneCount }),
4050
- };
4051
- };
4052
- const de_AccessPoliciesStatus = (output, context) => {
4053
- return {
4054
- Options: (0, smithy_client_1.expectString)(output.Options),
4055
- Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined,
4056
- };
4057
- };
4058
- const de_AdditionalLimit = (output, context) => {
4059
- return {
4060
- LimitName: (0, smithy_client_1.expectString)(output.LimitName),
4061
- LimitValues: output.LimitValues != null ? de_LimitValueList(output.LimitValues, context) : undefined,
4062
- };
4063
- };
4064
- const de_AdditionalLimitList = (output, context) => {
4065
- const retVal = (output || [])
4066
- .filter((e) => e != null)
4067
- .map((entry) => {
4068
- if (entry === null) {
4069
- return null;
4070
- }
4071
- return de_AdditionalLimit(entry, context);
4072
- });
4073
- return retVal;
4074
- };
4075
- const de_AdvancedOptions = (output, context) => {
4076
- return Object.entries(output).reduce((acc, [key, value]) => {
4077
- if (value === null) {
4078
- return acc;
4079
- }
4080
- acc[key] = (0, smithy_client_1.expectString)(value);
4081
- return acc;
4082
- }, {});
4083
- };
4084
- const de_AdvancedOptionsStatus = (output, context) => {
4085
- return {
4086
- Options: output.Options != null ? de_AdvancedOptions(output.Options, context) : undefined,
4087
- Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined,
4088
- };
4089
- };
4090
- const de_AdvancedSecurityOptions = (output, context) => {
4091
- return {
4092
- AnonymousAuthDisableDate: output.AnonymousAuthDisableDate != null
4093
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.AnonymousAuthDisableDate)))
4094
- : undefined,
4095
- AnonymousAuthEnabled: (0, smithy_client_1.expectBoolean)(output.AnonymousAuthEnabled),
4096
- Enabled: (0, smithy_client_1.expectBoolean)(output.Enabled),
4097
- InternalUserDatabaseEnabled: (0, smithy_client_1.expectBoolean)(output.InternalUserDatabaseEnabled),
4098
- SAMLOptions: output.SAMLOptions != null ? de_SAMLOptionsOutput(output.SAMLOptions, context) : undefined,
4099
- };
4100
- };
4101
- const de_AdvancedSecurityOptionsStatus = (output, context) => {
4102
- return {
4103
- Options: output.Options != null ? de_AdvancedSecurityOptions(output.Options, context) : undefined,
4104
- Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined,
4105
- };
4106
- };
4107
- const de_AuthorizedPrincipal = (output, context) => {
4108
- return {
4109
- Principal: (0, smithy_client_1.expectString)(output.Principal),
4110
- PrincipalType: (0, smithy_client_1.expectString)(output.PrincipalType),
4111
- };
4112
- };
4113
- const de_AuthorizedPrincipalList = (output, context) => {
4114
- const retVal = (output || [])
4115
- .filter((e) => e != null)
4116
- .map((entry) => {
4117
- if (entry === null) {
4118
- return null;
4119
- }
4120
- return de_AuthorizedPrincipal(entry, context);
4121
- });
4122
- return retVal;
4123
- };
4124
- const de_AutoTune = (output, context) => {
4125
- return {
4126
- AutoTuneDetails: output.AutoTuneDetails != null ? de_AutoTuneDetails(output.AutoTuneDetails, context) : undefined,
4127
- AutoTuneType: (0, smithy_client_1.expectString)(output.AutoTuneType),
4128
- };
4129
- };
4130
- const de_AutoTuneDetails = (output, context) => {
4131
- return {
4132
- ScheduledAutoTuneDetails: output.ScheduledAutoTuneDetails != null
4133
- ? de_ScheduledAutoTuneDetails(output.ScheduledAutoTuneDetails, context)
4134
- : undefined,
4135
- };
4136
- };
4137
- const de_AutoTuneList = (output, context) => {
4138
- const retVal = (output || [])
4139
- .filter((e) => e != null)
4140
- .map((entry) => {
4141
- if (entry === null) {
4142
- return null;
4143
- }
4144
- return de_AutoTune(entry, context);
4145
- });
4146
- return retVal;
4147
- };
4148
- const de_AutoTuneMaintenanceSchedule = (output, context) => {
4149
- return {
4150
- CronExpressionForRecurrence: (0, smithy_client_1.expectString)(output.CronExpressionForRecurrence),
4151
- Duration: output.Duration != null ? de_Duration(output.Duration, context) : undefined,
4152
- StartAt: output.StartAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.StartAt))) : undefined,
4153
- };
4154
- };
4155
- const de_AutoTuneMaintenanceScheduleList = (output, context) => {
4156
- const retVal = (output || [])
4157
- .filter((e) => e != null)
4158
- .map((entry) => {
4159
- if (entry === null) {
4160
- return null;
4161
- }
4162
- return de_AutoTuneMaintenanceSchedule(entry, context);
4163
- });
4164
- return retVal;
4165
- };
4166
- const de_AutoTuneOptions = (output, context) => {
4167
- return {
4168
- DesiredState: (0, smithy_client_1.expectString)(output.DesiredState),
4169
- MaintenanceSchedules: output.MaintenanceSchedules != null
4170
- ? de_AutoTuneMaintenanceScheduleList(output.MaintenanceSchedules, context)
4171
- : undefined,
4172
- RollbackOnDisable: (0, smithy_client_1.expectString)(output.RollbackOnDisable),
4173
- UseOffPeakWindow: (0, smithy_client_1.expectBoolean)(output.UseOffPeakWindow),
4174
- };
4175
- };
4176
- const de_AutoTuneOptionsOutput = (output, context) => {
4177
- return {
4178
- ErrorMessage: (0, smithy_client_1.expectString)(output.ErrorMessage),
4179
- State: (0, smithy_client_1.expectString)(output.State),
4180
- UseOffPeakWindow: (0, smithy_client_1.expectBoolean)(output.UseOffPeakWindow),
4181
- };
4182
- };
4183
- const de_AutoTuneOptionsStatus = (output, context) => {
4184
- return {
4185
- Options: output.Options != null ? de_AutoTuneOptions(output.Options, context) : undefined,
4186
- Status: output.Status != null ? de_AutoTuneStatus(output.Status, context) : undefined,
4187
- };
4188
- };
4189
- const de_AutoTuneStatus = (output, context) => {
4190
- return {
4191
- CreationDate: output.CreationDate != null
4192
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreationDate)))
4193
- : undefined,
4194
- ErrorMessage: (0, smithy_client_1.expectString)(output.ErrorMessage),
4195
- PendingDeletion: (0, smithy_client_1.expectBoolean)(output.PendingDeletion),
4196
- State: (0, smithy_client_1.expectString)(output.State),
4197
- UpdateDate: output.UpdateDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.UpdateDate))) : undefined,
4198
- UpdateVersion: (0, smithy_client_1.expectInt32)(output.UpdateVersion),
4199
- };
4200
- };
4201
- const de_AWSDomainInformation = (output, context) => {
4202
- return {
4203
- DomainName: (0, smithy_client_1.expectString)(output.DomainName),
4204
- OwnerId: (0, smithy_client_1.expectString)(output.OwnerId),
4205
- Region: (0, smithy_client_1.expectString)(output.Region),
4206
- };
4207
- };
4208
- const de_ChangeProgressDetails = (output, context) => {
4209
- return {
4210
- ChangeId: (0, smithy_client_1.expectString)(output.ChangeId),
4211
- Message: (0, smithy_client_1.expectString)(output.Message),
4212
- };
4213
- };
4214
- const de_ChangeProgressStage = (output, context) => {
4215
- return {
4216
- Description: (0, smithy_client_1.expectString)(output.Description),
4217
- LastUpdated: output.LastUpdated != null
4218
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdated)))
4219
- : undefined,
4220
- Name: (0, smithy_client_1.expectString)(output.Name),
4221
- Status: (0, smithy_client_1.expectString)(output.Status),
4222
- };
4223
- };
4224
- const de_ChangeProgressStageList = (output, context) => {
4225
- const retVal = (output || [])
4226
- .filter((e) => e != null)
4227
- .map((entry) => {
4228
- if (entry === null) {
4229
- return null;
4230
- }
4231
- return de_ChangeProgressStage(entry, context);
4232
- });
4233
- return retVal;
4234
- };
4235
- const de_ChangeProgressStatusDetails = (output, context) => {
4236
- return {
4237
- ChangeId: (0, smithy_client_1.expectString)(output.ChangeId),
4238
- ChangeProgressStages: output.ChangeProgressStages != null
4239
- ? de_ChangeProgressStageList(output.ChangeProgressStages, context)
4240
- : undefined,
4241
- CompletedProperties: output.CompletedProperties != null ? de_StringList(output.CompletedProperties, context) : undefined,
4242
- PendingProperties: output.PendingProperties != null ? de_StringList(output.PendingProperties, context) : undefined,
4243
- StartTime: output.StartTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.StartTime))) : undefined,
4244
- Status: (0, smithy_client_1.expectString)(output.Status),
4245
- TotalNumberOfStages: (0, smithy_client_1.expectInt32)(output.TotalNumberOfStages),
4246
- };
4247
- };
4248
- const de_ClusterConfig = (output, context) => {
4249
- return {
4250
- ColdStorageOptions: output.ColdStorageOptions != null ? de_ColdStorageOptions(output.ColdStorageOptions, context) : undefined,
4251
- DedicatedMasterCount: (0, smithy_client_1.expectInt32)(output.DedicatedMasterCount),
4252
- DedicatedMasterEnabled: (0, smithy_client_1.expectBoolean)(output.DedicatedMasterEnabled),
4253
- DedicatedMasterType: (0, smithy_client_1.expectString)(output.DedicatedMasterType),
4254
- InstanceCount: (0, smithy_client_1.expectInt32)(output.InstanceCount),
4255
- InstanceType: (0, smithy_client_1.expectString)(output.InstanceType),
4256
- WarmCount: (0, smithy_client_1.expectInt32)(output.WarmCount),
4257
- WarmEnabled: (0, smithy_client_1.expectBoolean)(output.WarmEnabled),
4258
- WarmType: (0, smithy_client_1.expectString)(output.WarmType),
4259
- ZoneAwarenessConfig: output.ZoneAwarenessConfig != null ? de_ZoneAwarenessConfig(output.ZoneAwarenessConfig, context) : undefined,
4260
- ZoneAwarenessEnabled: (0, smithy_client_1.expectBoolean)(output.ZoneAwarenessEnabled),
4261
- };
4262
- };
4263
- const de_ClusterConfigStatus = (output, context) => {
4264
- return {
4265
- Options: output.Options != null ? de_ClusterConfig(output.Options, context) : undefined,
4266
- Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined,
4267
- };
4268
- };
4269
- const de_CognitoOptions = (output, context) => {
4270
- return {
4271
- Enabled: (0, smithy_client_1.expectBoolean)(output.Enabled),
4272
- IdentityPoolId: (0, smithy_client_1.expectString)(output.IdentityPoolId),
4273
- RoleArn: (0, smithy_client_1.expectString)(output.RoleArn),
4274
- UserPoolId: (0, smithy_client_1.expectString)(output.UserPoolId),
4275
- };
4276
- };
4277
- const de_CognitoOptionsStatus = (output, context) => {
4278
- return {
4279
- Options: output.Options != null ? de_CognitoOptions(output.Options, context) : undefined,
4280
- Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined,
4281
- };
4282
- };
4283
- const de_ColdStorageOptions = (output, context) => {
4284
- return {
4285
- Enabled: (0, smithy_client_1.expectBoolean)(output.Enabled),
4286
- };
4287
- };
4288
- const de_CompatibleVersionsList = (output, context) => {
4289
- const retVal = (output || [])
4290
- .filter((e) => e != null)
4291
- .map((entry) => {
4292
- if (entry === null) {
4293
- return null;
4294
- }
4295
- return de_CompatibleVersionsMap(entry, context);
4296
- });
4297
- return retVal;
4298
- };
4299
- const de_CompatibleVersionsMap = (output, context) => {
4300
- return {
4301
- SourceVersion: (0, smithy_client_1.expectString)(output.SourceVersion),
4302
- TargetVersions: output.TargetVersions != null ? de_VersionList(output.TargetVersions, context) : undefined,
4303
- };
4304
- };
4305
- const de_ConnectionProperties = (output, context) => {
4306
- return {
4307
- Endpoint: (0, smithy_client_1.expectString)(output.Endpoint),
4308
- };
4309
- };
4310
- const de_DomainConfig = (output, context) => {
4311
- return {
4312
- AccessPolicies: output.AccessPolicies != null ? de_AccessPoliciesStatus(output.AccessPolicies, context) : undefined,
4313
- AdvancedOptions: output.AdvancedOptions != null ? de_AdvancedOptionsStatus(output.AdvancedOptions, context) : undefined,
4314
- AdvancedSecurityOptions: output.AdvancedSecurityOptions != null
4315
- ? de_AdvancedSecurityOptionsStatus(output.AdvancedSecurityOptions, context)
4316
- : undefined,
4317
- AutoTuneOptions: output.AutoTuneOptions != null ? de_AutoTuneOptionsStatus(output.AutoTuneOptions, context) : undefined,
4318
- ChangeProgressDetails: output.ChangeProgressDetails != null
4319
- ? de_ChangeProgressDetails(output.ChangeProgressDetails, context)
4320
- : undefined,
4321
- ClusterConfig: output.ClusterConfig != null ? de_ClusterConfigStatus(output.ClusterConfig, context) : undefined,
4322
- CognitoOptions: output.CognitoOptions != null ? de_CognitoOptionsStatus(output.CognitoOptions, context) : undefined,
4323
- DomainEndpointOptions: output.DomainEndpointOptions != null
4324
- ? de_DomainEndpointOptionsStatus(output.DomainEndpointOptions, context)
4325
- : undefined,
4326
- EBSOptions: output.EBSOptions != null ? de_EBSOptionsStatus(output.EBSOptions, context) : undefined,
4327
- EncryptionAtRestOptions: output.EncryptionAtRestOptions != null
4328
- ? de_EncryptionAtRestOptionsStatus(output.EncryptionAtRestOptions, context)
4329
- : undefined,
4330
- EngineVersion: output.EngineVersion != null ? de_VersionStatus(output.EngineVersion, context) : undefined,
4331
- LogPublishingOptions: output.LogPublishingOptions != null
4332
- ? de_LogPublishingOptionsStatus(output.LogPublishingOptions, context)
4333
- : undefined,
4334
- NodeToNodeEncryptionOptions: output.NodeToNodeEncryptionOptions != null
4335
- ? de_NodeToNodeEncryptionOptionsStatus(output.NodeToNodeEncryptionOptions, context)
4336
- : undefined,
4337
- OffPeakWindowOptions: output.OffPeakWindowOptions != null
4338
- ? de_OffPeakWindowOptionsStatus(output.OffPeakWindowOptions, context)
4339
- : undefined,
4340
- SnapshotOptions: output.SnapshotOptions != null ? de_SnapshotOptionsStatus(output.SnapshotOptions, context) : undefined,
4341
- SoftwareUpdateOptions: output.SoftwareUpdateOptions != null
4342
- ? de_SoftwareUpdateOptionsStatus(output.SoftwareUpdateOptions, context)
4343
- : undefined,
4344
- VPCOptions: output.VPCOptions != null ? de_VPCDerivedInfoStatus(output.VPCOptions, context) : undefined,
4345
- };
4346
- };
4347
- const de_DomainEndpointOptions = (output, context) => {
4348
- return {
4349
- CustomEndpoint: (0, smithy_client_1.expectString)(output.CustomEndpoint),
4350
- CustomEndpointCertificateArn: (0, smithy_client_1.expectString)(output.CustomEndpointCertificateArn),
4351
- CustomEndpointEnabled: (0, smithy_client_1.expectBoolean)(output.CustomEndpointEnabled),
4352
- EnforceHTTPS: (0, smithy_client_1.expectBoolean)(output.EnforceHTTPS),
4353
- TLSSecurityPolicy: (0, smithy_client_1.expectString)(output.TLSSecurityPolicy),
4354
- };
4355
- };
4356
- const de_DomainEndpointOptionsStatus = (output, context) => {
4357
- return {
4358
- Options: output.Options != null ? de_DomainEndpointOptions(output.Options, context) : undefined,
4359
- Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined,
4360
- };
4361
- };
4362
- const de_DomainInfo = (output, context) => {
4363
- return {
4364
- DomainName: (0, smithy_client_1.expectString)(output.DomainName),
4365
- EngineType: (0, smithy_client_1.expectString)(output.EngineType),
4366
- };
4367
- };
4368
- const de_DomainInfoList = (output, context) => {
4369
- const retVal = (output || [])
4370
- .filter((e) => e != null)
4371
- .map((entry) => {
4372
- if (entry === null) {
4373
- return null;
4374
- }
4375
- return de_DomainInfo(entry, context);
4376
- });
4377
- return retVal;
4378
- };
4379
- const de_DomainInformationContainer = (output, context) => {
4380
- return {
4381
- AWSDomainInformation: output.AWSDomainInformation != null ? de_AWSDomainInformation(output.AWSDomainInformation, context) : undefined,
4382
- };
3832
+ const de_DomainEndpointOptionsStatus = (output, context) => {
3833
+ return (0, smithy_client_1.take)(output, {
3834
+ Options: smithy_client_1._json,
3835
+ Status: (_) => de_OptionStatus(_, context),
3836
+ });
4383
3837
  };
4384
3838
  const de_DomainPackageDetails = (output, context) => {
4385
- return {
4386
- DomainName: (0, smithy_client_1.expectString)(output.DomainName),
4387
- DomainPackageStatus: (0, smithy_client_1.expectString)(output.DomainPackageStatus),
4388
- ErrorDetails: output.ErrorDetails != null ? de_ErrorDetails(output.ErrorDetails, context) : undefined,
4389
- LastUpdated: output.LastUpdated != null
4390
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdated)))
4391
- : undefined,
4392
- PackageID: (0, smithy_client_1.expectString)(output.PackageID),
4393
- PackageName: (0, smithy_client_1.expectString)(output.PackageName),
4394
- PackageType: (0, smithy_client_1.expectString)(output.PackageType),
4395
- PackageVersion: (0, smithy_client_1.expectString)(output.PackageVersion),
4396
- ReferencePath: (0, smithy_client_1.expectString)(output.ReferencePath),
4397
- };
3839
+ return (0, smithy_client_1.take)(output, {
3840
+ DomainName: smithy_client_1.expectString,
3841
+ DomainPackageStatus: smithy_client_1.expectString,
3842
+ ErrorDetails: smithy_client_1._json,
3843
+ LastUpdated: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3844
+ PackageID: smithy_client_1.expectString,
3845
+ PackageName: smithy_client_1.expectString,
3846
+ PackageType: smithy_client_1.expectString,
3847
+ PackageVersion: smithy_client_1.expectString,
3848
+ ReferencePath: smithy_client_1.expectString,
3849
+ });
4398
3850
  };
4399
3851
  const de_DomainPackageDetailsList = (output, context) => {
4400
3852
  const retVal = (output || [])
4401
3853
  .filter((e) => e != null)
4402
3854
  .map((entry) => {
4403
- if (entry === null) {
4404
- return null;
4405
- }
4406
3855
  return de_DomainPackageDetails(entry, context);
4407
3856
  });
4408
3857
  return retVal;
4409
3858
  };
4410
3859
  const de_DomainStatus = (output, context) => {
4411
- return {
4412
- ARN: (0, smithy_client_1.expectString)(output.ARN),
4413
- AccessPolicies: (0, smithy_client_1.expectString)(output.AccessPolicies),
4414
- AdvancedOptions: output.AdvancedOptions != null ? de_AdvancedOptions(output.AdvancedOptions, context) : undefined,
4415
- AdvancedSecurityOptions: output.AdvancedSecurityOptions != null
4416
- ? de_AdvancedSecurityOptions(output.AdvancedSecurityOptions, context)
4417
- : undefined,
4418
- AutoTuneOptions: output.AutoTuneOptions != null ? de_AutoTuneOptionsOutput(output.AutoTuneOptions, context) : undefined,
4419
- ChangeProgressDetails: output.ChangeProgressDetails != null
4420
- ? de_ChangeProgressDetails(output.ChangeProgressDetails, context)
4421
- : undefined,
4422
- ClusterConfig: output.ClusterConfig != null ? de_ClusterConfig(output.ClusterConfig, context) : undefined,
4423
- CognitoOptions: output.CognitoOptions != null ? de_CognitoOptions(output.CognitoOptions, context) : undefined,
4424
- Created: (0, smithy_client_1.expectBoolean)(output.Created),
4425
- Deleted: (0, smithy_client_1.expectBoolean)(output.Deleted),
4426
- DomainEndpointOptions: output.DomainEndpointOptions != null
4427
- ? de_DomainEndpointOptions(output.DomainEndpointOptions, context)
4428
- : undefined,
4429
- DomainId: (0, smithy_client_1.expectString)(output.DomainId),
4430
- DomainName: (0, smithy_client_1.expectString)(output.DomainName),
4431
- EBSOptions: output.EBSOptions != null ? de_EBSOptions(output.EBSOptions, context) : undefined,
4432
- EncryptionAtRestOptions: output.EncryptionAtRestOptions != null
4433
- ? de_EncryptionAtRestOptions(output.EncryptionAtRestOptions, context)
4434
- : undefined,
4435
- Endpoint: (0, smithy_client_1.expectString)(output.Endpoint),
4436
- Endpoints: output.Endpoints != null ? de_EndpointsMap(output.Endpoints, context) : undefined,
4437
- EngineVersion: (0, smithy_client_1.expectString)(output.EngineVersion),
4438
- LogPublishingOptions: output.LogPublishingOptions != null ? de_LogPublishingOptions(output.LogPublishingOptions, context) : undefined,
4439
- NodeToNodeEncryptionOptions: output.NodeToNodeEncryptionOptions != null
4440
- ? de_NodeToNodeEncryptionOptions(output.NodeToNodeEncryptionOptions, context)
4441
- : undefined,
4442
- OffPeakWindowOptions: output.OffPeakWindowOptions != null ? de_OffPeakWindowOptions(output.OffPeakWindowOptions, context) : undefined,
4443
- Processing: (0, smithy_client_1.expectBoolean)(output.Processing),
4444
- ServiceSoftwareOptions: output.ServiceSoftwareOptions != null
4445
- ? de_ServiceSoftwareOptions(output.ServiceSoftwareOptions, context)
4446
- : undefined,
4447
- SnapshotOptions: output.SnapshotOptions != null ? de_SnapshotOptions(output.SnapshotOptions, context) : undefined,
4448
- SoftwareUpdateOptions: output.SoftwareUpdateOptions != null
4449
- ? de_SoftwareUpdateOptions(output.SoftwareUpdateOptions, context)
4450
- : undefined,
4451
- UpgradeProcessing: (0, smithy_client_1.expectBoolean)(output.UpgradeProcessing),
4452
- VPCOptions: output.VPCOptions != null ? de_VPCDerivedInfo(output.VPCOptions, context) : undefined,
4453
- };
3860
+ return (0, smithy_client_1.take)(output, {
3861
+ ARN: smithy_client_1.expectString,
3862
+ AccessPolicies: smithy_client_1.expectString,
3863
+ AdvancedOptions: smithy_client_1._json,
3864
+ AdvancedSecurityOptions: (_) => de_AdvancedSecurityOptions(_, context),
3865
+ AutoTuneOptions: smithy_client_1._json,
3866
+ ChangeProgressDetails: smithy_client_1._json,
3867
+ ClusterConfig: smithy_client_1._json,
3868
+ CognitoOptions: smithy_client_1._json,
3869
+ Created: smithy_client_1.expectBoolean,
3870
+ Deleted: smithy_client_1.expectBoolean,
3871
+ DomainEndpointOptions: smithy_client_1._json,
3872
+ DomainId: smithy_client_1.expectString,
3873
+ DomainName: smithy_client_1.expectString,
3874
+ EBSOptions: smithy_client_1._json,
3875
+ EncryptionAtRestOptions: smithy_client_1._json,
3876
+ Endpoint: smithy_client_1.expectString,
3877
+ Endpoints: smithy_client_1._json,
3878
+ EngineVersion: smithy_client_1.expectString,
3879
+ LogPublishingOptions: smithy_client_1._json,
3880
+ NodeToNodeEncryptionOptions: smithy_client_1._json,
3881
+ OffPeakWindowOptions: smithy_client_1._json,
3882
+ Processing: smithy_client_1.expectBoolean,
3883
+ ServiceSoftwareOptions: (_) => de_ServiceSoftwareOptions(_, context),
3884
+ SnapshotOptions: smithy_client_1._json,
3885
+ SoftwareUpdateOptions: smithy_client_1._json,
3886
+ UpgradeProcessing: smithy_client_1.expectBoolean,
3887
+ VPCOptions: smithy_client_1._json,
3888
+ });
4454
3889
  };
4455
3890
  const de_DomainStatusList = (output, context) => {
4456
3891
  const retVal = (output || [])
4457
3892
  .filter((e) => e != null)
4458
3893
  .map((entry) => {
4459
- if (entry === null) {
4460
- return null;
4461
- }
4462
3894
  return de_DomainStatus(entry, context);
4463
3895
  });
4464
3896
  return retVal;
4465
3897
  };
4466
- const de_DryRunProgressStatus = (output, context) => {
4467
- return {
4468
- CreationDate: (0, smithy_client_1.expectString)(output.CreationDate),
4469
- DryRunId: (0, smithy_client_1.expectString)(output.DryRunId),
4470
- DryRunStatus: (0, smithy_client_1.expectString)(output.DryRunStatus),
4471
- UpdateDate: (0, smithy_client_1.expectString)(output.UpdateDate),
4472
- ValidationFailures: output.ValidationFailures != null ? de_ValidationFailures(output.ValidationFailures, context) : undefined,
4473
- };
4474
- };
4475
- const de_DryRunResults = (output, context) => {
4476
- return {
4477
- DeploymentType: (0, smithy_client_1.expectString)(output.DeploymentType),
4478
- Message: (0, smithy_client_1.expectString)(output.Message),
4479
- };
4480
- };
4481
- const de_Duration = (output, context) => {
4482
- return {
4483
- Unit: (0, smithy_client_1.expectString)(output.Unit),
4484
- Value: (0, smithy_client_1.expectLong)(output.Value),
4485
- };
4486
- };
4487
- const de_EBSOptions = (output, context) => {
4488
- return {
4489
- EBSEnabled: (0, smithy_client_1.expectBoolean)(output.EBSEnabled),
4490
- Iops: (0, smithy_client_1.expectInt32)(output.Iops),
4491
- Throughput: (0, smithy_client_1.expectInt32)(output.Throughput),
4492
- VolumeSize: (0, smithy_client_1.expectInt32)(output.VolumeSize),
4493
- VolumeType: (0, smithy_client_1.expectString)(output.VolumeType),
4494
- };
4495
- };
4496
3898
  const de_EBSOptionsStatus = (output, context) => {
4497
- return {
4498
- Options: output.Options != null ? de_EBSOptions(output.Options, context) : undefined,
4499
- Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined,
4500
- };
4501
- };
4502
- const de_EncryptionAtRestOptions = (output, context) => {
4503
- return {
4504
- Enabled: (0, smithy_client_1.expectBoolean)(output.Enabled),
4505
- KmsKeyId: (0, smithy_client_1.expectString)(output.KmsKeyId),
4506
- };
4507
- };
4508
- const de_EncryptionAtRestOptionsStatus = (output, context) => {
4509
- return {
4510
- Options: output.Options != null ? de_EncryptionAtRestOptions(output.Options, context) : undefined,
4511
- Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined,
4512
- };
4513
- };
4514
- const de_EndpointsMap = (output, context) => {
4515
- return Object.entries(output).reduce((acc, [key, value]) => {
4516
- if (value === null) {
4517
- return acc;
4518
- }
4519
- acc[key] = (0, smithy_client_1.expectString)(value);
4520
- return acc;
4521
- }, {});
4522
- };
4523
- const de_ErrorDetails = (output, context) => {
4524
- return {
4525
- ErrorMessage: (0, smithy_client_1.expectString)(output.ErrorMessage),
4526
- ErrorType: (0, smithy_client_1.expectString)(output.ErrorType),
4527
- };
4528
- };
4529
- const de_InboundConnection = (output, context) => {
4530
- return {
4531
- ConnectionId: (0, smithy_client_1.expectString)(output.ConnectionId),
4532
- ConnectionMode: (0, smithy_client_1.expectString)(output.ConnectionMode),
4533
- ConnectionStatus: output.ConnectionStatus != null ? de_InboundConnectionStatus(output.ConnectionStatus, context) : undefined,
4534
- LocalDomainInfo: output.LocalDomainInfo != null ? de_DomainInformationContainer(output.LocalDomainInfo, context) : undefined,
4535
- RemoteDomainInfo: output.RemoteDomainInfo != null ? de_DomainInformationContainer(output.RemoteDomainInfo, context) : undefined,
4536
- };
4537
- };
4538
- const de_InboundConnections = (output, context) => {
4539
- const retVal = (output || [])
4540
- .filter((e) => e != null)
4541
- .map((entry) => {
4542
- if (entry === null) {
4543
- return null;
4544
- }
4545
- return de_InboundConnection(entry, context);
3899
+ return (0, smithy_client_1.take)(output, {
3900
+ Options: smithy_client_1._json,
3901
+ Status: (_) => de_OptionStatus(_, context),
4546
3902
  });
4547
- return retVal;
4548
3903
  };
4549
- const de_InboundConnectionStatus = (output, context) => {
4550
- return {
4551
- Message: (0, smithy_client_1.expectString)(output.Message),
4552
- StatusCode: (0, smithy_client_1.expectString)(output.StatusCode),
4553
- };
4554
- };
4555
- const de_InstanceCountLimits = (output, context) => {
4556
- return {
4557
- MaximumInstanceCount: (0, smithy_client_1.expectInt32)(output.MaximumInstanceCount),
4558
- MinimumInstanceCount: (0, smithy_client_1.expectInt32)(output.MinimumInstanceCount),
4559
- };
4560
- };
4561
- const de_InstanceLimits = (output, context) => {
4562
- return {
4563
- InstanceCountLimits: output.InstanceCountLimits != null ? de_InstanceCountLimits(output.InstanceCountLimits, context) : undefined,
4564
- };
4565
- };
4566
- const de_InstanceRoleList = (output, context) => {
4567
- const retVal = (output || [])
4568
- .filter((e) => e != null)
4569
- .map((entry) => {
4570
- if (entry === null) {
4571
- return null;
4572
- }
4573
- return (0, smithy_client_1.expectString)(entry);
4574
- });
4575
- return retVal;
4576
- };
4577
- const de_InstanceTypeDetails = (output, context) => {
4578
- return {
4579
- AdvancedSecurityEnabled: (0, smithy_client_1.expectBoolean)(output.AdvancedSecurityEnabled),
4580
- AppLogsEnabled: (0, smithy_client_1.expectBoolean)(output.AppLogsEnabled),
4581
- CognitoEnabled: (0, smithy_client_1.expectBoolean)(output.CognitoEnabled),
4582
- EncryptionEnabled: (0, smithy_client_1.expectBoolean)(output.EncryptionEnabled),
4583
- InstanceRole: output.InstanceRole != null ? de_InstanceRoleList(output.InstanceRole, context) : undefined,
4584
- InstanceType: (0, smithy_client_1.expectString)(output.InstanceType),
4585
- WarmEnabled: (0, smithy_client_1.expectBoolean)(output.WarmEnabled),
4586
- };
4587
- };
4588
- const de_InstanceTypeDetailsList = (output, context) => {
4589
- const retVal = (output || [])
4590
- .filter((e) => e != null)
4591
- .map((entry) => {
4592
- if (entry === null) {
4593
- return null;
4594
- }
4595
- return de_InstanceTypeDetails(entry, context);
4596
- });
4597
- return retVal;
4598
- };
4599
- const de_Issues = (output, context) => {
4600
- const retVal = (output || [])
4601
- .filter((e) => e != null)
4602
- .map((entry) => {
4603
- if (entry === null) {
4604
- return null;
4605
- }
4606
- return (0, smithy_client_1.expectString)(entry);
4607
- });
4608
- return retVal;
4609
- };
4610
- const de_Limits = (output, context) => {
4611
- return {
4612
- AdditionalLimits: output.AdditionalLimits != null ? de_AdditionalLimitList(output.AdditionalLimits, context) : undefined,
4613
- InstanceLimits: output.InstanceLimits != null ? de_InstanceLimits(output.InstanceLimits, context) : undefined,
4614
- StorageTypes: output.StorageTypes != null ? de_StorageTypeList(output.StorageTypes, context) : undefined,
4615
- };
4616
- };
4617
- const de_LimitsByRole = (output, context) => {
4618
- return Object.entries(output).reduce((acc, [key, value]) => {
4619
- if (value === null) {
4620
- return acc;
4621
- }
4622
- acc[key] = de_Limits(value, context);
4623
- return acc;
4624
- }, {});
4625
- };
4626
- const de_LimitValueList = (output, context) => {
4627
- const retVal = (output || [])
4628
- .filter((e) => e != null)
4629
- .map((entry) => {
4630
- if (entry === null) {
4631
- return null;
4632
- }
4633
- return (0, smithy_client_1.expectString)(entry);
3904
+ const de_EncryptionAtRestOptionsStatus = (output, context) => {
3905
+ return (0, smithy_client_1.take)(output, {
3906
+ Options: smithy_client_1._json,
3907
+ Status: (_) => de_OptionStatus(_, context),
4634
3908
  });
4635
- return retVal;
4636
- };
4637
- const de_LogPublishingOption = (output, context) => {
4638
- return {
4639
- CloudWatchLogsLogGroupArn: (0, smithy_client_1.expectString)(output.CloudWatchLogsLogGroupArn),
4640
- Enabled: (0, smithy_client_1.expectBoolean)(output.Enabled),
4641
- };
4642
- };
4643
- const de_LogPublishingOptions = (output, context) => {
4644
- return Object.entries(output).reduce((acc, [key, value]) => {
4645
- if (value === null) {
4646
- return acc;
4647
- }
4648
- acc[key] = de_LogPublishingOption(value, context);
4649
- return acc;
4650
- }, {});
4651
3909
  };
4652
3910
  const de_LogPublishingOptionsStatus = (output, context) => {
4653
- return {
4654
- Options: output.Options != null ? de_LogPublishingOptions(output.Options, context) : undefined,
4655
- Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined,
4656
- };
4657
- };
4658
- const de_NodeToNodeEncryptionOptions = (output, context) => {
4659
- return {
4660
- Enabled: (0, smithy_client_1.expectBoolean)(output.Enabled),
4661
- };
3911
+ return (0, smithy_client_1.take)(output, {
3912
+ Options: smithy_client_1._json,
3913
+ Status: (_) => de_OptionStatus(_, context),
3914
+ });
4662
3915
  };
4663
3916
  const de_NodeToNodeEncryptionOptionsStatus = (output, context) => {
4664
- return {
4665
- Options: output.Options != null ? de_NodeToNodeEncryptionOptions(output.Options, context) : undefined,
4666
- Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined,
4667
- };
4668
- };
4669
- const de_OffPeakWindow = (output, context) => {
4670
- return {
4671
- WindowStartTime: output.WindowStartTime != null ? de_WindowStartTime(output.WindowStartTime, context) : undefined,
4672
- };
4673
- };
4674
- const de_OffPeakWindowOptions = (output, context) => {
4675
- return {
4676
- Enabled: (0, smithy_client_1.expectBoolean)(output.Enabled),
4677
- OffPeakWindow: output.OffPeakWindow != null ? de_OffPeakWindow(output.OffPeakWindow, context) : undefined,
4678
- };
3917
+ return (0, smithy_client_1.take)(output, {
3918
+ Options: smithy_client_1._json,
3919
+ Status: (_) => de_OptionStatus(_, context),
3920
+ });
4679
3921
  };
4680
3922
  const de_OffPeakWindowOptionsStatus = (output, context) => {
4681
- return {
4682
- Options: output.Options != null ? de_OffPeakWindowOptions(output.Options, context) : undefined,
4683
- Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined,
4684
- };
3923
+ return (0, smithy_client_1.take)(output, {
3924
+ Options: smithy_client_1._json,
3925
+ Status: (_) => de_OptionStatus(_, context),
3926
+ });
4685
3927
  };
4686
3928
  const de_OptionStatus = (output, context) => {
4687
- return {
4688
- CreationDate: output.CreationDate != null
4689
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreationDate)))
4690
- : undefined,
4691
- PendingDeletion: (0, smithy_client_1.expectBoolean)(output.PendingDeletion),
4692
- State: (0, smithy_client_1.expectString)(output.State),
4693
- UpdateDate: output.UpdateDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.UpdateDate))) : undefined,
4694
- UpdateVersion: (0, smithy_client_1.expectInt32)(output.UpdateVersion),
4695
- };
4696
- };
4697
- const de_OutboundConnection = (output, context) => {
4698
- return {
4699
- ConnectionAlias: (0, smithy_client_1.expectString)(output.ConnectionAlias),
4700
- ConnectionId: (0, smithy_client_1.expectString)(output.ConnectionId),
4701
- ConnectionMode: (0, smithy_client_1.expectString)(output.ConnectionMode),
4702
- ConnectionProperties: output.ConnectionProperties != null ? de_ConnectionProperties(output.ConnectionProperties, context) : undefined,
4703
- ConnectionStatus: output.ConnectionStatus != null ? de_OutboundConnectionStatus(output.ConnectionStatus, context) : undefined,
4704
- LocalDomainInfo: output.LocalDomainInfo != null ? de_DomainInformationContainer(output.LocalDomainInfo, context) : undefined,
4705
- RemoteDomainInfo: output.RemoteDomainInfo != null ? de_DomainInformationContainer(output.RemoteDomainInfo, context) : undefined,
4706
- };
4707
- };
4708
- const de_OutboundConnections = (output, context) => {
4709
- const retVal = (output || [])
4710
- .filter((e) => e != null)
4711
- .map((entry) => {
4712
- if (entry === null) {
4713
- return null;
4714
- }
4715
- return de_OutboundConnection(entry, context);
3929
+ return (0, smithy_client_1.take)(output, {
3930
+ CreationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3931
+ PendingDeletion: smithy_client_1.expectBoolean,
3932
+ State: smithy_client_1.expectString,
3933
+ UpdateDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3934
+ UpdateVersion: smithy_client_1.expectInt32,
4716
3935
  });
4717
- return retVal;
4718
- };
4719
- const de_OutboundConnectionStatus = (output, context) => {
4720
- return {
4721
- Message: (0, smithy_client_1.expectString)(output.Message),
4722
- StatusCode: (0, smithy_client_1.expectString)(output.StatusCode),
4723
- };
4724
3936
  };
4725
3937
  const de_PackageDetails = (output, context) => {
4726
- return {
4727
- AvailablePackageVersion: (0, smithy_client_1.expectString)(output.AvailablePackageVersion),
4728
- CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
4729
- ErrorDetails: output.ErrorDetails != null ? de_ErrorDetails(output.ErrorDetails, context) : undefined,
4730
- LastUpdatedAt: output.LastUpdatedAt != null
4731
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdatedAt)))
4732
- : undefined,
4733
- PackageDescription: (0, smithy_client_1.expectString)(output.PackageDescription),
4734
- PackageID: (0, smithy_client_1.expectString)(output.PackageID),
4735
- PackageName: (0, smithy_client_1.expectString)(output.PackageName),
4736
- PackageStatus: (0, smithy_client_1.expectString)(output.PackageStatus),
4737
- PackageType: (0, smithy_client_1.expectString)(output.PackageType),
4738
- };
3938
+ return (0, smithy_client_1.take)(output, {
3939
+ AvailablePackageVersion: smithy_client_1.expectString,
3940
+ CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3941
+ ErrorDetails: smithy_client_1._json,
3942
+ LastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3943
+ PackageDescription: smithy_client_1.expectString,
3944
+ PackageID: smithy_client_1.expectString,
3945
+ PackageName: smithy_client_1.expectString,
3946
+ PackageStatus: smithy_client_1.expectString,
3947
+ PackageType: smithy_client_1.expectString,
3948
+ });
4739
3949
  };
4740
3950
  const de_PackageDetailsList = (output, context) => {
4741
3951
  const retVal = (output || [])
4742
3952
  .filter((e) => e != null)
4743
3953
  .map((entry) => {
4744
- if (entry === null) {
4745
- return null;
4746
- }
4747
3954
  return de_PackageDetails(entry, context);
4748
3955
  });
4749
3956
  return retVal;
4750
3957
  };
4751
3958
  const de_PackageVersionHistory = (output, context) => {
4752
- return {
4753
- CommitMessage: (0, smithy_client_1.expectString)(output.CommitMessage),
4754
- CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
4755
- PackageVersion: (0, smithy_client_1.expectString)(output.PackageVersion),
4756
- };
3959
+ return (0, smithy_client_1.take)(output, {
3960
+ CommitMessage: smithy_client_1.expectString,
3961
+ CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3962
+ PackageVersion: smithy_client_1.expectString,
3963
+ });
4757
3964
  };
4758
3965
  const de_PackageVersionHistoryList = (output, context) => {
4759
3966
  const retVal = (output || [])
4760
3967
  .filter((e) => e != null)
4761
3968
  .map((entry) => {
4762
- if (entry === null) {
4763
- return null;
4764
- }
4765
3969
  return de_PackageVersionHistory(entry, context);
4766
3970
  });
4767
3971
  return retVal;
4768
3972
  };
4769
3973
  const de_RecurringCharge = (output, context) => {
4770
- return {
4771
- RecurringChargeAmount: (0, smithy_client_1.limitedParseDouble)(output.RecurringChargeAmount),
4772
- RecurringChargeFrequency: (0, smithy_client_1.expectString)(output.RecurringChargeFrequency),
4773
- };
3974
+ return (0, smithy_client_1.take)(output, {
3975
+ RecurringChargeAmount: smithy_client_1.limitedParseDouble,
3976
+ RecurringChargeFrequency: smithy_client_1.expectString,
3977
+ });
4774
3978
  };
4775
3979
  const de_RecurringChargeList = (output, context) => {
4776
3980
  const retVal = (output || [])
4777
3981
  .filter((e) => e != null)
4778
3982
  .map((entry) => {
4779
- if (entry === null) {
4780
- return null;
4781
- }
4782
3983
  return de_RecurringCharge(entry, context);
4783
3984
  });
4784
3985
  return retVal;
4785
3986
  };
4786
3987
  const de_ReservedInstance = (output, context) => {
4787
- return {
4788
- BillingSubscriptionId: (0, smithy_client_1.expectLong)(output.BillingSubscriptionId),
4789
- CurrencyCode: (0, smithy_client_1.expectString)(output.CurrencyCode),
4790
- Duration: (0, smithy_client_1.expectInt32)(output.Duration),
4791
- FixedPrice: (0, smithy_client_1.limitedParseDouble)(output.FixedPrice),
4792
- InstanceCount: (0, smithy_client_1.expectInt32)(output.InstanceCount),
4793
- InstanceType: (0, smithy_client_1.expectString)(output.InstanceType),
4794
- PaymentOption: (0, smithy_client_1.expectString)(output.PaymentOption),
4795
- RecurringCharges: output.RecurringCharges != null ? de_RecurringChargeList(output.RecurringCharges, context) : undefined,
4796
- ReservationName: (0, smithy_client_1.expectString)(output.ReservationName),
4797
- ReservedInstanceId: (0, smithy_client_1.expectString)(output.ReservedInstanceId),
4798
- ReservedInstanceOfferingId: (0, smithy_client_1.expectString)(output.ReservedInstanceOfferingId),
4799
- StartTime: output.StartTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.StartTime))) : undefined,
4800
- State: (0, smithy_client_1.expectString)(output.State),
4801
- UsagePrice: (0, smithy_client_1.limitedParseDouble)(output.UsagePrice),
4802
- };
3988
+ return (0, smithy_client_1.take)(output, {
3989
+ BillingSubscriptionId: smithy_client_1.expectLong,
3990
+ CurrencyCode: smithy_client_1.expectString,
3991
+ Duration: smithy_client_1.expectInt32,
3992
+ FixedPrice: smithy_client_1.limitedParseDouble,
3993
+ InstanceCount: smithy_client_1.expectInt32,
3994
+ InstanceType: smithy_client_1.expectString,
3995
+ PaymentOption: smithy_client_1.expectString,
3996
+ RecurringCharges: (_) => de_RecurringChargeList(_, context),
3997
+ ReservationName: smithy_client_1.expectString,
3998
+ ReservedInstanceId: smithy_client_1.expectString,
3999
+ ReservedInstanceOfferingId: smithy_client_1.expectString,
4000
+ StartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
4001
+ State: smithy_client_1.expectString,
4002
+ UsagePrice: smithy_client_1.limitedParseDouble,
4003
+ });
4803
4004
  };
4804
4005
  const de_ReservedInstanceList = (output, context) => {
4805
4006
  const retVal = (output || [])
4806
4007
  .filter((e) => e != null)
4807
4008
  .map((entry) => {
4808
- if (entry === null) {
4809
- return null;
4810
- }
4811
4009
  return de_ReservedInstance(entry, context);
4812
4010
  });
4813
4011
  return retVal;
4814
4012
  };
4815
4013
  const de_ReservedInstanceOffering = (output, context) => {
4816
- return {
4817
- CurrencyCode: (0, smithy_client_1.expectString)(output.CurrencyCode),
4818
- Duration: (0, smithy_client_1.expectInt32)(output.Duration),
4819
- FixedPrice: (0, smithy_client_1.limitedParseDouble)(output.FixedPrice),
4820
- InstanceType: (0, smithy_client_1.expectString)(output.InstanceType),
4821
- PaymentOption: (0, smithy_client_1.expectString)(output.PaymentOption),
4822
- RecurringCharges: output.RecurringCharges != null ? de_RecurringChargeList(output.RecurringCharges, context) : undefined,
4823
- ReservedInstanceOfferingId: (0, smithy_client_1.expectString)(output.ReservedInstanceOfferingId),
4824
- UsagePrice: (0, smithy_client_1.limitedParseDouble)(output.UsagePrice),
4825
- };
4014
+ return (0, smithy_client_1.take)(output, {
4015
+ CurrencyCode: smithy_client_1.expectString,
4016
+ Duration: smithy_client_1.expectInt32,
4017
+ FixedPrice: smithy_client_1.limitedParseDouble,
4018
+ InstanceType: smithy_client_1.expectString,
4019
+ PaymentOption: smithy_client_1.expectString,
4020
+ RecurringCharges: (_) => de_RecurringChargeList(_, context),
4021
+ ReservedInstanceOfferingId: smithy_client_1.expectString,
4022
+ UsagePrice: smithy_client_1.limitedParseDouble,
4023
+ });
4826
4024
  };
4827
4025
  const de_ReservedInstanceOfferingList = (output, context) => {
4828
4026
  const retVal = (output || [])
4829
4027
  .filter((e) => e != null)
4830
4028
  .map((entry) => {
4831
- if (entry === null) {
4832
- return null;
4833
- }
4834
4029
  return de_ReservedInstanceOffering(entry, context);
4835
4030
  });
4836
4031
  return retVal;
4837
4032
  };
4838
- const de_SAMLIdp = (output, context) => {
4839
- return {
4840
- EntityId: (0, smithy_client_1.expectString)(output.EntityId),
4841
- MetadataContent: (0, smithy_client_1.expectString)(output.MetadataContent),
4842
- };
4843
- };
4844
- const de_SAMLOptionsOutput = (output, context) => {
4845
- return {
4846
- Enabled: (0, smithy_client_1.expectBoolean)(output.Enabled),
4847
- Idp: output.Idp != null ? de_SAMLIdp(output.Idp, context) : undefined,
4848
- RolesKey: (0, smithy_client_1.expectString)(output.RolesKey),
4849
- SessionTimeoutMinutes: (0, smithy_client_1.expectInt32)(output.SessionTimeoutMinutes),
4850
- SubjectKey: (0, smithy_client_1.expectString)(output.SubjectKey),
4851
- };
4852
- };
4853
- const de_ScheduledAction = (output, context) => {
4854
- return {
4855
- Cancellable: (0, smithy_client_1.expectBoolean)(output.Cancellable),
4856
- Description: (0, smithy_client_1.expectString)(output.Description),
4857
- Id: (0, smithy_client_1.expectString)(output.Id),
4858
- Mandatory: (0, smithy_client_1.expectBoolean)(output.Mandatory),
4859
- ScheduledBy: (0, smithy_client_1.expectString)(output.ScheduledBy),
4860
- ScheduledTime: (0, smithy_client_1.expectLong)(output.ScheduledTime),
4861
- Severity: (0, smithy_client_1.expectString)(output.Severity),
4862
- Status: (0, smithy_client_1.expectString)(output.Status),
4863
- Type: (0, smithy_client_1.expectString)(output.Type),
4864
- };
4865
- };
4866
- const de_ScheduledActionsList = (output, context) => {
4867
- const retVal = (output || [])
4868
- .filter((e) => e != null)
4869
- .map((entry) => {
4870
- if (entry === null) {
4871
- return null;
4872
- }
4873
- return de_ScheduledAction(entry, context);
4874
- });
4875
- return retVal;
4876
- };
4877
4033
  const de_ScheduledAutoTuneDetails = (output, context) => {
4878
- return {
4879
- Action: (0, smithy_client_1.expectString)(output.Action),
4880
- ActionType: (0, smithy_client_1.expectString)(output.ActionType),
4881
- Date: output.Date != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.Date))) : undefined,
4882
- Severity: (0, smithy_client_1.expectString)(output.Severity),
4883
- };
4034
+ return (0, smithy_client_1.take)(output, {
4035
+ Action: smithy_client_1.expectString,
4036
+ ActionType: smithy_client_1.expectString,
4037
+ Date: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
4038
+ Severity: smithy_client_1.expectString,
4039
+ });
4884
4040
  };
4885
4041
  const de_ServiceSoftwareOptions = (output, context) => {
4886
- return {
4887
- AutomatedUpdateDate: output.AutomatedUpdateDate != null
4888
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.AutomatedUpdateDate)))
4889
- : undefined,
4890
- Cancellable: (0, smithy_client_1.expectBoolean)(output.Cancellable),
4891
- CurrentVersion: (0, smithy_client_1.expectString)(output.CurrentVersion),
4892
- Description: (0, smithy_client_1.expectString)(output.Description),
4893
- NewVersion: (0, smithy_client_1.expectString)(output.NewVersion),
4894
- OptionalDeployment: (0, smithy_client_1.expectBoolean)(output.OptionalDeployment),
4895
- UpdateAvailable: (0, smithy_client_1.expectBoolean)(output.UpdateAvailable),
4896
- UpdateStatus: (0, smithy_client_1.expectString)(output.UpdateStatus),
4897
- };
4898
- };
4899
- const de_SlotList = (output, context) => {
4900
- const retVal = (output || [])
4901
- .filter((e) => e != null)
4902
- .map((entry) => {
4903
- if (entry === null) {
4904
- return null;
4905
- }
4906
- return (0, smithy_client_1.expectLong)(entry);
4042
+ return (0, smithy_client_1.take)(output, {
4043
+ AutomatedUpdateDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
4044
+ Cancellable: smithy_client_1.expectBoolean,
4045
+ CurrentVersion: smithy_client_1.expectString,
4046
+ Description: smithy_client_1.expectString,
4047
+ NewVersion: smithy_client_1.expectString,
4048
+ OptionalDeployment: smithy_client_1.expectBoolean,
4049
+ UpdateAvailable: smithy_client_1.expectBoolean,
4050
+ UpdateStatus: smithy_client_1.expectString,
4907
4051
  });
4908
- return retVal;
4909
- };
4910
- const de_SnapshotOptions = (output, context) => {
4911
- return {
4912
- AutomatedSnapshotStartHour: (0, smithy_client_1.expectInt32)(output.AutomatedSnapshotStartHour),
4913
- };
4914
4052
  };
4915
4053
  const de_SnapshotOptionsStatus = (output, context) => {
4916
- return {
4917
- Options: output.Options != null ? de_SnapshotOptions(output.Options, context) : undefined,
4918
- Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined,
4919
- };
4920
- };
4921
- const de_SoftwareUpdateOptions = (output, context) => {
4922
- return {
4923
- AutoSoftwareUpdateEnabled: (0, smithy_client_1.expectBoolean)(output.AutoSoftwareUpdateEnabled),
4924
- };
4925
- };
4926
- const de_SoftwareUpdateOptionsStatus = (output, context) => {
4927
- return {
4928
- Options: output.Options != null ? de_SoftwareUpdateOptions(output.Options, context) : undefined,
4929
- Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined,
4930
- };
4931
- };
4932
- const de_StorageType = (output, context) => {
4933
- return {
4934
- StorageSubTypeName: (0, smithy_client_1.expectString)(output.StorageSubTypeName),
4935
- StorageTypeLimits: output.StorageTypeLimits != null ? de_StorageTypeLimitList(output.StorageTypeLimits, context) : undefined,
4936
- StorageTypeName: (0, smithy_client_1.expectString)(output.StorageTypeName),
4937
- };
4938
- };
4939
- const de_StorageTypeLimit = (output, context) => {
4940
- return {
4941
- LimitName: (0, smithy_client_1.expectString)(output.LimitName),
4942
- LimitValues: output.LimitValues != null ? de_LimitValueList(output.LimitValues, context) : undefined,
4943
- };
4944
- };
4945
- const de_StorageTypeLimitList = (output, context) => {
4946
- const retVal = (output || [])
4947
- .filter((e) => e != null)
4948
- .map((entry) => {
4949
- if (entry === null) {
4950
- return null;
4951
- }
4952
- return de_StorageTypeLimit(entry, context);
4953
- });
4954
- return retVal;
4955
- };
4956
- const de_StorageTypeList = (output, context) => {
4957
- const retVal = (output || [])
4958
- .filter((e) => e != null)
4959
- .map((entry) => {
4960
- if (entry === null) {
4961
- return null;
4962
- }
4963
- return de_StorageType(entry, context);
4054
+ return (0, smithy_client_1.take)(output, {
4055
+ Options: smithy_client_1._json,
4056
+ Status: (_) => de_OptionStatus(_, context),
4964
4057
  });
4965
- return retVal;
4966
4058
  };
4967
- const de_StringList = (output, context) => {
4968
- const retVal = (output || [])
4969
- .filter((e) => e != null)
4970
- .map((entry) => {
4971
- if (entry === null) {
4972
- return null;
4973
- }
4974
- return (0, smithy_client_1.expectString)(entry);
4975
- });
4976
- return retVal;
4977
- };
4978
- const de_Tag = (output, context) => {
4979
- return {
4980
- Key: (0, smithy_client_1.expectString)(output.Key),
4981
- Value: (0, smithy_client_1.expectString)(output.Value),
4982
- };
4983
- };
4984
- const de_TagList = (output, context) => {
4985
- const retVal = (output || [])
4986
- .filter((e) => e != null)
4987
- .map((entry) => {
4988
- if (entry === null) {
4989
- return null;
4990
- }
4991
- return de_Tag(entry, context);
4059
+ const de_SoftwareUpdateOptionsStatus = (output, context) => {
4060
+ return (0, smithy_client_1.take)(output, {
4061
+ Options: smithy_client_1._json,
4062
+ Status: (_) => de_OptionStatus(_, context),
4992
4063
  });
4993
- return retVal;
4994
4064
  };
4995
4065
  const de_UpgradeHistory = (output, context) => {
4996
- return {
4997
- StartTimestamp: output.StartTimestamp != null
4998
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.StartTimestamp)))
4999
- : undefined,
5000
- StepsList: output.StepsList != null ? de_UpgradeStepsList(output.StepsList, context) : undefined,
5001
- UpgradeName: (0, smithy_client_1.expectString)(output.UpgradeName),
5002
- UpgradeStatus: (0, smithy_client_1.expectString)(output.UpgradeStatus),
5003
- };
4066
+ return (0, smithy_client_1.take)(output, {
4067
+ StartTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
4068
+ StepsList: (_) => de_UpgradeStepsList(_, context),
4069
+ UpgradeName: smithy_client_1.expectString,
4070
+ UpgradeStatus: smithy_client_1.expectString,
4071
+ });
5004
4072
  };
5005
4073
  const de_UpgradeHistoryList = (output, context) => {
5006
4074
  const retVal = (output || [])
5007
4075
  .filter((e) => e != null)
5008
4076
  .map((entry) => {
5009
- if (entry === null) {
5010
- return null;
5011
- }
5012
4077
  return de_UpgradeHistory(entry, context);
5013
4078
  });
5014
4079
  return retVal;
5015
4080
  };
5016
4081
  const de_UpgradeStepItem = (output, context) => {
5017
- return {
5018
- Issues: output.Issues != null ? de_Issues(output.Issues, context) : undefined,
5019
- ProgressPercent: (0, smithy_client_1.limitedParseDouble)(output.ProgressPercent),
5020
- UpgradeStep: (0, smithy_client_1.expectString)(output.UpgradeStep),
5021
- UpgradeStepStatus: (0, smithy_client_1.expectString)(output.UpgradeStepStatus),
5022
- };
4082
+ return (0, smithy_client_1.take)(output, {
4083
+ Issues: smithy_client_1._json,
4084
+ ProgressPercent: smithy_client_1.limitedParseDouble,
4085
+ UpgradeStep: smithy_client_1.expectString,
4086
+ UpgradeStepStatus: smithy_client_1.expectString,
4087
+ });
5023
4088
  };
5024
4089
  const de_UpgradeStepsList = (output, context) => {
5025
4090
  const retVal = (output || [])
5026
4091
  .filter((e) => e != null)
5027
4092
  .map((entry) => {
5028
- if (entry === null) {
5029
- return null;
5030
- }
5031
4093
  return de_UpgradeStepItem(entry, context);
5032
4094
  });
5033
4095
  return retVal;
5034
4096
  };
5035
- const de_ValidationFailure = (output, context) => {
5036
- return {
5037
- Code: (0, smithy_client_1.expectString)(output.Code),
5038
- Message: (0, smithy_client_1.expectString)(output.Message),
5039
- };
5040
- };
5041
- const de_ValidationFailures = (output, context) => {
5042
- const retVal = (output || [])
5043
- .filter((e) => e != null)
5044
- .map((entry) => {
5045
- if (entry === null) {
5046
- return null;
5047
- }
5048
- return de_ValidationFailure(entry, context);
5049
- });
5050
- return retVal;
5051
- };
5052
- const de_VersionList = (output, context) => {
5053
- const retVal = (output || [])
5054
- .filter((e) => e != null)
5055
- .map((entry) => {
5056
- if (entry === null) {
5057
- return null;
5058
- }
5059
- return (0, smithy_client_1.expectString)(entry);
5060
- });
5061
- return retVal;
5062
- };
5063
4097
  const de_VersionStatus = (output, context) => {
5064
- return {
5065
- Options: (0, smithy_client_1.expectString)(output.Options),
5066
- Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined,
5067
- };
5068
- };
5069
- const de_VPCDerivedInfo = (output, context) => {
5070
- return {
5071
- AvailabilityZones: output.AvailabilityZones != null ? de_StringList(output.AvailabilityZones, context) : undefined,
5072
- SecurityGroupIds: output.SecurityGroupIds != null ? de_StringList(output.SecurityGroupIds, context) : undefined,
5073
- SubnetIds: output.SubnetIds != null ? de_StringList(output.SubnetIds, context) : undefined,
5074
- VPCId: (0, smithy_client_1.expectString)(output.VPCId),
5075
- };
5076
- };
5077
- const de_VPCDerivedInfoStatus = (output, context) => {
5078
- return {
5079
- Options: output.Options != null ? de_VPCDerivedInfo(output.Options, context) : undefined,
5080
- Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined,
5081
- };
5082
- };
5083
- const de_VpcEndpoint = (output, context) => {
5084
- return {
5085
- DomainArn: (0, smithy_client_1.expectString)(output.DomainArn),
5086
- Endpoint: (0, smithy_client_1.expectString)(output.Endpoint),
5087
- Status: (0, smithy_client_1.expectString)(output.Status),
5088
- VpcEndpointId: (0, smithy_client_1.expectString)(output.VpcEndpointId),
5089
- VpcEndpointOwner: (0, smithy_client_1.expectString)(output.VpcEndpointOwner),
5090
- VpcOptions: output.VpcOptions != null ? de_VPCDerivedInfo(output.VpcOptions, context) : undefined,
5091
- };
5092
- };
5093
- const de_VpcEndpointError = (output, context) => {
5094
- return {
5095
- ErrorCode: (0, smithy_client_1.expectString)(output.ErrorCode),
5096
- ErrorMessage: (0, smithy_client_1.expectString)(output.ErrorMessage),
5097
- VpcEndpointId: (0, smithy_client_1.expectString)(output.VpcEndpointId),
5098
- };
5099
- };
5100
- const de_VpcEndpointErrorList = (output, context) => {
5101
- const retVal = (output || [])
5102
- .filter((e) => e != null)
5103
- .map((entry) => {
5104
- if (entry === null) {
5105
- return null;
5106
- }
5107
- return de_VpcEndpointError(entry, context);
5108
- });
5109
- return retVal;
5110
- };
5111
- const de_VpcEndpoints = (output, context) => {
5112
- const retVal = (output || [])
5113
- .filter((e) => e != null)
5114
- .map((entry) => {
5115
- if (entry === null) {
5116
- return null;
5117
- }
5118
- return de_VpcEndpoint(entry, context);
4098
+ return (0, smithy_client_1.take)(output, {
4099
+ Options: smithy_client_1.expectString,
4100
+ Status: (_) => de_OptionStatus(_, context),
5119
4101
  });
5120
- return retVal;
5121
4102
  };
5122
- const de_VpcEndpointSummary = (output, context) => {
5123
- return {
5124
- DomainArn: (0, smithy_client_1.expectString)(output.DomainArn),
5125
- Status: (0, smithy_client_1.expectString)(output.Status),
5126
- VpcEndpointId: (0, smithy_client_1.expectString)(output.VpcEndpointId),
5127
- VpcEndpointOwner: (0, smithy_client_1.expectString)(output.VpcEndpointOwner),
5128
- };
5129
- };
5130
- const de_VpcEndpointSummaryList = (output, context) => {
5131
- const retVal = (output || [])
5132
- .filter((e) => e != null)
5133
- .map((entry) => {
5134
- if (entry === null) {
5135
- return null;
5136
- }
5137
- return de_VpcEndpointSummary(entry, context);
4103
+ const de_VPCDerivedInfoStatus = (output, context) => {
4104
+ return (0, smithy_client_1.take)(output, {
4105
+ Options: smithy_client_1._json,
4106
+ Status: (_) => de_OptionStatus(_, context),
5138
4107
  });
5139
- return retVal;
5140
- };
5141
- const de_WindowStartTime = (output, context) => {
5142
- return {
5143
- Hours: (0, smithy_client_1.expectLong)(output.Hours),
5144
- Minutes: (0, smithy_client_1.expectLong)(output.Minutes),
5145
- };
5146
- };
5147
- const de_ZoneAwarenessConfig = (output, context) => {
5148
- return {
5149
- AvailabilityZoneCount: (0, smithy_client_1.expectInt32)(output.AvailabilityZoneCount),
5150
- };
5151
4108
  };
5152
4109
  const deserializeMetadata = (output) => ({
5153
4110
  httpStatusCode: output.statusCode,