@aws-sdk/client-elasticsearch-service 3.312.0 → 3.315.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -31,10 +31,10 @@ const se_AddTagsCommand = async (input, context) => {
31
31
  };
32
32
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-01-01/tags";
33
33
  let body;
34
- body = JSON.stringify({
35
- ...(input.ARN != null && { ARN: input.ARN }),
36
- ...(input.TagList != null && { TagList: se_TagList(input.TagList, context) }),
37
- });
34
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
35
+ ARN: [],
36
+ TagList: (_) => (0, smithy_client_1._json)(_),
37
+ }));
38
38
  return new protocol_http_1.HttpRequest({
39
39
  protocol,
40
40
  hostname,
@@ -74,9 +74,9 @@ const se_AuthorizeVpcEndpointAccessCommand = async (input, context) => {
74
74
  "/2015-01-01/es/domain/{DomainName}/authorizeVpcEndpointAccess";
75
75
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
76
76
  let body;
77
- body = JSON.stringify({
78
- ...(input.Account != null && { Account: input.Account }),
79
- });
77
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
78
+ Account: [],
79
+ }));
80
80
  return new protocol_http_1.HttpRequest({
81
81
  protocol,
82
82
  hostname,
@@ -96,9 +96,9 @@ const se_CancelElasticsearchServiceSoftwareUpdateCommand = async (input, context
96
96
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
97
97
  "/2015-01-01/es/serviceSoftwareUpdate/cancel";
98
98
  let body;
99
- body = JSON.stringify({
100
- ...(input.DomainName != null && { DomainName: input.DomainName }),
101
- });
99
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
100
+ DomainName: [],
101
+ }));
102
102
  return new protocol_http_1.HttpRequest({
103
103
  protocol,
104
104
  hostname,
@@ -117,36 +117,24 @@ const se_CreateElasticsearchDomainCommand = async (input, context) => {
117
117
  };
118
118
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-01-01/es/domain";
119
119
  let body;
120
- body = JSON.stringify({
121
- ...(input.AccessPolicies != null && { AccessPolicies: input.AccessPolicies }),
122
- ...(input.AdvancedOptions != null && { AdvancedOptions: se_AdvancedOptions(input.AdvancedOptions, context) }),
123
- ...(input.AdvancedSecurityOptions != null && {
124
- AdvancedSecurityOptions: se_AdvancedSecurityOptionsInput(input.AdvancedSecurityOptions, context),
125
- }),
126
- ...(input.AutoTuneOptions != null && { AutoTuneOptions: se_AutoTuneOptionsInput(input.AutoTuneOptions, context) }),
127
- ...(input.CognitoOptions != null && { CognitoOptions: se_CognitoOptions(input.CognitoOptions, context) }),
128
- ...(input.DomainEndpointOptions != null && {
129
- DomainEndpointOptions: se_DomainEndpointOptions(input.DomainEndpointOptions, context),
130
- }),
131
- ...(input.DomainName != null && { DomainName: input.DomainName }),
132
- ...(input.EBSOptions != null && { EBSOptions: se_EBSOptions(input.EBSOptions, context) }),
133
- ...(input.ElasticsearchClusterConfig != null && {
134
- ElasticsearchClusterConfig: se_ElasticsearchClusterConfig(input.ElasticsearchClusterConfig, context),
135
- }),
136
- ...(input.ElasticsearchVersion != null && { ElasticsearchVersion: input.ElasticsearchVersion }),
137
- ...(input.EncryptionAtRestOptions != null && {
138
- EncryptionAtRestOptions: se_EncryptionAtRestOptions(input.EncryptionAtRestOptions, context),
139
- }),
140
- ...(input.LogPublishingOptions != null && {
141
- LogPublishingOptions: se_LogPublishingOptions(input.LogPublishingOptions, context),
142
- }),
143
- ...(input.NodeToNodeEncryptionOptions != null && {
144
- NodeToNodeEncryptionOptions: se_NodeToNodeEncryptionOptions(input.NodeToNodeEncryptionOptions, context),
145
- }),
146
- ...(input.SnapshotOptions != null && { SnapshotOptions: se_SnapshotOptions(input.SnapshotOptions, context) }),
147
- ...(input.TagList != null && { TagList: se_TagList(input.TagList, context) }),
148
- ...(input.VPCOptions != null && { VPCOptions: se_VPCOptions(input.VPCOptions, context) }),
149
- });
120
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
121
+ AccessPolicies: [],
122
+ AdvancedOptions: (_) => (0, smithy_client_1._json)(_),
123
+ AdvancedSecurityOptions: (_) => (0, smithy_client_1._json)(_),
124
+ AutoTuneOptions: (_) => se_AutoTuneOptionsInput(_, context),
125
+ CognitoOptions: (_) => (0, smithy_client_1._json)(_),
126
+ DomainEndpointOptions: (_) => (0, smithy_client_1._json)(_),
127
+ DomainName: [],
128
+ EBSOptions: (_) => (0, smithy_client_1._json)(_),
129
+ ElasticsearchClusterConfig: (_) => (0, smithy_client_1._json)(_),
130
+ ElasticsearchVersion: [],
131
+ EncryptionAtRestOptions: (_) => (0, smithy_client_1._json)(_),
132
+ LogPublishingOptions: (_) => (0, smithy_client_1._json)(_),
133
+ NodeToNodeEncryptionOptions: (_) => (0, smithy_client_1._json)(_),
134
+ SnapshotOptions: (_) => (0, smithy_client_1._json)(_),
135
+ TagList: (_) => (0, smithy_client_1._json)(_),
136
+ VPCOptions: (_) => (0, smithy_client_1._json)(_),
137
+ }));
150
138
  return new protocol_http_1.HttpRequest({
151
139
  protocol,
152
140
  hostname,
@@ -165,13 +153,11 @@ const se_CreateOutboundCrossClusterSearchConnectionCommand = async (input, conte
165
153
  };
166
154
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-01-01/es/ccs/outboundConnection";
167
155
  let body;
168
- body = JSON.stringify({
169
- ...(input.ConnectionAlias != null && { ConnectionAlias: input.ConnectionAlias }),
170
- ...(input.DestinationDomainInfo != null && {
171
- DestinationDomainInfo: se_DomainInformation(input.DestinationDomainInfo, context),
172
- }),
173
- ...(input.SourceDomainInfo != null && { SourceDomainInfo: se_DomainInformation(input.SourceDomainInfo, context) }),
174
- });
156
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
157
+ ConnectionAlias: [],
158
+ DestinationDomainInfo: (_) => (0, smithy_client_1._json)(_),
159
+ SourceDomainInfo: (_) => (0, smithy_client_1._json)(_),
160
+ }));
175
161
  return new protocol_http_1.HttpRequest({
176
162
  protocol,
177
163
  hostname,
@@ -190,12 +176,12 @@ const se_CreatePackageCommand = async (input, context) => {
190
176
  };
191
177
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-01-01/packages";
192
178
  let body;
193
- body = JSON.stringify({
194
- ...(input.PackageDescription != null && { PackageDescription: input.PackageDescription }),
195
- ...(input.PackageName != null && { PackageName: input.PackageName }),
196
- ...(input.PackageSource != null && { PackageSource: se_PackageSource(input.PackageSource, context) }),
197
- ...(input.PackageType != null && { PackageType: input.PackageType }),
198
- });
179
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
180
+ PackageDescription: [],
181
+ PackageName: [],
182
+ PackageSource: (_) => (0, smithy_client_1._json)(_),
183
+ PackageType: [],
184
+ }));
199
185
  return new protocol_http_1.HttpRequest({
200
186
  protocol,
201
187
  hostname,
@@ -214,11 +200,11 @@ const se_CreateVpcEndpointCommand = async (input, context) => {
214
200
  };
215
201
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-01-01/es/vpcEndpoints";
216
202
  let body;
217
- body = JSON.stringify({
218
- ...(input.ClientToken != null && { ClientToken: input.ClientToken }),
219
- ...(input.DomainArn != null && { DomainArn: input.DomainArn }),
220
- ...(input.VpcOptions != null && { VpcOptions: se_VPCOptions(input.VpcOptions, context) }),
221
- });
203
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
204
+ ClientToken: [],
205
+ DomainArn: [],
206
+ VpcOptions: (_) => (0, smithy_client_1._json)(_),
207
+ }));
222
208
  return new protocol_http_1.HttpRequest({
223
209
  protocol,
224
210
  hostname,
@@ -346,10 +332,10 @@ const se_DescribeDomainAutoTunesCommand = async (input, context) => {
346
332
  "/2015-01-01/es/domain/{DomainName}/autoTunes";
347
333
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
348
334
  let body;
349
- body = JSON.stringify({
350
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
351
- ...(input.NextToken != null && { NextToken: input.NextToken }),
352
- });
335
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
336
+ MaxResults: [],
337
+ NextToken: [],
338
+ }));
353
339
  return new protocol_http_1.HttpRequest({
354
340
  protocol,
355
341
  hostname,
@@ -367,7 +353,7 @@ const se_DescribeDomainChangeProgressCommand = async (input, context) => {
367
353
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
368
354
  "/2015-01-01/es/domain/{DomainName}/progress";
369
355
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
370
- const query = map({
356
+ const query = (0, smithy_client_1.map)({
371
357
  changeid: [, input.ChangeId],
372
358
  });
373
359
  let body;
@@ -424,9 +410,9 @@ const se_DescribeElasticsearchDomainsCommand = async (input, context) => {
424
410
  };
425
411
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-01-01/es/domain-info";
426
412
  let body;
427
- body = JSON.stringify({
428
- ...(input.DomainNames != null && { DomainNames: se_DomainNameList(input.DomainNames, context) }),
429
- });
413
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
414
+ DomainNames: (_) => (0, smithy_client_1._json)(_),
415
+ }));
430
416
  return new protocol_http_1.HttpRequest({
431
417
  protocol,
432
418
  hostname,
@@ -445,7 +431,7 @@ const se_DescribeElasticsearchInstanceTypeLimitsCommand = async (input, context)
445
431
  "/2015-01-01/es/instanceTypeLimits/{ElasticsearchVersion}/{InstanceType}";
446
432
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceType", () => input.InstanceType, "{InstanceType}", false);
447
433
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ElasticsearchVersion", () => input.ElasticsearchVersion, "{ElasticsearchVersion}", false);
448
- const query = map({
434
+ const query = (0, smithy_client_1.map)({
449
435
  domainName: [, input.DomainName],
450
436
  });
451
437
  let body;
@@ -469,11 +455,11 @@ const se_DescribeInboundCrossClusterSearchConnectionsCommand = async (input, con
469
455
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
470
456
  "/2015-01-01/es/ccs/inboundConnection/search";
471
457
  let body;
472
- body = JSON.stringify({
473
- ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }),
474
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
475
- ...(input.NextToken != null && { NextToken: input.NextToken }),
476
- });
458
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
459
+ Filters: (_) => (0, smithy_client_1._json)(_),
460
+ MaxResults: [],
461
+ NextToken: [],
462
+ }));
477
463
  return new protocol_http_1.HttpRequest({
478
464
  protocol,
479
465
  hostname,
@@ -493,11 +479,11 @@ const se_DescribeOutboundCrossClusterSearchConnectionsCommand = async (input, co
493
479
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
494
480
  "/2015-01-01/es/ccs/outboundConnection/search";
495
481
  let body;
496
- body = JSON.stringify({
497
- ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }),
498
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
499
- ...(input.NextToken != null && { NextToken: input.NextToken }),
500
- });
482
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
483
+ Filters: (_) => (0, smithy_client_1._json)(_),
484
+ MaxResults: [],
485
+ NextToken: [],
486
+ }));
501
487
  return new protocol_http_1.HttpRequest({
502
488
  protocol,
503
489
  hostname,
@@ -516,11 +502,11 @@ const se_DescribePackagesCommand = async (input, context) => {
516
502
  };
517
503
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-01-01/packages/describe";
518
504
  let body;
519
- body = JSON.stringify({
520
- ...(input.Filters != null && { Filters: se_DescribePackagesFilterList(input.Filters, context) }),
521
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
522
- ...(input.NextToken != null && { NextToken: input.NextToken }),
523
- });
505
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
506
+ Filters: (_) => (0, smithy_client_1._json)(_),
507
+ MaxResults: [],
508
+ NextToken: [],
509
+ }));
524
510
  return new protocol_http_1.HttpRequest({
525
511
  protocol,
526
512
  hostname,
@@ -536,7 +522,7 @@ const se_DescribeReservedElasticsearchInstanceOfferingsCommand = async (input, c
536
522
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
537
523
  const headers = {};
538
524
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-01-01/es/reservedInstanceOfferings";
539
- const query = map({
525
+ const query = (0, smithy_client_1.map)({
540
526
  offeringId: [, input.ReservedElasticsearchInstanceOfferingId],
541
527
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
542
528
  nextToken: [, input.NextToken],
@@ -558,7 +544,7 @@ const se_DescribeReservedElasticsearchInstancesCommand = async (input, context)
558
544
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
559
545
  const headers = {};
560
546
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-01-01/es/reservedInstances";
561
- const query = map({
547
+ const query = (0, smithy_client_1.map)({
562
548
  reservationId: [, input.ReservedElasticsearchInstanceId],
563
549
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
564
550
  nextToken: [, input.NextToken],
@@ -583,9 +569,9 @@ const se_DescribeVpcEndpointsCommand = async (input, context) => {
583
569
  };
584
570
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-01-01/es/vpcEndpoints/describe";
585
571
  let body;
586
- body = JSON.stringify({
587
- ...(input.VpcEndpointIds != null && { VpcEndpointIds: se_VpcEndpointIdList(input.VpcEndpointIds, context) }),
588
- });
572
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
573
+ VpcEndpointIds: (_) => (0, smithy_client_1._json)(_),
574
+ }));
589
575
  return new protocol_http_1.HttpRequest({
590
576
  protocol,
591
577
  hostname,
@@ -620,7 +606,7 @@ const se_GetCompatibleElasticsearchVersionsCommand = async (input, context) => {
620
606
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
621
607
  const headers = {};
622
608
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-01-01/es/compatibleVersions";
623
- const query = map({
609
+ const query = (0, smithy_client_1.map)({
624
610
  domainName: [, input.DomainName],
625
611
  });
626
612
  let body;
@@ -641,7 +627,7 @@ const se_GetPackageVersionHistoryCommand = async (input, context) => {
641
627
  const headers = {};
642
628
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-01-01/packages/{PackageID}/history";
643
629
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "PackageID", () => input.PackageID, "{PackageID}", false);
644
- const query = map({
630
+ const query = (0, smithy_client_1.map)({
645
631
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
646
632
  nextToken: [, input.NextToken],
647
633
  });
@@ -664,7 +650,7 @@ const se_GetUpgradeHistoryCommand = async (input, context) => {
664
650
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
665
651
  "/2015-01-01/es/upgradeDomain/{DomainName}/history";
666
652
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
667
- const query = map({
653
+ const query = (0, smithy_client_1.map)({
668
654
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
669
655
  nextToken: [, input.NextToken],
670
656
  });
@@ -703,7 +689,7 @@ const se_ListDomainNamesCommand = async (input, context) => {
703
689
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
704
690
  const headers = {};
705
691
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-01-01/domain";
706
- const query = map({
692
+ const query = (0, smithy_client_1.map)({
707
693
  engineType: [, input.EngineType],
708
694
  });
709
695
  let body;
@@ -724,7 +710,7 @@ const se_ListDomainsForPackageCommand = async (input, context) => {
724
710
  const headers = {};
725
711
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-01-01/packages/{PackageID}/domains";
726
712
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "PackageID", () => input.PackageID, "{PackageID}", false);
727
- const query = map({
713
+ const query = (0, smithy_client_1.map)({
728
714
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
729
715
  nextToken: [, input.NextToken],
730
716
  });
@@ -747,7 +733,7 @@ const se_ListElasticsearchInstanceTypesCommand = async (input, context) => {
747
733
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
748
734
  "/2015-01-01/es/instanceTypes/{ElasticsearchVersion}";
749
735
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ElasticsearchVersion", () => input.ElasticsearchVersion, "{ElasticsearchVersion}", false);
750
- const query = map({
736
+ const query = (0, smithy_client_1.map)({
751
737
  domainName: [, input.DomainName],
752
738
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
753
739
  nextToken: [, input.NextToken],
@@ -769,7 +755,7 @@ const se_ListElasticsearchVersionsCommand = async (input, context) => {
769
755
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
770
756
  const headers = {};
771
757
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-01-01/es/versions";
772
- const query = map({
758
+ const query = (0, smithy_client_1.map)({
773
759
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
774
760
  nextToken: [, input.NextToken],
775
761
  });
@@ -791,7 +777,7 @@ const se_ListPackagesForDomainCommand = async (input, context) => {
791
777
  const headers = {};
792
778
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-01-01/domain/{DomainName}/packages";
793
779
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
794
- const query = map({
780
+ const query = (0, smithy_client_1.map)({
795
781
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
796
782
  nextToken: [, input.NextToken],
797
783
  });
@@ -812,7 +798,7 @@ const se_ListTagsCommand = async (input, context) => {
812
798
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
813
799
  const headers = {};
814
800
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-01-01/tags";
815
- const query = map({
801
+ const query = (0, smithy_client_1.map)({
816
802
  arn: [, (0, smithy_client_1.expectNonNull)(input.ARN, `ARN`)],
817
803
  });
818
804
  let body;
@@ -834,7 +820,7 @@ const se_ListVpcEndpointAccessCommand = async (input, context) => {
834
820
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
835
821
  "/2015-01-01/es/domain/{DomainName}/listVpcEndpointAccess";
836
822
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
837
- const query = map({
823
+ const query = (0, smithy_client_1.map)({
838
824
  nextToken: [, input.NextToken],
839
825
  });
840
826
  let body;
@@ -854,7 +840,7 @@ const se_ListVpcEndpointsCommand = async (input, context) => {
854
840
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
855
841
  const headers = {};
856
842
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-01-01/es/vpcEndpoints";
857
- const query = map({
843
+ const query = (0, smithy_client_1.map)({
858
844
  nextToken: [, input.NextToken],
859
845
  });
860
846
  let body;
@@ -876,7 +862,7 @@ const se_ListVpcEndpointsForDomainCommand = async (input, context) => {
876
862
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
877
863
  "/2015-01-01/es/domain/{DomainName}/vpcEndpoints";
878
864
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
879
- const query = map({
865
+ const query = (0, smithy_client_1.map)({
880
866
  nextToken: [, input.NextToken],
881
867
  });
882
868
  let body;
@@ -900,13 +886,11 @@ const se_PurchaseReservedElasticsearchInstanceOfferingCommand = async (input, co
900
886
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
901
887
  "/2015-01-01/es/purchaseReservedInstanceOffering";
902
888
  let body;
903
- body = JSON.stringify({
904
- ...(input.InstanceCount != null && { InstanceCount: input.InstanceCount }),
905
- ...(input.ReservationName != null && { ReservationName: input.ReservationName }),
906
- ...(input.ReservedElasticsearchInstanceOfferingId != null && {
907
- ReservedElasticsearchInstanceOfferingId: input.ReservedElasticsearchInstanceOfferingId,
908
- }),
909
- });
889
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
890
+ InstanceCount: [],
891
+ ReservationName: [],
892
+ ReservedElasticsearchInstanceOfferingId: [],
893
+ }));
910
894
  return new protocol_http_1.HttpRequest({
911
895
  protocol,
912
896
  hostname,
@@ -943,10 +927,10 @@ const se_RemoveTagsCommand = async (input, context) => {
943
927
  };
944
928
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-01-01/tags-removal";
945
929
  let body;
946
- body = JSON.stringify({
947
- ...(input.ARN != null && { ARN: input.ARN }),
948
- ...(input.TagKeys != null && { TagKeys: se_StringList(input.TagKeys, context) }),
949
- });
930
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
931
+ ARN: [],
932
+ TagKeys: (_) => (0, smithy_client_1._json)(_),
933
+ }));
950
934
  return new protocol_http_1.HttpRequest({
951
935
  protocol,
952
936
  hostname,
@@ -967,9 +951,9 @@ const se_RevokeVpcEndpointAccessCommand = async (input, context) => {
967
951
  "/2015-01-01/es/domain/{DomainName}/revokeVpcEndpointAccess";
968
952
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
969
953
  let body;
970
- body = JSON.stringify({
971
- ...(input.Account != null && { Account: input.Account }),
972
- });
954
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
955
+ Account: [],
956
+ }));
973
957
  return new protocol_http_1.HttpRequest({
974
958
  protocol,
975
959
  hostname,
@@ -989,9 +973,9 @@ const se_StartElasticsearchServiceSoftwareUpdateCommand = async (input, context)
989
973
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
990
974
  "/2015-01-01/es/serviceSoftwareUpdate/start";
991
975
  let body;
992
- body = JSON.stringify({
993
- ...(input.DomainName != null && { DomainName: input.DomainName }),
994
- });
976
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
977
+ DomainName: [],
978
+ }));
995
979
  return new protocol_http_1.HttpRequest({
996
980
  protocol,
997
981
  hostname,
@@ -1011,34 +995,22 @@ const se_UpdateElasticsearchDomainConfigCommand = async (input, context) => {
1011
995
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-01-01/es/domain/{DomainName}/config";
1012
996
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
1013
997
  let body;
1014
- body = JSON.stringify({
1015
- ...(input.AccessPolicies != null && { AccessPolicies: input.AccessPolicies }),
1016
- ...(input.AdvancedOptions != null && { AdvancedOptions: se_AdvancedOptions(input.AdvancedOptions, context) }),
1017
- ...(input.AdvancedSecurityOptions != null && {
1018
- AdvancedSecurityOptions: se_AdvancedSecurityOptionsInput(input.AdvancedSecurityOptions, context),
1019
- }),
1020
- ...(input.AutoTuneOptions != null && { AutoTuneOptions: se_AutoTuneOptions(input.AutoTuneOptions, context) }),
1021
- ...(input.CognitoOptions != null && { CognitoOptions: se_CognitoOptions(input.CognitoOptions, context) }),
1022
- ...(input.DomainEndpointOptions != null && {
1023
- DomainEndpointOptions: se_DomainEndpointOptions(input.DomainEndpointOptions, context),
1024
- }),
1025
- ...(input.DryRun != null && { DryRun: input.DryRun }),
1026
- ...(input.EBSOptions != null && { EBSOptions: se_EBSOptions(input.EBSOptions, context) }),
1027
- ...(input.ElasticsearchClusterConfig != null && {
1028
- ElasticsearchClusterConfig: se_ElasticsearchClusterConfig(input.ElasticsearchClusterConfig, context),
1029
- }),
1030
- ...(input.EncryptionAtRestOptions != null && {
1031
- EncryptionAtRestOptions: se_EncryptionAtRestOptions(input.EncryptionAtRestOptions, context),
1032
- }),
1033
- ...(input.LogPublishingOptions != null && {
1034
- LogPublishingOptions: se_LogPublishingOptions(input.LogPublishingOptions, context),
1035
- }),
1036
- ...(input.NodeToNodeEncryptionOptions != null && {
1037
- NodeToNodeEncryptionOptions: se_NodeToNodeEncryptionOptions(input.NodeToNodeEncryptionOptions, context),
1038
- }),
1039
- ...(input.SnapshotOptions != null && { SnapshotOptions: se_SnapshotOptions(input.SnapshotOptions, context) }),
1040
- ...(input.VPCOptions != null && { VPCOptions: se_VPCOptions(input.VPCOptions, context) }),
1041
- });
998
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
999
+ AccessPolicies: [],
1000
+ AdvancedOptions: (_) => (0, smithy_client_1._json)(_),
1001
+ AdvancedSecurityOptions: (_) => (0, smithy_client_1._json)(_),
1002
+ AutoTuneOptions: (_) => se_AutoTuneOptions(_, context),
1003
+ CognitoOptions: (_) => (0, smithy_client_1._json)(_),
1004
+ DomainEndpointOptions: (_) => (0, smithy_client_1._json)(_),
1005
+ DryRun: [],
1006
+ EBSOptions: (_) => (0, smithy_client_1._json)(_),
1007
+ ElasticsearchClusterConfig: (_) => (0, smithy_client_1._json)(_),
1008
+ EncryptionAtRestOptions: (_) => (0, smithy_client_1._json)(_),
1009
+ LogPublishingOptions: (_) => (0, smithy_client_1._json)(_),
1010
+ NodeToNodeEncryptionOptions: (_) => (0, smithy_client_1._json)(_),
1011
+ SnapshotOptions: (_) => (0, smithy_client_1._json)(_),
1012
+ VPCOptions: (_) => (0, smithy_client_1._json)(_),
1013
+ }));
1042
1014
  return new protocol_http_1.HttpRequest({
1043
1015
  protocol,
1044
1016
  hostname,
@@ -1057,12 +1029,12 @@ const se_UpdatePackageCommand = async (input, context) => {
1057
1029
  };
1058
1030
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-01-01/packages/update";
1059
1031
  let body;
1060
- body = JSON.stringify({
1061
- ...(input.CommitMessage != null && { CommitMessage: input.CommitMessage }),
1062
- ...(input.PackageDescription != null && { PackageDescription: input.PackageDescription }),
1063
- ...(input.PackageID != null && { PackageID: input.PackageID }),
1064
- ...(input.PackageSource != null && { PackageSource: se_PackageSource(input.PackageSource, context) }),
1065
- });
1032
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1033
+ CommitMessage: [],
1034
+ PackageDescription: [],
1035
+ PackageID: [],
1036
+ PackageSource: (_) => (0, smithy_client_1._json)(_),
1037
+ }));
1066
1038
  return new protocol_http_1.HttpRequest({
1067
1039
  protocol,
1068
1040
  hostname,
@@ -1081,10 +1053,10 @@ const se_UpdateVpcEndpointCommand = async (input, context) => {
1081
1053
  };
1082
1054
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-01-01/es/vpcEndpoints/update";
1083
1055
  let body;
1084
- body = JSON.stringify({
1085
- ...(input.VpcEndpointId != null && { VpcEndpointId: input.VpcEndpointId }),
1086
- ...(input.VpcOptions != null && { VpcOptions: se_VPCOptions(input.VpcOptions, context) }),
1087
- });
1056
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1057
+ VpcEndpointId: [],
1058
+ VpcOptions: (_) => (0, smithy_client_1._json)(_),
1059
+ }));
1088
1060
  return new protocol_http_1.HttpRequest({
1089
1061
  protocol,
1090
1062
  hostname,
@@ -1103,11 +1075,11 @@ const se_UpgradeElasticsearchDomainCommand = async (input, context) => {
1103
1075
  };
1104
1076
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-01-01/es/upgradeDomain";
1105
1077
  let body;
1106
- body = JSON.stringify({
1107
- ...(input.DomainName != null && { DomainName: input.DomainName }),
1108
- ...(input.PerformCheckOnly != null && { PerformCheckOnly: input.PerformCheckOnly }),
1109
- ...(input.TargetVersion != null && { TargetVersion: input.TargetVersion }),
1110
- });
1078
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1079
+ DomainName: [],
1080
+ PerformCheckOnly: [],
1081
+ TargetVersion: [],
1082
+ }));
1111
1083
  return new protocol_http_1.HttpRequest({
1112
1084
  protocol,
1113
1085
  hostname,
@@ -1123,13 +1095,14 @@ const de_AcceptInboundCrossClusterSearchConnectionCommand = async (output, conte
1123
1095
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1124
1096
  return de_AcceptInboundCrossClusterSearchConnectionCommandError(output, context);
1125
1097
  }
1126
- const contents = map({
1098
+ const contents = (0, smithy_client_1.map)({
1127
1099
  $metadata: deserializeMetadata(output),
1128
1100
  });
1129
1101
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1130
- if (data.CrossClusterSearchConnection != null) {
1131
- contents.CrossClusterSearchConnection = de_InboundCrossClusterSearchConnection(data.CrossClusterSearchConnection, context);
1132
- }
1102
+ const doc = (0, smithy_client_1.take)(data, {
1103
+ CrossClusterSearchConnection: smithy_client_1._json,
1104
+ });
1105
+ Object.assign(contents, doc);
1133
1106
  return contents;
1134
1107
  };
1135
1108
  exports.de_AcceptInboundCrossClusterSearchConnectionCommand = de_AcceptInboundCrossClusterSearchConnectionCommand;
@@ -1151,10 +1124,9 @@ const de_AcceptInboundCrossClusterSearchConnectionCommandError = async (output,
1151
1124
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1152
1125
  default:
1153
1126
  const parsedBody = parsedOutput.body;
1154
- (0, smithy_client_1.throwDefaultError)({
1127
+ return throwDefaultError({
1155
1128
  output,
1156
1129
  parsedBody,
1157
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
1158
1130
  errorCode,
1159
1131
  });
1160
1132
  }
@@ -1163,7 +1135,7 @@ const de_AddTagsCommand = async (output, context) => {
1163
1135
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1164
1136
  return de_AddTagsCommandError(output, context);
1165
1137
  }
1166
- const contents = map({
1138
+ const contents = (0, smithy_client_1.map)({
1167
1139
  $metadata: deserializeMetadata(output),
1168
1140
  });
1169
1141
  await collectBody(output.body, context);
@@ -1191,10 +1163,9 @@ const de_AddTagsCommandError = async (output, context) => {
1191
1163
  throw await de_ValidationExceptionRes(parsedOutput, context);
1192
1164
  default:
1193
1165
  const parsedBody = parsedOutput.body;
1194
- (0, smithy_client_1.throwDefaultError)({
1166
+ return throwDefaultError({
1195
1167
  output,
1196
1168
  parsedBody,
1197
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
1198
1169
  errorCode,
1199
1170
  });
1200
1171
  }
@@ -1203,13 +1174,14 @@ const de_AssociatePackageCommand = async (output, context) => {
1203
1174
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1204
1175
  return de_AssociatePackageCommandError(output, context);
1205
1176
  }
1206
- const contents = map({
1177
+ const contents = (0, smithy_client_1.map)({
1207
1178
  $metadata: deserializeMetadata(output),
1208
1179
  });
1209
1180
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1210
- if (data.DomainPackageDetails != null) {
1211
- contents.DomainPackageDetails = de_DomainPackageDetails(data.DomainPackageDetails, context);
1212
- }
1181
+ const doc = (0, smithy_client_1.take)(data, {
1182
+ DomainPackageDetails: (_) => de_DomainPackageDetails(_, context),
1183
+ });
1184
+ Object.assign(contents, doc);
1213
1185
  return contents;
1214
1186
  };
1215
1187
  exports.de_AssociatePackageCommand = de_AssociatePackageCommand;
@@ -1240,10 +1212,9 @@ const de_AssociatePackageCommandError = async (output, context) => {
1240
1212
  throw await de_ValidationExceptionRes(parsedOutput, context);
1241
1213
  default:
1242
1214
  const parsedBody = parsedOutput.body;
1243
- (0, smithy_client_1.throwDefaultError)({
1215
+ return throwDefaultError({
1244
1216
  output,
1245
1217
  parsedBody,
1246
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
1247
1218
  errorCode,
1248
1219
  });
1249
1220
  }
@@ -1252,13 +1223,14 @@ const de_AuthorizeVpcEndpointAccessCommand = async (output, context) => {
1252
1223
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1253
1224
  return de_AuthorizeVpcEndpointAccessCommandError(output, context);
1254
1225
  }
1255
- const contents = map({
1226
+ const contents = (0, smithy_client_1.map)({
1256
1227
  $metadata: deserializeMetadata(output),
1257
1228
  });
1258
1229
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1259
- if (data.AuthorizedPrincipal != null) {
1260
- contents.AuthorizedPrincipal = de_AuthorizedPrincipal(data.AuthorizedPrincipal, context);
1261
- }
1230
+ const doc = (0, smithy_client_1.take)(data, {
1231
+ AuthorizedPrincipal: smithy_client_1._json,
1232
+ });
1233
+ Object.assign(contents, doc);
1262
1234
  return contents;
1263
1235
  };
1264
1236
  exports.de_AuthorizeVpcEndpointAccessCommand = de_AuthorizeVpcEndpointAccessCommand;
@@ -1289,10 +1261,9 @@ const de_AuthorizeVpcEndpointAccessCommandError = async (output, context) => {
1289
1261
  throw await de_ValidationExceptionRes(parsedOutput, context);
1290
1262
  default:
1291
1263
  const parsedBody = parsedOutput.body;
1292
- (0, smithy_client_1.throwDefaultError)({
1264
+ return throwDefaultError({
1293
1265
  output,
1294
1266
  parsedBody,
1295
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
1296
1267
  errorCode,
1297
1268
  });
1298
1269
  }
@@ -1301,13 +1272,14 @@ const de_CancelElasticsearchServiceSoftwareUpdateCommand = async (output, contex
1301
1272
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1302
1273
  return de_CancelElasticsearchServiceSoftwareUpdateCommandError(output, context);
1303
1274
  }
1304
- const contents = map({
1275
+ const contents = (0, smithy_client_1.map)({
1305
1276
  $metadata: deserializeMetadata(output),
1306
1277
  });
1307
1278
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1308
- if (data.ServiceSoftwareOptions != null) {
1309
- contents.ServiceSoftwareOptions = de_ServiceSoftwareOptions(data.ServiceSoftwareOptions, context);
1310
- }
1279
+ const doc = (0, smithy_client_1.take)(data, {
1280
+ ServiceSoftwareOptions: (_) => de_ServiceSoftwareOptions(_, context),
1281
+ });
1282
+ Object.assign(contents, doc);
1311
1283
  return contents;
1312
1284
  };
1313
1285
  exports.de_CancelElasticsearchServiceSoftwareUpdateCommand = de_CancelElasticsearchServiceSoftwareUpdateCommand;
@@ -1332,10 +1304,9 @@ const de_CancelElasticsearchServiceSoftwareUpdateCommandError = async (output, c
1332
1304
  throw await de_ValidationExceptionRes(parsedOutput, context);
1333
1305
  default:
1334
1306
  const parsedBody = parsedOutput.body;
1335
- (0, smithy_client_1.throwDefaultError)({
1307
+ return throwDefaultError({
1336
1308
  output,
1337
1309
  parsedBody,
1338
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
1339
1310
  errorCode,
1340
1311
  });
1341
1312
  }
@@ -1344,13 +1315,14 @@ const de_CreateElasticsearchDomainCommand = async (output, context) => {
1344
1315
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1345
1316
  return de_CreateElasticsearchDomainCommandError(output, context);
1346
1317
  }
1347
- const contents = map({
1318
+ const contents = (0, smithy_client_1.map)({
1348
1319
  $metadata: deserializeMetadata(output),
1349
1320
  });
1350
1321
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1351
- if (data.DomainStatus != null) {
1352
- contents.DomainStatus = de_ElasticsearchDomainStatus(data.DomainStatus, context);
1353
- }
1322
+ const doc = (0, smithy_client_1.take)(data, {
1323
+ DomainStatus: (_) => de_ElasticsearchDomainStatus(_, context),
1324
+ });
1325
+ Object.assign(contents, doc);
1354
1326
  return contents;
1355
1327
  };
1356
1328
  exports.de_CreateElasticsearchDomainCommand = de_CreateElasticsearchDomainCommand;
@@ -1384,10 +1356,9 @@ const de_CreateElasticsearchDomainCommandError = async (output, context) => {
1384
1356
  throw await de_ValidationExceptionRes(parsedOutput, context);
1385
1357
  default:
1386
1358
  const parsedBody = parsedOutput.body;
1387
- (0, smithy_client_1.throwDefaultError)({
1359
+ return throwDefaultError({
1388
1360
  output,
1389
1361
  parsedBody,
1390
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
1391
1362
  errorCode,
1392
1363
  });
1393
1364
  }
@@ -1396,25 +1367,18 @@ const de_CreateOutboundCrossClusterSearchConnectionCommand = async (output, cont
1396
1367
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1397
1368
  return de_CreateOutboundCrossClusterSearchConnectionCommandError(output, context);
1398
1369
  }
1399
- const contents = map({
1370
+ const contents = (0, smithy_client_1.map)({
1400
1371
  $metadata: deserializeMetadata(output),
1401
1372
  });
1402
1373
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1403
- if (data.ConnectionAlias != null) {
1404
- contents.ConnectionAlias = (0, smithy_client_1.expectString)(data.ConnectionAlias);
1405
- }
1406
- if (data.ConnectionStatus != null) {
1407
- contents.ConnectionStatus = de_OutboundCrossClusterSearchConnectionStatus(data.ConnectionStatus, context);
1408
- }
1409
- if (data.CrossClusterSearchConnectionId != null) {
1410
- contents.CrossClusterSearchConnectionId = (0, smithy_client_1.expectString)(data.CrossClusterSearchConnectionId);
1411
- }
1412
- if (data.DestinationDomainInfo != null) {
1413
- contents.DestinationDomainInfo = de_DomainInformation(data.DestinationDomainInfo, context);
1414
- }
1415
- if (data.SourceDomainInfo != null) {
1416
- contents.SourceDomainInfo = de_DomainInformation(data.SourceDomainInfo, context);
1417
- }
1374
+ const doc = (0, smithy_client_1.take)(data, {
1375
+ ConnectionAlias: smithy_client_1.expectString,
1376
+ ConnectionStatus: smithy_client_1._json,
1377
+ CrossClusterSearchConnectionId: smithy_client_1.expectString,
1378
+ DestinationDomainInfo: smithy_client_1._json,
1379
+ SourceDomainInfo: smithy_client_1._json,
1380
+ });
1381
+ Object.assign(contents, doc);
1418
1382
  return contents;
1419
1383
  };
1420
1384
  exports.de_CreateOutboundCrossClusterSearchConnectionCommand = de_CreateOutboundCrossClusterSearchConnectionCommand;
@@ -1439,10 +1403,9 @@ const de_CreateOutboundCrossClusterSearchConnectionCommandError = async (output,
1439
1403
  throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
1440
1404
  default:
1441
1405
  const parsedBody = parsedOutput.body;
1442
- (0, smithy_client_1.throwDefaultError)({
1406
+ return throwDefaultError({
1443
1407
  output,
1444
1408
  parsedBody,
1445
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
1446
1409
  errorCode,
1447
1410
  });
1448
1411
  }
@@ -1451,13 +1414,14 @@ const de_CreatePackageCommand = async (output, context) => {
1451
1414
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1452
1415
  return de_CreatePackageCommandError(output, context);
1453
1416
  }
1454
- const contents = map({
1417
+ const contents = (0, smithy_client_1.map)({
1455
1418
  $metadata: deserializeMetadata(output),
1456
1419
  });
1457
1420
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1458
- if (data.PackageDetails != null) {
1459
- contents.PackageDetails = de_PackageDetails(data.PackageDetails, context);
1460
- }
1421
+ const doc = (0, smithy_client_1.take)(data, {
1422
+ PackageDetails: (_) => de_PackageDetails(_, context),
1423
+ });
1424
+ Object.assign(contents, doc);
1461
1425
  return contents;
1462
1426
  };
1463
1427
  exports.de_CreatePackageCommand = de_CreatePackageCommand;
@@ -1491,10 +1455,9 @@ const de_CreatePackageCommandError = async (output, context) => {
1491
1455
  throw await de_ValidationExceptionRes(parsedOutput, context);
1492
1456
  default:
1493
1457
  const parsedBody = parsedOutput.body;
1494
- (0, smithy_client_1.throwDefaultError)({
1458
+ return throwDefaultError({
1495
1459
  output,
1496
1460
  parsedBody,
1497
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
1498
1461
  errorCode,
1499
1462
  });
1500
1463
  }
@@ -1503,13 +1466,14 @@ const de_CreateVpcEndpointCommand = async (output, context) => {
1503
1466
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1504
1467
  return de_CreateVpcEndpointCommandError(output, context);
1505
1468
  }
1506
- const contents = map({
1469
+ const contents = (0, smithy_client_1.map)({
1507
1470
  $metadata: deserializeMetadata(output),
1508
1471
  });
1509
1472
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1510
- if (data.VpcEndpoint != null) {
1511
- contents.VpcEndpoint = de_VpcEndpoint(data.VpcEndpoint, context);
1512
- }
1473
+ const doc = (0, smithy_client_1.take)(data, {
1474
+ VpcEndpoint: smithy_client_1._json,
1475
+ });
1476
+ Object.assign(contents, doc);
1513
1477
  return contents;
1514
1478
  };
1515
1479
  exports.de_CreateVpcEndpointCommand = de_CreateVpcEndpointCommand;
@@ -1540,10 +1504,9 @@ const de_CreateVpcEndpointCommandError = async (output, context) => {
1540
1504
  throw await de_ValidationExceptionRes(parsedOutput, context);
1541
1505
  default:
1542
1506
  const parsedBody = parsedOutput.body;
1543
- (0, smithy_client_1.throwDefaultError)({
1507
+ return throwDefaultError({
1544
1508
  output,
1545
1509
  parsedBody,
1546
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
1547
1510
  errorCode,
1548
1511
  });
1549
1512
  }
@@ -1552,13 +1515,14 @@ const de_DeleteElasticsearchDomainCommand = async (output, context) => {
1552
1515
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1553
1516
  return de_DeleteElasticsearchDomainCommandError(output, context);
1554
1517
  }
1555
- const contents = map({
1518
+ const contents = (0, smithy_client_1.map)({
1556
1519
  $metadata: deserializeMetadata(output),
1557
1520
  });
1558
1521
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1559
- if (data.DomainStatus != null) {
1560
- contents.DomainStatus = de_ElasticsearchDomainStatus(data.DomainStatus, context);
1561
- }
1522
+ const doc = (0, smithy_client_1.take)(data, {
1523
+ DomainStatus: (_) => de_ElasticsearchDomainStatus(_, context),
1524
+ });
1525
+ Object.assign(contents, doc);
1562
1526
  return contents;
1563
1527
  };
1564
1528
  exports.de_DeleteElasticsearchDomainCommand = de_DeleteElasticsearchDomainCommand;
@@ -1583,10 +1547,9 @@ const de_DeleteElasticsearchDomainCommandError = async (output, context) => {
1583
1547
  throw await de_ValidationExceptionRes(parsedOutput, context);
1584
1548
  default:
1585
1549
  const parsedBody = parsedOutput.body;
1586
- (0, smithy_client_1.throwDefaultError)({
1550
+ return throwDefaultError({
1587
1551
  output,
1588
1552
  parsedBody,
1589
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
1590
1553
  errorCode,
1591
1554
  });
1592
1555
  }
@@ -1595,7 +1558,7 @@ const de_DeleteElasticsearchServiceRoleCommand = async (output, context) => {
1595
1558
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1596
1559
  return de_DeleteElasticsearchServiceRoleCommandError(output, context);
1597
1560
  }
1598
- const contents = map({
1561
+ const contents = (0, smithy_client_1.map)({
1599
1562
  $metadata: deserializeMetadata(output),
1600
1563
  });
1601
1564
  await collectBody(output.body, context);
@@ -1620,10 +1583,9 @@ const de_DeleteElasticsearchServiceRoleCommandError = async (output, context) =>
1620
1583
  throw await de_ValidationExceptionRes(parsedOutput, context);
1621
1584
  default:
1622
1585
  const parsedBody = parsedOutput.body;
1623
- (0, smithy_client_1.throwDefaultError)({
1586
+ return throwDefaultError({
1624
1587
  output,
1625
1588
  parsedBody,
1626
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
1627
1589
  errorCode,
1628
1590
  });
1629
1591
  }
@@ -1632,13 +1594,14 @@ const de_DeleteInboundCrossClusterSearchConnectionCommand = async (output, conte
1632
1594
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1633
1595
  return de_DeleteInboundCrossClusterSearchConnectionCommandError(output, context);
1634
1596
  }
1635
- const contents = map({
1597
+ const contents = (0, smithy_client_1.map)({
1636
1598
  $metadata: deserializeMetadata(output),
1637
1599
  });
1638
1600
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1639
- if (data.CrossClusterSearchConnection != null) {
1640
- contents.CrossClusterSearchConnection = de_InboundCrossClusterSearchConnection(data.CrossClusterSearchConnection, context);
1641
- }
1601
+ const doc = (0, smithy_client_1.take)(data, {
1602
+ CrossClusterSearchConnection: smithy_client_1._json,
1603
+ });
1604
+ Object.assign(contents, doc);
1642
1605
  return contents;
1643
1606
  };
1644
1607
  exports.de_DeleteInboundCrossClusterSearchConnectionCommand = de_DeleteInboundCrossClusterSearchConnectionCommand;
@@ -1657,10 +1620,9 @@ const de_DeleteInboundCrossClusterSearchConnectionCommandError = async (output,
1657
1620
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1658
1621
  default:
1659
1622
  const parsedBody = parsedOutput.body;
1660
- (0, smithy_client_1.throwDefaultError)({
1623
+ return throwDefaultError({
1661
1624
  output,
1662
1625
  parsedBody,
1663
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
1664
1626
  errorCode,
1665
1627
  });
1666
1628
  }
@@ -1669,13 +1631,14 @@ const de_DeleteOutboundCrossClusterSearchConnectionCommand = async (output, cont
1669
1631
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1670
1632
  return de_DeleteOutboundCrossClusterSearchConnectionCommandError(output, context);
1671
1633
  }
1672
- const contents = map({
1634
+ const contents = (0, smithy_client_1.map)({
1673
1635
  $metadata: deserializeMetadata(output),
1674
1636
  });
1675
1637
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1676
- if (data.CrossClusterSearchConnection != null) {
1677
- contents.CrossClusterSearchConnection = de_OutboundCrossClusterSearchConnection(data.CrossClusterSearchConnection, context);
1678
- }
1638
+ const doc = (0, smithy_client_1.take)(data, {
1639
+ CrossClusterSearchConnection: smithy_client_1._json,
1640
+ });
1641
+ Object.assign(contents, doc);
1679
1642
  return contents;
1680
1643
  };
1681
1644
  exports.de_DeleteOutboundCrossClusterSearchConnectionCommand = de_DeleteOutboundCrossClusterSearchConnectionCommand;
@@ -1694,10 +1657,9 @@ const de_DeleteOutboundCrossClusterSearchConnectionCommandError = async (output,
1694
1657
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1695
1658
  default:
1696
1659
  const parsedBody = parsedOutput.body;
1697
- (0, smithy_client_1.throwDefaultError)({
1660
+ return throwDefaultError({
1698
1661
  output,
1699
1662
  parsedBody,
1700
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
1701
1663
  errorCode,
1702
1664
  });
1703
1665
  }
@@ -1706,13 +1668,14 @@ const de_DeletePackageCommand = async (output, context) => {
1706
1668
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1707
1669
  return de_DeletePackageCommandError(output, context);
1708
1670
  }
1709
- const contents = map({
1671
+ const contents = (0, smithy_client_1.map)({
1710
1672
  $metadata: deserializeMetadata(output),
1711
1673
  });
1712
1674
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1713
- if (data.PackageDetails != null) {
1714
- contents.PackageDetails = de_PackageDetails(data.PackageDetails, context);
1715
- }
1675
+ const doc = (0, smithy_client_1.take)(data, {
1676
+ PackageDetails: (_) => de_PackageDetails(_, context),
1677
+ });
1678
+ Object.assign(contents, doc);
1716
1679
  return contents;
1717
1680
  };
1718
1681
  exports.de_DeletePackageCommand = de_DeletePackageCommand;
@@ -1743,10 +1706,9 @@ const de_DeletePackageCommandError = async (output, context) => {
1743
1706
  throw await de_ValidationExceptionRes(parsedOutput, context);
1744
1707
  default:
1745
1708
  const parsedBody = parsedOutput.body;
1746
- (0, smithy_client_1.throwDefaultError)({
1709
+ return throwDefaultError({
1747
1710
  output,
1748
1711
  parsedBody,
1749
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
1750
1712
  errorCode,
1751
1713
  });
1752
1714
  }
@@ -1755,13 +1717,14 @@ const de_DeleteVpcEndpointCommand = async (output, context) => {
1755
1717
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1756
1718
  return de_DeleteVpcEndpointCommandError(output, context);
1757
1719
  }
1758
- const contents = map({
1720
+ const contents = (0, smithy_client_1.map)({
1759
1721
  $metadata: deserializeMetadata(output),
1760
1722
  });
1761
1723
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1762
- if (data.VpcEndpointSummary != null) {
1763
- contents.VpcEndpointSummary = de_VpcEndpointSummary(data.VpcEndpointSummary, context);
1764
- }
1724
+ const doc = (0, smithy_client_1.take)(data, {
1725
+ VpcEndpointSummary: smithy_client_1._json,
1726
+ });
1727
+ Object.assign(contents, doc);
1765
1728
  return contents;
1766
1729
  };
1767
1730
  exports.de_DeleteVpcEndpointCommand = de_DeleteVpcEndpointCommand;
@@ -1786,10 +1749,9 @@ const de_DeleteVpcEndpointCommandError = async (output, context) => {
1786
1749
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1787
1750
  default:
1788
1751
  const parsedBody = parsedOutput.body;
1789
- (0, smithy_client_1.throwDefaultError)({
1752
+ return throwDefaultError({
1790
1753
  output,
1791
1754
  parsedBody,
1792
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
1793
1755
  errorCode,
1794
1756
  });
1795
1757
  }
@@ -1798,16 +1760,15 @@ const de_DescribeDomainAutoTunesCommand = async (output, context) => {
1798
1760
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1799
1761
  return de_DescribeDomainAutoTunesCommandError(output, context);
1800
1762
  }
1801
- const contents = map({
1763
+ const contents = (0, smithy_client_1.map)({
1802
1764
  $metadata: deserializeMetadata(output),
1803
1765
  });
1804
1766
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1805
- if (data.AutoTunes != null) {
1806
- contents.AutoTunes = de_AutoTuneList(data.AutoTunes, context);
1807
- }
1808
- if (data.NextToken != null) {
1809
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
1810
- }
1767
+ const doc = (0, smithy_client_1.take)(data, {
1768
+ AutoTunes: (_) => de_AutoTuneList(_, context),
1769
+ NextToken: smithy_client_1.expectString,
1770
+ });
1771
+ Object.assign(contents, doc);
1811
1772
  return contents;
1812
1773
  };
1813
1774
  exports.de_DescribeDomainAutoTunesCommand = de_DescribeDomainAutoTunesCommand;
@@ -1832,10 +1793,9 @@ const de_DescribeDomainAutoTunesCommandError = async (output, context) => {
1832
1793
  throw await de_ValidationExceptionRes(parsedOutput, context);
1833
1794
  default:
1834
1795
  const parsedBody = parsedOutput.body;
1835
- (0, smithy_client_1.throwDefaultError)({
1796
+ return throwDefaultError({
1836
1797
  output,
1837
1798
  parsedBody,
1838
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
1839
1799
  errorCode,
1840
1800
  });
1841
1801
  }
@@ -1844,13 +1804,14 @@ const de_DescribeDomainChangeProgressCommand = async (output, context) => {
1844
1804
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1845
1805
  return de_DescribeDomainChangeProgressCommandError(output, context);
1846
1806
  }
1847
- const contents = map({
1807
+ const contents = (0, smithy_client_1.map)({
1848
1808
  $metadata: deserializeMetadata(output),
1849
1809
  });
1850
1810
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1851
- if (data.ChangeProgressStatus != null) {
1852
- contents.ChangeProgressStatus = de_ChangeProgressStatusDetails(data.ChangeProgressStatus, context);
1853
- }
1811
+ const doc = (0, smithy_client_1.take)(data, {
1812
+ ChangeProgressStatus: (_) => de_ChangeProgressStatusDetails(_, context),
1813
+ });
1814
+ Object.assign(contents, doc);
1854
1815
  return contents;
1855
1816
  };
1856
1817
  exports.de_DescribeDomainChangeProgressCommand = de_DescribeDomainChangeProgressCommand;
@@ -1875,10 +1836,9 @@ const de_DescribeDomainChangeProgressCommandError = async (output, context) => {
1875
1836
  throw await de_ValidationExceptionRes(parsedOutput, context);
1876
1837
  default:
1877
1838
  const parsedBody = parsedOutput.body;
1878
- (0, smithy_client_1.throwDefaultError)({
1839
+ return throwDefaultError({
1879
1840
  output,
1880
1841
  parsedBody,
1881
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
1882
1842
  errorCode,
1883
1843
  });
1884
1844
  }
@@ -1887,13 +1847,14 @@ const de_DescribeElasticsearchDomainCommand = async (output, context) => {
1887
1847
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1888
1848
  return de_DescribeElasticsearchDomainCommandError(output, context);
1889
1849
  }
1890
- const contents = map({
1850
+ const contents = (0, smithy_client_1.map)({
1891
1851
  $metadata: deserializeMetadata(output),
1892
1852
  });
1893
1853
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1894
- if (data.DomainStatus != null) {
1895
- contents.DomainStatus = de_ElasticsearchDomainStatus(data.DomainStatus, context);
1896
- }
1854
+ const doc = (0, smithy_client_1.take)(data, {
1855
+ DomainStatus: (_) => de_ElasticsearchDomainStatus(_, context),
1856
+ });
1857
+ Object.assign(contents, doc);
1897
1858
  return contents;
1898
1859
  };
1899
1860
  exports.de_DescribeElasticsearchDomainCommand = de_DescribeElasticsearchDomainCommand;
@@ -1918,10 +1879,9 @@ const de_DescribeElasticsearchDomainCommandError = async (output, context) => {
1918
1879
  throw await de_ValidationExceptionRes(parsedOutput, context);
1919
1880
  default:
1920
1881
  const parsedBody = parsedOutput.body;
1921
- (0, smithy_client_1.throwDefaultError)({
1882
+ return throwDefaultError({
1922
1883
  output,
1923
1884
  parsedBody,
1924
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
1925
1885
  errorCode,
1926
1886
  });
1927
1887
  }
@@ -1930,13 +1890,14 @@ const de_DescribeElasticsearchDomainConfigCommand = async (output, context) => {
1930
1890
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1931
1891
  return de_DescribeElasticsearchDomainConfigCommandError(output, context);
1932
1892
  }
1933
- const contents = map({
1893
+ const contents = (0, smithy_client_1.map)({
1934
1894
  $metadata: deserializeMetadata(output),
1935
1895
  });
1936
1896
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1937
- if (data.DomainConfig != null) {
1938
- contents.DomainConfig = de_ElasticsearchDomainConfig(data.DomainConfig, context);
1939
- }
1897
+ const doc = (0, smithy_client_1.take)(data, {
1898
+ DomainConfig: (_) => de_ElasticsearchDomainConfig(_, context),
1899
+ });
1900
+ Object.assign(contents, doc);
1940
1901
  return contents;
1941
1902
  };
1942
1903
  exports.de_DescribeElasticsearchDomainConfigCommand = de_DescribeElasticsearchDomainConfigCommand;
@@ -1961,10 +1922,9 @@ const de_DescribeElasticsearchDomainConfigCommandError = async (output, context)
1961
1922
  throw await de_ValidationExceptionRes(parsedOutput, context);
1962
1923
  default:
1963
1924
  const parsedBody = parsedOutput.body;
1964
- (0, smithy_client_1.throwDefaultError)({
1925
+ return throwDefaultError({
1965
1926
  output,
1966
1927
  parsedBody,
1967
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
1968
1928
  errorCode,
1969
1929
  });
1970
1930
  }
@@ -1973,13 +1933,14 @@ const de_DescribeElasticsearchDomainsCommand = async (output, context) => {
1973
1933
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1974
1934
  return de_DescribeElasticsearchDomainsCommandError(output, context);
1975
1935
  }
1976
- const contents = map({
1936
+ const contents = (0, smithy_client_1.map)({
1977
1937
  $metadata: deserializeMetadata(output),
1978
1938
  });
1979
1939
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1980
- if (data.DomainStatusList != null) {
1981
- contents.DomainStatusList = de_ElasticsearchDomainStatusList(data.DomainStatusList, context);
1982
- }
1940
+ const doc = (0, smithy_client_1.take)(data, {
1941
+ DomainStatusList: (_) => de_ElasticsearchDomainStatusList(_, context),
1942
+ });
1943
+ Object.assign(contents, doc);
1983
1944
  return contents;
1984
1945
  };
1985
1946
  exports.de_DescribeElasticsearchDomainsCommand = de_DescribeElasticsearchDomainsCommand;
@@ -2001,10 +1962,9 @@ const de_DescribeElasticsearchDomainsCommandError = async (output, context) => {
2001
1962
  throw await de_ValidationExceptionRes(parsedOutput, context);
2002
1963
  default:
2003
1964
  const parsedBody = parsedOutput.body;
2004
- (0, smithy_client_1.throwDefaultError)({
1965
+ return throwDefaultError({
2005
1966
  output,
2006
1967
  parsedBody,
2007
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
2008
1968
  errorCode,
2009
1969
  });
2010
1970
  }
@@ -2013,13 +1973,14 @@ const de_DescribeElasticsearchInstanceTypeLimitsCommand = async (output, context
2013
1973
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2014
1974
  return de_DescribeElasticsearchInstanceTypeLimitsCommandError(output, context);
2015
1975
  }
2016
- const contents = map({
1976
+ const contents = (0, smithy_client_1.map)({
2017
1977
  $metadata: deserializeMetadata(output),
2018
1978
  });
2019
1979
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2020
- if (data.LimitsByRole != null) {
2021
- contents.LimitsByRole = de_LimitsByRole(data.LimitsByRole, context);
2022
- }
1980
+ const doc = (0, smithy_client_1.take)(data, {
1981
+ LimitsByRole: smithy_client_1._json,
1982
+ });
1983
+ Object.assign(contents, doc);
2023
1984
  return contents;
2024
1985
  };
2025
1986
  exports.de_DescribeElasticsearchInstanceTypeLimitsCommand = de_DescribeElasticsearchInstanceTypeLimitsCommand;
@@ -2050,10 +2011,9 @@ const de_DescribeElasticsearchInstanceTypeLimitsCommandError = async (output, co
2050
2011
  throw await de_ValidationExceptionRes(parsedOutput, context);
2051
2012
  default:
2052
2013
  const parsedBody = parsedOutput.body;
2053
- (0, smithy_client_1.throwDefaultError)({
2014
+ return throwDefaultError({
2054
2015
  output,
2055
2016
  parsedBody,
2056
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
2057
2017
  errorCode,
2058
2018
  });
2059
2019
  }
@@ -2062,16 +2022,15 @@ const de_DescribeInboundCrossClusterSearchConnectionsCommand = async (output, co
2062
2022
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2063
2023
  return de_DescribeInboundCrossClusterSearchConnectionsCommandError(output, context);
2064
2024
  }
2065
- const contents = map({
2025
+ const contents = (0, smithy_client_1.map)({
2066
2026
  $metadata: deserializeMetadata(output),
2067
2027
  });
2068
2028
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2069
- if (data.CrossClusterSearchConnections != null) {
2070
- contents.CrossClusterSearchConnections = de_InboundCrossClusterSearchConnections(data.CrossClusterSearchConnections, context);
2071
- }
2072
- if (data.NextToken != null) {
2073
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2074
- }
2029
+ const doc = (0, smithy_client_1.take)(data, {
2030
+ CrossClusterSearchConnections: smithy_client_1._json,
2031
+ NextToken: smithy_client_1.expectString,
2032
+ });
2033
+ Object.assign(contents, doc);
2075
2034
  return contents;
2076
2035
  };
2077
2036
  exports.de_DescribeInboundCrossClusterSearchConnectionsCommand = de_DescribeInboundCrossClusterSearchConnectionsCommand;
@@ -2090,10 +2049,9 @@ const de_DescribeInboundCrossClusterSearchConnectionsCommandError = async (outpu
2090
2049
  throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
2091
2050
  default:
2092
2051
  const parsedBody = parsedOutput.body;
2093
- (0, smithy_client_1.throwDefaultError)({
2052
+ return throwDefaultError({
2094
2053
  output,
2095
2054
  parsedBody,
2096
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
2097
2055
  errorCode,
2098
2056
  });
2099
2057
  }
@@ -2102,16 +2060,15 @@ const de_DescribeOutboundCrossClusterSearchConnectionsCommand = async (output, c
2102
2060
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2103
2061
  return de_DescribeOutboundCrossClusterSearchConnectionsCommandError(output, context);
2104
2062
  }
2105
- const contents = map({
2063
+ const contents = (0, smithy_client_1.map)({
2106
2064
  $metadata: deserializeMetadata(output),
2107
2065
  });
2108
2066
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2109
- if (data.CrossClusterSearchConnections != null) {
2110
- contents.CrossClusterSearchConnections = de_OutboundCrossClusterSearchConnections(data.CrossClusterSearchConnections, context);
2111
- }
2112
- if (data.NextToken != null) {
2113
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2114
- }
2067
+ const doc = (0, smithy_client_1.take)(data, {
2068
+ CrossClusterSearchConnections: smithy_client_1._json,
2069
+ NextToken: smithy_client_1.expectString,
2070
+ });
2071
+ Object.assign(contents, doc);
2115
2072
  return contents;
2116
2073
  };
2117
2074
  exports.de_DescribeOutboundCrossClusterSearchConnectionsCommand = de_DescribeOutboundCrossClusterSearchConnectionsCommand;
@@ -2130,10 +2087,9 @@ const de_DescribeOutboundCrossClusterSearchConnectionsCommandError = async (outp
2130
2087
  throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
2131
2088
  default:
2132
2089
  const parsedBody = parsedOutput.body;
2133
- (0, smithy_client_1.throwDefaultError)({
2090
+ return throwDefaultError({
2134
2091
  output,
2135
2092
  parsedBody,
2136
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
2137
2093
  errorCode,
2138
2094
  });
2139
2095
  }
@@ -2142,16 +2098,15 @@ const de_DescribePackagesCommand = async (output, context) => {
2142
2098
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2143
2099
  return de_DescribePackagesCommandError(output, context);
2144
2100
  }
2145
- const contents = map({
2101
+ const contents = (0, smithy_client_1.map)({
2146
2102
  $metadata: deserializeMetadata(output),
2147
2103
  });
2148
2104
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2149
- if (data.NextToken != null) {
2150
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2151
- }
2152
- if (data.PackageDetailsList != null) {
2153
- contents.PackageDetailsList = de_PackageDetailsList(data.PackageDetailsList, context);
2154
- }
2105
+ const doc = (0, smithy_client_1.take)(data, {
2106
+ NextToken: smithy_client_1.expectString,
2107
+ PackageDetailsList: (_) => de_PackageDetailsList(_, context),
2108
+ });
2109
+ Object.assign(contents, doc);
2155
2110
  return contents;
2156
2111
  };
2157
2112
  exports.de_DescribePackagesCommand = de_DescribePackagesCommand;
@@ -2179,10 +2134,9 @@ const de_DescribePackagesCommandError = async (output, context) => {
2179
2134
  throw await de_ValidationExceptionRes(parsedOutput, context);
2180
2135
  default:
2181
2136
  const parsedBody = parsedOutput.body;
2182
- (0, smithy_client_1.throwDefaultError)({
2137
+ return throwDefaultError({
2183
2138
  output,
2184
2139
  parsedBody,
2185
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
2186
2140
  errorCode,
2187
2141
  });
2188
2142
  }
@@ -2191,16 +2145,15 @@ const de_DescribeReservedElasticsearchInstanceOfferingsCommand = async (output,
2191
2145
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2192
2146
  return de_DescribeReservedElasticsearchInstanceOfferingsCommandError(output, context);
2193
2147
  }
2194
- const contents = map({
2148
+ const contents = (0, smithy_client_1.map)({
2195
2149
  $metadata: deserializeMetadata(output),
2196
2150
  });
2197
2151
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2198
- if (data.NextToken != null) {
2199
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2200
- }
2201
- if (data.ReservedElasticsearchInstanceOfferings != null) {
2202
- contents.ReservedElasticsearchInstanceOfferings = de_ReservedElasticsearchInstanceOfferingList(data.ReservedElasticsearchInstanceOfferings, context);
2203
- }
2152
+ const doc = (0, smithy_client_1.take)(data, {
2153
+ NextToken: smithy_client_1.expectString,
2154
+ ReservedElasticsearchInstanceOfferings: (_) => de_ReservedElasticsearchInstanceOfferingList(_, context),
2155
+ });
2156
+ Object.assign(contents, doc);
2204
2157
  return contents;
2205
2158
  };
2206
2159
  exports.de_DescribeReservedElasticsearchInstanceOfferingsCommand = de_DescribeReservedElasticsearchInstanceOfferingsCommand;
@@ -2225,10 +2178,9 @@ const de_DescribeReservedElasticsearchInstanceOfferingsCommandError = async (out
2225
2178
  throw await de_ValidationExceptionRes(parsedOutput, context);
2226
2179
  default:
2227
2180
  const parsedBody = parsedOutput.body;
2228
- (0, smithy_client_1.throwDefaultError)({
2181
+ return throwDefaultError({
2229
2182
  output,
2230
2183
  parsedBody,
2231
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
2232
2184
  errorCode,
2233
2185
  });
2234
2186
  }
@@ -2237,16 +2189,15 @@ const de_DescribeReservedElasticsearchInstancesCommand = async (output, context)
2237
2189
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2238
2190
  return de_DescribeReservedElasticsearchInstancesCommandError(output, context);
2239
2191
  }
2240
- const contents = map({
2192
+ const contents = (0, smithy_client_1.map)({
2241
2193
  $metadata: deserializeMetadata(output),
2242
2194
  });
2243
2195
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2244
- if (data.NextToken != null) {
2245
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2246
- }
2247
- if (data.ReservedElasticsearchInstances != null) {
2248
- contents.ReservedElasticsearchInstances = de_ReservedElasticsearchInstanceList(data.ReservedElasticsearchInstances, context);
2249
- }
2196
+ const doc = (0, smithy_client_1.take)(data, {
2197
+ NextToken: smithy_client_1.expectString,
2198
+ ReservedElasticsearchInstances: (_) => de_ReservedElasticsearchInstanceList(_, context),
2199
+ });
2200
+ Object.assign(contents, doc);
2250
2201
  return contents;
2251
2202
  };
2252
2203
  exports.de_DescribeReservedElasticsearchInstancesCommand = de_DescribeReservedElasticsearchInstancesCommand;
@@ -2271,10 +2222,9 @@ const de_DescribeReservedElasticsearchInstancesCommandError = async (output, con
2271
2222
  throw await de_ValidationExceptionRes(parsedOutput, context);
2272
2223
  default:
2273
2224
  const parsedBody = parsedOutput.body;
2274
- (0, smithy_client_1.throwDefaultError)({
2225
+ return throwDefaultError({
2275
2226
  output,
2276
2227
  parsedBody,
2277
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
2278
2228
  errorCode,
2279
2229
  });
2280
2230
  }
@@ -2283,16 +2233,15 @@ const de_DescribeVpcEndpointsCommand = async (output, context) => {
2283
2233
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2284
2234
  return de_DescribeVpcEndpointsCommandError(output, context);
2285
2235
  }
2286
- const contents = map({
2236
+ const contents = (0, smithy_client_1.map)({
2287
2237
  $metadata: deserializeMetadata(output),
2288
2238
  });
2289
2239
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2290
- if (data.VpcEndpointErrors != null) {
2291
- contents.VpcEndpointErrors = de_VpcEndpointErrorList(data.VpcEndpointErrors, context);
2292
- }
2293
- if (data.VpcEndpoints != null) {
2294
- contents.VpcEndpoints = de_VpcEndpoints(data.VpcEndpoints, context);
2295
- }
2240
+ const doc = (0, smithy_client_1.take)(data, {
2241
+ VpcEndpointErrors: smithy_client_1._json,
2242
+ VpcEndpoints: smithy_client_1._json,
2243
+ });
2244
+ Object.assign(contents, doc);
2296
2245
  return contents;
2297
2246
  };
2298
2247
  exports.de_DescribeVpcEndpointsCommand = de_DescribeVpcEndpointsCommand;
@@ -2317,10 +2266,9 @@ const de_DescribeVpcEndpointsCommandError = async (output, context) => {
2317
2266
  throw await de_ValidationExceptionRes(parsedOutput, context);
2318
2267
  default:
2319
2268
  const parsedBody = parsedOutput.body;
2320
- (0, smithy_client_1.throwDefaultError)({
2269
+ return throwDefaultError({
2321
2270
  output,
2322
2271
  parsedBody,
2323
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
2324
2272
  errorCode,
2325
2273
  });
2326
2274
  }
@@ -2329,13 +2277,14 @@ const de_DissociatePackageCommand = async (output, context) => {
2329
2277
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2330
2278
  return de_DissociatePackageCommandError(output, context);
2331
2279
  }
2332
- const contents = map({
2280
+ const contents = (0, smithy_client_1.map)({
2333
2281
  $metadata: deserializeMetadata(output),
2334
2282
  });
2335
2283
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2336
- if (data.DomainPackageDetails != null) {
2337
- contents.DomainPackageDetails = de_DomainPackageDetails(data.DomainPackageDetails, context);
2338
- }
2284
+ const doc = (0, smithy_client_1.take)(data, {
2285
+ DomainPackageDetails: (_) => de_DomainPackageDetails(_, context),
2286
+ });
2287
+ Object.assign(contents, doc);
2339
2288
  return contents;
2340
2289
  };
2341
2290
  exports.de_DissociatePackageCommand = de_DissociatePackageCommand;
@@ -2366,10 +2315,9 @@ const de_DissociatePackageCommandError = async (output, context) => {
2366
2315
  throw await de_ValidationExceptionRes(parsedOutput, context);
2367
2316
  default:
2368
2317
  const parsedBody = parsedOutput.body;
2369
- (0, smithy_client_1.throwDefaultError)({
2318
+ return throwDefaultError({
2370
2319
  output,
2371
2320
  parsedBody,
2372
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
2373
2321
  errorCode,
2374
2322
  });
2375
2323
  }
@@ -2378,13 +2326,14 @@ const de_GetCompatibleElasticsearchVersionsCommand = async (output, context) =>
2378
2326
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2379
2327
  return de_GetCompatibleElasticsearchVersionsCommandError(output, context);
2380
2328
  }
2381
- const contents = map({
2329
+ const contents = (0, smithy_client_1.map)({
2382
2330
  $metadata: deserializeMetadata(output),
2383
2331
  });
2384
2332
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2385
- if (data.CompatibleElasticsearchVersions != null) {
2386
- contents.CompatibleElasticsearchVersions = de_CompatibleElasticsearchVersionsList(data.CompatibleElasticsearchVersions, context);
2387
- }
2333
+ const doc = (0, smithy_client_1.take)(data, {
2334
+ CompatibleElasticsearchVersions: smithy_client_1._json,
2335
+ });
2336
+ Object.assign(contents, doc);
2388
2337
  return contents;
2389
2338
  };
2390
2339
  exports.de_GetCompatibleElasticsearchVersionsCommand = de_GetCompatibleElasticsearchVersionsCommand;
@@ -2412,10 +2361,9 @@ const de_GetCompatibleElasticsearchVersionsCommandError = async (output, context
2412
2361
  throw await de_ValidationExceptionRes(parsedOutput, context);
2413
2362
  default:
2414
2363
  const parsedBody = parsedOutput.body;
2415
- (0, smithy_client_1.throwDefaultError)({
2364
+ return throwDefaultError({
2416
2365
  output,
2417
2366
  parsedBody,
2418
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
2419
2367
  errorCode,
2420
2368
  });
2421
2369
  }
@@ -2424,19 +2372,16 @@ const de_GetPackageVersionHistoryCommand = async (output, context) => {
2424
2372
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2425
2373
  return de_GetPackageVersionHistoryCommandError(output, context);
2426
2374
  }
2427
- const contents = map({
2375
+ const contents = (0, smithy_client_1.map)({
2428
2376
  $metadata: deserializeMetadata(output),
2429
2377
  });
2430
2378
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2431
- if (data.NextToken != null) {
2432
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2433
- }
2434
- if (data.PackageID != null) {
2435
- contents.PackageID = (0, smithy_client_1.expectString)(data.PackageID);
2436
- }
2437
- if (data.PackageVersionHistoryList != null) {
2438
- contents.PackageVersionHistoryList = de_PackageVersionHistoryList(data.PackageVersionHistoryList, context);
2439
- }
2379
+ const doc = (0, smithy_client_1.take)(data, {
2380
+ NextToken: smithy_client_1.expectString,
2381
+ PackageID: smithy_client_1.expectString,
2382
+ PackageVersionHistoryList: (_) => de_PackageVersionHistoryList(_, context),
2383
+ });
2384
+ Object.assign(contents, doc);
2440
2385
  return contents;
2441
2386
  };
2442
2387
  exports.de_GetPackageVersionHistoryCommand = de_GetPackageVersionHistoryCommand;
@@ -2464,10 +2409,9 @@ const de_GetPackageVersionHistoryCommandError = async (output, context) => {
2464
2409
  throw await de_ValidationExceptionRes(parsedOutput, context);
2465
2410
  default:
2466
2411
  const parsedBody = parsedOutput.body;
2467
- (0, smithy_client_1.throwDefaultError)({
2412
+ return throwDefaultError({
2468
2413
  output,
2469
2414
  parsedBody,
2470
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
2471
2415
  errorCode,
2472
2416
  });
2473
2417
  }
@@ -2476,16 +2420,15 @@ const de_GetUpgradeHistoryCommand = async (output, context) => {
2476
2420
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2477
2421
  return de_GetUpgradeHistoryCommandError(output, context);
2478
2422
  }
2479
- const contents = map({
2423
+ const contents = (0, smithy_client_1.map)({
2480
2424
  $metadata: deserializeMetadata(output),
2481
2425
  });
2482
2426
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2483
- if (data.NextToken != null) {
2484
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2485
- }
2486
- if (data.UpgradeHistories != null) {
2487
- contents.UpgradeHistories = de_UpgradeHistoryList(data.UpgradeHistories, context);
2488
- }
2427
+ const doc = (0, smithy_client_1.take)(data, {
2428
+ NextToken: smithy_client_1.expectString,
2429
+ UpgradeHistories: (_) => de_UpgradeHistoryList(_, context),
2430
+ });
2431
+ Object.assign(contents, doc);
2489
2432
  return contents;
2490
2433
  };
2491
2434
  exports.de_GetUpgradeHistoryCommand = de_GetUpgradeHistoryCommand;
@@ -2513,10 +2456,9 @@ const de_GetUpgradeHistoryCommandError = async (output, context) => {
2513
2456
  throw await de_ValidationExceptionRes(parsedOutput, context);
2514
2457
  default:
2515
2458
  const parsedBody = parsedOutput.body;
2516
- (0, smithy_client_1.throwDefaultError)({
2459
+ return throwDefaultError({
2517
2460
  output,
2518
2461
  parsedBody,
2519
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
2520
2462
  errorCode,
2521
2463
  });
2522
2464
  }
@@ -2525,19 +2467,16 @@ const de_GetUpgradeStatusCommand = async (output, context) => {
2525
2467
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2526
2468
  return de_GetUpgradeStatusCommandError(output, context);
2527
2469
  }
2528
- const contents = map({
2470
+ const contents = (0, smithy_client_1.map)({
2529
2471
  $metadata: deserializeMetadata(output),
2530
2472
  });
2531
2473
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2532
- if (data.StepStatus != null) {
2533
- contents.StepStatus = (0, smithy_client_1.expectString)(data.StepStatus);
2534
- }
2535
- if (data.UpgradeName != null) {
2536
- contents.UpgradeName = (0, smithy_client_1.expectString)(data.UpgradeName);
2537
- }
2538
- if (data.UpgradeStep != null) {
2539
- contents.UpgradeStep = (0, smithy_client_1.expectString)(data.UpgradeStep);
2540
- }
2474
+ const doc = (0, smithy_client_1.take)(data, {
2475
+ StepStatus: smithy_client_1.expectString,
2476
+ UpgradeName: smithy_client_1.expectString,
2477
+ UpgradeStep: smithy_client_1.expectString,
2478
+ });
2479
+ Object.assign(contents, doc);
2541
2480
  return contents;
2542
2481
  };
2543
2482
  exports.de_GetUpgradeStatusCommand = de_GetUpgradeStatusCommand;
@@ -2565,10 +2504,9 @@ const de_GetUpgradeStatusCommandError = async (output, context) => {
2565
2504
  throw await de_ValidationExceptionRes(parsedOutput, context);
2566
2505
  default:
2567
2506
  const parsedBody = parsedOutput.body;
2568
- (0, smithy_client_1.throwDefaultError)({
2507
+ return throwDefaultError({
2569
2508
  output,
2570
2509
  parsedBody,
2571
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
2572
2510
  errorCode,
2573
2511
  });
2574
2512
  }
@@ -2577,13 +2515,14 @@ const de_ListDomainNamesCommand = async (output, context) => {
2577
2515
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2578
2516
  return de_ListDomainNamesCommandError(output, context);
2579
2517
  }
2580
- const contents = map({
2518
+ const contents = (0, smithy_client_1.map)({
2581
2519
  $metadata: deserializeMetadata(output),
2582
2520
  });
2583
2521
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2584
- if (data.DomainNames != null) {
2585
- contents.DomainNames = de_DomainInfoList(data.DomainNames, context);
2586
- }
2522
+ const doc = (0, smithy_client_1.take)(data, {
2523
+ DomainNames: smithy_client_1._json,
2524
+ });
2525
+ Object.assign(contents, doc);
2587
2526
  return contents;
2588
2527
  };
2589
2528
  exports.de_ListDomainNamesCommand = de_ListDomainNamesCommand;
@@ -2602,10 +2541,9 @@ const de_ListDomainNamesCommandError = async (output, context) => {
2602
2541
  throw await de_ValidationExceptionRes(parsedOutput, context);
2603
2542
  default:
2604
2543
  const parsedBody = parsedOutput.body;
2605
- (0, smithy_client_1.throwDefaultError)({
2544
+ return throwDefaultError({
2606
2545
  output,
2607
2546
  parsedBody,
2608
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
2609
2547
  errorCode,
2610
2548
  });
2611
2549
  }
@@ -2614,16 +2552,15 @@ const de_ListDomainsForPackageCommand = async (output, context) => {
2614
2552
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2615
2553
  return de_ListDomainsForPackageCommandError(output, context);
2616
2554
  }
2617
- const contents = map({
2555
+ const contents = (0, smithy_client_1.map)({
2618
2556
  $metadata: deserializeMetadata(output),
2619
2557
  });
2620
2558
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2621
- if (data.DomainPackageDetailsList != null) {
2622
- contents.DomainPackageDetailsList = de_DomainPackageDetailsList(data.DomainPackageDetailsList, context);
2623
- }
2624
- if (data.NextToken != null) {
2625
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2626
- }
2559
+ const doc = (0, smithy_client_1.take)(data, {
2560
+ DomainPackageDetailsList: (_) => de_DomainPackageDetailsList(_, context),
2561
+ NextToken: smithy_client_1.expectString,
2562
+ });
2563
+ Object.assign(contents, doc);
2627
2564
  return contents;
2628
2565
  };
2629
2566
  exports.de_ListDomainsForPackageCommand = de_ListDomainsForPackageCommand;
@@ -2651,10 +2588,9 @@ const de_ListDomainsForPackageCommandError = async (output, context) => {
2651
2588
  throw await de_ValidationExceptionRes(parsedOutput, context);
2652
2589
  default:
2653
2590
  const parsedBody = parsedOutput.body;
2654
- (0, smithy_client_1.throwDefaultError)({
2591
+ return throwDefaultError({
2655
2592
  output,
2656
2593
  parsedBody,
2657
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
2658
2594
  errorCode,
2659
2595
  });
2660
2596
  }
@@ -2663,16 +2599,15 @@ const de_ListElasticsearchInstanceTypesCommand = async (output, context) => {
2663
2599
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2664
2600
  return de_ListElasticsearchInstanceTypesCommandError(output, context);
2665
2601
  }
2666
- const contents = map({
2602
+ const contents = (0, smithy_client_1.map)({
2667
2603
  $metadata: deserializeMetadata(output),
2668
2604
  });
2669
2605
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2670
- if (data.ElasticsearchInstanceTypes != null) {
2671
- contents.ElasticsearchInstanceTypes = de_ElasticsearchInstanceTypeList(data.ElasticsearchInstanceTypes, context);
2672
- }
2673
- if (data.NextToken != null) {
2674
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2675
- }
2606
+ const doc = (0, smithy_client_1.take)(data, {
2607
+ ElasticsearchInstanceTypes: smithy_client_1._json,
2608
+ NextToken: smithy_client_1.expectString,
2609
+ });
2610
+ Object.assign(contents, doc);
2676
2611
  return contents;
2677
2612
  };
2678
2613
  exports.de_ListElasticsearchInstanceTypesCommand = de_ListElasticsearchInstanceTypesCommand;
@@ -2697,10 +2632,9 @@ const de_ListElasticsearchInstanceTypesCommandError = async (output, context) =>
2697
2632
  throw await de_ValidationExceptionRes(parsedOutput, context);
2698
2633
  default:
2699
2634
  const parsedBody = parsedOutput.body;
2700
- (0, smithy_client_1.throwDefaultError)({
2635
+ return throwDefaultError({
2701
2636
  output,
2702
2637
  parsedBody,
2703
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
2704
2638
  errorCode,
2705
2639
  });
2706
2640
  }
@@ -2709,16 +2643,15 @@ const de_ListElasticsearchVersionsCommand = async (output, context) => {
2709
2643
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2710
2644
  return de_ListElasticsearchVersionsCommandError(output, context);
2711
2645
  }
2712
- const contents = map({
2646
+ const contents = (0, smithy_client_1.map)({
2713
2647
  $metadata: deserializeMetadata(output),
2714
2648
  });
2715
2649
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2716
- if (data.ElasticsearchVersions != null) {
2717
- contents.ElasticsearchVersions = de_ElasticsearchVersionList(data.ElasticsearchVersions, context);
2718
- }
2719
- if (data.NextToken != null) {
2720
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2721
- }
2650
+ const doc = (0, smithy_client_1.take)(data, {
2651
+ ElasticsearchVersions: smithy_client_1._json,
2652
+ NextToken: smithy_client_1.expectString,
2653
+ });
2654
+ Object.assign(contents, doc);
2722
2655
  return contents;
2723
2656
  };
2724
2657
  exports.de_ListElasticsearchVersionsCommand = de_ListElasticsearchVersionsCommand;
@@ -2743,10 +2676,9 @@ const de_ListElasticsearchVersionsCommandError = async (output, context) => {
2743
2676
  throw await de_ValidationExceptionRes(parsedOutput, context);
2744
2677
  default:
2745
2678
  const parsedBody = parsedOutput.body;
2746
- (0, smithy_client_1.throwDefaultError)({
2679
+ return throwDefaultError({
2747
2680
  output,
2748
2681
  parsedBody,
2749
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
2750
2682
  errorCode,
2751
2683
  });
2752
2684
  }
@@ -2755,16 +2687,15 @@ const de_ListPackagesForDomainCommand = async (output, context) => {
2755
2687
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2756
2688
  return de_ListPackagesForDomainCommandError(output, context);
2757
2689
  }
2758
- const contents = map({
2690
+ const contents = (0, smithy_client_1.map)({
2759
2691
  $metadata: deserializeMetadata(output),
2760
2692
  });
2761
2693
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2762
- if (data.DomainPackageDetailsList != null) {
2763
- contents.DomainPackageDetailsList = de_DomainPackageDetailsList(data.DomainPackageDetailsList, context);
2764
- }
2765
- if (data.NextToken != null) {
2766
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2767
- }
2694
+ const doc = (0, smithy_client_1.take)(data, {
2695
+ DomainPackageDetailsList: (_) => de_DomainPackageDetailsList(_, context),
2696
+ NextToken: smithy_client_1.expectString,
2697
+ });
2698
+ Object.assign(contents, doc);
2768
2699
  return contents;
2769
2700
  };
2770
2701
  exports.de_ListPackagesForDomainCommand = de_ListPackagesForDomainCommand;
@@ -2792,10 +2723,9 @@ const de_ListPackagesForDomainCommandError = async (output, context) => {
2792
2723
  throw await de_ValidationExceptionRes(parsedOutput, context);
2793
2724
  default:
2794
2725
  const parsedBody = parsedOutput.body;
2795
- (0, smithy_client_1.throwDefaultError)({
2726
+ return throwDefaultError({
2796
2727
  output,
2797
2728
  parsedBody,
2798
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
2799
2729
  errorCode,
2800
2730
  });
2801
2731
  }
@@ -2804,13 +2734,14 @@ const de_ListTagsCommand = async (output, context) => {
2804
2734
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2805
2735
  return de_ListTagsCommandError(output, context);
2806
2736
  }
2807
- const contents = map({
2737
+ const contents = (0, smithy_client_1.map)({
2808
2738
  $metadata: deserializeMetadata(output),
2809
2739
  });
2810
2740
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2811
- if (data.TagList != null) {
2812
- contents.TagList = de_TagList(data.TagList, context);
2813
- }
2741
+ const doc = (0, smithy_client_1.take)(data, {
2742
+ TagList: smithy_client_1._json,
2743
+ });
2744
+ Object.assign(contents, doc);
2814
2745
  return contents;
2815
2746
  };
2816
2747
  exports.de_ListTagsCommand = de_ListTagsCommand;
@@ -2835,10 +2766,9 @@ const de_ListTagsCommandError = async (output, context) => {
2835
2766
  throw await de_ValidationExceptionRes(parsedOutput, context);
2836
2767
  default:
2837
2768
  const parsedBody = parsedOutput.body;
2838
- (0, smithy_client_1.throwDefaultError)({
2769
+ return throwDefaultError({
2839
2770
  output,
2840
2771
  parsedBody,
2841
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
2842
2772
  errorCode,
2843
2773
  });
2844
2774
  }
@@ -2847,16 +2777,15 @@ const de_ListVpcEndpointAccessCommand = async (output, context) => {
2847
2777
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2848
2778
  return de_ListVpcEndpointAccessCommandError(output, context);
2849
2779
  }
2850
- const contents = map({
2780
+ const contents = (0, smithy_client_1.map)({
2851
2781
  $metadata: deserializeMetadata(output),
2852
2782
  });
2853
2783
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2854
- if (data.AuthorizedPrincipalList != null) {
2855
- contents.AuthorizedPrincipalList = de_AuthorizedPrincipalList(data.AuthorizedPrincipalList, context);
2856
- }
2857
- if (data.NextToken != null) {
2858
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2859
- }
2784
+ const doc = (0, smithy_client_1.take)(data, {
2785
+ AuthorizedPrincipalList: smithy_client_1._json,
2786
+ NextToken: smithy_client_1.expectString,
2787
+ });
2788
+ Object.assign(contents, doc);
2860
2789
  return contents;
2861
2790
  };
2862
2791
  exports.de_ListVpcEndpointAccessCommand = de_ListVpcEndpointAccessCommand;
@@ -2881,10 +2810,9 @@ const de_ListVpcEndpointAccessCommandError = async (output, context) => {
2881
2810
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2882
2811
  default:
2883
2812
  const parsedBody = parsedOutput.body;
2884
- (0, smithy_client_1.throwDefaultError)({
2813
+ return throwDefaultError({
2885
2814
  output,
2886
2815
  parsedBody,
2887
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
2888
2816
  errorCode,
2889
2817
  });
2890
2818
  }
@@ -2893,16 +2821,15 @@ const de_ListVpcEndpointsCommand = async (output, context) => {
2893
2821
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2894
2822
  return de_ListVpcEndpointsCommandError(output, context);
2895
2823
  }
2896
- const contents = map({
2824
+ const contents = (0, smithy_client_1.map)({
2897
2825
  $metadata: deserializeMetadata(output),
2898
2826
  });
2899
2827
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2900
- if (data.NextToken != null) {
2901
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2902
- }
2903
- if (data.VpcEndpointSummaryList != null) {
2904
- contents.VpcEndpointSummaryList = de_VpcEndpointSummaryList(data.VpcEndpointSummaryList, context);
2905
- }
2828
+ const doc = (0, smithy_client_1.take)(data, {
2829
+ NextToken: smithy_client_1.expectString,
2830
+ VpcEndpointSummaryList: smithy_client_1._json,
2831
+ });
2832
+ Object.assign(contents, doc);
2906
2833
  return contents;
2907
2834
  };
2908
2835
  exports.de_ListVpcEndpointsCommand = de_ListVpcEndpointsCommand;
@@ -2924,10 +2851,9 @@ const de_ListVpcEndpointsCommandError = async (output, context) => {
2924
2851
  throw await de_InternalExceptionRes(parsedOutput, context);
2925
2852
  default:
2926
2853
  const parsedBody = parsedOutput.body;
2927
- (0, smithy_client_1.throwDefaultError)({
2854
+ return throwDefaultError({
2928
2855
  output,
2929
2856
  parsedBody,
2930
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
2931
2857
  errorCode,
2932
2858
  });
2933
2859
  }
@@ -2936,16 +2862,15 @@ const de_ListVpcEndpointsForDomainCommand = async (output, context) => {
2936
2862
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2937
2863
  return de_ListVpcEndpointsForDomainCommandError(output, context);
2938
2864
  }
2939
- const contents = map({
2865
+ const contents = (0, smithy_client_1.map)({
2940
2866
  $metadata: deserializeMetadata(output),
2941
2867
  });
2942
2868
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2943
- if (data.NextToken != null) {
2944
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2945
- }
2946
- if (data.VpcEndpointSummaryList != null) {
2947
- contents.VpcEndpointSummaryList = de_VpcEndpointSummaryList(data.VpcEndpointSummaryList, context);
2948
- }
2869
+ const doc = (0, smithy_client_1.take)(data, {
2870
+ NextToken: smithy_client_1.expectString,
2871
+ VpcEndpointSummaryList: smithy_client_1._json,
2872
+ });
2873
+ Object.assign(contents, doc);
2949
2874
  return contents;
2950
2875
  };
2951
2876
  exports.de_ListVpcEndpointsForDomainCommand = de_ListVpcEndpointsForDomainCommand;
@@ -2970,10 +2895,9 @@ const de_ListVpcEndpointsForDomainCommandError = async (output, context) => {
2970
2895
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2971
2896
  default:
2972
2897
  const parsedBody = parsedOutput.body;
2973
- (0, smithy_client_1.throwDefaultError)({
2898
+ return throwDefaultError({
2974
2899
  output,
2975
2900
  parsedBody,
2976
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
2977
2901
  errorCode,
2978
2902
  });
2979
2903
  }
@@ -2982,16 +2906,15 @@ const de_PurchaseReservedElasticsearchInstanceOfferingCommand = async (output, c
2982
2906
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2983
2907
  return de_PurchaseReservedElasticsearchInstanceOfferingCommandError(output, context);
2984
2908
  }
2985
- const contents = map({
2909
+ const contents = (0, smithy_client_1.map)({
2986
2910
  $metadata: deserializeMetadata(output),
2987
2911
  });
2988
2912
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2989
- if (data.ReservationName != null) {
2990
- contents.ReservationName = (0, smithy_client_1.expectString)(data.ReservationName);
2991
- }
2992
- if (data.ReservedElasticsearchInstanceId != null) {
2993
- contents.ReservedElasticsearchInstanceId = (0, smithy_client_1.expectString)(data.ReservedElasticsearchInstanceId);
2994
- }
2913
+ const doc = (0, smithy_client_1.take)(data, {
2914
+ ReservationName: smithy_client_1.expectString,
2915
+ ReservedElasticsearchInstanceId: smithy_client_1.expectString,
2916
+ });
2917
+ Object.assign(contents, doc);
2995
2918
  return contents;
2996
2919
  };
2997
2920
  exports.de_PurchaseReservedElasticsearchInstanceOfferingCommand = de_PurchaseReservedElasticsearchInstanceOfferingCommand;
@@ -3022,10 +2945,9 @@ const de_PurchaseReservedElasticsearchInstanceOfferingCommandError = async (outp
3022
2945
  throw await de_ValidationExceptionRes(parsedOutput, context);
3023
2946
  default:
3024
2947
  const parsedBody = parsedOutput.body;
3025
- (0, smithy_client_1.throwDefaultError)({
2948
+ return throwDefaultError({
3026
2949
  output,
3027
2950
  parsedBody,
3028
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
3029
2951
  errorCode,
3030
2952
  });
3031
2953
  }
@@ -3034,13 +2956,14 @@ const de_RejectInboundCrossClusterSearchConnectionCommand = async (output, conte
3034
2956
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3035
2957
  return de_RejectInboundCrossClusterSearchConnectionCommandError(output, context);
3036
2958
  }
3037
- const contents = map({
2959
+ const contents = (0, smithy_client_1.map)({
3038
2960
  $metadata: deserializeMetadata(output),
3039
2961
  });
3040
2962
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3041
- if (data.CrossClusterSearchConnection != null) {
3042
- contents.CrossClusterSearchConnection = de_InboundCrossClusterSearchConnection(data.CrossClusterSearchConnection, context);
3043
- }
2963
+ const doc = (0, smithy_client_1.take)(data, {
2964
+ CrossClusterSearchConnection: smithy_client_1._json,
2965
+ });
2966
+ Object.assign(contents, doc);
3044
2967
  return contents;
3045
2968
  };
3046
2969
  exports.de_RejectInboundCrossClusterSearchConnectionCommand = de_RejectInboundCrossClusterSearchConnectionCommand;
@@ -3059,10 +2982,9 @@ const de_RejectInboundCrossClusterSearchConnectionCommandError = async (output,
3059
2982
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3060
2983
  default:
3061
2984
  const parsedBody = parsedOutput.body;
3062
- (0, smithy_client_1.throwDefaultError)({
2985
+ return throwDefaultError({
3063
2986
  output,
3064
2987
  parsedBody,
3065
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
3066
2988
  errorCode,
3067
2989
  });
3068
2990
  }
@@ -3071,7 +2993,7 @@ const de_RemoveTagsCommand = async (output, context) => {
3071
2993
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3072
2994
  return de_RemoveTagsCommandError(output, context);
3073
2995
  }
3074
- const contents = map({
2996
+ const contents = (0, smithy_client_1.map)({
3075
2997
  $metadata: deserializeMetadata(output),
3076
2998
  });
3077
2999
  await collectBody(output.body, context);
@@ -3096,10 +3018,9 @@ const de_RemoveTagsCommandError = async (output, context) => {
3096
3018
  throw await de_ValidationExceptionRes(parsedOutput, context);
3097
3019
  default:
3098
3020
  const parsedBody = parsedOutput.body;
3099
- (0, smithy_client_1.throwDefaultError)({
3021
+ return throwDefaultError({
3100
3022
  output,
3101
3023
  parsedBody,
3102
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
3103
3024
  errorCode,
3104
3025
  });
3105
3026
  }
@@ -3108,7 +3029,7 @@ const de_RevokeVpcEndpointAccessCommand = async (output, context) => {
3108
3029
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3109
3030
  return de_RevokeVpcEndpointAccessCommandError(output, context);
3110
3031
  }
3111
- const contents = map({
3032
+ const contents = (0, smithy_client_1.map)({
3112
3033
  $metadata: deserializeMetadata(output),
3113
3034
  });
3114
3035
  await collectBody(output.body, context);
@@ -3139,10 +3060,9 @@ const de_RevokeVpcEndpointAccessCommandError = async (output, context) => {
3139
3060
  throw await de_ValidationExceptionRes(parsedOutput, context);
3140
3061
  default:
3141
3062
  const parsedBody = parsedOutput.body;
3142
- (0, smithy_client_1.throwDefaultError)({
3063
+ return throwDefaultError({
3143
3064
  output,
3144
3065
  parsedBody,
3145
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
3146
3066
  errorCode,
3147
3067
  });
3148
3068
  }
@@ -3151,13 +3071,14 @@ const de_StartElasticsearchServiceSoftwareUpdateCommand = async (output, context
3151
3071
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3152
3072
  return de_StartElasticsearchServiceSoftwareUpdateCommandError(output, context);
3153
3073
  }
3154
- const contents = map({
3074
+ const contents = (0, smithy_client_1.map)({
3155
3075
  $metadata: deserializeMetadata(output),
3156
3076
  });
3157
3077
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3158
- if (data.ServiceSoftwareOptions != null) {
3159
- contents.ServiceSoftwareOptions = de_ServiceSoftwareOptions(data.ServiceSoftwareOptions, context);
3160
- }
3078
+ const doc = (0, smithy_client_1.take)(data, {
3079
+ ServiceSoftwareOptions: (_) => de_ServiceSoftwareOptions(_, context),
3080
+ });
3081
+ Object.assign(contents, doc);
3161
3082
  return contents;
3162
3083
  };
3163
3084
  exports.de_StartElasticsearchServiceSoftwareUpdateCommand = de_StartElasticsearchServiceSoftwareUpdateCommand;
@@ -3182,10 +3103,9 @@ const de_StartElasticsearchServiceSoftwareUpdateCommandError = async (output, co
3182
3103
  throw await de_ValidationExceptionRes(parsedOutput, context);
3183
3104
  default:
3184
3105
  const parsedBody = parsedOutput.body;
3185
- (0, smithy_client_1.throwDefaultError)({
3106
+ return throwDefaultError({
3186
3107
  output,
3187
3108
  parsedBody,
3188
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
3189
3109
  errorCode,
3190
3110
  });
3191
3111
  }
@@ -3194,16 +3114,15 @@ const de_UpdateElasticsearchDomainConfigCommand = async (output, context) => {
3194
3114
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3195
3115
  return de_UpdateElasticsearchDomainConfigCommandError(output, context);
3196
3116
  }
3197
- const contents = map({
3117
+ const contents = (0, smithy_client_1.map)({
3198
3118
  $metadata: deserializeMetadata(output),
3199
3119
  });
3200
3120
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3201
- if (data.DomainConfig != null) {
3202
- contents.DomainConfig = de_ElasticsearchDomainConfig(data.DomainConfig, context);
3203
- }
3204
- if (data.DryRunResults != null) {
3205
- contents.DryRunResults = de_DryRunResults(data.DryRunResults, context);
3206
- }
3121
+ const doc = (0, smithy_client_1.take)(data, {
3122
+ DomainConfig: (_) => de_ElasticsearchDomainConfig(_, context),
3123
+ DryRunResults: smithy_client_1._json,
3124
+ });
3125
+ Object.assign(contents, doc);
3207
3126
  return contents;
3208
3127
  };
3209
3128
  exports.de_UpdateElasticsearchDomainConfigCommand = de_UpdateElasticsearchDomainConfigCommand;
@@ -3234,10 +3153,9 @@ const de_UpdateElasticsearchDomainConfigCommandError = async (output, context) =
3234
3153
  throw await de_ValidationExceptionRes(parsedOutput, context);
3235
3154
  default:
3236
3155
  const parsedBody = parsedOutput.body;
3237
- (0, smithy_client_1.throwDefaultError)({
3156
+ return throwDefaultError({
3238
3157
  output,
3239
3158
  parsedBody,
3240
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
3241
3159
  errorCode,
3242
3160
  });
3243
3161
  }
@@ -3246,13 +3164,14 @@ const de_UpdatePackageCommand = async (output, context) => {
3246
3164
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3247
3165
  return de_UpdatePackageCommandError(output, context);
3248
3166
  }
3249
- const contents = map({
3167
+ const contents = (0, smithy_client_1.map)({
3250
3168
  $metadata: deserializeMetadata(output),
3251
3169
  });
3252
3170
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3253
- if (data.PackageDetails != null) {
3254
- contents.PackageDetails = de_PackageDetails(data.PackageDetails, context);
3255
- }
3171
+ const doc = (0, smithy_client_1.take)(data, {
3172
+ PackageDetails: (_) => de_PackageDetails(_, context),
3173
+ });
3174
+ Object.assign(contents, doc);
3256
3175
  return contents;
3257
3176
  };
3258
3177
  exports.de_UpdatePackageCommand = de_UpdatePackageCommand;
@@ -3283,10 +3202,9 @@ const de_UpdatePackageCommandError = async (output, context) => {
3283
3202
  throw await de_ValidationExceptionRes(parsedOutput, context);
3284
3203
  default:
3285
3204
  const parsedBody = parsedOutput.body;
3286
- (0, smithy_client_1.throwDefaultError)({
3205
+ return throwDefaultError({
3287
3206
  output,
3288
3207
  parsedBody,
3289
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
3290
3208
  errorCode,
3291
3209
  });
3292
3210
  }
@@ -3295,13 +3213,14 @@ const de_UpdateVpcEndpointCommand = async (output, context) => {
3295
3213
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3296
3214
  return de_UpdateVpcEndpointCommandError(output, context);
3297
3215
  }
3298
- const contents = map({
3216
+ const contents = (0, smithy_client_1.map)({
3299
3217
  $metadata: deserializeMetadata(output),
3300
3218
  });
3301
3219
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3302
- if (data.VpcEndpoint != null) {
3303
- contents.VpcEndpoint = de_VpcEndpoint(data.VpcEndpoint, context);
3304
- }
3220
+ const doc = (0, smithy_client_1.take)(data, {
3221
+ VpcEndpoint: smithy_client_1._json,
3222
+ });
3223
+ Object.assign(contents, doc);
3305
3224
  return contents;
3306
3225
  };
3307
3226
  exports.de_UpdateVpcEndpointCommand = de_UpdateVpcEndpointCommand;
@@ -3332,10 +3251,9 @@ const de_UpdateVpcEndpointCommandError = async (output, context) => {
3332
3251
  throw await de_ValidationExceptionRes(parsedOutput, context);
3333
3252
  default:
3334
3253
  const parsedBody = parsedOutput.body;
3335
- (0, smithy_client_1.throwDefaultError)({
3254
+ return throwDefaultError({
3336
3255
  output,
3337
3256
  parsedBody,
3338
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
3339
3257
  errorCode,
3340
3258
  });
3341
3259
  }
@@ -3344,22 +3262,17 @@ const de_UpgradeElasticsearchDomainCommand = async (output, context) => {
3344
3262
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3345
3263
  return de_UpgradeElasticsearchDomainCommandError(output, context);
3346
3264
  }
3347
- const contents = map({
3265
+ const contents = (0, smithy_client_1.map)({
3348
3266
  $metadata: deserializeMetadata(output),
3349
3267
  });
3350
3268
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3351
- if (data.ChangeProgressDetails != null) {
3352
- contents.ChangeProgressDetails = de_ChangeProgressDetails(data.ChangeProgressDetails, context);
3353
- }
3354
- if (data.DomainName != null) {
3355
- contents.DomainName = (0, smithy_client_1.expectString)(data.DomainName);
3356
- }
3357
- if (data.PerformCheckOnly != null) {
3358
- contents.PerformCheckOnly = (0, smithy_client_1.expectBoolean)(data.PerformCheckOnly);
3359
- }
3360
- if (data.TargetVersion != null) {
3361
- contents.TargetVersion = (0, smithy_client_1.expectString)(data.TargetVersion);
3362
- }
3269
+ const doc = (0, smithy_client_1.take)(data, {
3270
+ ChangeProgressDetails: smithy_client_1._json,
3271
+ DomainName: smithy_client_1.expectString,
3272
+ PerformCheckOnly: smithy_client_1.expectBoolean,
3273
+ TargetVersion: smithy_client_1.expectString,
3274
+ });
3275
+ Object.assign(contents, doc);
3363
3276
  return contents;
3364
3277
  };
3365
3278
  exports.de_UpgradeElasticsearchDomainCommand = de_UpgradeElasticsearchDomainCommand;
@@ -3390,21 +3303,21 @@ const de_UpgradeElasticsearchDomainCommandError = async (output, context) => {
3390
3303
  throw await de_ValidationExceptionRes(parsedOutput, context);
3391
3304
  default:
3392
3305
  const parsedBody = parsedOutput.body;
3393
- (0, smithy_client_1.throwDefaultError)({
3306
+ return throwDefaultError({
3394
3307
  output,
3395
3308
  parsedBody,
3396
- exceptionCtor: ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException,
3397
3309
  errorCode,
3398
3310
  });
3399
3311
  }
3400
3312
  };
3401
- const map = smithy_client_1.map;
3313
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException);
3402
3314
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
3403
- const contents = map({});
3315
+ const contents = (0, smithy_client_1.map)({});
3404
3316
  const data = parsedOutput.body;
3405
- if (data.message != null) {
3406
- contents.message = (0, smithy_client_1.expectString)(data.message);
3407
- }
3317
+ const doc = (0, smithy_client_1.take)(data, {
3318
+ message: smithy_client_1.expectString,
3319
+ });
3320
+ Object.assign(contents, doc);
3408
3321
  const exception = new models_0_1.AccessDeniedException({
3409
3322
  $metadata: deserializeMetadata(parsedOutput),
3410
3323
  ...contents,
@@ -3412,11 +3325,12 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
3412
3325
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3413
3326
  };
3414
3327
  const de_BaseExceptionRes = async (parsedOutput, context) => {
3415
- const contents = map({});
3328
+ const contents = (0, smithy_client_1.map)({});
3416
3329
  const data = parsedOutput.body;
3417
- if (data.message != null) {
3418
- contents.message = (0, smithy_client_1.expectString)(data.message);
3419
- }
3330
+ const doc = (0, smithy_client_1.take)(data, {
3331
+ message: smithy_client_1.expectString,
3332
+ });
3333
+ Object.assign(contents, doc);
3420
3334
  const exception = new models_0_1.BaseException({
3421
3335
  $metadata: deserializeMetadata(parsedOutput),
3422
3336
  ...contents,
@@ -3424,11 +3338,12 @@ const de_BaseExceptionRes = async (parsedOutput, context) => {
3424
3338
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3425
3339
  };
3426
3340
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
3427
- const contents = map({});
3341
+ const contents = (0, smithy_client_1.map)({});
3428
3342
  const data = parsedOutput.body;
3429
- if (data.message != null) {
3430
- contents.message = (0, smithy_client_1.expectString)(data.message);
3431
- }
3343
+ const doc = (0, smithy_client_1.take)(data, {
3344
+ message: smithy_client_1.expectString,
3345
+ });
3346
+ Object.assign(contents, doc);
3432
3347
  const exception = new models_0_1.ConflictException({
3433
3348
  $metadata: deserializeMetadata(parsedOutput),
3434
3349
  ...contents,
@@ -3436,11 +3351,12 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
3436
3351
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3437
3352
  };
3438
3353
  const de_DisabledOperationExceptionRes = async (parsedOutput, context) => {
3439
- const contents = map({});
3354
+ const contents = (0, smithy_client_1.map)({});
3440
3355
  const data = parsedOutput.body;
3441
- if (data.message != null) {
3442
- contents.message = (0, smithy_client_1.expectString)(data.message);
3443
- }
3356
+ const doc = (0, smithy_client_1.take)(data, {
3357
+ message: smithy_client_1.expectString,
3358
+ });
3359
+ Object.assign(contents, doc);
3444
3360
  const exception = new models_0_1.DisabledOperationException({
3445
3361
  $metadata: deserializeMetadata(parsedOutput),
3446
3362
  ...contents,
@@ -3448,11 +3364,12 @@ const de_DisabledOperationExceptionRes = async (parsedOutput, context) => {
3448
3364
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3449
3365
  };
3450
3366
  const de_InternalExceptionRes = async (parsedOutput, context) => {
3451
- const contents = map({});
3367
+ const contents = (0, smithy_client_1.map)({});
3452
3368
  const data = parsedOutput.body;
3453
- if (data.message != null) {
3454
- contents.message = (0, smithy_client_1.expectString)(data.message);
3455
- }
3369
+ const doc = (0, smithy_client_1.take)(data, {
3370
+ message: smithy_client_1.expectString,
3371
+ });
3372
+ Object.assign(contents, doc);
3456
3373
  const exception = new models_0_1.InternalException({
3457
3374
  $metadata: deserializeMetadata(parsedOutput),
3458
3375
  ...contents,
@@ -3460,11 +3377,12 @@ const de_InternalExceptionRes = async (parsedOutput, context) => {
3460
3377
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3461
3378
  };
3462
3379
  const de_InvalidPaginationTokenExceptionRes = async (parsedOutput, context) => {
3463
- const contents = map({});
3380
+ const contents = (0, smithy_client_1.map)({});
3464
3381
  const data = parsedOutput.body;
3465
- if (data.message != null) {
3466
- contents.message = (0, smithy_client_1.expectString)(data.message);
3467
- }
3382
+ const doc = (0, smithy_client_1.take)(data, {
3383
+ message: smithy_client_1.expectString,
3384
+ });
3385
+ Object.assign(contents, doc);
3468
3386
  const exception = new models_0_1.InvalidPaginationTokenException({
3469
3387
  $metadata: deserializeMetadata(parsedOutput),
3470
3388
  ...contents,
@@ -3472,11 +3390,12 @@ const de_InvalidPaginationTokenExceptionRes = async (parsedOutput, context) => {
3472
3390
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3473
3391
  };
3474
3392
  const de_InvalidTypeExceptionRes = async (parsedOutput, context) => {
3475
- const contents = map({});
3393
+ const contents = (0, smithy_client_1.map)({});
3476
3394
  const data = parsedOutput.body;
3477
- if (data.message != null) {
3478
- contents.message = (0, smithy_client_1.expectString)(data.message);
3479
- }
3395
+ const doc = (0, smithy_client_1.take)(data, {
3396
+ message: smithy_client_1.expectString,
3397
+ });
3398
+ Object.assign(contents, doc);
3480
3399
  const exception = new models_0_1.InvalidTypeException({
3481
3400
  $metadata: deserializeMetadata(parsedOutput),
3482
3401
  ...contents,
@@ -3484,11 +3403,12 @@ const de_InvalidTypeExceptionRes = async (parsedOutput, context) => {
3484
3403
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3485
3404
  };
3486
3405
  const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
3487
- const contents = map({});
3406
+ const contents = (0, smithy_client_1.map)({});
3488
3407
  const data = parsedOutput.body;
3489
- if (data.message != null) {
3490
- contents.message = (0, smithy_client_1.expectString)(data.message);
3491
- }
3408
+ const doc = (0, smithy_client_1.take)(data, {
3409
+ message: smithy_client_1.expectString,
3410
+ });
3411
+ Object.assign(contents, doc);
3492
3412
  const exception = new models_0_1.LimitExceededException({
3493
3413
  $metadata: deserializeMetadata(parsedOutput),
3494
3414
  ...contents,
@@ -3496,11 +3416,12 @@ const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
3496
3416
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3497
3417
  };
3498
3418
  const de_ResourceAlreadyExistsExceptionRes = async (parsedOutput, context) => {
3499
- const contents = map({});
3419
+ const contents = (0, smithy_client_1.map)({});
3500
3420
  const data = parsedOutput.body;
3501
- if (data.message != null) {
3502
- contents.message = (0, smithy_client_1.expectString)(data.message);
3503
- }
3421
+ const doc = (0, smithy_client_1.take)(data, {
3422
+ message: smithy_client_1.expectString,
3423
+ });
3424
+ Object.assign(contents, doc);
3504
3425
  const exception = new models_0_1.ResourceAlreadyExistsException({
3505
3426
  $metadata: deserializeMetadata(parsedOutput),
3506
3427
  ...contents,
@@ -3508,11 +3429,12 @@ const de_ResourceAlreadyExistsExceptionRes = async (parsedOutput, context) => {
3508
3429
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3509
3430
  };
3510
3431
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
3511
- const contents = map({});
3432
+ const contents = (0, smithy_client_1.map)({});
3512
3433
  const data = parsedOutput.body;
3513
- if (data.message != null) {
3514
- contents.message = (0, smithy_client_1.expectString)(data.message);
3515
- }
3434
+ const doc = (0, smithy_client_1.take)(data, {
3435
+ message: smithy_client_1.expectString,
3436
+ });
3437
+ Object.assign(contents, doc);
3516
3438
  const exception = new models_0_1.ResourceNotFoundException({
3517
3439
  $metadata: deserializeMetadata(parsedOutput),
3518
3440
  ...contents,
@@ -3520,47 +3442,24 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
3520
3442
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3521
3443
  };
3522
3444
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
3523
- const contents = map({});
3445
+ const contents = (0, smithy_client_1.map)({});
3524
3446
  const data = parsedOutput.body;
3525
- if (data.message != null) {
3526
- contents.message = (0, smithy_client_1.expectString)(data.message);
3527
- }
3447
+ const doc = (0, smithy_client_1.take)(data, {
3448
+ message: smithy_client_1.expectString,
3449
+ });
3450
+ Object.assign(contents, doc);
3528
3451
  const exception = new models_0_1.ValidationException({
3529
3452
  $metadata: deserializeMetadata(parsedOutput),
3530
3453
  ...contents,
3531
3454
  });
3532
3455
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3533
3456
  };
3534
- const se_AdvancedOptions = (input, context) => {
3535
- return Object.entries(input).reduce((acc, [key, value]) => {
3536
- if (value === null) {
3537
- return acc;
3538
- }
3539
- acc[key] = value;
3540
- return acc;
3541
- }, {});
3542
- };
3543
- const se_AdvancedSecurityOptionsInput = (input, context) => {
3544
- return {
3545
- ...(input.AnonymousAuthEnabled != null && { AnonymousAuthEnabled: input.AnonymousAuthEnabled }),
3546
- ...(input.Enabled != null && { Enabled: input.Enabled }),
3547
- ...(input.InternalUserDatabaseEnabled != null && {
3548
- InternalUserDatabaseEnabled: input.InternalUserDatabaseEnabled,
3549
- }),
3550
- ...(input.MasterUserOptions != null && {
3551
- MasterUserOptions: se_MasterUserOptions(input.MasterUserOptions, context),
3552
- }),
3553
- ...(input.SAMLOptions != null && { SAMLOptions: se_SAMLOptionsInput(input.SAMLOptions, context) }),
3554
- };
3555
- };
3556
3457
  const se_AutoTuneMaintenanceSchedule = (input, context) => {
3557
- return {
3558
- ...(input.CronExpressionForRecurrence != null && {
3559
- CronExpressionForRecurrence: input.CronExpressionForRecurrence,
3560
- }),
3561
- ...(input.Duration != null && { Duration: se_Duration(input.Duration, context) }),
3562
- ...(input.StartAt != null && { StartAt: Math.round(input.StartAt.getTime() / 1000) }),
3563
- };
3458
+ return (0, smithy_client_1.take)(input, {
3459
+ CronExpressionForRecurrence: [],
3460
+ Duration: smithy_client_1._json,
3461
+ StartAt: (_) => Math.round(_.getTime() / 1000),
3462
+ });
3564
3463
  };
3565
3464
  const se_AutoTuneMaintenanceScheduleList = (input, context) => {
3566
3465
  return input
@@ -3570,1199 +3469,421 @@ const se_AutoTuneMaintenanceScheduleList = (input, context) => {
3570
3469
  });
3571
3470
  };
3572
3471
  const se_AutoTuneOptions = (input, context) => {
3573
- return {
3574
- ...(input.DesiredState != null && { DesiredState: input.DesiredState }),
3575
- ...(input.MaintenanceSchedules != null && {
3576
- MaintenanceSchedules: se_AutoTuneMaintenanceScheduleList(input.MaintenanceSchedules, context),
3577
- }),
3578
- ...(input.RollbackOnDisable != null && { RollbackOnDisable: input.RollbackOnDisable }),
3579
- };
3580
- };
3581
- const se_AutoTuneOptionsInput = (input, context) => {
3582
- return {
3583
- ...(input.DesiredState != null && { DesiredState: input.DesiredState }),
3584
- ...(input.MaintenanceSchedules != null && {
3585
- MaintenanceSchedules: se_AutoTuneMaintenanceScheduleList(input.MaintenanceSchedules, context),
3586
- }),
3587
- };
3588
- };
3589
- const se_CognitoOptions = (input, context) => {
3590
- return {
3591
- ...(input.Enabled != null && { Enabled: input.Enabled }),
3592
- ...(input.IdentityPoolId != null && { IdentityPoolId: input.IdentityPoolId }),
3593
- ...(input.RoleArn != null && { RoleArn: input.RoleArn }),
3594
- ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }),
3595
- };
3596
- };
3597
- const se_ColdStorageOptions = (input, context) => {
3598
- return {
3599
- ...(input.Enabled != null && { Enabled: input.Enabled }),
3600
- };
3601
- };
3602
- const se_DescribePackagesFilter = (input, context) => {
3603
- return {
3604
- ...(input.Name != null && { Name: input.Name }),
3605
- ...(input.Value != null && { Value: se_DescribePackagesFilterValues(input.Value, context) }),
3606
- };
3607
- };
3608
- const se_DescribePackagesFilterList = (input, context) => {
3609
- return input
3610
- .filter((e) => e != null)
3611
- .map((entry) => {
3612
- return se_DescribePackagesFilter(entry, context);
3613
- });
3614
- };
3615
- const se_DescribePackagesFilterValues = (input, context) => {
3616
- return input
3617
- .filter((e) => e != null)
3618
- .map((entry) => {
3619
- return entry;
3620
- });
3621
- };
3622
- const se_DomainEndpointOptions = (input, context) => {
3623
- return {
3624
- ...(input.CustomEndpoint != null && { CustomEndpoint: input.CustomEndpoint }),
3625
- ...(input.CustomEndpointCertificateArn != null && {
3626
- CustomEndpointCertificateArn: input.CustomEndpointCertificateArn,
3627
- }),
3628
- ...(input.CustomEndpointEnabled != null && { CustomEndpointEnabled: input.CustomEndpointEnabled }),
3629
- ...(input.EnforceHTTPS != null && { EnforceHTTPS: input.EnforceHTTPS }),
3630
- ...(input.TLSSecurityPolicy != null && { TLSSecurityPolicy: input.TLSSecurityPolicy }),
3631
- };
3632
- };
3633
- const se_DomainInformation = (input, context) => {
3634
- return {
3635
- ...(input.DomainName != null && { DomainName: input.DomainName }),
3636
- ...(input.OwnerId != null && { OwnerId: input.OwnerId }),
3637
- ...(input.Region != null && { Region: input.Region }),
3638
- };
3639
- };
3640
- const se_DomainNameList = (input, context) => {
3641
- return input
3642
- .filter((e) => e != null)
3643
- .map((entry) => {
3644
- return entry;
3645
- });
3646
- };
3647
- const se_Duration = (input, context) => {
3648
- return {
3649
- ...(input.Unit != null && { Unit: input.Unit }),
3650
- ...(input.Value != null && { Value: input.Value }),
3651
- };
3652
- };
3653
- const se_EBSOptions = (input, context) => {
3654
- return {
3655
- ...(input.EBSEnabled != null && { EBSEnabled: input.EBSEnabled }),
3656
- ...(input.Iops != null && { Iops: input.Iops }),
3657
- ...(input.Throughput != null && { Throughput: input.Throughput }),
3658
- ...(input.VolumeSize != null && { VolumeSize: input.VolumeSize }),
3659
- ...(input.VolumeType != null && { VolumeType: input.VolumeType }),
3660
- };
3661
- };
3662
- const se_ElasticsearchClusterConfig = (input, context) => {
3663
- return {
3664
- ...(input.ColdStorageOptions != null && {
3665
- ColdStorageOptions: se_ColdStorageOptions(input.ColdStorageOptions, context),
3666
- }),
3667
- ...(input.DedicatedMasterCount != null && { DedicatedMasterCount: input.DedicatedMasterCount }),
3668
- ...(input.DedicatedMasterEnabled != null && { DedicatedMasterEnabled: input.DedicatedMasterEnabled }),
3669
- ...(input.DedicatedMasterType != null && { DedicatedMasterType: input.DedicatedMasterType }),
3670
- ...(input.InstanceCount != null && { InstanceCount: input.InstanceCount }),
3671
- ...(input.InstanceType != null && { InstanceType: input.InstanceType }),
3672
- ...(input.WarmCount != null && { WarmCount: input.WarmCount }),
3673
- ...(input.WarmEnabled != null && { WarmEnabled: input.WarmEnabled }),
3674
- ...(input.WarmType != null && { WarmType: input.WarmType }),
3675
- ...(input.ZoneAwarenessConfig != null && {
3676
- ZoneAwarenessConfig: se_ZoneAwarenessConfig(input.ZoneAwarenessConfig, context),
3677
- }),
3678
- ...(input.ZoneAwarenessEnabled != null && { ZoneAwarenessEnabled: input.ZoneAwarenessEnabled }),
3679
- };
3680
- };
3681
- const se_EncryptionAtRestOptions = (input, context) => {
3682
- return {
3683
- ...(input.Enabled != null && { Enabled: input.Enabled }),
3684
- ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }),
3685
- };
3686
- };
3687
- const se_Filter = (input, context) => {
3688
- return {
3689
- ...(input.Name != null && { Name: input.Name }),
3690
- ...(input.Values != null && { Values: se_ValueStringList(input.Values, context) }),
3691
- };
3692
- };
3693
- const se_FilterList = (input, context) => {
3694
- return input
3695
- .filter((e) => e != null)
3696
- .map((entry) => {
3697
- return se_Filter(entry, context);
3698
- });
3699
- };
3700
- const se_LogPublishingOption = (input, context) => {
3701
- return {
3702
- ...(input.CloudWatchLogsLogGroupArn != null && { CloudWatchLogsLogGroupArn: input.CloudWatchLogsLogGroupArn }),
3703
- ...(input.Enabled != null && { Enabled: input.Enabled }),
3704
- };
3705
- };
3706
- const se_LogPublishingOptions = (input, context) => {
3707
- return Object.entries(input).reduce((acc, [key, value]) => {
3708
- if (value === null) {
3709
- return acc;
3710
- }
3711
- acc[key] = se_LogPublishingOption(value, context);
3712
- return acc;
3713
- }, {});
3714
- };
3715
- const se_MasterUserOptions = (input, context) => {
3716
- return {
3717
- ...(input.MasterUserARN != null && { MasterUserARN: input.MasterUserARN }),
3718
- ...(input.MasterUserName != null && { MasterUserName: input.MasterUserName }),
3719
- ...(input.MasterUserPassword != null && { MasterUserPassword: input.MasterUserPassword }),
3720
- };
3721
- };
3722
- const se_NodeToNodeEncryptionOptions = (input, context) => {
3723
- return {
3724
- ...(input.Enabled != null && { Enabled: input.Enabled }),
3725
- };
3726
- };
3727
- const se_PackageSource = (input, context) => {
3728
- return {
3729
- ...(input.S3BucketName != null && { S3BucketName: input.S3BucketName }),
3730
- ...(input.S3Key != null && { S3Key: input.S3Key }),
3731
- };
3732
- };
3733
- const se_SAMLIdp = (input, context) => {
3734
- return {
3735
- ...(input.EntityId != null && { EntityId: input.EntityId }),
3736
- ...(input.MetadataContent != null && { MetadataContent: input.MetadataContent }),
3737
- };
3738
- };
3739
- const se_SAMLOptionsInput = (input, context) => {
3740
- return {
3741
- ...(input.Enabled != null && { Enabled: input.Enabled }),
3742
- ...(input.Idp != null && { Idp: se_SAMLIdp(input.Idp, context) }),
3743
- ...(input.MasterBackendRole != null && { MasterBackendRole: input.MasterBackendRole }),
3744
- ...(input.MasterUserName != null && { MasterUserName: input.MasterUserName }),
3745
- ...(input.RolesKey != null && { RolesKey: input.RolesKey }),
3746
- ...(input.SessionTimeoutMinutes != null && { SessionTimeoutMinutes: input.SessionTimeoutMinutes }),
3747
- ...(input.SubjectKey != null && { SubjectKey: input.SubjectKey }),
3748
- };
3749
- };
3750
- const se_SnapshotOptions = (input, context) => {
3751
- return {
3752
- ...(input.AutomatedSnapshotStartHour != null && { AutomatedSnapshotStartHour: input.AutomatedSnapshotStartHour }),
3753
- };
3754
- };
3755
- const se_StringList = (input, context) => {
3756
- return input
3757
- .filter((e) => e != null)
3758
- .map((entry) => {
3759
- return entry;
3760
- });
3761
- };
3762
- const se_Tag = (input, context) => {
3763
- return {
3764
- ...(input.Key != null && { Key: input.Key }),
3765
- ...(input.Value != null && { Value: input.Value }),
3766
- };
3767
- };
3768
- const se_TagList = (input, context) => {
3769
- return input
3770
- .filter((e) => e != null)
3771
- .map((entry) => {
3772
- return se_Tag(entry, context);
3773
- });
3774
- };
3775
- const se_ValueStringList = (input, context) => {
3776
- return input
3777
- .filter((e) => e != null)
3778
- .map((entry) => {
3779
- return entry;
3472
+ return (0, smithy_client_1.take)(input, {
3473
+ DesiredState: [],
3474
+ MaintenanceSchedules: (_) => se_AutoTuneMaintenanceScheduleList(_, context),
3475
+ RollbackOnDisable: [],
3780
3476
  });
3781
3477
  };
3782
- const se_VpcEndpointIdList = (input, context) => {
3783
- return input
3784
- .filter((e) => e != null)
3785
- .map((entry) => {
3786
- return entry;
3478
+ const se_AutoTuneOptionsInput = (input, context) => {
3479
+ return (0, smithy_client_1.take)(input, {
3480
+ DesiredState: [],
3481
+ MaintenanceSchedules: (_) => se_AutoTuneMaintenanceScheduleList(_, context),
3787
3482
  });
3788
3483
  };
3789
- const se_VPCOptions = (input, context) => {
3790
- return {
3791
- ...(input.SecurityGroupIds != null && { SecurityGroupIds: se_StringList(input.SecurityGroupIds, context) }),
3792
- ...(input.SubnetIds != null && { SubnetIds: se_StringList(input.SubnetIds, context) }),
3793
- };
3794
- };
3795
- const se_ZoneAwarenessConfig = (input, context) => {
3796
- return {
3797
- ...(input.AvailabilityZoneCount != null && { AvailabilityZoneCount: input.AvailabilityZoneCount }),
3798
- };
3799
- };
3800
3484
  const de_AccessPoliciesStatus = (output, context) => {
3801
- return {
3802
- Options: (0, smithy_client_1.expectString)(output.Options),
3803
- Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined,
3804
- };
3805
- };
3806
- const de_AdditionalLimit = (output, context) => {
3807
- return {
3808
- LimitName: (0, smithy_client_1.expectString)(output.LimitName),
3809
- LimitValues: output.LimitValues != null ? de_LimitValueList(output.LimitValues, context) : undefined,
3810
- };
3811
- };
3812
- const de_AdditionalLimitList = (output, context) => {
3813
- const retVal = (output || [])
3814
- .filter((e) => e != null)
3815
- .map((entry) => {
3816
- if (entry === null) {
3817
- return null;
3818
- }
3819
- return de_AdditionalLimit(entry, context);
3485
+ return (0, smithy_client_1.take)(output, {
3486
+ Options: smithy_client_1.expectString,
3487
+ Status: (_) => de_OptionStatus(_, context),
3820
3488
  });
3821
- return retVal;
3822
- };
3823
- const de_AdvancedOptions = (output, context) => {
3824
- return Object.entries(output).reduce((acc, [key, value]) => {
3825
- if (value === null) {
3826
- return acc;
3827
- }
3828
- acc[key] = (0, smithy_client_1.expectString)(value);
3829
- return acc;
3830
- }, {});
3831
3489
  };
3832
3490
  const de_AdvancedOptionsStatus = (output, context) => {
3833
- return {
3834
- Options: output.Options != null ? de_AdvancedOptions(output.Options, context) : undefined,
3835
- Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined,
3836
- };
3491
+ return (0, smithy_client_1.take)(output, {
3492
+ Options: smithy_client_1._json,
3493
+ Status: (_) => de_OptionStatus(_, context),
3494
+ });
3837
3495
  };
3838
3496
  const de_AdvancedSecurityOptions = (output, context) => {
3839
- return {
3840
- AnonymousAuthDisableDate: output.AnonymousAuthDisableDate != null
3841
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.AnonymousAuthDisableDate)))
3842
- : undefined,
3843
- AnonymousAuthEnabled: (0, smithy_client_1.expectBoolean)(output.AnonymousAuthEnabled),
3844
- Enabled: (0, smithy_client_1.expectBoolean)(output.Enabled),
3845
- InternalUserDatabaseEnabled: (0, smithy_client_1.expectBoolean)(output.InternalUserDatabaseEnabled),
3846
- SAMLOptions: output.SAMLOptions != null ? de_SAMLOptionsOutput(output.SAMLOptions, context) : undefined,
3847
- };
3497
+ return (0, smithy_client_1.take)(output, {
3498
+ AnonymousAuthDisableDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3499
+ AnonymousAuthEnabled: smithy_client_1.expectBoolean,
3500
+ Enabled: smithy_client_1.expectBoolean,
3501
+ InternalUserDatabaseEnabled: smithy_client_1.expectBoolean,
3502
+ SAMLOptions: smithy_client_1._json,
3503
+ });
3848
3504
  };
3849
3505
  const de_AdvancedSecurityOptionsStatus = (output, context) => {
3850
- return {
3851
- Options: output.Options != null ? de_AdvancedSecurityOptions(output.Options, context) : undefined,
3852
- Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined,
3853
- };
3854
- };
3855
- const de_AuthorizedPrincipal = (output, context) => {
3856
- return {
3857
- Principal: (0, smithy_client_1.expectString)(output.Principal),
3858
- PrincipalType: (0, smithy_client_1.expectString)(output.PrincipalType),
3859
- };
3860
- };
3861
- const de_AuthorizedPrincipalList = (output, context) => {
3862
- const retVal = (output || [])
3863
- .filter((e) => e != null)
3864
- .map((entry) => {
3865
- if (entry === null) {
3866
- return null;
3867
- }
3868
- return de_AuthorizedPrincipal(entry, context);
3506
+ return (0, smithy_client_1.take)(output, {
3507
+ Options: (_) => de_AdvancedSecurityOptions(_, context),
3508
+ Status: (_) => de_OptionStatus(_, context),
3869
3509
  });
3870
- return retVal;
3871
3510
  };
3872
3511
  const de_AutoTune = (output, context) => {
3873
- return {
3874
- AutoTuneDetails: output.AutoTuneDetails != null ? de_AutoTuneDetails(output.AutoTuneDetails, context) : undefined,
3875
- AutoTuneType: (0, smithy_client_1.expectString)(output.AutoTuneType),
3876
- };
3512
+ return (0, smithy_client_1.take)(output, {
3513
+ AutoTuneDetails: (_) => de_AutoTuneDetails(_, context),
3514
+ AutoTuneType: smithy_client_1.expectString,
3515
+ });
3877
3516
  };
3878
3517
  const de_AutoTuneDetails = (output, context) => {
3879
- return {
3880
- ScheduledAutoTuneDetails: output.ScheduledAutoTuneDetails != null
3881
- ? de_ScheduledAutoTuneDetails(output.ScheduledAutoTuneDetails, context)
3882
- : undefined,
3883
- };
3518
+ return (0, smithy_client_1.take)(output, {
3519
+ ScheduledAutoTuneDetails: (_) => de_ScheduledAutoTuneDetails(_, context),
3520
+ });
3884
3521
  };
3885
3522
  const de_AutoTuneList = (output, context) => {
3886
3523
  const retVal = (output || [])
3887
3524
  .filter((e) => e != null)
3888
3525
  .map((entry) => {
3889
- if (entry === null) {
3890
- return null;
3891
- }
3892
3526
  return de_AutoTune(entry, context);
3893
3527
  });
3894
3528
  return retVal;
3895
3529
  };
3896
3530
  const de_AutoTuneMaintenanceSchedule = (output, context) => {
3897
- return {
3898
- CronExpressionForRecurrence: (0, smithy_client_1.expectString)(output.CronExpressionForRecurrence),
3899
- Duration: output.Duration != null ? de_Duration(output.Duration, context) : undefined,
3900
- StartAt: output.StartAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.StartAt))) : undefined,
3901
- };
3531
+ return (0, smithy_client_1.take)(output, {
3532
+ CronExpressionForRecurrence: smithy_client_1.expectString,
3533
+ Duration: smithy_client_1._json,
3534
+ StartAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3535
+ });
3902
3536
  };
3903
3537
  const de_AutoTuneMaintenanceScheduleList = (output, context) => {
3904
3538
  const retVal = (output || [])
3905
3539
  .filter((e) => e != null)
3906
3540
  .map((entry) => {
3907
- if (entry === null) {
3908
- return null;
3909
- }
3910
3541
  return de_AutoTuneMaintenanceSchedule(entry, context);
3911
3542
  });
3912
3543
  return retVal;
3913
3544
  };
3914
3545
  const de_AutoTuneOptions = (output, context) => {
3915
- return {
3916
- DesiredState: (0, smithy_client_1.expectString)(output.DesiredState),
3917
- MaintenanceSchedules: output.MaintenanceSchedules != null
3918
- ? de_AutoTuneMaintenanceScheduleList(output.MaintenanceSchedules, context)
3919
- : undefined,
3920
- RollbackOnDisable: (0, smithy_client_1.expectString)(output.RollbackOnDisable),
3921
- };
3922
- };
3923
- const de_AutoTuneOptionsOutput = (output, context) => {
3924
- return {
3925
- ErrorMessage: (0, smithy_client_1.expectString)(output.ErrorMessage),
3926
- State: (0, smithy_client_1.expectString)(output.State),
3927
- };
3546
+ return (0, smithy_client_1.take)(output, {
3547
+ DesiredState: smithy_client_1.expectString,
3548
+ MaintenanceSchedules: (_) => de_AutoTuneMaintenanceScheduleList(_, context),
3549
+ RollbackOnDisable: smithy_client_1.expectString,
3550
+ });
3928
3551
  };
3929
3552
  const de_AutoTuneOptionsStatus = (output, context) => {
3930
- return {
3931
- Options: output.Options != null ? de_AutoTuneOptions(output.Options, context) : undefined,
3932
- Status: output.Status != null ? de_AutoTuneStatus(output.Status, context) : undefined,
3933
- };
3553
+ return (0, smithy_client_1.take)(output, {
3554
+ Options: (_) => de_AutoTuneOptions(_, context),
3555
+ Status: (_) => de_AutoTuneStatus(_, context),
3556
+ });
3934
3557
  };
3935
3558
  const de_AutoTuneStatus = (output, context) => {
3936
- return {
3937
- CreationDate: output.CreationDate != null
3938
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreationDate)))
3939
- : undefined,
3940
- ErrorMessage: (0, smithy_client_1.expectString)(output.ErrorMessage),
3941
- PendingDeletion: (0, smithy_client_1.expectBoolean)(output.PendingDeletion),
3942
- State: (0, smithy_client_1.expectString)(output.State),
3943
- UpdateDate: output.UpdateDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.UpdateDate))) : undefined,
3944
- UpdateVersion: (0, smithy_client_1.expectInt32)(output.UpdateVersion),
3945
- };
3946
- };
3947
- const de_ChangeProgressDetails = (output, context) => {
3948
- return {
3949
- ChangeId: (0, smithy_client_1.expectString)(output.ChangeId),
3950
- Message: (0, smithy_client_1.expectString)(output.Message),
3951
- };
3559
+ return (0, smithy_client_1.take)(output, {
3560
+ CreationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3561
+ ErrorMessage: smithy_client_1.expectString,
3562
+ PendingDeletion: smithy_client_1.expectBoolean,
3563
+ State: smithy_client_1.expectString,
3564
+ UpdateDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3565
+ UpdateVersion: smithy_client_1.expectInt32,
3566
+ });
3952
3567
  };
3953
3568
  const de_ChangeProgressStage = (output, context) => {
3954
- return {
3955
- Description: (0, smithy_client_1.expectString)(output.Description),
3956
- LastUpdated: output.LastUpdated != null
3957
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdated)))
3958
- : undefined,
3959
- Name: (0, smithy_client_1.expectString)(output.Name),
3960
- Status: (0, smithy_client_1.expectString)(output.Status),
3961
- };
3569
+ return (0, smithy_client_1.take)(output, {
3570
+ Description: smithy_client_1.expectString,
3571
+ LastUpdated: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3572
+ Name: smithy_client_1.expectString,
3573
+ Status: smithy_client_1.expectString,
3574
+ });
3962
3575
  };
3963
3576
  const de_ChangeProgressStageList = (output, context) => {
3964
3577
  const retVal = (output || [])
3965
3578
  .filter((e) => e != null)
3966
3579
  .map((entry) => {
3967
- if (entry === null) {
3968
- return null;
3969
- }
3970
3580
  return de_ChangeProgressStage(entry, context);
3971
3581
  });
3972
3582
  return retVal;
3973
3583
  };
3974
3584
  const de_ChangeProgressStatusDetails = (output, context) => {
3975
- return {
3976
- ChangeId: (0, smithy_client_1.expectString)(output.ChangeId),
3977
- ChangeProgressStages: output.ChangeProgressStages != null
3978
- ? de_ChangeProgressStageList(output.ChangeProgressStages, context)
3979
- : undefined,
3980
- CompletedProperties: output.CompletedProperties != null ? de_StringList(output.CompletedProperties, context) : undefined,
3981
- PendingProperties: output.PendingProperties != null ? de_StringList(output.PendingProperties, context) : undefined,
3982
- StartTime: output.StartTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.StartTime))) : undefined,
3983
- Status: (0, smithy_client_1.expectString)(output.Status),
3984
- TotalNumberOfStages: (0, smithy_client_1.expectInt32)(output.TotalNumberOfStages),
3985
- };
3986
- };
3987
- const de_CognitoOptions = (output, context) => {
3988
- return {
3989
- Enabled: (0, smithy_client_1.expectBoolean)(output.Enabled),
3990
- IdentityPoolId: (0, smithy_client_1.expectString)(output.IdentityPoolId),
3991
- RoleArn: (0, smithy_client_1.expectString)(output.RoleArn),
3992
- UserPoolId: (0, smithy_client_1.expectString)(output.UserPoolId),
3993
- };
3585
+ return (0, smithy_client_1.take)(output, {
3586
+ ChangeId: smithy_client_1.expectString,
3587
+ ChangeProgressStages: (_) => de_ChangeProgressStageList(_, context),
3588
+ CompletedProperties: smithy_client_1._json,
3589
+ PendingProperties: smithy_client_1._json,
3590
+ StartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3591
+ Status: smithy_client_1.expectString,
3592
+ TotalNumberOfStages: smithy_client_1.expectInt32,
3593
+ });
3994
3594
  };
3995
3595
  const de_CognitoOptionsStatus = (output, context) => {
3996
- return {
3997
- Options: output.Options != null ? de_CognitoOptions(output.Options, context) : undefined,
3998
- Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined,
3999
- };
4000
- };
4001
- const de_ColdStorageOptions = (output, context) => {
4002
- return {
4003
- Enabled: (0, smithy_client_1.expectBoolean)(output.Enabled),
4004
- };
4005
- };
4006
- const de_CompatibleElasticsearchVersionsList = (output, context) => {
4007
- const retVal = (output || [])
4008
- .filter((e) => e != null)
4009
- .map((entry) => {
4010
- if (entry === null) {
4011
- return null;
4012
- }
4013
- return de_CompatibleVersionsMap(entry, context);
3596
+ return (0, smithy_client_1.take)(output, {
3597
+ Options: smithy_client_1._json,
3598
+ Status: (_) => de_OptionStatus(_, context),
4014
3599
  });
4015
- return retVal;
4016
- };
4017
- const de_CompatibleVersionsMap = (output, context) => {
4018
- return {
4019
- SourceVersion: (0, smithy_client_1.expectString)(output.SourceVersion),
4020
- TargetVersions: output.TargetVersions != null ? de_ElasticsearchVersionList(output.TargetVersions, context) : undefined,
4021
- };
4022
- };
4023
- const de_DomainEndpointOptions = (output, context) => {
4024
- return {
4025
- CustomEndpoint: (0, smithy_client_1.expectString)(output.CustomEndpoint),
4026
- CustomEndpointCertificateArn: (0, smithy_client_1.expectString)(output.CustomEndpointCertificateArn),
4027
- CustomEndpointEnabled: (0, smithy_client_1.expectBoolean)(output.CustomEndpointEnabled),
4028
- EnforceHTTPS: (0, smithy_client_1.expectBoolean)(output.EnforceHTTPS),
4029
- TLSSecurityPolicy: (0, smithy_client_1.expectString)(output.TLSSecurityPolicy),
4030
- };
4031
3600
  };
4032
3601
  const de_DomainEndpointOptionsStatus = (output, context) => {
4033
- return {
4034
- Options: output.Options != null ? de_DomainEndpointOptions(output.Options, context) : undefined,
4035
- Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined,
4036
- };
4037
- };
4038
- const de_DomainInfo = (output, context) => {
4039
- return {
4040
- DomainName: (0, smithy_client_1.expectString)(output.DomainName),
4041
- EngineType: (0, smithy_client_1.expectString)(output.EngineType),
4042
- };
4043
- };
4044
- const de_DomainInfoList = (output, context) => {
4045
- const retVal = (output || [])
4046
- .filter((e) => e != null)
4047
- .map((entry) => {
4048
- if (entry === null) {
4049
- return null;
4050
- }
4051
- return de_DomainInfo(entry, context);
3602
+ return (0, smithy_client_1.take)(output, {
3603
+ Options: smithy_client_1._json,
3604
+ Status: (_) => de_OptionStatus(_, context),
4052
3605
  });
4053
- return retVal;
4054
- };
4055
- const de_DomainInformation = (output, context) => {
4056
- return {
4057
- DomainName: (0, smithy_client_1.expectString)(output.DomainName),
4058
- OwnerId: (0, smithy_client_1.expectString)(output.OwnerId),
4059
- Region: (0, smithy_client_1.expectString)(output.Region),
4060
- };
4061
3606
  };
4062
3607
  const de_DomainPackageDetails = (output, context) => {
4063
- return {
4064
- DomainName: (0, smithy_client_1.expectString)(output.DomainName),
4065
- DomainPackageStatus: (0, smithy_client_1.expectString)(output.DomainPackageStatus),
4066
- ErrorDetails: output.ErrorDetails != null ? de_ErrorDetails(output.ErrorDetails, context) : undefined,
4067
- LastUpdated: output.LastUpdated != null
4068
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdated)))
4069
- : undefined,
4070
- PackageID: (0, smithy_client_1.expectString)(output.PackageID),
4071
- PackageName: (0, smithy_client_1.expectString)(output.PackageName),
4072
- PackageType: (0, smithy_client_1.expectString)(output.PackageType),
4073
- PackageVersion: (0, smithy_client_1.expectString)(output.PackageVersion),
4074
- ReferencePath: (0, smithy_client_1.expectString)(output.ReferencePath),
4075
- };
3608
+ return (0, smithy_client_1.take)(output, {
3609
+ DomainName: smithy_client_1.expectString,
3610
+ DomainPackageStatus: smithy_client_1.expectString,
3611
+ ErrorDetails: smithy_client_1._json,
3612
+ LastUpdated: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3613
+ PackageID: smithy_client_1.expectString,
3614
+ PackageName: smithy_client_1.expectString,
3615
+ PackageType: smithy_client_1.expectString,
3616
+ PackageVersion: smithy_client_1.expectString,
3617
+ ReferencePath: smithy_client_1.expectString,
3618
+ });
4076
3619
  };
4077
3620
  const de_DomainPackageDetailsList = (output, context) => {
4078
3621
  const retVal = (output || [])
4079
3622
  .filter((e) => e != null)
4080
3623
  .map((entry) => {
4081
- if (entry === null) {
4082
- return null;
4083
- }
4084
3624
  return de_DomainPackageDetails(entry, context);
4085
3625
  });
4086
3626
  return retVal;
4087
3627
  };
4088
- const de_DryRunResults = (output, context) => {
4089
- return {
4090
- DeploymentType: (0, smithy_client_1.expectString)(output.DeploymentType),
4091
- Message: (0, smithy_client_1.expectString)(output.Message),
4092
- };
4093
- };
4094
- const de_Duration = (output, context) => {
4095
- return {
4096
- Unit: (0, smithy_client_1.expectString)(output.Unit),
4097
- Value: (0, smithy_client_1.expectLong)(output.Value),
4098
- };
4099
- };
4100
- const de_EBSOptions = (output, context) => {
4101
- return {
4102
- EBSEnabled: (0, smithy_client_1.expectBoolean)(output.EBSEnabled),
4103
- Iops: (0, smithy_client_1.expectInt32)(output.Iops),
4104
- Throughput: (0, smithy_client_1.expectInt32)(output.Throughput),
4105
- VolumeSize: (0, smithy_client_1.expectInt32)(output.VolumeSize),
4106
- VolumeType: (0, smithy_client_1.expectString)(output.VolumeType),
4107
- };
4108
- };
4109
3628
  const de_EBSOptionsStatus = (output, context) => {
4110
- return {
4111
- Options: output.Options != null ? de_EBSOptions(output.Options, context) : undefined,
4112
- Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined,
4113
- };
4114
- };
4115
- const de_ElasticsearchClusterConfig = (output, context) => {
4116
- return {
4117
- ColdStorageOptions: output.ColdStorageOptions != null ? de_ColdStorageOptions(output.ColdStorageOptions, context) : undefined,
4118
- DedicatedMasterCount: (0, smithy_client_1.expectInt32)(output.DedicatedMasterCount),
4119
- DedicatedMasterEnabled: (0, smithy_client_1.expectBoolean)(output.DedicatedMasterEnabled),
4120
- DedicatedMasterType: (0, smithy_client_1.expectString)(output.DedicatedMasterType),
4121
- InstanceCount: (0, smithy_client_1.expectInt32)(output.InstanceCount),
4122
- InstanceType: (0, smithy_client_1.expectString)(output.InstanceType),
4123
- WarmCount: (0, smithy_client_1.expectInt32)(output.WarmCount),
4124
- WarmEnabled: (0, smithy_client_1.expectBoolean)(output.WarmEnabled),
4125
- WarmType: (0, smithy_client_1.expectString)(output.WarmType),
4126
- ZoneAwarenessConfig: output.ZoneAwarenessConfig != null ? de_ZoneAwarenessConfig(output.ZoneAwarenessConfig, context) : undefined,
4127
- ZoneAwarenessEnabled: (0, smithy_client_1.expectBoolean)(output.ZoneAwarenessEnabled),
4128
- };
3629
+ return (0, smithy_client_1.take)(output, {
3630
+ Options: smithy_client_1._json,
3631
+ Status: (_) => de_OptionStatus(_, context),
3632
+ });
4129
3633
  };
4130
3634
  const de_ElasticsearchClusterConfigStatus = (output, context) => {
4131
- return {
4132
- Options: output.Options != null ? de_ElasticsearchClusterConfig(output.Options, context) : undefined,
4133
- Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined,
4134
- };
3635
+ return (0, smithy_client_1.take)(output, {
3636
+ Options: smithy_client_1._json,
3637
+ Status: (_) => de_OptionStatus(_, context),
3638
+ });
4135
3639
  };
4136
3640
  const de_ElasticsearchDomainConfig = (output, context) => {
4137
- return {
4138
- AccessPolicies: output.AccessPolicies != null ? de_AccessPoliciesStatus(output.AccessPolicies, context) : undefined,
4139
- AdvancedOptions: output.AdvancedOptions != null ? de_AdvancedOptionsStatus(output.AdvancedOptions, context) : undefined,
4140
- AdvancedSecurityOptions: output.AdvancedSecurityOptions != null
4141
- ? de_AdvancedSecurityOptionsStatus(output.AdvancedSecurityOptions, context)
4142
- : undefined,
4143
- AutoTuneOptions: output.AutoTuneOptions != null ? de_AutoTuneOptionsStatus(output.AutoTuneOptions, context) : undefined,
4144
- ChangeProgressDetails: output.ChangeProgressDetails != null
4145
- ? de_ChangeProgressDetails(output.ChangeProgressDetails, context)
4146
- : undefined,
4147
- CognitoOptions: output.CognitoOptions != null ? de_CognitoOptionsStatus(output.CognitoOptions, context) : undefined,
4148
- DomainEndpointOptions: output.DomainEndpointOptions != null
4149
- ? de_DomainEndpointOptionsStatus(output.DomainEndpointOptions, context)
4150
- : undefined,
4151
- EBSOptions: output.EBSOptions != null ? de_EBSOptionsStatus(output.EBSOptions, context) : undefined,
4152
- ElasticsearchClusterConfig: output.ElasticsearchClusterConfig != null
4153
- ? de_ElasticsearchClusterConfigStatus(output.ElasticsearchClusterConfig, context)
4154
- : undefined,
4155
- ElasticsearchVersion: output.ElasticsearchVersion != null
4156
- ? de_ElasticsearchVersionStatus(output.ElasticsearchVersion, context)
4157
- : undefined,
4158
- EncryptionAtRestOptions: output.EncryptionAtRestOptions != null
4159
- ? de_EncryptionAtRestOptionsStatus(output.EncryptionAtRestOptions, context)
4160
- : undefined,
4161
- LogPublishingOptions: output.LogPublishingOptions != null
4162
- ? de_LogPublishingOptionsStatus(output.LogPublishingOptions, context)
4163
- : undefined,
4164
- NodeToNodeEncryptionOptions: output.NodeToNodeEncryptionOptions != null
4165
- ? de_NodeToNodeEncryptionOptionsStatus(output.NodeToNodeEncryptionOptions, context)
4166
- : undefined,
4167
- SnapshotOptions: output.SnapshotOptions != null ? de_SnapshotOptionsStatus(output.SnapshotOptions, context) : undefined,
4168
- VPCOptions: output.VPCOptions != null ? de_VPCDerivedInfoStatus(output.VPCOptions, context) : undefined,
4169
- };
3641
+ return (0, smithy_client_1.take)(output, {
3642
+ AccessPolicies: (_) => de_AccessPoliciesStatus(_, context),
3643
+ AdvancedOptions: (_) => de_AdvancedOptionsStatus(_, context),
3644
+ AdvancedSecurityOptions: (_) => de_AdvancedSecurityOptionsStatus(_, context),
3645
+ AutoTuneOptions: (_) => de_AutoTuneOptionsStatus(_, context),
3646
+ ChangeProgressDetails: smithy_client_1._json,
3647
+ CognitoOptions: (_) => de_CognitoOptionsStatus(_, context),
3648
+ DomainEndpointOptions: (_) => de_DomainEndpointOptionsStatus(_, context),
3649
+ EBSOptions: (_) => de_EBSOptionsStatus(_, context),
3650
+ ElasticsearchClusterConfig: (_) => de_ElasticsearchClusterConfigStatus(_, context),
3651
+ ElasticsearchVersion: (_) => de_ElasticsearchVersionStatus(_, context),
3652
+ EncryptionAtRestOptions: (_) => de_EncryptionAtRestOptionsStatus(_, context),
3653
+ LogPublishingOptions: (_) => de_LogPublishingOptionsStatus(_, context),
3654
+ NodeToNodeEncryptionOptions: (_) => de_NodeToNodeEncryptionOptionsStatus(_, context),
3655
+ SnapshotOptions: (_) => de_SnapshotOptionsStatus(_, context),
3656
+ VPCOptions: (_) => de_VPCDerivedInfoStatus(_, context),
3657
+ });
4170
3658
  };
4171
3659
  const de_ElasticsearchDomainStatus = (output, context) => {
4172
- return {
4173
- ARN: (0, smithy_client_1.expectString)(output.ARN),
4174
- AccessPolicies: (0, smithy_client_1.expectString)(output.AccessPolicies),
4175
- AdvancedOptions: output.AdvancedOptions != null ? de_AdvancedOptions(output.AdvancedOptions, context) : undefined,
4176
- AdvancedSecurityOptions: output.AdvancedSecurityOptions != null
4177
- ? de_AdvancedSecurityOptions(output.AdvancedSecurityOptions, context)
4178
- : undefined,
4179
- AutoTuneOptions: output.AutoTuneOptions != null ? de_AutoTuneOptionsOutput(output.AutoTuneOptions, context) : undefined,
4180
- ChangeProgressDetails: output.ChangeProgressDetails != null
4181
- ? de_ChangeProgressDetails(output.ChangeProgressDetails, context)
4182
- : undefined,
4183
- CognitoOptions: output.CognitoOptions != null ? de_CognitoOptions(output.CognitoOptions, context) : undefined,
4184
- Created: (0, smithy_client_1.expectBoolean)(output.Created),
4185
- Deleted: (0, smithy_client_1.expectBoolean)(output.Deleted),
4186
- DomainEndpointOptions: output.DomainEndpointOptions != null
4187
- ? de_DomainEndpointOptions(output.DomainEndpointOptions, context)
4188
- : undefined,
4189
- DomainId: (0, smithy_client_1.expectString)(output.DomainId),
4190
- DomainName: (0, smithy_client_1.expectString)(output.DomainName),
4191
- EBSOptions: output.EBSOptions != null ? de_EBSOptions(output.EBSOptions, context) : undefined,
4192
- ElasticsearchClusterConfig: output.ElasticsearchClusterConfig != null
4193
- ? de_ElasticsearchClusterConfig(output.ElasticsearchClusterConfig, context)
4194
- : undefined,
4195
- ElasticsearchVersion: (0, smithy_client_1.expectString)(output.ElasticsearchVersion),
4196
- EncryptionAtRestOptions: output.EncryptionAtRestOptions != null
4197
- ? de_EncryptionAtRestOptions(output.EncryptionAtRestOptions, context)
4198
- : undefined,
4199
- Endpoint: (0, smithy_client_1.expectString)(output.Endpoint),
4200
- Endpoints: output.Endpoints != null ? de_EndpointsMap(output.Endpoints, context) : undefined,
4201
- LogPublishingOptions: output.LogPublishingOptions != null ? de_LogPublishingOptions(output.LogPublishingOptions, context) : undefined,
4202
- NodeToNodeEncryptionOptions: output.NodeToNodeEncryptionOptions != null
4203
- ? de_NodeToNodeEncryptionOptions(output.NodeToNodeEncryptionOptions, context)
4204
- : undefined,
4205
- Processing: (0, smithy_client_1.expectBoolean)(output.Processing),
4206
- ServiceSoftwareOptions: output.ServiceSoftwareOptions != null
4207
- ? de_ServiceSoftwareOptions(output.ServiceSoftwareOptions, context)
4208
- : undefined,
4209
- SnapshotOptions: output.SnapshotOptions != null ? de_SnapshotOptions(output.SnapshotOptions, context) : undefined,
4210
- UpgradeProcessing: (0, smithy_client_1.expectBoolean)(output.UpgradeProcessing),
4211
- VPCOptions: output.VPCOptions != null ? de_VPCDerivedInfo(output.VPCOptions, context) : undefined,
4212
- };
3660
+ return (0, smithy_client_1.take)(output, {
3661
+ ARN: smithy_client_1.expectString,
3662
+ AccessPolicies: smithy_client_1.expectString,
3663
+ AdvancedOptions: smithy_client_1._json,
3664
+ AdvancedSecurityOptions: (_) => de_AdvancedSecurityOptions(_, context),
3665
+ AutoTuneOptions: smithy_client_1._json,
3666
+ ChangeProgressDetails: smithy_client_1._json,
3667
+ CognitoOptions: smithy_client_1._json,
3668
+ Created: smithy_client_1.expectBoolean,
3669
+ Deleted: smithy_client_1.expectBoolean,
3670
+ DomainEndpointOptions: smithy_client_1._json,
3671
+ DomainId: smithy_client_1.expectString,
3672
+ DomainName: smithy_client_1.expectString,
3673
+ EBSOptions: smithy_client_1._json,
3674
+ ElasticsearchClusterConfig: smithy_client_1._json,
3675
+ ElasticsearchVersion: smithy_client_1.expectString,
3676
+ EncryptionAtRestOptions: smithy_client_1._json,
3677
+ Endpoint: smithy_client_1.expectString,
3678
+ Endpoints: smithy_client_1._json,
3679
+ LogPublishingOptions: smithy_client_1._json,
3680
+ NodeToNodeEncryptionOptions: smithy_client_1._json,
3681
+ Processing: smithy_client_1.expectBoolean,
3682
+ ServiceSoftwareOptions: (_) => de_ServiceSoftwareOptions(_, context),
3683
+ SnapshotOptions: smithy_client_1._json,
3684
+ UpgradeProcessing: smithy_client_1.expectBoolean,
3685
+ VPCOptions: smithy_client_1._json,
3686
+ });
4213
3687
  };
4214
3688
  const de_ElasticsearchDomainStatusList = (output, context) => {
4215
3689
  const retVal = (output || [])
4216
3690
  .filter((e) => e != null)
4217
3691
  .map((entry) => {
4218
- if (entry === null) {
4219
- return null;
4220
- }
4221
3692
  return de_ElasticsearchDomainStatus(entry, context);
4222
3693
  });
4223
3694
  return retVal;
4224
3695
  };
4225
- const de_ElasticsearchInstanceTypeList = (output, context) => {
4226
- const retVal = (output || [])
4227
- .filter((e) => e != null)
4228
- .map((entry) => {
4229
- if (entry === null) {
4230
- return null;
4231
- }
4232
- return (0, smithy_client_1.expectString)(entry);
4233
- });
4234
- return retVal;
4235
- };
4236
- const de_ElasticsearchVersionList = (output, context) => {
4237
- const retVal = (output || [])
4238
- .filter((e) => e != null)
4239
- .map((entry) => {
4240
- if (entry === null) {
4241
- return null;
4242
- }
4243
- return (0, smithy_client_1.expectString)(entry);
4244
- });
4245
- return retVal;
4246
- };
4247
3696
  const de_ElasticsearchVersionStatus = (output, context) => {
4248
- return {
4249
- Options: (0, smithy_client_1.expectString)(output.Options),
4250
- Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined,
4251
- };
4252
- };
4253
- const de_EncryptionAtRestOptions = (output, context) => {
4254
- return {
4255
- Enabled: (0, smithy_client_1.expectBoolean)(output.Enabled),
4256
- KmsKeyId: (0, smithy_client_1.expectString)(output.KmsKeyId),
4257
- };
4258
- };
4259
- const de_EncryptionAtRestOptionsStatus = (output, context) => {
4260
- return {
4261
- Options: output.Options != null ? de_EncryptionAtRestOptions(output.Options, context) : undefined,
4262
- Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined,
4263
- };
4264
- };
4265
- const de_EndpointsMap = (output, context) => {
4266
- return Object.entries(output).reduce((acc, [key, value]) => {
4267
- if (value === null) {
4268
- return acc;
4269
- }
4270
- acc[key] = (0, smithy_client_1.expectString)(value);
4271
- return acc;
4272
- }, {});
4273
- };
4274
- const de_ErrorDetails = (output, context) => {
4275
- return {
4276
- ErrorMessage: (0, smithy_client_1.expectString)(output.ErrorMessage),
4277
- ErrorType: (0, smithy_client_1.expectString)(output.ErrorType),
4278
- };
4279
- };
4280
- const de_InboundCrossClusterSearchConnection = (output, context) => {
4281
- return {
4282
- ConnectionStatus: output.ConnectionStatus != null
4283
- ? de_InboundCrossClusterSearchConnectionStatus(output.ConnectionStatus, context)
4284
- : undefined,
4285
- CrossClusterSearchConnectionId: (0, smithy_client_1.expectString)(output.CrossClusterSearchConnectionId),
4286
- DestinationDomainInfo: output.DestinationDomainInfo != null ? de_DomainInformation(output.DestinationDomainInfo, context) : undefined,
4287
- SourceDomainInfo: output.SourceDomainInfo != null ? de_DomainInformation(output.SourceDomainInfo, context) : undefined,
4288
- };
4289
- };
4290
- const de_InboundCrossClusterSearchConnections = (output, context) => {
4291
- const retVal = (output || [])
4292
- .filter((e) => e != null)
4293
- .map((entry) => {
4294
- if (entry === null) {
4295
- return null;
4296
- }
4297
- return de_InboundCrossClusterSearchConnection(entry, context);
4298
- });
4299
- return retVal;
4300
- };
4301
- const de_InboundCrossClusterSearchConnectionStatus = (output, context) => {
4302
- return {
4303
- Message: (0, smithy_client_1.expectString)(output.Message),
4304
- StatusCode: (0, smithy_client_1.expectString)(output.StatusCode),
4305
- };
4306
- };
4307
- const de_InstanceCountLimits = (output, context) => {
4308
- return {
4309
- MaximumInstanceCount: (0, smithy_client_1.expectInt32)(output.MaximumInstanceCount),
4310
- MinimumInstanceCount: (0, smithy_client_1.expectInt32)(output.MinimumInstanceCount),
4311
- };
4312
- };
4313
- const de_InstanceLimits = (output, context) => {
4314
- return {
4315
- InstanceCountLimits: output.InstanceCountLimits != null ? de_InstanceCountLimits(output.InstanceCountLimits, context) : undefined,
4316
- };
4317
- };
4318
- const de_Issues = (output, context) => {
4319
- const retVal = (output || [])
4320
- .filter((e) => e != null)
4321
- .map((entry) => {
4322
- if (entry === null) {
4323
- return null;
4324
- }
4325
- return (0, smithy_client_1.expectString)(entry);
3697
+ return (0, smithy_client_1.take)(output, {
3698
+ Options: smithy_client_1.expectString,
3699
+ Status: (_) => de_OptionStatus(_, context),
4326
3700
  });
4327
- return retVal;
4328
- };
4329
- const de_Limits = (output, context) => {
4330
- return {
4331
- AdditionalLimits: output.AdditionalLimits != null ? de_AdditionalLimitList(output.AdditionalLimits, context) : undefined,
4332
- InstanceLimits: output.InstanceLimits != null ? de_InstanceLimits(output.InstanceLimits, context) : undefined,
4333
- StorageTypes: output.StorageTypes != null ? de_StorageTypeList(output.StorageTypes, context) : undefined,
4334
- };
4335
- };
4336
- const de_LimitsByRole = (output, context) => {
4337
- return Object.entries(output).reduce((acc, [key, value]) => {
4338
- if (value === null) {
4339
- return acc;
4340
- }
4341
- acc[key] = de_Limits(value, context);
4342
- return acc;
4343
- }, {});
4344
3701
  };
4345
- const de_LimitValueList = (output, context) => {
4346
- const retVal = (output || [])
4347
- .filter((e) => e != null)
4348
- .map((entry) => {
4349
- if (entry === null) {
4350
- return null;
4351
- }
4352
- return (0, smithy_client_1.expectString)(entry);
3702
+ const de_EncryptionAtRestOptionsStatus = (output, context) => {
3703
+ return (0, smithy_client_1.take)(output, {
3704
+ Options: smithy_client_1._json,
3705
+ Status: (_) => de_OptionStatus(_, context),
4353
3706
  });
4354
- return retVal;
4355
- };
4356
- const de_LogPublishingOption = (output, context) => {
4357
- return {
4358
- CloudWatchLogsLogGroupArn: (0, smithy_client_1.expectString)(output.CloudWatchLogsLogGroupArn),
4359
- Enabled: (0, smithy_client_1.expectBoolean)(output.Enabled),
4360
- };
4361
- };
4362
- const de_LogPublishingOptions = (output, context) => {
4363
- return Object.entries(output).reduce((acc, [key, value]) => {
4364
- if (value === null) {
4365
- return acc;
4366
- }
4367
- acc[key] = de_LogPublishingOption(value, context);
4368
- return acc;
4369
- }, {});
4370
3707
  };
4371
3708
  const de_LogPublishingOptionsStatus = (output, context) => {
4372
- return {
4373
- Options: output.Options != null ? de_LogPublishingOptions(output.Options, context) : undefined,
4374
- Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined,
4375
- };
4376
- };
4377
- const de_NodeToNodeEncryptionOptions = (output, context) => {
4378
- return {
4379
- Enabled: (0, smithy_client_1.expectBoolean)(output.Enabled),
4380
- };
3709
+ return (0, smithy_client_1.take)(output, {
3710
+ Options: smithy_client_1._json,
3711
+ Status: (_) => de_OptionStatus(_, context),
3712
+ });
4381
3713
  };
4382
3714
  const de_NodeToNodeEncryptionOptionsStatus = (output, context) => {
4383
- return {
4384
- Options: output.Options != null ? de_NodeToNodeEncryptionOptions(output.Options, context) : undefined,
4385
- Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined,
4386
- };
3715
+ return (0, smithy_client_1.take)(output, {
3716
+ Options: smithy_client_1._json,
3717
+ Status: (_) => de_OptionStatus(_, context),
3718
+ });
4387
3719
  };
4388
3720
  const de_OptionStatus = (output, context) => {
4389
- return {
4390
- CreationDate: output.CreationDate != null
4391
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreationDate)))
4392
- : undefined,
4393
- PendingDeletion: (0, smithy_client_1.expectBoolean)(output.PendingDeletion),
4394
- State: (0, smithy_client_1.expectString)(output.State),
4395
- UpdateDate: output.UpdateDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.UpdateDate))) : undefined,
4396
- UpdateVersion: (0, smithy_client_1.expectInt32)(output.UpdateVersion),
4397
- };
4398
- };
4399
- const de_OutboundCrossClusterSearchConnection = (output, context) => {
4400
- return {
4401
- ConnectionAlias: (0, smithy_client_1.expectString)(output.ConnectionAlias),
4402
- ConnectionStatus: output.ConnectionStatus != null
4403
- ? de_OutboundCrossClusterSearchConnectionStatus(output.ConnectionStatus, context)
4404
- : undefined,
4405
- CrossClusterSearchConnectionId: (0, smithy_client_1.expectString)(output.CrossClusterSearchConnectionId),
4406
- DestinationDomainInfo: output.DestinationDomainInfo != null ? de_DomainInformation(output.DestinationDomainInfo, context) : undefined,
4407
- SourceDomainInfo: output.SourceDomainInfo != null ? de_DomainInformation(output.SourceDomainInfo, context) : undefined,
4408
- };
4409
- };
4410
- const de_OutboundCrossClusterSearchConnections = (output, context) => {
4411
- const retVal = (output || [])
4412
- .filter((e) => e != null)
4413
- .map((entry) => {
4414
- if (entry === null) {
4415
- return null;
4416
- }
4417
- return de_OutboundCrossClusterSearchConnection(entry, context);
3721
+ return (0, smithy_client_1.take)(output, {
3722
+ CreationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3723
+ PendingDeletion: smithy_client_1.expectBoolean,
3724
+ State: smithy_client_1.expectString,
3725
+ UpdateDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3726
+ UpdateVersion: smithy_client_1.expectInt32,
4418
3727
  });
4419
- return retVal;
4420
- };
4421
- const de_OutboundCrossClusterSearchConnectionStatus = (output, context) => {
4422
- return {
4423
- Message: (0, smithy_client_1.expectString)(output.Message),
4424
- StatusCode: (0, smithy_client_1.expectString)(output.StatusCode),
4425
- };
4426
3728
  };
4427
3729
  const de_PackageDetails = (output, context) => {
4428
- return {
4429
- AvailablePackageVersion: (0, smithy_client_1.expectString)(output.AvailablePackageVersion),
4430
- CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
4431
- ErrorDetails: output.ErrorDetails != null ? de_ErrorDetails(output.ErrorDetails, context) : undefined,
4432
- LastUpdatedAt: output.LastUpdatedAt != null
4433
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdatedAt)))
4434
- : undefined,
4435
- PackageDescription: (0, smithy_client_1.expectString)(output.PackageDescription),
4436
- PackageID: (0, smithy_client_1.expectString)(output.PackageID),
4437
- PackageName: (0, smithy_client_1.expectString)(output.PackageName),
4438
- PackageStatus: (0, smithy_client_1.expectString)(output.PackageStatus),
4439
- PackageType: (0, smithy_client_1.expectString)(output.PackageType),
4440
- };
3730
+ return (0, smithy_client_1.take)(output, {
3731
+ AvailablePackageVersion: smithy_client_1.expectString,
3732
+ CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3733
+ ErrorDetails: smithy_client_1._json,
3734
+ LastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3735
+ PackageDescription: smithy_client_1.expectString,
3736
+ PackageID: smithy_client_1.expectString,
3737
+ PackageName: smithy_client_1.expectString,
3738
+ PackageStatus: smithy_client_1.expectString,
3739
+ PackageType: smithy_client_1.expectString,
3740
+ });
4441
3741
  };
4442
3742
  const de_PackageDetailsList = (output, context) => {
4443
3743
  const retVal = (output || [])
4444
3744
  .filter((e) => e != null)
4445
3745
  .map((entry) => {
4446
- if (entry === null) {
4447
- return null;
4448
- }
4449
3746
  return de_PackageDetails(entry, context);
4450
3747
  });
4451
3748
  return retVal;
4452
3749
  };
4453
3750
  const de_PackageVersionHistory = (output, context) => {
4454
- return {
4455
- CommitMessage: (0, smithy_client_1.expectString)(output.CommitMessage),
4456
- CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
4457
- PackageVersion: (0, smithy_client_1.expectString)(output.PackageVersion),
4458
- };
3751
+ return (0, smithy_client_1.take)(output, {
3752
+ CommitMessage: smithy_client_1.expectString,
3753
+ CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3754
+ PackageVersion: smithy_client_1.expectString,
3755
+ });
4459
3756
  };
4460
3757
  const de_PackageVersionHistoryList = (output, context) => {
4461
3758
  const retVal = (output || [])
4462
3759
  .filter((e) => e != null)
4463
3760
  .map((entry) => {
4464
- if (entry === null) {
4465
- return null;
4466
- }
4467
3761
  return de_PackageVersionHistory(entry, context);
4468
3762
  });
4469
3763
  return retVal;
4470
3764
  };
4471
3765
  const de_RecurringCharge = (output, context) => {
4472
- return {
4473
- RecurringChargeAmount: (0, smithy_client_1.limitedParseDouble)(output.RecurringChargeAmount),
4474
- RecurringChargeFrequency: (0, smithy_client_1.expectString)(output.RecurringChargeFrequency),
4475
- };
3766
+ return (0, smithy_client_1.take)(output, {
3767
+ RecurringChargeAmount: smithy_client_1.limitedParseDouble,
3768
+ RecurringChargeFrequency: smithy_client_1.expectString,
3769
+ });
4476
3770
  };
4477
3771
  const de_RecurringChargeList = (output, context) => {
4478
3772
  const retVal = (output || [])
4479
3773
  .filter((e) => e != null)
4480
3774
  .map((entry) => {
4481
- if (entry === null) {
4482
- return null;
4483
- }
4484
3775
  return de_RecurringCharge(entry, context);
4485
3776
  });
4486
3777
  return retVal;
4487
3778
  };
4488
3779
  const de_ReservedElasticsearchInstance = (output, context) => {
4489
- return {
4490
- CurrencyCode: (0, smithy_client_1.expectString)(output.CurrencyCode),
4491
- Duration: (0, smithy_client_1.expectInt32)(output.Duration),
4492
- ElasticsearchInstanceCount: (0, smithy_client_1.expectInt32)(output.ElasticsearchInstanceCount),
4493
- ElasticsearchInstanceType: (0, smithy_client_1.expectString)(output.ElasticsearchInstanceType),
4494
- FixedPrice: (0, smithy_client_1.limitedParseDouble)(output.FixedPrice),
4495
- PaymentOption: (0, smithy_client_1.expectString)(output.PaymentOption),
4496
- RecurringCharges: output.RecurringCharges != null ? de_RecurringChargeList(output.RecurringCharges, context) : undefined,
4497
- ReservationName: (0, smithy_client_1.expectString)(output.ReservationName),
4498
- ReservedElasticsearchInstanceId: (0, smithy_client_1.expectString)(output.ReservedElasticsearchInstanceId),
4499
- ReservedElasticsearchInstanceOfferingId: (0, smithy_client_1.expectString)(output.ReservedElasticsearchInstanceOfferingId),
4500
- StartTime: output.StartTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.StartTime))) : undefined,
4501
- State: (0, smithy_client_1.expectString)(output.State),
4502
- UsagePrice: (0, smithy_client_1.limitedParseDouble)(output.UsagePrice),
4503
- };
3780
+ return (0, smithy_client_1.take)(output, {
3781
+ CurrencyCode: smithy_client_1.expectString,
3782
+ Duration: smithy_client_1.expectInt32,
3783
+ ElasticsearchInstanceCount: smithy_client_1.expectInt32,
3784
+ ElasticsearchInstanceType: smithy_client_1.expectString,
3785
+ FixedPrice: smithy_client_1.limitedParseDouble,
3786
+ PaymentOption: smithy_client_1.expectString,
3787
+ RecurringCharges: (_) => de_RecurringChargeList(_, context),
3788
+ ReservationName: smithy_client_1.expectString,
3789
+ ReservedElasticsearchInstanceId: smithy_client_1.expectString,
3790
+ ReservedElasticsearchInstanceOfferingId: smithy_client_1.expectString,
3791
+ StartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3792
+ State: smithy_client_1.expectString,
3793
+ UsagePrice: smithy_client_1.limitedParseDouble,
3794
+ });
4504
3795
  };
4505
3796
  const de_ReservedElasticsearchInstanceList = (output, context) => {
4506
3797
  const retVal = (output || [])
4507
3798
  .filter((e) => e != null)
4508
3799
  .map((entry) => {
4509
- if (entry === null) {
4510
- return null;
4511
- }
4512
3800
  return de_ReservedElasticsearchInstance(entry, context);
4513
3801
  });
4514
3802
  return retVal;
4515
3803
  };
4516
3804
  const de_ReservedElasticsearchInstanceOffering = (output, context) => {
4517
- return {
4518
- CurrencyCode: (0, smithy_client_1.expectString)(output.CurrencyCode),
4519
- Duration: (0, smithy_client_1.expectInt32)(output.Duration),
4520
- ElasticsearchInstanceType: (0, smithy_client_1.expectString)(output.ElasticsearchInstanceType),
4521
- FixedPrice: (0, smithy_client_1.limitedParseDouble)(output.FixedPrice),
4522
- PaymentOption: (0, smithy_client_1.expectString)(output.PaymentOption),
4523
- RecurringCharges: output.RecurringCharges != null ? de_RecurringChargeList(output.RecurringCharges, context) : undefined,
4524
- ReservedElasticsearchInstanceOfferingId: (0, smithy_client_1.expectString)(output.ReservedElasticsearchInstanceOfferingId),
4525
- UsagePrice: (0, smithy_client_1.limitedParseDouble)(output.UsagePrice),
4526
- };
3805
+ return (0, smithy_client_1.take)(output, {
3806
+ CurrencyCode: smithy_client_1.expectString,
3807
+ Duration: smithy_client_1.expectInt32,
3808
+ ElasticsearchInstanceType: smithy_client_1.expectString,
3809
+ FixedPrice: smithy_client_1.limitedParseDouble,
3810
+ PaymentOption: smithy_client_1.expectString,
3811
+ RecurringCharges: (_) => de_RecurringChargeList(_, context),
3812
+ ReservedElasticsearchInstanceOfferingId: smithy_client_1.expectString,
3813
+ UsagePrice: smithy_client_1.limitedParseDouble,
3814
+ });
4527
3815
  };
4528
3816
  const de_ReservedElasticsearchInstanceOfferingList = (output, context) => {
4529
3817
  const retVal = (output || [])
4530
3818
  .filter((e) => e != null)
4531
3819
  .map((entry) => {
4532
- if (entry === null) {
4533
- return null;
4534
- }
4535
3820
  return de_ReservedElasticsearchInstanceOffering(entry, context);
4536
3821
  });
4537
3822
  return retVal;
4538
3823
  };
4539
- const de_SAMLIdp = (output, context) => {
4540
- return {
4541
- EntityId: (0, smithy_client_1.expectString)(output.EntityId),
4542
- MetadataContent: (0, smithy_client_1.expectString)(output.MetadataContent),
4543
- };
4544
- };
4545
- const de_SAMLOptionsOutput = (output, context) => {
4546
- return {
4547
- Enabled: (0, smithy_client_1.expectBoolean)(output.Enabled),
4548
- Idp: output.Idp != null ? de_SAMLIdp(output.Idp, context) : undefined,
4549
- RolesKey: (0, smithy_client_1.expectString)(output.RolesKey),
4550
- SessionTimeoutMinutes: (0, smithy_client_1.expectInt32)(output.SessionTimeoutMinutes),
4551
- SubjectKey: (0, smithy_client_1.expectString)(output.SubjectKey),
4552
- };
4553
- };
4554
3824
  const de_ScheduledAutoTuneDetails = (output, context) => {
4555
- return {
4556
- Action: (0, smithy_client_1.expectString)(output.Action),
4557
- ActionType: (0, smithy_client_1.expectString)(output.ActionType),
4558
- Date: output.Date != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.Date))) : undefined,
4559
- Severity: (0, smithy_client_1.expectString)(output.Severity),
4560
- };
4561
- };
4562
- const de_ServiceSoftwareOptions = (output, context) => {
4563
- return {
4564
- AutomatedUpdateDate: output.AutomatedUpdateDate != null
4565
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.AutomatedUpdateDate)))
4566
- : undefined,
4567
- Cancellable: (0, smithy_client_1.expectBoolean)(output.Cancellable),
4568
- CurrentVersion: (0, smithy_client_1.expectString)(output.CurrentVersion),
4569
- Description: (0, smithy_client_1.expectString)(output.Description),
4570
- NewVersion: (0, smithy_client_1.expectString)(output.NewVersion),
4571
- OptionalDeployment: (0, smithy_client_1.expectBoolean)(output.OptionalDeployment),
4572
- UpdateAvailable: (0, smithy_client_1.expectBoolean)(output.UpdateAvailable),
4573
- UpdateStatus: (0, smithy_client_1.expectString)(output.UpdateStatus),
4574
- };
4575
- };
4576
- const de_SnapshotOptions = (output, context) => {
4577
- return {
4578
- AutomatedSnapshotStartHour: (0, smithy_client_1.expectInt32)(output.AutomatedSnapshotStartHour),
4579
- };
4580
- };
4581
- const de_SnapshotOptionsStatus = (output, context) => {
4582
- return {
4583
- Options: output.Options != null ? de_SnapshotOptions(output.Options, context) : undefined,
4584
- Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined,
4585
- };
4586
- };
4587
- const de_StorageType = (output, context) => {
4588
- return {
4589
- StorageSubTypeName: (0, smithy_client_1.expectString)(output.StorageSubTypeName),
4590
- StorageTypeLimits: output.StorageTypeLimits != null ? de_StorageTypeLimitList(output.StorageTypeLimits, context) : undefined,
4591
- StorageTypeName: (0, smithy_client_1.expectString)(output.StorageTypeName),
4592
- };
4593
- };
4594
- const de_StorageTypeLimit = (output, context) => {
4595
- return {
4596
- LimitName: (0, smithy_client_1.expectString)(output.LimitName),
4597
- LimitValues: output.LimitValues != null ? de_LimitValueList(output.LimitValues, context) : undefined,
4598
- };
4599
- };
4600
- const de_StorageTypeLimitList = (output, context) => {
4601
- const retVal = (output || [])
4602
- .filter((e) => e != null)
4603
- .map((entry) => {
4604
- if (entry === null) {
4605
- return null;
4606
- }
4607
- return de_StorageTypeLimit(entry, context);
4608
- });
4609
- return retVal;
4610
- };
4611
- const de_StorageTypeList = (output, context) => {
4612
- const retVal = (output || [])
4613
- .filter((e) => e != null)
4614
- .map((entry) => {
4615
- if (entry === null) {
4616
- return null;
4617
- }
4618
- return de_StorageType(entry, context);
3825
+ return (0, smithy_client_1.take)(output, {
3826
+ Action: smithy_client_1.expectString,
3827
+ ActionType: smithy_client_1.expectString,
3828
+ Date: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3829
+ Severity: smithy_client_1.expectString,
4619
3830
  });
4620
- return retVal;
4621
3831
  };
4622
- const de_StringList = (output, context) => {
4623
- const retVal = (output || [])
4624
- .filter((e) => e != null)
4625
- .map((entry) => {
4626
- if (entry === null) {
4627
- return null;
4628
- }
4629
- return (0, smithy_client_1.expectString)(entry);
3832
+ const de_ServiceSoftwareOptions = (output, context) => {
3833
+ return (0, smithy_client_1.take)(output, {
3834
+ AutomatedUpdateDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3835
+ Cancellable: smithy_client_1.expectBoolean,
3836
+ CurrentVersion: smithy_client_1.expectString,
3837
+ Description: smithy_client_1.expectString,
3838
+ NewVersion: smithy_client_1.expectString,
3839
+ OptionalDeployment: smithy_client_1.expectBoolean,
3840
+ UpdateAvailable: smithy_client_1.expectBoolean,
3841
+ UpdateStatus: smithy_client_1.expectString,
4630
3842
  });
4631
- return retVal;
4632
- };
4633
- const de_Tag = (output, context) => {
4634
- return {
4635
- Key: (0, smithy_client_1.expectString)(output.Key),
4636
- Value: (0, smithy_client_1.expectString)(output.Value),
4637
- };
4638
3843
  };
4639
- const de_TagList = (output, context) => {
4640
- const retVal = (output || [])
4641
- .filter((e) => e != null)
4642
- .map((entry) => {
4643
- if (entry === null) {
4644
- return null;
4645
- }
4646
- return de_Tag(entry, context);
3844
+ const de_SnapshotOptionsStatus = (output, context) => {
3845
+ return (0, smithy_client_1.take)(output, {
3846
+ Options: smithy_client_1._json,
3847
+ Status: (_) => de_OptionStatus(_, context),
4647
3848
  });
4648
- return retVal;
4649
3849
  };
4650
3850
  const de_UpgradeHistory = (output, context) => {
4651
- return {
4652
- StartTimestamp: output.StartTimestamp != null
4653
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.StartTimestamp)))
4654
- : undefined,
4655
- StepsList: output.StepsList != null ? de_UpgradeStepsList(output.StepsList, context) : undefined,
4656
- UpgradeName: (0, smithy_client_1.expectString)(output.UpgradeName),
4657
- UpgradeStatus: (0, smithy_client_1.expectString)(output.UpgradeStatus),
4658
- };
3851
+ return (0, smithy_client_1.take)(output, {
3852
+ StartTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3853
+ StepsList: (_) => de_UpgradeStepsList(_, context),
3854
+ UpgradeName: smithy_client_1.expectString,
3855
+ UpgradeStatus: smithy_client_1.expectString,
3856
+ });
4659
3857
  };
4660
3858
  const de_UpgradeHistoryList = (output, context) => {
4661
3859
  const retVal = (output || [])
4662
3860
  .filter((e) => e != null)
4663
3861
  .map((entry) => {
4664
- if (entry === null) {
4665
- return null;
4666
- }
4667
3862
  return de_UpgradeHistory(entry, context);
4668
3863
  });
4669
3864
  return retVal;
4670
3865
  };
4671
3866
  const de_UpgradeStepItem = (output, context) => {
4672
- return {
4673
- Issues: output.Issues != null ? de_Issues(output.Issues, context) : undefined,
4674
- ProgressPercent: (0, smithy_client_1.limitedParseDouble)(output.ProgressPercent),
4675
- UpgradeStep: (0, smithy_client_1.expectString)(output.UpgradeStep),
4676
- UpgradeStepStatus: (0, smithy_client_1.expectString)(output.UpgradeStepStatus),
4677
- };
3867
+ return (0, smithy_client_1.take)(output, {
3868
+ Issues: smithy_client_1._json,
3869
+ ProgressPercent: smithy_client_1.limitedParseDouble,
3870
+ UpgradeStep: smithy_client_1.expectString,
3871
+ UpgradeStepStatus: smithy_client_1.expectString,
3872
+ });
4678
3873
  };
4679
3874
  const de_UpgradeStepsList = (output, context) => {
4680
3875
  const retVal = (output || [])
4681
3876
  .filter((e) => e != null)
4682
3877
  .map((entry) => {
4683
- if (entry === null) {
4684
- return null;
4685
- }
4686
3878
  return de_UpgradeStepItem(entry, context);
4687
3879
  });
4688
3880
  return retVal;
4689
3881
  };
4690
- const de_VPCDerivedInfo = (output, context) => {
4691
- return {
4692
- AvailabilityZones: output.AvailabilityZones != null ? de_StringList(output.AvailabilityZones, context) : undefined,
4693
- SecurityGroupIds: output.SecurityGroupIds != null ? de_StringList(output.SecurityGroupIds, context) : undefined,
4694
- SubnetIds: output.SubnetIds != null ? de_StringList(output.SubnetIds, context) : undefined,
4695
- VPCId: (0, smithy_client_1.expectString)(output.VPCId),
4696
- };
4697
- };
4698
3882
  const de_VPCDerivedInfoStatus = (output, context) => {
4699
- return {
4700
- Options: output.Options != null ? de_VPCDerivedInfo(output.Options, context) : undefined,
4701
- Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined,
4702
- };
4703
- };
4704
- const de_VpcEndpoint = (output, context) => {
4705
- return {
4706
- DomainArn: (0, smithy_client_1.expectString)(output.DomainArn),
4707
- Endpoint: (0, smithy_client_1.expectString)(output.Endpoint),
4708
- Status: (0, smithy_client_1.expectString)(output.Status),
4709
- VpcEndpointId: (0, smithy_client_1.expectString)(output.VpcEndpointId),
4710
- VpcEndpointOwner: (0, smithy_client_1.expectString)(output.VpcEndpointOwner),
4711
- VpcOptions: output.VpcOptions != null ? de_VPCDerivedInfo(output.VpcOptions, context) : undefined,
4712
- };
4713
- };
4714
- const de_VpcEndpointError = (output, context) => {
4715
- return {
4716
- ErrorCode: (0, smithy_client_1.expectString)(output.ErrorCode),
4717
- ErrorMessage: (0, smithy_client_1.expectString)(output.ErrorMessage),
4718
- VpcEndpointId: (0, smithy_client_1.expectString)(output.VpcEndpointId),
4719
- };
4720
- };
4721
- const de_VpcEndpointErrorList = (output, context) => {
4722
- const retVal = (output || [])
4723
- .filter((e) => e != null)
4724
- .map((entry) => {
4725
- if (entry === null) {
4726
- return null;
4727
- }
4728
- return de_VpcEndpointError(entry, context);
4729
- });
4730
- return retVal;
4731
- };
4732
- const de_VpcEndpoints = (output, context) => {
4733
- const retVal = (output || [])
4734
- .filter((e) => e != null)
4735
- .map((entry) => {
4736
- if (entry === null) {
4737
- return null;
4738
- }
4739
- return de_VpcEndpoint(entry, context);
4740
- });
4741
- return retVal;
4742
- };
4743
- const de_VpcEndpointSummary = (output, context) => {
4744
- return {
4745
- DomainArn: (0, smithy_client_1.expectString)(output.DomainArn),
4746
- Status: (0, smithy_client_1.expectString)(output.Status),
4747
- VpcEndpointId: (0, smithy_client_1.expectString)(output.VpcEndpointId),
4748
- VpcEndpointOwner: (0, smithy_client_1.expectString)(output.VpcEndpointOwner),
4749
- };
4750
- };
4751
- const de_VpcEndpointSummaryList = (output, context) => {
4752
- const retVal = (output || [])
4753
- .filter((e) => e != null)
4754
- .map((entry) => {
4755
- if (entry === null) {
4756
- return null;
4757
- }
4758
- return de_VpcEndpointSummary(entry, context);
3883
+ return (0, smithy_client_1.take)(output, {
3884
+ Options: smithy_client_1._json,
3885
+ Status: (_) => de_OptionStatus(_, context),
4759
3886
  });
4760
- return retVal;
4761
- };
4762
- const de_ZoneAwarenessConfig = (output, context) => {
4763
- return {
4764
- AvailabilityZoneCount: (0, smithy_client_1.expectInt32)(output.AvailabilityZoneCount),
4765
- };
4766
3887
  };
4767
3888
  const deserializeMetadata = (output) => ({
4768
3889
  httpStatusCode: output.statusCode,