@aws-sdk/client-kafka 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.
@@ -14,9 +14,9 @@ const se_BatchAssociateScramSecretCommand = async (input, context) => {
14
14
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/clusters/{ClusterArn}/scram-secrets";
15
15
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ClusterArn", () => input.ClusterArn, "{ClusterArn}", false);
16
16
  let body;
17
- body = JSON.stringify({
18
- ...(input.SecretArnList != null && { secretArnList: se___listOf__string(input.SecretArnList, context) }),
19
- });
17
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
18
+ secretArnList: [, (_) => (0, smithy_client_1._json)(_), `SecretArnList`],
19
+ }));
20
20
  return new protocol_http_1.HttpRequest({
21
21
  protocol,
22
22
  hostname,
@@ -36,9 +36,9 @@ const se_BatchDisassociateScramSecretCommand = async (input, context) => {
36
36
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/clusters/{ClusterArn}/scram-secrets";
37
37
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ClusterArn", () => input.ClusterArn, "{ClusterArn}", false);
38
38
  let body;
39
- body = JSON.stringify({
40
- ...(input.SecretArnList != null && { secretArnList: se___listOf__string(input.SecretArnList, context) }),
41
- });
39
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
40
+ secretArnList: [, (_) => (0, smithy_client_1._json)(_), `SecretArnList`],
41
+ }));
42
42
  return new protocol_http_1.HttpRequest({
43
43
  protocol,
44
44
  hostname,
@@ -57,26 +57,20 @@ const se_CreateClusterCommand = async (input, context) => {
57
57
  };
58
58
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/clusters";
59
59
  let body;
60
- body = JSON.stringify({
61
- ...(input.BrokerNodeGroupInfo != null && {
62
- brokerNodeGroupInfo: se_BrokerNodeGroupInfo(input.BrokerNodeGroupInfo, context),
63
- }),
64
- ...(input.ClientAuthentication != null && {
65
- clientAuthentication: se_ClientAuthentication(input.ClientAuthentication, context),
66
- }),
67
- ...(input.ClusterName != null && { clusterName: input.ClusterName }),
68
- ...(input.ConfigurationInfo != null && {
69
- configurationInfo: se_ConfigurationInfo(input.ConfigurationInfo, context),
70
- }),
71
- ...(input.EncryptionInfo != null && { encryptionInfo: se_EncryptionInfo(input.EncryptionInfo, context) }),
72
- ...(input.EnhancedMonitoring != null && { enhancedMonitoring: input.EnhancedMonitoring }),
73
- ...(input.KafkaVersion != null && { kafkaVersion: input.KafkaVersion }),
74
- ...(input.LoggingInfo != null && { loggingInfo: se_LoggingInfo(input.LoggingInfo, context) }),
75
- ...(input.NumberOfBrokerNodes != null && { numberOfBrokerNodes: input.NumberOfBrokerNodes }),
76
- ...(input.OpenMonitoring != null && { openMonitoring: se_OpenMonitoringInfo(input.OpenMonitoring, context) }),
77
- ...(input.StorageMode != null && { storageMode: input.StorageMode }),
78
- ...(input.Tags != null && { tags: se___mapOf__string(input.Tags, context) }),
79
- });
60
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
61
+ brokerNodeGroupInfo: [, (_) => se_BrokerNodeGroupInfo(_, context), `BrokerNodeGroupInfo`],
62
+ clientAuthentication: [, (_) => se_ClientAuthentication(_, context), `ClientAuthentication`],
63
+ clusterName: [, , `ClusterName`],
64
+ configurationInfo: [, (_) => se_ConfigurationInfo(_, context), `ConfigurationInfo`],
65
+ encryptionInfo: [, (_) => se_EncryptionInfo(_, context), `EncryptionInfo`],
66
+ enhancedMonitoring: [, , `EnhancedMonitoring`],
67
+ kafkaVersion: [, , `KafkaVersion`],
68
+ loggingInfo: [, (_) => se_LoggingInfo(_, context), `LoggingInfo`],
69
+ numberOfBrokerNodes: [, , `NumberOfBrokerNodes`],
70
+ openMonitoring: [, (_) => se_OpenMonitoringInfo(_, context), `OpenMonitoring`],
71
+ storageMode: [, , `StorageMode`],
72
+ tags: [, (_) => (0, smithy_client_1._json)(_), `Tags`],
73
+ }));
80
74
  return new protocol_http_1.HttpRequest({
81
75
  protocol,
82
76
  hostname,
@@ -95,12 +89,12 @@ const se_CreateClusterV2Command = async (input, context) => {
95
89
  };
96
90
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/api/v2/clusters";
97
91
  let body;
98
- body = JSON.stringify({
99
- ...(input.ClusterName != null && { clusterName: input.ClusterName }),
100
- ...(input.Provisioned != null && { provisioned: se_ProvisionedRequest(input.Provisioned, context) }),
101
- ...(input.Serverless != null && { serverless: se_ServerlessRequest(input.Serverless, context) }),
102
- ...(input.Tags != null && { tags: se___mapOf__string(input.Tags, context) }),
103
- });
92
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
93
+ clusterName: [, , `ClusterName`],
94
+ provisioned: [, (_) => se_ProvisionedRequest(_, context), `Provisioned`],
95
+ serverless: [, (_) => se_ServerlessRequest(_, context), `Serverless`],
96
+ tags: [, (_) => (0, smithy_client_1._json)(_), `Tags`],
97
+ }));
104
98
  return new protocol_http_1.HttpRequest({
105
99
  protocol,
106
100
  hostname,
@@ -119,12 +113,12 @@ const se_CreateConfigurationCommand = async (input, context) => {
119
113
  };
120
114
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/configurations";
121
115
  let body;
122
- body = JSON.stringify({
123
- ...(input.Description != null && { description: input.Description }),
124
- ...(input.KafkaVersions != null && { kafkaVersions: se___listOf__string(input.KafkaVersions, context) }),
125
- ...(input.Name != null && { name: input.Name }),
126
- ...(input.ServerProperties != null && { serverProperties: context.base64Encoder(input.ServerProperties) }),
127
- });
116
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
117
+ description: [, , `Description`],
118
+ kafkaVersions: [, (_) => (0, smithy_client_1._json)(_), `KafkaVersions`],
119
+ name: [, , `Name`],
120
+ serverProperties: [, (_) => context.base64Encoder(_), `ServerProperties`],
121
+ }));
128
122
  return new protocol_http_1.HttpRequest({
129
123
  protocol,
130
124
  hostname,
@@ -141,7 +135,7 @@ const se_DeleteClusterCommand = async (input, context) => {
141
135
  const headers = {};
142
136
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/clusters/{ClusterArn}";
143
137
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ClusterArn", () => input.ClusterArn, "{ClusterArn}", false);
144
- const query = map({
138
+ const query = (0, smithy_client_1.map)({
145
139
  currentVersion: [, input.CurrentVersion],
146
140
  });
147
141
  let body;
@@ -283,7 +277,7 @@ const se_GetCompatibleKafkaVersionsCommand = async (input, context) => {
283
277
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
284
278
  const headers = {};
285
279
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/compatible-kafka-versions";
286
- const query = map({
280
+ const query = (0, smithy_client_1.map)({
287
281
  clusterArn: [, input.ClusterArn],
288
282
  });
289
283
  let body;
@@ -304,7 +298,7 @@ const se_ListClusterOperationsCommand = async (input, context) => {
304
298
  const headers = {};
305
299
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/clusters/{ClusterArn}/operations";
306
300
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ClusterArn", () => input.ClusterArn, "{ClusterArn}", false);
307
- const query = map({
301
+ const query = (0, smithy_client_1.map)({
308
302
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
309
303
  nextToken: [, input.NextToken],
310
304
  });
@@ -325,7 +319,7 @@ const se_ListClustersCommand = async (input, context) => {
325
319
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
326
320
  const headers = {};
327
321
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/clusters";
328
- const query = map({
322
+ const query = (0, smithy_client_1.map)({
329
323
  clusterNameFilter: [, input.ClusterNameFilter],
330
324
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
331
325
  nextToken: [, input.NextToken],
@@ -347,7 +341,7 @@ const se_ListClustersV2Command = async (input, context) => {
347
341
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
348
342
  const headers = {};
349
343
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/api/v2/clusters";
350
- const query = map({
344
+ const query = (0, smithy_client_1.map)({
351
345
  clusterNameFilter: [, input.ClusterNameFilter],
352
346
  clusterTypeFilter: [, input.ClusterTypeFilter],
353
347
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
@@ -371,7 +365,7 @@ const se_ListConfigurationRevisionsCommand = async (input, context) => {
371
365
  const headers = {};
372
366
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/configurations/{Arn}/revisions";
373
367
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Arn", () => input.Arn, "{Arn}", false);
374
- const query = map({
368
+ const query = (0, smithy_client_1.map)({
375
369
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
376
370
  nextToken: [, input.NextToken],
377
371
  });
@@ -392,7 +386,7 @@ const se_ListConfigurationsCommand = async (input, context) => {
392
386
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
393
387
  const headers = {};
394
388
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/configurations";
395
- const query = map({
389
+ const query = (0, smithy_client_1.map)({
396
390
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
397
391
  nextToken: [, input.NextToken],
398
392
  });
@@ -413,7 +407,7 @@ const se_ListKafkaVersionsCommand = async (input, context) => {
413
407
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
414
408
  const headers = {};
415
409
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/kafka-versions";
416
- const query = map({
410
+ const query = (0, smithy_client_1.map)({
417
411
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
418
412
  nextToken: [, input.NextToken],
419
413
  });
@@ -435,7 +429,7 @@ const se_ListNodesCommand = async (input, context) => {
435
429
  const headers = {};
436
430
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/clusters/{ClusterArn}/nodes";
437
431
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ClusterArn", () => input.ClusterArn, "{ClusterArn}", false);
438
- const query = map({
432
+ const query = (0, smithy_client_1.map)({
439
433
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
440
434
  nextToken: [, input.NextToken],
441
435
  });
@@ -457,7 +451,7 @@ const se_ListScramSecretsCommand = async (input, context) => {
457
451
  const headers = {};
458
452
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/clusters/{ClusterArn}/scram-secrets";
459
453
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ClusterArn", () => input.ClusterArn, "{ClusterArn}", false);
460
- const query = map({
454
+ const query = (0, smithy_client_1.map)({
461
455
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
462
456
  nextToken: [, input.NextToken],
463
457
  });
@@ -499,9 +493,9 @@ const se_RebootBrokerCommand = async (input, context) => {
499
493
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/clusters/{ClusterArn}/reboot-broker";
500
494
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ClusterArn", () => input.ClusterArn, "{ClusterArn}", false);
501
495
  let body;
502
- body = JSON.stringify({
503
- ...(input.BrokerIds != null && { brokerIds: se___listOf__string(input.BrokerIds, context) }),
504
- });
496
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
497
+ brokerIds: [, (_) => (0, smithy_client_1._json)(_), `BrokerIds`],
498
+ }));
505
499
  return new protocol_http_1.HttpRequest({
506
500
  protocol,
507
501
  hostname,
@@ -521,9 +515,9 @@ const se_TagResourceCommand = async (input, context) => {
521
515
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/tags/{ResourceArn}";
522
516
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
523
517
  let body;
524
- body = JSON.stringify({
525
- ...(input.Tags != null && { tags: se___mapOf__string(input.Tags, context) }),
526
- });
518
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
519
+ tags: [, (_) => (0, smithy_client_1._json)(_), `Tags`],
520
+ }));
527
521
  return new protocol_http_1.HttpRequest({
528
522
  protocol,
529
523
  hostname,
@@ -540,7 +534,7 @@ const se_UntagResourceCommand = async (input, context) => {
540
534
  const headers = {};
541
535
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/tags/{ResourceArn}";
542
536
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
543
- const query = map({
537
+ const query = (0, smithy_client_1.map)({
544
538
  tagKeys: [
545
539
  (0, smithy_client_1.expectNonNull)(input.TagKeys, `TagKeys`) != null,
546
540
  () => (input.TagKeys || []).map((_entry) => _entry),
@@ -567,10 +561,10 @@ const se_UpdateBrokerCountCommand = async (input, context) => {
567
561
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/clusters/{ClusterArn}/nodes/count";
568
562
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ClusterArn", () => input.ClusterArn, "{ClusterArn}", false);
569
563
  let body;
570
- body = JSON.stringify({
571
- ...(input.CurrentVersion != null && { currentVersion: input.CurrentVersion }),
572
- ...(input.TargetNumberOfBrokerNodes != null && { targetNumberOfBrokerNodes: input.TargetNumberOfBrokerNodes }),
573
- });
564
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
565
+ currentVersion: [, , `CurrentVersion`],
566
+ targetNumberOfBrokerNodes: [, , `TargetNumberOfBrokerNodes`],
567
+ }));
574
568
  return new protocol_http_1.HttpRequest({
575
569
  protocol,
576
570
  hostname,
@@ -590,12 +584,10 @@ const se_UpdateBrokerStorageCommand = async (input, context) => {
590
584
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/clusters/{ClusterArn}/nodes/storage";
591
585
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ClusterArn", () => input.ClusterArn, "{ClusterArn}", false);
592
586
  let body;
593
- body = JSON.stringify({
594
- ...(input.CurrentVersion != null && { currentVersion: input.CurrentVersion }),
595
- ...(input.TargetBrokerEBSVolumeInfo != null && {
596
- targetBrokerEBSVolumeInfo: se___listOfBrokerEBSVolumeInfo(input.TargetBrokerEBSVolumeInfo, context),
597
- }),
598
- });
587
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
588
+ currentVersion: [, , `CurrentVersion`],
589
+ targetBrokerEBSVolumeInfo: [, (_) => se___listOfBrokerEBSVolumeInfo(_, context), `TargetBrokerEBSVolumeInfo`],
590
+ }));
599
591
  return new protocol_http_1.HttpRequest({
600
592
  protocol,
601
593
  hostname,
@@ -615,10 +607,10 @@ const se_UpdateBrokerTypeCommand = async (input, context) => {
615
607
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/clusters/{ClusterArn}/nodes/type";
616
608
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ClusterArn", () => input.ClusterArn, "{ClusterArn}", false);
617
609
  let body;
618
- body = JSON.stringify({
619
- ...(input.CurrentVersion != null && { currentVersion: input.CurrentVersion }),
620
- ...(input.TargetInstanceType != null && { targetInstanceType: input.TargetInstanceType }),
621
- });
610
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
611
+ currentVersion: [, , `CurrentVersion`],
612
+ targetInstanceType: [, , `TargetInstanceType`],
613
+ }));
622
614
  return new protocol_http_1.HttpRequest({
623
615
  protocol,
624
616
  hostname,
@@ -638,12 +630,10 @@ const se_UpdateClusterConfigurationCommand = async (input, context) => {
638
630
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/clusters/{ClusterArn}/configuration";
639
631
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ClusterArn", () => input.ClusterArn, "{ClusterArn}", false);
640
632
  let body;
641
- body = JSON.stringify({
642
- ...(input.ConfigurationInfo != null && {
643
- configurationInfo: se_ConfigurationInfo(input.ConfigurationInfo, context),
644
- }),
645
- ...(input.CurrentVersion != null && { currentVersion: input.CurrentVersion }),
646
- });
633
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
634
+ configurationInfo: [, (_) => se_ConfigurationInfo(_, context), `ConfigurationInfo`],
635
+ currentVersion: [, , `CurrentVersion`],
636
+ }));
647
637
  return new protocol_http_1.HttpRequest({
648
638
  protocol,
649
639
  hostname,
@@ -663,13 +653,11 @@ const se_UpdateClusterKafkaVersionCommand = async (input, context) => {
663
653
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/clusters/{ClusterArn}/version";
664
654
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ClusterArn", () => input.ClusterArn, "{ClusterArn}", false);
665
655
  let body;
666
- body = JSON.stringify({
667
- ...(input.ConfigurationInfo != null && {
668
- configurationInfo: se_ConfigurationInfo(input.ConfigurationInfo, context),
669
- }),
670
- ...(input.CurrentVersion != null && { currentVersion: input.CurrentVersion }),
671
- ...(input.TargetKafkaVersion != null && { targetKafkaVersion: input.TargetKafkaVersion }),
672
- });
656
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
657
+ configurationInfo: [, (_) => se_ConfigurationInfo(_, context), `ConfigurationInfo`],
658
+ currentVersion: [, , `CurrentVersion`],
659
+ targetKafkaVersion: [, , `TargetKafkaVersion`],
660
+ }));
673
661
  return new protocol_http_1.HttpRequest({
674
662
  protocol,
675
663
  hostname,
@@ -689,10 +677,10 @@ const se_UpdateConfigurationCommand = async (input, context) => {
689
677
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/configurations/{Arn}";
690
678
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Arn", () => input.Arn, "{Arn}", false);
691
679
  let body;
692
- body = JSON.stringify({
693
- ...(input.Description != null && { description: input.Description }),
694
- ...(input.ServerProperties != null && { serverProperties: context.base64Encoder(input.ServerProperties) }),
695
- });
680
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
681
+ description: [, , `Description`],
682
+ serverProperties: [, (_) => context.base64Encoder(_), `ServerProperties`],
683
+ }));
696
684
  return new protocol_http_1.HttpRequest({
697
685
  protocol,
698
686
  hostname,
@@ -712,10 +700,10 @@ const se_UpdateConnectivityCommand = async (input, context) => {
712
700
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/clusters/{ClusterArn}/connectivity";
713
701
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ClusterArn", () => input.ClusterArn, "{ClusterArn}", false);
714
702
  let body;
715
- body = JSON.stringify({
716
- ...(input.ConnectivityInfo != null && { connectivityInfo: se_ConnectivityInfo(input.ConnectivityInfo, context) }),
717
- ...(input.CurrentVersion != null && { currentVersion: input.CurrentVersion }),
718
- });
703
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
704
+ connectivityInfo: [, (_) => se_ConnectivityInfo(_, context), `ConnectivityInfo`],
705
+ currentVersion: [, , `CurrentVersion`],
706
+ }));
719
707
  return new protocol_http_1.HttpRequest({
720
708
  protocol,
721
709
  hostname,
@@ -735,12 +723,12 @@ const se_UpdateMonitoringCommand = async (input, context) => {
735
723
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/clusters/{ClusterArn}/monitoring";
736
724
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ClusterArn", () => input.ClusterArn, "{ClusterArn}", false);
737
725
  let body;
738
- body = JSON.stringify({
739
- ...(input.CurrentVersion != null && { currentVersion: input.CurrentVersion }),
740
- ...(input.EnhancedMonitoring != null && { enhancedMonitoring: input.EnhancedMonitoring }),
741
- ...(input.LoggingInfo != null && { loggingInfo: se_LoggingInfo(input.LoggingInfo, context) }),
742
- ...(input.OpenMonitoring != null && { openMonitoring: se_OpenMonitoringInfo(input.OpenMonitoring, context) }),
743
- });
726
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
727
+ currentVersion: [, , `CurrentVersion`],
728
+ enhancedMonitoring: [, , `EnhancedMonitoring`],
729
+ loggingInfo: [, (_) => se_LoggingInfo(_, context), `LoggingInfo`],
730
+ openMonitoring: [, (_) => se_OpenMonitoringInfo(_, context), `OpenMonitoring`],
731
+ }));
744
732
  return new protocol_http_1.HttpRequest({
745
733
  protocol,
746
734
  hostname,
@@ -760,13 +748,11 @@ const se_UpdateSecurityCommand = async (input, context) => {
760
748
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/clusters/{ClusterArn}/security";
761
749
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ClusterArn", () => input.ClusterArn, "{ClusterArn}", false);
762
750
  let body;
763
- body = JSON.stringify({
764
- ...(input.ClientAuthentication != null && {
765
- clientAuthentication: se_ClientAuthentication(input.ClientAuthentication, context),
766
- }),
767
- ...(input.CurrentVersion != null && { currentVersion: input.CurrentVersion }),
768
- ...(input.EncryptionInfo != null && { encryptionInfo: se_EncryptionInfo(input.EncryptionInfo, context) }),
769
- });
751
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
752
+ clientAuthentication: [, (_) => se_ClientAuthentication(_, context), `ClientAuthentication`],
753
+ currentVersion: [, , `CurrentVersion`],
754
+ encryptionInfo: [, (_) => se_EncryptionInfo(_, context), `EncryptionInfo`],
755
+ }));
770
756
  return new protocol_http_1.HttpRequest({
771
757
  protocol,
772
758
  hostname,
@@ -786,14 +772,12 @@ const se_UpdateStorageCommand = async (input, context) => {
786
772
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/clusters/{ClusterArn}/storage";
787
773
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ClusterArn", () => input.ClusterArn, "{ClusterArn}", false);
788
774
  let body;
789
- body = JSON.stringify({
790
- ...(input.CurrentVersion != null && { currentVersion: input.CurrentVersion }),
791
- ...(input.ProvisionedThroughput != null && {
792
- provisionedThroughput: se_ProvisionedThroughput(input.ProvisionedThroughput, context),
793
- }),
794
- ...(input.StorageMode != null && { storageMode: input.StorageMode }),
795
- ...(input.VolumeSizeGB != null && { volumeSizeGB: input.VolumeSizeGB }),
796
- });
775
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
776
+ currentVersion: [, , `CurrentVersion`],
777
+ provisionedThroughput: [, (_) => se_ProvisionedThroughput(_, context), `ProvisionedThroughput`],
778
+ storageMode: [, , `StorageMode`],
779
+ volumeSizeGB: [, , `VolumeSizeGB`],
780
+ }));
797
781
  return new protocol_http_1.HttpRequest({
798
782
  protocol,
799
783
  hostname,
@@ -809,16 +793,15 @@ const de_BatchAssociateScramSecretCommand = async (output, context) => {
809
793
  if (output.statusCode !== 200 && output.statusCode >= 300) {
810
794
  return de_BatchAssociateScramSecretCommandError(output, context);
811
795
  }
812
- const contents = map({
796
+ const contents = (0, smithy_client_1.map)({
813
797
  $metadata: deserializeMetadata(output),
814
798
  });
815
799
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
816
- if (data.clusterArn != null) {
817
- contents.ClusterArn = (0, smithy_client_1.expectString)(data.clusterArn);
818
- }
819
- if (data.unprocessedScramSecrets != null) {
820
- contents.UnprocessedScramSecrets = de___listOfUnprocessedScramSecret(data.unprocessedScramSecrets, context);
821
- }
800
+ const doc = (0, smithy_client_1.take)(data, {
801
+ ClusterArn: [, smithy_client_1.expectString, `clusterArn`],
802
+ UnprocessedScramSecrets: [, (_) => de___listOfUnprocessedScramSecret(_, context), `unprocessedScramSecrets`],
803
+ });
804
+ Object.assign(contents, doc);
822
805
  return contents;
823
806
  };
824
807
  exports.de_BatchAssociateScramSecretCommand = de_BatchAssociateScramSecretCommand;
@@ -852,10 +835,9 @@ const de_BatchAssociateScramSecretCommandError = async (output, context) => {
852
835
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
853
836
  default:
854
837
  const parsedBody = parsedOutput.body;
855
- (0, smithy_client_1.throwDefaultError)({
838
+ return throwDefaultError({
856
839
  output,
857
840
  parsedBody,
858
- exceptionCtor: KafkaServiceException_1.KafkaServiceException,
859
841
  errorCode,
860
842
  });
861
843
  }
@@ -864,16 +846,15 @@ const de_BatchDisassociateScramSecretCommand = async (output, context) => {
864
846
  if (output.statusCode !== 200 && output.statusCode >= 300) {
865
847
  return de_BatchDisassociateScramSecretCommandError(output, context);
866
848
  }
867
- const contents = map({
849
+ const contents = (0, smithy_client_1.map)({
868
850
  $metadata: deserializeMetadata(output),
869
851
  });
870
852
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
871
- if (data.clusterArn != null) {
872
- contents.ClusterArn = (0, smithy_client_1.expectString)(data.clusterArn);
873
- }
874
- if (data.unprocessedScramSecrets != null) {
875
- contents.UnprocessedScramSecrets = de___listOfUnprocessedScramSecret(data.unprocessedScramSecrets, context);
876
- }
853
+ const doc = (0, smithy_client_1.take)(data, {
854
+ ClusterArn: [, smithy_client_1.expectString, `clusterArn`],
855
+ UnprocessedScramSecrets: [, (_) => de___listOfUnprocessedScramSecret(_, context), `unprocessedScramSecrets`],
856
+ });
857
+ Object.assign(contents, doc);
877
858
  return contents;
878
859
  };
879
860
  exports.de_BatchDisassociateScramSecretCommand = de_BatchDisassociateScramSecretCommand;
@@ -907,10 +888,9 @@ const de_BatchDisassociateScramSecretCommandError = async (output, context) => {
907
888
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
908
889
  default:
909
890
  const parsedBody = parsedOutput.body;
910
- (0, smithy_client_1.throwDefaultError)({
891
+ return throwDefaultError({
911
892
  output,
912
893
  parsedBody,
913
- exceptionCtor: KafkaServiceException_1.KafkaServiceException,
914
894
  errorCode,
915
895
  });
916
896
  }
@@ -919,19 +899,16 @@ const de_CreateClusterCommand = async (output, context) => {
919
899
  if (output.statusCode !== 200 && output.statusCode >= 300) {
920
900
  return de_CreateClusterCommandError(output, context);
921
901
  }
922
- const contents = map({
902
+ const contents = (0, smithy_client_1.map)({
923
903
  $metadata: deserializeMetadata(output),
924
904
  });
925
905
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
926
- if (data.clusterArn != null) {
927
- contents.ClusterArn = (0, smithy_client_1.expectString)(data.clusterArn);
928
- }
929
- if (data.clusterName != null) {
930
- contents.ClusterName = (0, smithy_client_1.expectString)(data.clusterName);
931
- }
932
- if (data.state != null) {
933
- contents.State = (0, smithy_client_1.expectString)(data.state);
934
- }
906
+ const doc = (0, smithy_client_1.take)(data, {
907
+ ClusterArn: [, smithy_client_1.expectString, `clusterArn`],
908
+ ClusterName: [, smithy_client_1.expectString, `clusterName`],
909
+ State: [, smithy_client_1.expectString, `state`],
910
+ });
911
+ Object.assign(contents, doc);
935
912
  return contents;
936
913
  };
937
914
  exports.de_CreateClusterCommand = de_CreateClusterCommand;
@@ -965,10 +942,9 @@ const de_CreateClusterCommandError = async (output, context) => {
965
942
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
966
943
  default:
967
944
  const parsedBody = parsedOutput.body;
968
- (0, smithy_client_1.throwDefaultError)({
945
+ return throwDefaultError({
969
946
  output,
970
947
  parsedBody,
971
- exceptionCtor: KafkaServiceException_1.KafkaServiceException,
972
948
  errorCode,
973
949
  });
974
950
  }
@@ -977,22 +953,17 @@ const de_CreateClusterV2Command = async (output, context) => {
977
953
  if (output.statusCode !== 200 && output.statusCode >= 300) {
978
954
  return de_CreateClusterV2CommandError(output, context);
979
955
  }
980
- const contents = map({
956
+ const contents = (0, smithy_client_1.map)({
981
957
  $metadata: deserializeMetadata(output),
982
958
  });
983
959
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
984
- if (data.clusterArn != null) {
985
- contents.ClusterArn = (0, smithy_client_1.expectString)(data.clusterArn);
986
- }
987
- if (data.clusterName != null) {
988
- contents.ClusterName = (0, smithy_client_1.expectString)(data.clusterName);
989
- }
990
- if (data.clusterType != null) {
991
- contents.ClusterType = (0, smithy_client_1.expectString)(data.clusterType);
992
- }
993
- if (data.state != null) {
994
- contents.State = (0, smithy_client_1.expectString)(data.state);
995
- }
960
+ const doc = (0, smithy_client_1.take)(data, {
961
+ ClusterArn: [, smithy_client_1.expectString, `clusterArn`],
962
+ ClusterName: [, smithy_client_1.expectString, `clusterName`],
963
+ ClusterType: [, smithy_client_1.expectString, `clusterType`],
964
+ State: [, smithy_client_1.expectString, `state`],
965
+ });
966
+ Object.assign(contents, doc);
996
967
  return contents;
997
968
  };
998
969
  exports.de_CreateClusterV2Command = de_CreateClusterV2Command;
@@ -1026,10 +997,9 @@ const de_CreateClusterV2CommandError = async (output, context) => {
1026
997
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1027
998
  default:
1028
999
  const parsedBody = parsedOutput.body;
1029
- (0, smithy_client_1.throwDefaultError)({
1000
+ return throwDefaultError({
1030
1001
  output,
1031
1002
  parsedBody,
1032
- exceptionCtor: KafkaServiceException_1.KafkaServiceException,
1033
1003
  errorCode,
1034
1004
  });
1035
1005
  }
@@ -1038,25 +1008,18 @@ const de_CreateConfigurationCommand = async (output, context) => {
1038
1008
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1039
1009
  return de_CreateConfigurationCommandError(output, context);
1040
1010
  }
1041
- const contents = map({
1011
+ const contents = (0, smithy_client_1.map)({
1042
1012
  $metadata: deserializeMetadata(output),
1043
1013
  });
1044
1014
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1045
- if (data.arn != null) {
1046
- contents.Arn = (0, smithy_client_1.expectString)(data.arn);
1047
- }
1048
- if (data.creationTime != null) {
1049
- contents.CreationTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.creationTime));
1050
- }
1051
- if (data.latestRevision != null) {
1052
- contents.LatestRevision = de_ConfigurationRevision(data.latestRevision, context);
1053
- }
1054
- if (data.name != null) {
1055
- contents.Name = (0, smithy_client_1.expectString)(data.name);
1056
- }
1057
- if (data.state != null) {
1058
- contents.State = (0, smithy_client_1.expectString)(data.state);
1059
- }
1015
+ const doc = (0, smithy_client_1.take)(data, {
1016
+ Arn: [, smithy_client_1.expectString, `arn`],
1017
+ CreationTime: [, (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)), `creationTime`],
1018
+ LatestRevision: [, (_) => de_ConfigurationRevision(_, context), `latestRevision`],
1019
+ Name: [, smithy_client_1.expectString, `name`],
1020
+ State: [, smithy_client_1.expectString, `state`],
1021
+ });
1022
+ Object.assign(contents, doc);
1060
1023
  return contents;
1061
1024
  };
1062
1025
  exports.de_CreateConfigurationCommand = de_CreateConfigurationCommand;
@@ -1090,10 +1053,9 @@ const de_CreateConfigurationCommandError = async (output, context) => {
1090
1053
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1091
1054
  default:
1092
1055
  const parsedBody = parsedOutput.body;
1093
- (0, smithy_client_1.throwDefaultError)({
1056
+ return throwDefaultError({
1094
1057
  output,
1095
1058
  parsedBody,
1096
- exceptionCtor: KafkaServiceException_1.KafkaServiceException,
1097
1059
  errorCode,
1098
1060
  });
1099
1061
  }
@@ -1102,16 +1064,15 @@ const de_DeleteClusterCommand = async (output, context) => {
1102
1064
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1103
1065
  return de_DeleteClusterCommandError(output, context);
1104
1066
  }
1105
- const contents = map({
1067
+ const contents = (0, smithy_client_1.map)({
1106
1068
  $metadata: deserializeMetadata(output),
1107
1069
  });
1108
1070
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1109
- if (data.clusterArn != null) {
1110
- contents.ClusterArn = (0, smithy_client_1.expectString)(data.clusterArn);
1111
- }
1112
- if (data.state != null) {
1113
- contents.State = (0, smithy_client_1.expectString)(data.state);
1114
- }
1071
+ const doc = (0, smithy_client_1.take)(data, {
1072
+ ClusterArn: [, smithy_client_1.expectString, `clusterArn`],
1073
+ State: [, smithy_client_1.expectString, `state`],
1074
+ });
1075
+ Object.assign(contents, doc);
1115
1076
  return contents;
1116
1077
  };
1117
1078
  exports.de_DeleteClusterCommand = de_DeleteClusterCommand;
@@ -1136,10 +1097,9 @@ const de_DeleteClusterCommandError = async (output, context) => {
1136
1097
  throw await de_NotFoundExceptionRes(parsedOutput, context);
1137
1098
  default:
1138
1099
  const parsedBody = parsedOutput.body;
1139
- (0, smithy_client_1.throwDefaultError)({
1100
+ return throwDefaultError({
1140
1101
  output,
1141
1102
  parsedBody,
1142
- exceptionCtor: KafkaServiceException_1.KafkaServiceException,
1143
1103
  errorCode,
1144
1104
  });
1145
1105
  }
@@ -1148,16 +1108,15 @@ const de_DeleteConfigurationCommand = async (output, context) => {
1148
1108
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1149
1109
  return de_DeleteConfigurationCommandError(output, context);
1150
1110
  }
1151
- const contents = map({
1111
+ const contents = (0, smithy_client_1.map)({
1152
1112
  $metadata: deserializeMetadata(output),
1153
1113
  });
1154
1114
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1155
- if (data.arn != null) {
1156
- contents.Arn = (0, smithy_client_1.expectString)(data.arn);
1157
- }
1158
- if (data.state != null) {
1159
- contents.State = (0, smithy_client_1.expectString)(data.state);
1160
- }
1115
+ const doc = (0, smithy_client_1.take)(data, {
1116
+ Arn: [, smithy_client_1.expectString, `arn`],
1117
+ State: [, smithy_client_1.expectString, `state`],
1118
+ });
1119
+ Object.assign(contents, doc);
1161
1120
  return contents;
1162
1121
  };
1163
1122
  exports.de_DeleteConfigurationCommand = de_DeleteConfigurationCommand;
@@ -1182,10 +1141,9 @@ const de_DeleteConfigurationCommandError = async (output, context) => {
1182
1141
  throw await de_NotFoundExceptionRes(parsedOutput, context);
1183
1142
  default:
1184
1143
  const parsedBody = parsedOutput.body;
1185
- (0, smithy_client_1.throwDefaultError)({
1144
+ return throwDefaultError({
1186
1145
  output,
1187
1146
  parsedBody,
1188
- exceptionCtor: KafkaServiceException_1.KafkaServiceException,
1189
1147
  errorCode,
1190
1148
  });
1191
1149
  }
@@ -1194,13 +1152,14 @@ const de_DescribeClusterCommand = async (output, context) => {
1194
1152
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1195
1153
  return de_DescribeClusterCommandError(output, context);
1196
1154
  }
1197
- const contents = map({
1155
+ const contents = (0, smithy_client_1.map)({
1198
1156
  $metadata: deserializeMetadata(output),
1199
1157
  });
1200
1158
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1201
- if (data.clusterInfo != null) {
1202
- contents.ClusterInfo = de_ClusterInfo(data.clusterInfo, context);
1203
- }
1159
+ const doc = (0, smithy_client_1.take)(data, {
1160
+ ClusterInfo: [, (_) => de_ClusterInfo(_, context), `clusterInfo`],
1161
+ });
1162
+ Object.assign(contents, doc);
1204
1163
  return contents;
1205
1164
  };
1206
1165
  exports.de_DescribeClusterCommand = de_DescribeClusterCommand;
@@ -1228,10 +1187,9 @@ const de_DescribeClusterCommandError = async (output, context) => {
1228
1187
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1229
1188
  default:
1230
1189
  const parsedBody = parsedOutput.body;
1231
- (0, smithy_client_1.throwDefaultError)({
1190
+ return throwDefaultError({
1232
1191
  output,
1233
1192
  parsedBody,
1234
- exceptionCtor: KafkaServiceException_1.KafkaServiceException,
1235
1193
  errorCode,
1236
1194
  });
1237
1195
  }
@@ -1240,13 +1198,14 @@ const de_DescribeClusterOperationCommand = async (output, context) => {
1240
1198
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1241
1199
  return de_DescribeClusterOperationCommandError(output, context);
1242
1200
  }
1243
- const contents = map({
1201
+ const contents = (0, smithy_client_1.map)({
1244
1202
  $metadata: deserializeMetadata(output),
1245
1203
  });
1246
1204
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1247
- if (data.clusterOperationInfo != null) {
1248
- contents.ClusterOperationInfo = de_ClusterOperationInfo(data.clusterOperationInfo, context);
1249
- }
1205
+ const doc = (0, smithy_client_1.take)(data, {
1206
+ ClusterOperationInfo: [, (_) => de_ClusterOperationInfo(_, context), `clusterOperationInfo`],
1207
+ });
1208
+ Object.assign(contents, doc);
1250
1209
  return contents;
1251
1210
  };
1252
1211
  exports.de_DescribeClusterOperationCommand = de_DescribeClusterOperationCommand;
@@ -1274,10 +1233,9 @@ const de_DescribeClusterOperationCommandError = async (output, context) => {
1274
1233
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1275
1234
  default:
1276
1235
  const parsedBody = parsedOutput.body;
1277
- (0, smithy_client_1.throwDefaultError)({
1236
+ return throwDefaultError({
1278
1237
  output,
1279
1238
  parsedBody,
1280
- exceptionCtor: KafkaServiceException_1.KafkaServiceException,
1281
1239
  errorCode,
1282
1240
  });
1283
1241
  }
@@ -1286,13 +1244,14 @@ const de_DescribeClusterV2Command = async (output, context) => {
1286
1244
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1287
1245
  return de_DescribeClusterV2CommandError(output, context);
1288
1246
  }
1289
- const contents = map({
1247
+ const contents = (0, smithy_client_1.map)({
1290
1248
  $metadata: deserializeMetadata(output),
1291
1249
  });
1292
1250
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1293
- if (data.clusterInfo != null) {
1294
- contents.ClusterInfo = de_Cluster(data.clusterInfo, context);
1295
- }
1251
+ const doc = (0, smithy_client_1.take)(data, {
1252
+ ClusterInfo: [, (_) => de_Cluster(_, context), `clusterInfo`],
1253
+ });
1254
+ Object.assign(contents, doc);
1296
1255
  return contents;
1297
1256
  };
1298
1257
  exports.de_DescribeClusterV2Command = de_DescribeClusterV2Command;
@@ -1320,10 +1279,9 @@ const de_DescribeClusterV2CommandError = async (output, context) => {
1320
1279
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1321
1280
  default:
1322
1281
  const parsedBody = parsedOutput.body;
1323
- (0, smithy_client_1.throwDefaultError)({
1282
+ return throwDefaultError({
1324
1283
  output,
1325
1284
  parsedBody,
1326
- exceptionCtor: KafkaServiceException_1.KafkaServiceException,
1327
1285
  errorCode,
1328
1286
  });
1329
1287
  }
@@ -1332,31 +1290,20 @@ const de_DescribeConfigurationCommand = async (output, context) => {
1332
1290
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1333
1291
  return de_DescribeConfigurationCommandError(output, context);
1334
1292
  }
1335
- const contents = map({
1293
+ const contents = (0, smithy_client_1.map)({
1336
1294
  $metadata: deserializeMetadata(output),
1337
1295
  });
1338
1296
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1339
- if (data.arn != null) {
1340
- contents.Arn = (0, smithy_client_1.expectString)(data.arn);
1341
- }
1342
- if (data.creationTime != null) {
1343
- contents.CreationTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.creationTime));
1344
- }
1345
- if (data.description != null) {
1346
- contents.Description = (0, smithy_client_1.expectString)(data.description);
1347
- }
1348
- if (data.kafkaVersions != null) {
1349
- contents.KafkaVersions = de___listOf__string(data.kafkaVersions, context);
1350
- }
1351
- if (data.latestRevision != null) {
1352
- contents.LatestRevision = de_ConfigurationRevision(data.latestRevision, context);
1353
- }
1354
- if (data.name != null) {
1355
- contents.Name = (0, smithy_client_1.expectString)(data.name);
1356
- }
1357
- if (data.state != null) {
1358
- contents.State = (0, smithy_client_1.expectString)(data.state);
1359
- }
1297
+ const doc = (0, smithy_client_1.take)(data, {
1298
+ Arn: [, smithy_client_1.expectString, `arn`],
1299
+ CreationTime: [, (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)), `creationTime`],
1300
+ Description: [, smithy_client_1.expectString, `description`],
1301
+ KafkaVersions: [, smithy_client_1._json, `kafkaVersions`],
1302
+ LatestRevision: [, (_) => de_ConfigurationRevision(_, context), `latestRevision`],
1303
+ Name: [, smithy_client_1.expectString, `name`],
1304
+ State: [, smithy_client_1.expectString, `state`],
1305
+ });
1306
+ Object.assign(contents, doc);
1360
1307
  return contents;
1361
1308
  };
1362
1309
  exports.de_DescribeConfigurationCommand = de_DescribeConfigurationCommand;
@@ -1387,10 +1334,9 @@ const de_DescribeConfigurationCommandError = async (output, context) => {
1387
1334
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1388
1335
  default:
1389
1336
  const parsedBody = parsedOutput.body;
1390
- (0, smithy_client_1.throwDefaultError)({
1337
+ return throwDefaultError({
1391
1338
  output,
1392
1339
  parsedBody,
1393
- exceptionCtor: KafkaServiceException_1.KafkaServiceException,
1394
1340
  errorCode,
1395
1341
  });
1396
1342
  }
@@ -1399,25 +1345,18 @@ const de_DescribeConfigurationRevisionCommand = async (output, context) => {
1399
1345
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1400
1346
  return de_DescribeConfigurationRevisionCommandError(output, context);
1401
1347
  }
1402
- const contents = map({
1348
+ const contents = (0, smithy_client_1.map)({
1403
1349
  $metadata: deserializeMetadata(output),
1404
1350
  });
1405
1351
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1406
- if (data.arn != null) {
1407
- contents.Arn = (0, smithy_client_1.expectString)(data.arn);
1408
- }
1409
- if (data.creationTime != null) {
1410
- contents.CreationTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.creationTime));
1411
- }
1412
- if (data.description != null) {
1413
- contents.Description = (0, smithy_client_1.expectString)(data.description);
1414
- }
1415
- if (data.revision != null) {
1416
- contents.Revision = (0, smithy_client_1.expectLong)(data.revision);
1417
- }
1418
- if (data.serverProperties != null) {
1419
- contents.ServerProperties = context.base64Decoder(data.serverProperties);
1420
- }
1352
+ const doc = (0, smithy_client_1.take)(data, {
1353
+ Arn: [, smithy_client_1.expectString, `arn`],
1354
+ CreationTime: [, (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)), `creationTime`],
1355
+ Description: [, smithy_client_1.expectString, `description`],
1356
+ Revision: [, smithy_client_1.expectLong, `revision`],
1357
+ ServerProperties: [, context.base64Decoder, `serverProperties`],
1358
+ });
1359
+ Object.assign(contents, doc);
1421
1360
  return contents;
1422
1361
  };
1423
1362
  exports.de_DescribeConfigurationRevisionCommand = de_DescribeConfigurationRevisionCommand;
@@ -1448,10 +1387,9 @@ const de_DescribeConfigurationRevisionCommandError = async (output, context) =>
1448
1387
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1449
1388
  default:
1450
1389
  const parsedBody = parsedOutput.body;
1451
- (0, smithy_client_1.throwDefaultError)({
1390
+ return throwDefaultError({
1452
1391
  output,
1453
1392
  parsedBody,
1454
- exceptionCtor: KafkaServiceException_1.KafkaServiceException,
1455
1393
  errorCode,
1456
1394
  });
1457
1395
  }
@@ -1460,31 +1398,20 @@ const de_GetBootstrapBrokersCommand = async (output, context) => {
1460
1398
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1461
1399
  return de_GetBootstrapBrokersCommandError(output, context);
1462
1400
  }
1463
- const contents = map({
1401
+ const contents = (0, smithy_client_1.map)({
1464
1402
  $metadata: deserializeMetadata(output),
1465
1403
  });
1466
1404
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1467
- if (data.bootstrapBrokerString != null) {
1468
- contents.BootstrapBrokerString = (0, smithy_client_1.expectString)(data.bootstrapBrokerString);
1469
- }
1470
- if (data.bootstrapBrokerStringPublicSaslIam != null) {
1471
- contents.BootstrapBrokerStringPublicSaslIam = (0, smithy_client_1.expectString)(data.bootstrapBrokerStringPublicSaslIam);
1472
- }
1473
- if (data.bootstrapBrokerStringPublicSaslScram != null) {
1474
- contents.BootstrapBrokerStringPublicSaslScram = (0, smithy_client_1.expectString)(data.bootstrapBrokerStringPublicSaslScram);
1475
- }
1476
- if (data.bootstrapBrokerStringPublicTls != null) {
1477
- contents.BootstrapBrokerStringPublicTls = (0, smithy_client_1.expectString)(data.bootstrapBrokerStringPublicTls);
1478
- }
1479
- if (data.bootstrapBrokerStringSaslIam != null) {
1480
- contents.BootstrapBrokerStringSaslIam = (0, smithy_client_1.expectString)(data.bootstrapBrokerStringSaslIam);
1481
- }
1482
- if (data.bootstrapBrokerStringSaslScram != null) {
1483
- contents.BootstrapBrokerStringSaslScram = (0, smithy_client_1.expectString)(data.bootstrapBrokerStringSaslScram);
1484
- }
1485
- if (data.bootstrapBrokerStringTls != null) {
1486
- contents.BootstrapBrokerStringTls = (0, smithy_client_1.expectString)(data.bootstrapBrokerStringTls);
1487
- }
1405
+ const doc = (0, smithy_client_1.take)(data, {
1406
+ BootstrapBrokerString: [, smithy_client_1.expectString, `bootstrapBrokerString`],
1407
+ BootstrapBrokerStringPublicSaslIam: [, smithy_client_1.expectString, `bootstrapBrokerStringPublicSaslIam`],
1408
+ BootstrapBrokerStringPublicSaslScram: [, smithy_client_1.expectString, `bootstrapBrokerStringPublicSaslScram`],
1409
+ BootstrapBrokerStringPublicTls: [, smithy_client_1.expectString, `bootstrapBrokerStringPublicTls`],
1410
+ BootstrapBrokerStringSaslIam: [, smithy_client_1.expectString, `bootstrapBrokerStringSaslIam`],
1411
+ BootstrapBrokerStringSaslScram: [, smithy_client_1.expectString, `bootstrapBrokerStringSaslScram`],
1412
+ BootstrapBrokerStringTls: [, smithy_client_1.expectString, `bootstrapBrokerStringTls`],
1413
+ });
1414
+ Object.assign(contents, doc);
1488
1415
  return contents;
1489
1416
  };
1490
1417
  exports.de_GetBootstrapBrokersCommand = de_GetBootstrapBrokersCommand;
@@ -1512,10 +1439,9 @@ const de_GetBootstrapBrokersCommandError = async (output, context) => {
1512
1439
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1513
1440
  default:
1514
1441
  const parsedBody = parsedOutput.body;
1515
- (0, smithy_client_1.throwDefaultError)({
1442
+ return throwDefaultError({
1516
1443
  output,
1517
1444
  parsedBody,
1518
- exceptionCtor: KafkaServiceException_1.KafkaServiceException,
1519
1445
  errorCode,
1520
1446
  });
1521
1447
  }
@@ -1524,13 +1450,14 @@ const de_GetCompatibleKafkaVersionsCommand = async (output, context) => {
1524
1450
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1525
1451
  return de_GetCompatibleKafkaVersionsCommandError(output, context);
1526
1452
  }
1527
- const contents = map({
1453
+ const contents = (0, smithy_client_1.map)({
1528
1454
  $metadata: deserializeMetadata(output),
1529
1455
  });
1530
1456
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1531
- if (data.compatibleKafkaVersions != null) {
1532
- contents.CompatibleKafkaVersions = de___listOfCompatibleKafkaVersion(data.compatibleKafkaVersions, context);
1533
- }
1457
+ const doc = (0, smithy_client_1.take)(data, {
1458
+ CompatibleKafkaVersions: [, (_) => de___listOfCompatibleKafkaVersion(_, context), `compatibleKafkaVersions`],
1459
+ });
1460
+ Object.assign(contents, doc);
1534
1461
  return contents;
1535
1462
  };
1536
1463
  exports.de_GetCompatibleKafkaVersionsCommand = de_GetCompatibleKafkaVersionsCommand;
@@ -1564,10 +1491,9 @@ const de_GetCompatibleKafkaVersionsCommandError = async (output, context) => {
1564
1491
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1565
1492
  default:
1566
1493
  const parsedBody = parsedOutput.body;
1567
- (0, smithy_client_1.throwDefaultError)({
1494
+ return throwDefaultError({
1568
1495
  output,
1569
1496
  parsedBody,
1570
- exceptionCtor: KafkaServiceException_1.KafkaServiceException,
1571
1497
  errorCode,
1572
1498
  });
1573
1499
  }
@@ -1576,16 +1502,15 @@ const de_ListClusterOperationsCommand = async (output, context) => {
1576
1502
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1577
1503
  return de_ListClusterOperationsCommandError(output, context);
1578
1504
  }
1579
- const contents = map({
1505
+ const contents = (0, smithy_client_1.map)({
1580
1506
  $metadata: deserializeMetadata(output),
1581
1507
  });
1582
1508
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1583
- if (data.clusterOperationInfoList != null) {
1584
- contents.ClusterOperationInfoList = de___listOfClusterOperationInfo(data.clusterOperationInfoList, context);
1585
- }
1586
- if (data.nextToken != null) {
1587
- contents.NextToken = (0, smithy_client_1.expectString)(data.nextToken);
1588
- }
1509
+ const doc = (0, smithy_client_1.take)(data, {
1510
+ ClusterOperationInfoList: [, (_) => de___listOfClusterOperationInfo(_, context), `clusterOperationInfoList`],
1511
+ NextToken: [, smithy_client_1.expectString, `nextToken`],
1512
+ });
1513
+ Object.assign(contents, doc);
1589
1514
  return contents;
1590
1515
  };
1591
1516
  exports.de_ListClusterOperationsCommand = de_ListClusterOperationsCommand;
@@ -1610,10 +1535,9 @@ const de_ListClusterOperationsCommandError = async (output, context) => {
1610
1535
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1611
1536
  default:
1612
1537
  const parsedBody = parsedOutput.body;
1613
- (0, smithy_client_1.throwDefaultError)({
1538
+ return throwDefaultError({
1614
1539
  output,
1615
1540
  parsedBody,
1616
- exceptionCtor: KafkaServiceException_1.KafkaServiceException,
1617
1541
  errorCode,
1618
1542
  });
1619
1543
  }
@@ -1622,16 +1546,15 @@ const de_ListClustersCommand = async (output, context) => {
1622
1546
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1623
1547
  return de_ListClustersCommandError(output, context);
1624
1548
  }
1625
- const contents = map({
1549
+ const contents = (0, smithy_client_1.map)({
1626
1550
  $metadata: deserializeMetadata(output),
1627
1551
  });
1628
1552
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1629
- if (data.clusterInfoList != null) {
1630
- contents.ClusterInfoList = de___listOfClusterInfo(data.clusterInfoList, context);
1631
- }
1632
- if (data.nextToken != null) {
1633
- contents.NextToken = (0, smithy_client_1.expectString)(data.nextToken);
1634
- }
1553
+ const doc = (0, smithy_client_1.take)(data, {
1554
+ ClusterInfoList: [, (_) => de___listOfClusterInfo(_, context), `clusterInfoList`],
1555
+ NextToken: [, smithy_client_1.expectString, `nextToken`],
1556
+ });
1557
+ Object.assign(contents, doc);
1635
1558
  return contents;
1636
1559
  };
1637
1560
  exports.de_ListClustersCommand = de_ListClustersCommand;
@@ -1656,10 +1579,9 @@ const de_ListClustersCommandError = async (output, context) => {
1656
1579
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1657
1580
  default:
1658
1581
  const parsedBody = parsedOutput.body;
1659
- (0, smithy_client_1.throwDefaultError)({
1582
+ return throwDefaultError({
1660
1583
  output,
1661
1584
  parsedBody,
1662
- exceptionCtor: KafkaServiceException_1.KafkaServiceException,
1663
1585
  errorCode,
1664
1586
  });
1665
1587
  }
@@ -1668,16 +1590,15 @@ const de_ListClustersV2Command = async (output, context) => {
1668
1590
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1669
1591
  return de_ListClustersV2CommandError(output, context);
1670
1592
  }
1671
- const contents = map({
1593
+ const contents = (0, smithy_client_1.map)({
1672
1594
  $metadata: deserializeMetadata(output),
1673
1595
  });
1674
1596
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1675
- if (data.clusterInfoList != null) {
1676
- contents.ClusterInfoList = de___listOfCluster(data.clusterInfoList, context);
1677
- }
1678
- if (data.nextToken != null) {
1679
- contents.NextToken = (0, smithy_client_1.expectString)(data.nextToken);
1680
- }
1597
+ const doc = (0, smithy_client_1.take)(data, {
1598
+ ClusterInfoList: [, (_) => de___listOfCluster(_, context), `clusterInfoList`],
1599
+ NextToken: [, smithy_client_1.expectString, `nextToken`],
1600
+ });
1601
+ Object.assign(contents, doc);
1681
1602
  return contents;
1682
1603
  };
1683
1604
  exports.de_ListClustersV2Command = de_ListClustersV2Command;
@@ -1702,10 +1623,9 @@ const de_ListClustersV2CommandError = async (output, context) => {
1702
1623
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1703
1624
  default:
1704
1625
  const parsedBody = parsedOutput.body;
1705
- (0, smithy_client_1.throwDefaultError)({
1626
+ return throwDefaultError({
1706
1627
  output,
1707
1628
  parsedBody,
1708
- exceptionCtor: KafkaServiceException_1.KafkaServiceException,
1709
1629
  errorCode,
1710
1630
  });
1711
1631
  }
@@ -1714,16 +1634,15 @@ const de_ListConfigurationRevisionsCommand = async (output, context) => {
1714
1634
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1715
1635
  return de_ListConfigurationRevisionsCommandError(output, context);
1716
1636
  }
1717
- const contents = map({
1637
+ const contents = (0, smithy_client_1.map)({
1718
1638
  $metadata: deserializeMetadata(output),
1719
1639
  });
1720
1640
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1721
- if (data.nextToken != null) {
1722
- contents.NextToken = (0, smithy_client_1.expectString)(data.nextToken);
1723
- }
1724
- if (data.revisions != null) {
1725
- contents.Revisions = de___listOfConfigurationRevision(data.revisions, context);
1726
- }
1641
+ const doc = (0, smithy_client_1.take)(data, {
1642
+ NextToken: [, smithy_client_1.expectString, `nextToken`],
1643
+ Revisions: [, (_) => de___listOfConfigurationRevision(_, context), `revisions`],
1644
+ });
1645
+ Object.assign(contents, doc);
1727
1646
  return contents;
1728
1647
  };
1729
1648
  exports.de_ListConfigurationRevisionsCommand = de_ListConfigurationRevisionsCommand;
@@ -1754,10 +1673,9 @@ const de_ListConfigurationRevisionsCommandError = async (output, context) => {
1754
1673
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1755
1674
  default:
1756
1675
  const parsedBody = parsedOutput.body;
1757
- (0, smithy_client_1.throwDefaultError)({
1676
+ return throwDefaultError({
1758
1677
  output,
1759
1678
  parsedBody,
1760
- exceptionCtor: KafkaServiceException_1.KafkaServiceException,
1761
1679
  errorCode,
1762
1680
  });
1763
1681
  }
@@ -1766,16 +1684,15 @@ const de_ListConfigurationsCommand = async (output, context) => {
1766
1684
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1767
1685
  return de_ListConfigurationsCommandError(output, context);
1768
1686
  }
1769
- const contents = map({
1687
+ const contents = (0, smithy_client_1.map)({
1770
1688
  $metadata: deserializeMetadata(output),
1771
1689
  });
1772
1690
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1773
- if (data.configurations != null) {
1774
- contents.Configurations = de___listOfConfiguration(data.configurations, context);
1775
- }
1776
- if (data.nextToken != null) {
1777
- contents.NextToken = (0, smithy_client_1.expectString)(data.nextToken);
1778
- }
1691
+ const doc = (0, smithy_client_1.take)(data, {
1692
+ Configurations: [, (_) => de___listOfConfiguration(_, context), `configurations`],
1693
+ NextToken: [, smithy_client_1.expectString, `nextToken`],
1694
+ });
1695
+ Object.assign(contents, doc);
1779
1696
  return contents;
1780
1697
  };
1781
1698
  exports.de_ListConfigurationsCommand = de_ListConfigurationsCommand;
@@ -1803,10 +1720,9 @@ const de_ListConfigurationsCommandError = async (output, context) => {
1803
1720
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1804
1721
  default:
1805
1722
  const parsedBody = parsedOutput.body;
1806
- (0, smithy_client_1.throwDefaultError)({
1723
+ return throwDefaultError({
1807
1724
  output,
1808
1725
  parsedBody,
1809
- exceptionCtor: KafkaServiceException_1.KafkaServiceException,
1810
1726
  errorCode,
1811
1727
  });
1812
1728
  }
@@ -1815,16 +1731,15 @@ const de_ListKafkaVersionsCommand = async (output, context) => {
1815
1731
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1816
1732
  return de_ListKafkaVersionsCommandError(output, context);
1817
1733
  }
1818
- const contents = map({
1734
+ const contents = (0, smithy_client_1.map)({
1819
1735
  $metadata: deserializeMetadata(output),
1820
1736
  });
1821
1737
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1822
- if (data.kafkaVersions != null) {
1823
- contents.KafkaVersions = de___listOfKafkaVersion(data.kafkaVersions, context);
1824
- }
1825
- if (data.nextToken != null) {
1826
- contents.NextToken = (0, smithy_client_1.expectString)(data.nextToken);
1827
- }
1738
+ const doc = (0, smithy_client_1.take)(data, {
1739
+ KafkaVersions: [, (_) => de___listOfKafkaVersion(_, context), `kafkaVersions`],
1740
+ NextToken: [, smithy_client_1.expectString, `nextToken`],
1741
+ });
1742
+ Object.assign(contents, doc);
1828
1743
  return contents;
1829
1744
  };
1830
1745
  exports.de_ListKafkaVersionsCommand = de_ListKafkaVersionsCommand;
@@ -1849,10 +1764,9 @@ const de_ListKafkaVersionsCommandError = async (output, context) => {
1849
1764
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1850
1765
  default:
1851
1766
  const parsedBody = parsedOutput.body;
1852
- (0, smithy_client_1.throwDefaultError)({
1767
+ return throwDefaultError({
1853
1768
  output,
1854
1769
  parsedBody,
1855
- exceptionCtor: KafkaServiceException_1.KafkaServiceException,
1856
1770
  errorCode,
1857
1771
  });
1858
1772
  }
@@ -1861,16 +1775,15 @@ const de_ListNodesCommand = async (output, context) => {
1861
1775
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1862
1776
  return de_ListNodesCommandError(output, context);
1863
1777
  }
1864
- const contents = map({
1778
+ const contents = (0, smithy_client_1.map)({
1865
1779
  $metadata: deserializeMetadata(output),
1866
1780
  });
1867
1781
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1868
- if (data.nextToken != null) {
1869
- contents.NextToken = (0, smithy_client_1.expectString)(data.nextToken);
1870
- }
1871
- if (data.nodeInfoList != null) {
1872
- contents.NodeInfoList = de___listOfNodeInfo(data.nodeInfoList, context);
1873
- }
1782
+ const doc = (0, smithy_client_1.take)(data, {
1783
+ NextToken: [, smithy_client_1.expectString, `nextToken`],
1784
+ NodeInfoList: [, (_) => de___listOfNodeInfo(_, context), `nodeInfoList`],
1785
+ });
1786
+ Object.assign(contents, doc);
1874
1787
  return contents;
1875
1788
  };
1876
1789
  exports.de_ListNodesCommand = de_ListNodesCommand;
@@ -1895,10 +1808,9 @@ const de_ListNodesCommandError = async (output, context) => {
1895
1808
  throw await de_NotFoundExceptionRes(parsedOutput, context);
1896
1809
  default:
1897
1810
  const parsedBody = parsedOutput.body;
1898
- (0, smithy_client_1.throwDefaultError)({
1811
+ return throwDefaultError({
1899
1812
  output,
1900
1813
  parsedBody,
1901
- exceptionCtor: KafkaServiceException_1.KafkaServiceException,
1902
1814
  errorCode,
1903
1815
  });
1904
1816
  }
@@ -1907,16 +1819,15 @@ const de_ListScramSecretsCommand = async (output, context) => {
1907
1819
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1908
1820
  return de_ListScramSecretsCommandError(output, context);
1909
1821
  }
1910
- const contents = map({
1822
+ const contents = (0, smithy_client_1.map)({
1911
1823
  $metadata: deserializeMetadata(output),
1912
1824
  });
1913
1825
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1914
- if (data.nextToken != null) {
1915
- contents.NextToken = (0, smithy_client_1.expectString)(data.nextToken);
1916
- }
1917
- if (data.secretArnList != null) {
1918
- contents.SecretArnList = de___listOf__string(data.secretArnList, context);
1919
- }
1826
+ const doc = (0, smithy_client_1.take)(data, {
1827
+ NextToken: [, smithy_client_1.expectString, `nextToken`],
1828
+ SecretArnList: [, smithy_client_1._json, `secretArnList`],
1829
+ });
1830
+ Object.assign(contents, doc);
1920
1831
  return contents;
1921
1832
  };
1922
1833
  exports.de_ListScramSecretsCommand = de_ListScramSecretsCommand;
@@ -1950,10 +1861,9 @@ const de_ListScramSecretsCommandError = async (output, context) => {
1950
1861
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1951
1862
  default:
1952
1863
  const parsedBody = parsedOutput.body;
1953
- (0, smithy_client_1.throwDefaultError)({
1864
+ return throwDefaultError({
1954
1865
  output,
1955
1866
  parsedBody,
1956
- exceptionCtor: KafkaServiceException_1.KafkaServiceException,
1957
1867
  errorCode,
1958
1868
  });
1959
1869
  }
@@ -1962,13 +1872,14 @@ const de_ListTagsForResourceCommand = async (output, context) => {
1962
1872
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1963
1873
  return de_ListTagsForResourceCommandError(output, context);
1964
1874
  }
1965
- const contents = map({
1875
+ const contents = (0, smithy_client_1.map)({
1966
1876
  $metadata: deserializeMetadata(output),
1967
1877
  });
1968
1878
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1969
- if (data.tags != null) {
1970
- contents.Tags = de___mapOf__string(data.tags, context);
1971
- }
1879
+ const doc = (0, smithy_client_1.take)(data, {
1880
+ Tags: [, smithy_client_1._json, `tags`],
1881
+ });
1882
+ Object.assign(contents, doc);
1972
1883
  return contents;
1973
1884
  };
1974
1885
  exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
@@ -1990,10 +1901,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
1990
1901
  throw await de_NotFoundExceptionRes(parsedOutput, context);
1991
1902
  default:
1992
1903
  const parsedBody = parsedOutput.body;
1993
- (0, smithy_client_1.throwDefaultError)({
1904
+ return throwDefaultError({
1994
1905
  output,
1995
1906
  parsedBody,
1996
- exceptionCtor: KafkaServiceException_1.KafkaServiceException,
1997
1907
  errorCode,
1998
1908
  });
1999
1909
  }
@@ -2002,16 +1912,15 @@ const de_RebootBrokerCommand = async (output, context) => {
2002
1912
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2003
1913
  return de_RebootBrokerCommandError(output, context);
2004
1914
  }
2005
- const contents = map({
1915
+ const contents = (0, smithy_client_1.map)({
2006
1916
  $metadata: deserializeMetadata(output),
2007
1917
  });
2008
1918
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2009
- if (data.clusterArn != null) {
2010
- contents.ClusterArn = (0, smithy_client_1.expectString)(data.clusterArn);
2011
- }
2012
- if (data.clusterOperationArn != null) {
2013
- contents.ClusterOperationArn = (0, smithy_client_1.expectString)(data.clusterOperationArn);
2014
- }
1919
+ const doc = (0, smithy_client_1.take)(data, {
1920
+ ClusterArn: [, smithy_client_1.expectString, `clusterArn`],
1921
+ ClusterOperationArn: [, smithy_client_1.expectString, `clusterOperationArn`],
1922
+ });
1923
+ Object.assign(contents, doc);
2015
1924
  return contents;
2016
1925
  };
2017
1926
  exports.de_RebootBrokerCommand = de_RebootBrokerCommand;
@@ -2045,10 +1954,9 @@ const de_RebootBrokerCommandError = async (output, context) => {
2045
1954
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2046
1955
  default:
2047
1956
  const parsedBody = parsedOutput.body;
2048
- (0, smithy_client_1.throwDefaultError)({
1957
+ return throwDefaultError({
2049
1958
  output,
2050
1959
  parsedBody,
2051
- exceptionCtor: KafkaServiceException_1.KafkaServiceException,
2052
1960
  errorCode,
2053
1961
  });
2054
1962
  }
@@ -2057,7 +1965,7 @@ const de_TagResourceCommand = async (output, context) => {
2057
1965
  if (output.statusCode !== 204 && output.statusCode >= 300) {
2058
1966
  return de_TagResourceCommandError(output, context);
2059
1967
  }
2060
- const contents = map({
1968
+ const contents = (0, smithy_client_1.map)({
2061
1969
  $metadata: deserializeMetadata(output),
2062
1970
  });
2063
1971
  await collectBody(output.body, context);
@@ -2082,10 +1990,9 @@ const de_TagResourceCommandError = async (output, context) => {
2082
1990
  throw await de_NotFoundExceptionRes(parsedOutput, context);
2083
1991
  default:
2084
1992
  const parsedBody = parsedOutput.body;
2085
- (0, smithy_client_1.throwDefaultError)({
1993
+ return throwDefaultError({
2086
1994
  output,
2087
1995
  parsedBody,
2088
- exceptionCtor: KafkaServiceException_1.KafkaServiceException,
2089
1996
  errorCode,
2090
1997
  });
2091
1998
  }
@@ -2094,7 +2001,7 @@ const de_UntagResourceCommand = async (output, context) => {
2094
2001
  if (output.statusCode !== 204 && output.statusCode >= 300) {
2095
2002
  return de_UntagResourceCommandError(output, context);
2096
2003
  }
2097
- const contents = map({
2004
+ const contents = (0, smithy_client_1.map)({
2098
2005
  $metadata: deserializeMetadata(output),
2099
2006
  });
2100
2007
  await collectBody(output.body, context);
@@ -2119,10 +2026,9 @@ const de_UntagResourceCommandError = async (output, context) => {
2119
2026
  throw await de_NotFoundExceptionRes(parsedOutput, context);
2120
2027
  default:
2121
2028
  const parsedBody = parsedOutput.body;
2122
- (0, smithy_client_1.throwDefaultError)({
2029
+ return throwDefaultError({
2123
2030
  output,
2124
2031
  parsedBody,
2125
- exceptionCtor: KafkaServiceException_1.KafkaServiceException,
2126
2032
  errorCode,
2127
2033
  });
2128
2034
  }
@@ -2131,16 +2037,15 @@ const de_UpdateBrokerCountCommand = async (output, context) => {
2131
2037
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2132
2038
  return de_UpdateBrokerCountCommandError(output, context);
2133
2039
  }
2134
- const contents = map({
2040
+ const contents = (0, smithy_client_1.map)({
2135
2041
  $metadata: deserializeMetadata(output),
2136
2042
  });
2137
2043
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2138
- if (data.clusterArn != null) {
2139
- contents.ClusterArn = (0, smithy_client_1.expectString)(data.clusterArn);
2140
- }
2141
- if (data.clusterOperationArn != null) {
2142
- contents.ClusterOperationArn = (0, smithy_client_1.expectString)(data.clusterOperationArn);
2143
- }
2044
+ const doc = (0, smithy_client_1.take)(data, {
2045
+ ClusterArn: [, smithy_client_1.expectString, `clusterArn`],
2046
+ ClusterOperationArn: [, smithy_client_1.expectString, `clusterOperationArn`],
2047
+ });
2048
+ Object.assign(contents, doc);
2144
2049
  return contents;
2145
2050
  };
2146
2051
  exports.de_UpdateBrokerCountCommand = de_UpdateBrokerCountCommand;
@@ -2168,10 +2073,9 @@ const de_UpdateBrokerCountCommandError = async (output, context) => {
2168
2073
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2169
2074
  default:
2170
2075
  const parsedBody = parsedOutput.body;
2171
- (0, smithy_client_1.throwDefaultError)({
2076
+ return throwDefaultError({
2172
2077
  output,
2173
2078
  parsedBody,
2174
- exceptionCtor: KafkaServiceException_1.KafkaServiceException,
2175
2079
  errorCode,
2176
2080
  });
2177
2081
  }
@@ -2180,16 +2084,15 @@ const de_UpdateBrokerStorageCommand = async (output, context) => {
2180
2084
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2181
2085
  return de_UpdateBrokerStorageCommandError(output, context);
2182
2086
  }
2183
- const contents = map({
2087
+ const contents = (0, smithy_client_1.map)({
2184
2088
  $metadata: deserializeMetadata(output),
2185
2089
  });
2186
2090
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2187
- if (data.clusterArn != null) {
2188
- contents.ClusterArn = (0, smithy_client_1.expectString)(data.clusterArn);
2189
- }
2190
- if (data.clusterOperationArn != null) {
2191
- contents.ClusterOperationArn = (0, smithy_client_1.expectString)(data.clusterOperationArn);
2192
- }
2091
+ const doc = (0, smithy_client_1.take)(data, {
2092
+ ClusterArn: [, smithy_client_1.expectString, `clusterArn`],
2093
+ ClusterOperationArn: [, smithy_client_1.expectString, `clusterOperationArn`],
2094
+ });
2095
+ Object.assign(contents, doc);
2193
2096
  return contents;
2194
2097
  };
2195
2098
  exports.de_UpdateBrokerStorageCommand = de_UpdateBrokerStorageCommand;
@@ -2217,10 +2120,9 @@ const de_UpdateBrokerStorageCommandError = async (output, context) => {
2217
2120
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2218
2121
  default:
2219
2122
  const parsedBody = parsedOutput.body;
2220
- (0, smithy_client_1.throwDefaultError)({
2123
+ return throwDefaultError({
2221
2124
  output,
2222
2125
  parsedBody,
2223
- exceptionCtor: KafkaServiceException_1.KafkaServiceException,
2224
2126
  errorCode,
2225
2127
  });
2226
2128
  }
@@ -2229,16 +2131,15 @@ const de_UpdateBrokerTypeCommand = async (output, context) => {
2229
2131
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2230
2132
  return de_UpdateBrokerTypeCommandError(output, context);
2231
2133
  }
2232
- const contents = map({
2134
+ const contents = (0, smithy_client_1.map)({
2233
2135
  $metadata: deserializeMetadata(output),
2234
2136
  });
2235
2137
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2236
- if (data.clusterArn != null) {
2237
- contents.ClusterArn = (0, smithy_client_1.expectString)(data.clusterArn);
2238
- }
2239
- if (data.clusterOperationArn != null) {
2240
- contents.ClusterOperationArn = (0, smithy_client_1.expectString)(data.clusterOperationArn);
2241
- }
2138
+ const doc = (0, smithy_client_1.take)(data, {
2139
+ ClusterArn: [, smithy_client_1.expectString, `clusterArn`],
2140
+ ClusterOperationArn: [, smithy_client_1.expectString, `clusterOperationArn`],
2141
+ });
2142
+ Object.assign(contents, doc);
2242
2143
  return contents;
2243
2144
  };
2244
2145
  exports.de_UpdateBrokerTypeCommand = de_UpdateBrokerTypeCommand;
@@ -2272,10 +2173,9 @@ const de_UpdateBrokerTypeCommandError = async (output, context) => {
2272
2173
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2273
2174
  default:
2274
2175
  const parsedBody = parsedOutput.body;
2275
- (0, smithy_client_1.throwDefaultError)({
2176
+ return throwDefaultError({
2276
2177
  output,
2277
2178
  parsedBody,
2278
- exceptionCtor: KafkaServiceException_1.KafkaServiceException,
2279
2179
  errorCode,
2280
2180
  });
2281
2181
  }
@@ -2284,16 +2184,15 @@ const de_UpdateClusterConfigurationCommand = async (output, context) => {
2284
2184
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2285
2185
  return de_UpdateClusterConfigurationCommandError(output, context);
2286
2186
  }
2287
- const contents = map({
2187
+ const contents = (0, smithy_client_1.map)({
2288
2188
  $metadata: deserializeMetadata(output),
2289
2189
  });
2290
2190
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2291
- if (data.clusterArn != null) {
2292
- contents.ClusterArn = (0, smithy_client_1.expectString)(data.clusterArn);
2293
- }
2294
- if (data.clusterOperationArn != null) {
2295
- contents.ClusterOperationArn = (0, smithy_client_1.expectString)(data.clusterOperationArn);
2296
- }
2191
+ const doc = (0, smithy_client_1.take)(data, {
2192
+ ClusterArn: [, smithy_client_1.expectString, `clusterArn`],
2193
+ ClusterOperationArn: [, smithy_client_1.expectString, `clusterOperationArn`],
2194
+ });
2195
+ Object.assign(contents, doc);
2297
2196
  return contents;
2298
2197
  };
2299
2198
  exports.de_UpdateClusterConfigurationCommand = de_UpdateClusterConfigurationCommand;
@@ -2324,10 +2223,9 @@ const de_UpdateClusterConfigurationCommandError = async (output, context) => {
2324
2223
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2325
2224
  default:
2326
2225
  const parsedBody = parsedOutput.body;
2327
- (0, smithy_client_1.throwDefaultError)({
2226
+ return throwDefaultError({
2328
2227
  output,
2329
2228
  parsedBody,
2330
- exceptionCtor: KafkaServiceException_1.KafkaServiceException,
2331
2229
  errorCode,
2332
2230
  });
2333
2231
  }
@@ -2336,16 +2234,15 @@ const de_UpdateClusterKafkaVersionCommand = async (output, context) => {
2336
2234
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2337
2235
  return de_UpdateClusterKafkaVersionCommandError(output, context);
2338
2236
  }
2339
- const contents = map({
2237
+ const contents = (0, smithy_client_1.map)({
2340
2238
  $metadata: deserializeMetadata(output),
2341
2239
  });
2342
2240
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2343
- if (data.clusterArn != null) {
2344
- contents.ClusterArn = (0, smithy_client_1.expectString)(data.clusterArn);
2345
- }
2346
- if (data.clusterOperationArn != null) {
2347
- contents.ClusterOperationArn = (0, smithy_client_1.expectString)(data.clusterOperationArn);
2348
- }
2241
+ const doc = (0, smithy_client_1.take)(data, {
2242
+ ClusterArn: [, smithy_client_1.expectString, `clusterArn`],
2243
+ ClusterOperationArn: [, smithy_client_1.expectString, `clusterOperationArn`],
2244
+ });
2245
+ Object.assign(contents, doc);
2349
2246
  return contents;
2350
2247
  };
2351
2248
  exports.de_UpdateClusterKafkaVersionCommand = de_UpdateClusterKafkaVersionCommand;
@@ -2379,10 +2276,9 @@ const de_UpdateClusterKafkaVersionCommandError = async (output, context) => {
2379
2276
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2380
2277
  default:
2381
2278
  const parsedBody = parsedOutput.body;
2382
- (0, smithy_client_1.throwDefaultError)({
2279
+ return throwDefaultError({
2383
2280
  output,
2384
2281
  parsedBody,
2385
- exceptionCtor: KafkaServiceException_1.KafkaServiceException,
2386
2282
  errorCode,
2387
2283
  });
2388
2284
  }
@@ -2391,16 +2287,15 @@ const de_UpdateConfigurationCommand = async (output, context) => {
2391
2287
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2392
2288
  return de_UpdateConfigurationCommandError(output, context);
2393
2289
  }
2394
- const contents = map({
2290
+ const contents = (0, smithy_client_1.map)({
2395
2291
  $metadata: deserializeMetadata(output),
2396
2292
  });
2397
2293
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2398
- if (data.arn != null) {
2399
- contents.Arn = (0, smithy_client_1.expectString)(data.arn);
2400
- }
2401
- if (data.latestRevision != null) {
2402
- contents.LatestRevision = de_ConfigurationRevision(data.latestRevision, context);
2403
- }
2294
+ const doc = (0, smithy_client_1.take)(data, {
2295
+ Arn: [, smithy_client_1.expectString, `arn`],
2296
+ LatestRevision: [, (_) => de_ConfigurationRevision(_, context), `latestRevision`],
2297
+ });
2298
+ Object.assign(contents, doc);
2404
2299
  return contents;
2405
2300
  };
2406
2301
  exports.de_UpdateConfigurationCommand = de_UpdateConfigurationCommand;
@@ -2431,10 +2326,9 @@ const de_UpdateConfigurationCommandError = async (output, context) => {
2431
2326
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2432
2327
  default:
2433
2328
  const parsedBody = parsedOutput.body;
2434
- (0, smithy_client_1.throwDefaultError)({
2329
+ return throwDefaultError({
2435
2330
  output,
2436
2331
  parsedBody,
2437
- exceptionCtor: KafkaServiceException_1.KafkaServiceException,
2438
2332
  errorCode,
2439
2333
  });
2440
2334
  }
@@ -2443,16 +2337,15 @@ const de_UpdateConnectivityCommand = async (output, context) => {
2443
2337
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2444
2338
  return de_UpdateConnectivityCommandError(output, context);
2445
2339
  }
2446
- const contents = map({
2340
+ const contents = (0, smithy_client_1.map)({
2447
2341
  $metadata: deserializeMetadata(output),
2448
2342
  });
2449
2343
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2450
- if (data.clusterArn != null) {
2451
- contents.ClusterArn = (0, smithy_client_1.expectString)(data.clusterArn);
2452
- }
2453
- if (data.clusterOperationArn != null) {
2454
- contents.ClusterOperationArn = (0, smithy_client_1.expectString)(data.clusterOperationArn);
2455
- }
2344
+ const doc = (0, smithy_client_1.take)(data, {
2345
+ ClusterArn: [, smithy_client_1.expectString, `clusterArn`],
2346
+ ClusterOperationArn: [, smithy_client_1.expectString, `clusterOperationArn`],
2347
+ });
2348
+ Object.assign(contents, doc);
2456
2349
  return contents;
2457
2350
  };
2458
2351
  exports.de_UpdateConnectivityCommand = de_UpdateConnectivityCommand;
@@ -2483,10 +2376,9 @@ const de_UpdateConnectivityCommandError = async (output, context) => {
2483
2376
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2484
2377
  default:
2485
2378
  const parsedBody = parsedOutput.body;
2486
- (0, smithy_client_1.throwDefaultError)({
2379
+ return throwDefaultError({
2487
2380
  output,
2488
2381
  parsedBody,
2489
- exceptionCtor: KafkaServiceException_1.KafkaServiceException,
2490
2382
  errorCode,
2491
2383
  });
2492
2384
  }
@@ -2495,16 +2387,15 @@ const de_UpdateMonitoringCommand = async (output, context) => {
2495
2387
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2496
2388
  return de_UpdateMonitoringCommandError(output, context);
2497
2389
  }
2498
- const contents = map({
2390
+ const contents = (0, smithy_client_1.map)({
2499
2391
  $metadata: deserializeMetadata(output),
2500
2392
  });
2501
2393
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2502
- if (data.clusterArn != null) {
2503
- contents.ClusterArn = (0, smithy_client_1.expectString)(data.clusterArn);
2504
- }
2505
- if (data.clusterOperationArn != null) {
2506
- contents.ClusterOperationArn = (0, smithy_client_1.expectString)(data.clusterOperationArn);
2507
- }
2394
+ const doc = (0, smithy_client_1.take)(data, {
2395
+ ClusterArn: [, smithy_client_1.expectString, `clusterArn`],
2396
+ ClusterOperationArn: [, smithy_client_1.expectString, `clusterOperationArn`],
2397
+ });
2398
+ Object.assign(contents, doc);
2508
2399
  return contents;
2509
2400
  };
2510
2401
  exports.de_UpdateMonitoringCommand = de_UpdateMonitoringCommand;
@@ -2532,10 +2423,9 @@ const de_UpdateMonitoringCommandError = async (output, context) => {
2532
2423
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2533
2424
  default:
2534
2425
  const parsedBody = parsedOutput.body;
2535
- (0, smithy_client_1.throwDefaultError)({
2426
+ return throwDefaultError({
2536
2427
  output,
2537
2428
  parsedBody,
2538
- exceptionCtor: KafkaServiceException_1.KafkaServiceException,
2539
2429
  errorCode,
2540
2430
  });
2541
2431
  }
@@ -2544,16 +2434,15 @@ const de_UpdateSecurityCommand = async (output, context) => {
2544
2434
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2545
2435
  return de_UpdateSecurityCommandError(output, context);
2546
2436
  }
2547
- const contents = map({
2437
+ const contents = (0, smithy_client_1.map)({
2548
2438
  $metadata: deserializeMetadata(output),
2549
2439
  });
2550
2440
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2551
- if (data.clusterArn != null) {
2552
- contents.ClusterArn = (0, smithy_client_1.expectString)(data.clusterArn);
2553
- }
2554
- if (data.clusterOperationArn != null) {
2555
- contents.ClusterOperationArn = (0, smithy_client_1.expectString)(data.clusterOperationArn);
2556
- }
2441
+ const doc = (0, smithy_client_1.take)(data, {
2442
+ ClusterArn: [, smithy_client_1.expectString, `clusterArn`],
2443
+ ClusterOperationArn: [, smithy_client_1.expectString, `clusterOperationArn`],
2444
+ });
2445
+ Object.assign(contents, doc);
2557
2446
  return contents;
2558
2447
  };
2559
2448
  exports.de_UpdateSecurityCommand = de_UpdateSecurityCommand;
@@ -2587,10 +2476,9 @@ const de_UpdateSecurityCommandError = async (output, context) => {
2587
2476
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2588
2477
  default:
2589
2478
  const parsedBody = parsedOutput.body;
2590
- (0, smithy_client_1.throwDefaultError)({
2479
+ return throwDefaultError({
2591
2480
  output,
2592
2481
  parsedBody,
2593
- exceptionCtor: KafkaServiceException_1.KafkaServiceException,
2594
2482
  errorCode,
2595
2483
  });
2596
2484
  }
@@ -2599,16 +2487,15 @@ const de_UpdateStorageCommand = async (output, context) => {
2599
2487
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2600
2488
  return de_UpdateStorageCommandError(output, context);
2601
2489
  }
2602
- const contents = map({
2490
+ const contents = (0, smithy_client_1.map)({
2603
2491
  $metadata: deserializeMetadata(output),
2604
2492
  });
2605
2493
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2606
- if (data.clusterArn != null) {
2607
- contents.ClusterArn = (0, smithy_client_1.expectString)(data.clusterArn);
2608
- }
2609
- if (data.clusterOperationArn != null) {
2610
- contents.ClusterOperationArn = (0, smithy_client_1.expectString)(data.clusterOperationArn);
2611
- }
2494
+ const doc = (0, smithy_client_1.take)(data, {
2495
+ ClusterArn: [, smithy_client_1.expectString, `clusterArn`],
2496
+ ClusterOperationArn: [, smithy_client_1.expectString, `clusterOperationArn`],
2497
+ });
2498
+ Object.assign(contents, doc);
2612
2499
  return contents;
2613
2500
  };
2614
2501
  exports.de_UpdateStorageCommand = de_UpdateStorageCommand;
@@ -2642,24 +2529,22 @@ const de_UpdateStorageCommandError = async (output, context) => {
2642
2529
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2643
2530
  default:
2644
2531
  const parsedBody = parsedOutput.body;
2645
- (0, smithy_client_1.throwDefaultError)({
2532
+ return throwDefaultError({
2646
2533
  output,
2647
2534
  parsedBody,
2648
- exceptionCtor: KafkaServiceException_1.KafkaServiceException,
2649
2535
  errorCode,
2650
2536
  });
2651
2537
  }
2652
2538
  };
2653
- const map = smithy_client_1.map;
2539
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(KafkaServiceException_1.KafkaServiceException);
2654
2540
  const de_BadRequestExceptionRes = async (parsedOutput, context) => {
2655
- const contents = map({});
2541
+ const contents = (0, smithy_client_1.map)({});
2656
2542
  const data = parsedOutput.body;
2657
- if (data.invalidParameter != null) {
2658
- contents.InvalidParameter = (0, smithy_client_1.expectString)(data.invalidParameter);
2659
- }
2660
- if (data.message != null) {
2661
- contents.Message = (0, smithy_client_1.expectString)(data.message);
2662
- }
2543
+ const doc = (0, smithy_client_1.take)(data, {
2544
+ InvalidParameter: [, smithy_client_1.expectString, `invalidParameter`],
2545
+ Message: [, smithy_client_1.expectString, `message`],
2546
+ });
2547
+ Object.assign(contents, doc);
2663
2548
  const exception = new models_0_1.BadRequestException({
2664
2549
  $metadata: deserializeMetadata(parsedOutput),
2665
2550
  ...contents,
@@ -2667,14 +2552,13 @@ const de_BadRequestExceptionRes = async (parsedOutput, context) => {
2667
2552
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2668
2553
  };
2669
2554
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
2670
- const contents = map({});
2555
+ const contents = (0, smithy_client_1.map)({});
2671
2556
  const data = parsedOutput.body;
2672
- if (data.invalidParameter != null) {
2673
- contents.InvalidParameter = (0, smithy_client_1.expectString)(data.invalidParameter);
2674
- }
2675
- if (data.message != null) {
2676
- contents.Message = (0, smithy_client_1.expectString)(data.message);
2677
- }
2557
+ const doc = (0, smithy_client_1.take)(data, {
2558
+ InvalidParameter: [, smithy_client_1.expectString, `invalidParameter`],
2559
+ Message: [, smithy_client_1.expectString, `message`],
2560
+ });
2561
+ Object.assign(contents, doc);
2678
2562
  const exception = new models_0_1.ConflictException({
2679
2563
  $metadata: deserializeMetadata(parsedOutput),
2680
2564
  ...contents,
@@ -2682,14 +2566,13 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
2682
2566
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2683
2567
  };
2684
2568
  const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
2685
- const contents = map({});
2569
+ const contents = (0, smithy_client_1.map)({});
2686
2570
  const data = parsedOutput.body;
2687
- if (data.invalidParameter != null) {
2688
- contents.InvalidParameter = (0, smithy_client_1.expectString)(data.invalidParameter);
2689
- }
2690
- if (data.message != null) {
2691
- contents.Message = (0, smithy_client_1.expectString)(data.message);
2692
- }
2571
+ const doc = (0, smithy_client_1.take)(data, {
2572
+ InvalidParameter: [, smithy_client_1.expectString, `invalidParameter`],
2573
+ Message: [, smithy_client_1.expectString, `message`],
2574
+ });
2575
+ Object.assign(contents, doc);
2693
2576
  const exception = new models_0_1.ForbiddenException({
2694
2577
  $metadata: deserializeMetadata(parsedOutput),
2695
2578
  ...contents,
@@ -2697,14 +2580,13 @@ const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
2697
2580
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2698
2581
  };
2699
2582
  const de_InternalServerErrorExceptionRes = async (parsedOutput, context) => {
2700
- const contents = map({});
2583
+ const contents = (0, smithy_client_1.map)({});
2701
2584
  const data = parsedOutput.body;
2702
- if (data.invalidParameter != null) {
2703
- contents.InvalidParameter = (0, smithy_client_1.expectString)(data.invalidParameter);
2704
- }
2705
- if (data.message != null) {
2706
- contents.Message = (0, smithy_client_1.expectString)(data.message);
2707
- }
2585
+ const doc = (0, smithy_client_1.take)(data, {
2586
+ InvalidParameter: [, smithy_client_1.expectString, `invalidParameter`],
2587
+ Message: [, smithy_client_1.expectString, `message`],
2588
+ });
2589
+ Object.assign(contents, doc);
2708
2590
  const exception = new models_0_1.InternalServerErrorException({
2709
2591
  $metadata: deserializeMetadata(parsedOutput),
2710
2592
  ...contents,
@@ -2712,14 +2594,13 @@ const de_InternalServerErrorExceptionRes = async (parsedOutput, context) => {
2712
2594
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2713
2595
  };
2714
2596
  const de_NotFoundExceptionRes = async (parsedOutput, context) => {
2715
- const contents = map({});
2597
+ const contents = (0, smithy_client_1.map)({});
2716
2598
  const data = parsedOutput.body;
2717
- if (data.invalidParameter != null) {
2718
- contents.InvalidParameter = (0, smithy_client_1.expectString)(data.invalidParameter);
2719
- }
2720
- if (data.message != null) {
2721
- contents.Message = (0, smithy_client_1.expectString)(data.message);
2722
- }
2599
+ const doc = (0, smithy_client_1.take)(data, {
2600
+ InvalidParameter: [, smithy_client_1.expectString, `invalidParameter`],
2601
+ Message: [, smithy_client_1.expectString, `message`],
2602
+ });
2603
+ Object.assign(contents, doc);
2723
2604
  const exception = new models_0_1.NotFoundException({
2724
2605
  $metadata: deserializeMetadata(parsedOutput),
2725
2606
  ...contents,
@@ -2727,14 +2608,13 @@ const de_NotFoundExceptionRes = async (parsedOutput, context) => {
2727
2608
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2728
2609
  };
2729
2610
  const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
2730
- const contents = map({});
2611
+ const contents = (0, smithy_client_1.map)({});
2731
2612
  const data = parsedOutput.body;
2732
- if (data.invalidParameter != null) {
2733
- contents.InvalidParameter = (0, smithy_client_1.expectString)(data.invalidParameter);
2734
- }
2735
- if (data.message != null) {
2736
- contents.Message = (0, smithy_client_1.expectString)(data.message);
2737
- }
2613
+ const doc = (0, smithy_client_1.take)(data, {
2614
+ InvalidParameter: [, smithy_client_1.expectString, `invalidParameter`],
2615
+ Message: [, smithy_client_1.expectString, `message`],
2616
+ });
2617
+ Object.assign(contents, doc);
2738
2618
  const exception = new models_0_1.ServiceUnavailableException({
2739
2619
  $metadata: deserializeMetadata(parsedOutput),
2740
2620
  ...contents,
@@ -2742,14 +2622,13 @@ const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
2742
2622
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2743
2623
  };
2744
2624
  const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
2745
- const contents = map({});
2625
+ const contents = (0, smithy_client_1.map)({});
2746
2626
  const data = parsedOutput.body;
2747
- if (data.invalidParameter != null) {
2748
- contents.InvalidParameter = (0, smithy_client_1.expectString)(data.invalidParameter);
2749
- }
2750
- if (data.message != null) {
2751
- contents.Message = (0, smithy_client_1.expectString)(data.message);
2752
- }
2627
+ const doc = (0, smithy_client_1.take)(data, {
2628
+ InvalidParameter: [, smithy_client_1.expectString, `invalidParameter`],
2629
+ Message: [, smithy_client_1.expectString, `message`],
2630
+ });
2631
+ Object.assign(contents, doc);
2753
2632
  const exception = new models_0_1.TooManyRequestsException({
2754
2633
  $metadata: deserializeMetadata(parsedOutput),
2755
2634
  ...contents,
@@ -2757,27 +2636,19 @@ const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
2757
2636
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2758
2637
  };
2759
2638
  const de_UnauthorizedExceptionRes = async (parsedOutput, context) => {
2760
- const contents = map({});
2639
+ const contents = (0, smithy_client_1.map)({});
2761
2640
  const data = parsedOutput.body;
2762
- if (data.invalidParameter != null) {
2763
- contents.InvalidParameter = (0, smithy_client_1.expectString)(data.invalidParameter);
2764
- }
2765
- if (data.message != null) {
2766
- contents.Message = (0, smithy_client_1.expectString)(data.message);
2767
- }
2641
+ const doc = (0, smithy_client_1.take)(data, {
2642
+ InvalidParameter: [, smithy_client_1.expectString, `invalidParameter`],
2643
+ Message: [, smithy_client_1.expectString, `message`],
2644
+ });
2645
+ Object.assign(contents, doc);
2768
2646
  const exception = new models_0_1.UnauthorizedException({
2769
2647
  $metadata: deserializeMetadata(parsedOutput),
2770
2648
  ...contents,
2771
2649
  });
2772
2650
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2773
2651
  };
2774
- const se___listOf__string = (input, context) => {
2775
- return input
2776
- .filter((e) => e != null)
2777
- .map((entry) => {
2778
- return entry;
2779
- });
2780
- };
2781
2652
  const se___listOfBrokerEBSVolumeInfo = (input, context) => {
2782
2653
  return input
2783
2654
  .filter((e) => e != null)
@@ -2792,238 +2663,199 @@ const se___listOfVpcConfig = (input, context) => {
2792
2663
  return se_VpcConfig(entry, context);
2793
2664
  });
2794
2665
  };
2795
- const se___mapOf__string = (input, context) => {
2796
- return Object.entries(input).reduce((acc, [key, value]) => {
2797
- if (value === null) {
2798
- return acc;
2799
- }
2800
- acc[key] = value;
2801
- return acc;
2802
- }, {});
2803
- };
2804
2666
  const se_BrokerEBSVolumeInfo = (input, context) => {
2805
- return {
2806
- ...(input.KafkaBrokerNodeId != null && { kafkaBrokerNodeId: input.KafkaBrokerNodeId }),
2807
- ...(input.ProvisionedThroughput != null && {
2808
- provisionedThroughput: se_ProvisionedThroughput(input.ProvisionedThroughput, context),
2809
- }),
2810
- ...(input.VolumeSizeGB != null && { volumeSizeGB: input.VolumeSizeGB }),
2811
- };
2667
+ return (0, smithy_client_1.take)(input, {
2668
+ kafkaBrokerNodeId: [, , `KafkaBrokerNodeId`],
2669
+ provisionedThroughput: [, (_) => se_ProvisionedThroughput(_, context), `ProvisionedThroughput`],
2670
+ volumeSizeGB: [, , `VolumeSizeGB`],
2671
+ });
2812
2672
  };
2813
2673
  const se_BrokerLogs = (input, context) => {
2814
- return {
2815
- ...(input.CloudWatchLogs != null && { cloudWatchLogs: se_CloudWatchLogs(input.CloudWatchLogs, context) }),
2816
- ...(input.Firehose != null && { firehose: se_Firehose(input.Firehose, context) }),
2817
- ...(input.S3 != null && { s3: se_S3(input.S3, context) }),
2818
- };
2674
+ return (0, smithy_client_1.take)(input, {
2675
+ cloudWatchLogs: [, (_) => se_CloudWatchLogs(_, context), `CloudWatchLogs`],
2676
+ firehose: [, (_) => se_Firehose(_, context), `Firehose`],
2677
+ s3: [, (_) => se_S3(_, context), `S3`],
2678
+ });
2819
2679
  };
2820
2680
  const se_BrokerNodeGroupInfo = (input, context) => {
2821
- return {
2822
- ...(input.BrokerAZDistribution != null && { brokerAZDistribution: input.BrokerAZDistribution }),
2823
- ...(input.ClientSubnets != null && { clientSubnets: se___listOf__string(input.ClientSubnets, context) }),
2824
- ...(input.ConnectivityInfo != null && { connectivityInfo: se_ConnectivityInfo(input.ConnectivityInfo, context) }),
2825
- ...(input.InstanceType != null && { instanceType: input.InstanceType }),
2826
- ...(input.SecurityGroups != null && { securityGroups: se___listOf__string(input.SecurityGroups, context) }),
2827
- ...(input.StorageInfo != null && { storageInfo: se_StorageInfo(input.StorageInfo, context) }),
2828
- };
2681
+ return (0, smithy_client_1.take)(input, {
2682
+ brokerAZDistribution: [, , `BrokerAZDistribution`],
2683
+ clientSubnets: [, smithy_client_1._json, `ClientSubnets`],
2684
+ connectivityInfo: [, (_) => se_ConnectivityInfo(_, context), `ConnectivityInfo`],
2685
+ instanceType: [, , `InstanceType`],
2686
+ securityGroups: [, smithy_client_1._json, `SecurityGroups`],
2687
+ storageInfo: [, (_) => se_StorageInfo(_, context), `StorageInfo`],
2688
+ });
2829
2689
  };
2830
2690
  const se_ClientAuthentication = (input, context) => {
2831
- return {
2832
- ...(input.Sasl != null && { sasl: se_Sasl(input.Sasl, context) }),
2833
- ...(input.Tls != null && { tls: se_Tls(input.Tls, context) }),
2834
- ...(input.Unauthenticated != null && { unauthenticated: se_Unauthenticated(input.Unauthenticated, context) }),
2835
- };
2691
+ return (0, smithy_client_1.take)(input, {
2692
+ sasl: [, (_) => se_Sasl(_, context), `Sasl`],
2693
+ tls: [, (_) => se_Tls(_, context), `Tls`],
2694
+ unauthenticated: [, (_) => se_Unauthenticated(_, context), `Unauthenticated`],
2695
+ });
2836
2696
  };
2837
2697
  const se_CloudWatchLogs = (input, context) => {
2838
- return {
2839
- ...(input.Enabled != null && { enabled: input.Enabled }),
2840
- ...(input.LogGroup != null && { logGroup: input.LogGroup }),
2841
- };
2698
+ return (0, smithy_client_1.take)(input, {
2699
+ enabled: [, , `Enabled`],
2700
+ logGroup: [, , `LogGroup`],
2701
+ });
2842
2702
  };
2843
2703
  const se_ConfigurationInfo = (input, context) => {
2844
- return {
2845
- ...(input.Arn != null && { arn: input.Arn }),
2846
- ...(input.Revision != null && { revision: input.Revision }),
2847
- };
2704
+ return (0, smithy_client_1.take)(input, {
2705
+ arn: [, , `Arn`],
2706
+ revision: [, , `Revision`],
2707
+ });
2848
2708
  };
2849
2709
  const se_ConnectivityInfo = (input, context) => {
2850
- return {
2851
- ...(input.PublicAccess != null && { publicAccess: se_PublicAccess(input.PublicAccess, context) }),
2852
- };
2710
+ return (0, smithy_client_1.take)(input, {
2711
+ publicAccess: [, (_) => se_PublicAccess(_, context), `PublicAccess`],
2712
+ });
2853
2713
  };
2854
2714
  const se_EBSStorageInfo = (input, context) => {
2855
- return {
2856
- ...(input.ProvisionedThroughput != null && {
2857
- provisionedThroughput: se_ProvisionedThroughput(input.ProvisionedThroughput, context),
2858
- }),
2859
- ...(input.VolumeSize != null && { volumeSize: input.VolumeSize }),
2860
- };
2715
+ return (0, smithy_client_1.take)(input, {
2716
+ provisionedThroughput: [, (_) => se_ProvisionedThroughput(_, context), `ProvisionedThroughput`],
2717
+ volumeSize: [, , `VolumeSize`],
2718
+ });
2861
2719
  };
2862
2720
  const se_EncryptionAtRest = (input, context) => {
2863
- return {
2864
- ...(input.DataVolumeKMSKeyId != null && { dataVolumeKMSKeyId: input.DataVolumeKMSKeyId }),
2865
- };
2721
+ return (0, smithy_client_1.take)(input, {
2722
+ dataVolumeKMSKeyId: [, , `DataVolumeKMSKeyId`],
2723
+ });
2866
2724
  };
2867
2725
  const se_EncryptionInfo = (input, context) => {
2868
- return {
2869
- ...(input.EncryptionAtRest != null && { encryptionAtRest: se_EncryptionAtRest(input.EncryptionAtRest, context) }),
2870
- ...(input.EncryptionInTransit != null && {
2871
- encryptionInTransit: se_EncryptionInTransit(input.EncryptionInTransit, context),
2872
- }),
2873
- };
2726
+ return (0, smithy_client_1.take)(input, {
2727
+ encryptionAtRest: [, (_) => se_EncryptionAtRest(_, context), `EncryptionAtRest`],
2728
+ encryptionInTransit: [, (_) => se_EncryptionInTransit(_, context), `EncryptionInTransit`],
2729
+ });
2874
2730
  };
2875
2731
  const se_EncryptionInTransit = (input, context) => {
2876
- return {
2877
- ...(input.ClientBroker != null && { clientBroker: input.ClientBroker }),
2878
- ...(input.InCluster != null && { inCluster: input.InCluster }),
2879
- };
2732
+ return (0, smithy_client_1.take)(input, {
2733
+ clientBroker: [, , `ClientBroker`],
2734
+ inCluster: [, , `InCluster`],
2735
+ });
2880
2736
  };
2881
2737
  const se_Firehose = (input, context) => {
2882
- return {
2883
- ...(input.DeliveryStream != null && { deliveryStream: input.DeliveryStream }),
2884
- ...(input.Enabled != null && { enabled: input.Enabled }),
2885
- };
2738
+ return (0, smithy_client_1.take)(input, {
2739
+ deliveryStream: [, , `DeliveryStream`],
2740
+ enabled: [, , `Enabled`],
2741
+ });
2886
2742
  };
2887
2743
  const se_Iam = (input, context) => {
2888
- return {
2889
- ...(input.Enabled != null && { enabled: input.Enabled }),
2890
- };
2744
+ return (0, smithy_client_1.take)(input, {
2745
+ enabled: [, , `Enabled`],
2746
+ });
2891
2747
  };
2892
2748
  const se_JmxExporterInfo = (input, context) => {
2893
- return {
2894
- ...(input.EnabledInBroker != null && { enabledInBroker: input.EnabledInBroker }),
2895
- };
2749
+ return (0, smithy_client_1.take)(input, {
2750
+ enabledInBroker: [, , `EnabledInBroker`],
2751
+ });
2896
2752
  };
2897
2753
  const se_LoggingInfo = (input, context) => {
2898
- return {
2899
- ...(input.BrokerLogs != null && { brokerLogs: se_BrokerLogs(input.BrokerLogs, context) }),
2900
- };
2754
+ return (0, smithy_client_1.take)(input, {
2755
+ brokerLogs: [, (_) => se_BrokerLogs(_, context), `BrokerLogs`],
2756
+ });
2901
2757
  };
2902
2758
  const se_NodeExporterInfo = (input, context) => {
2903
- return {
2904
- ...(input.EnabledInBroker != null && { enabledInBroker: input.EnabledInBroker }),
2905
- };
2759
+ return (0, smithy_client_1.take)(input, {
2760
+ enabledInBroker: [, , `EnabledInBroker`],
2761
+ });
2906
2762
  };
2907
2763
  const se_OpenMonitoringInfo = (input, context) => {
2908
- return {
2909
- ...(input.Prometheus != null && { prometheus: se_PrometheusInfo(input.Prometheus, context) }),
2910
- };
2764
+ return (0, smithy_client_1.take)(input, {
2765
+ prometheus: [, (_) => se_PrometheusInfo(_, context), `Prometheus`],
2766
+ });
2911
2767
  };
2912
2768
  const se_PrometheusInfo = (input, context) => {
2913
- return {
2914
- ...(input.JmxExporter != null && { jmxExporter: se_JmxExporterInfo(input.JmxExporter, context) }),
2915
- ...(input.NodeExporter != null && { nodeExporter: se_NodeExporterInfo(input.NodeExporter, context) }),
2916
- };
2769
+ return (0, smithy_client_1.take)(input, {
2770
+ jmxExporter: [, (_) => se_JmxExporterInfo(_, context), `JmxExporter`],
2771
+ nodeExporter: [, (_) => se_NodeExporterInfo(_, context), `NodeExporter`],
2772
+ });
2917
2773
  };
2918
2774
  const se_ProvisionedRequest = (input, context) => {
2919
- return {
2920
- ...(input.BrokerNodeGroupInfo != null && {
2921
- brokerNodeGroupInfo: se_BrokerNodeGroupInfo(input.BrokerNodeGroupInfo, context),
2922
- }),
2923
- ...(input.ClientAuthentication != null && {
2924
- clientAuthentication: se_ClientAuthentication(input.ClientAuthentication, context),
2925
- }),
2926
- ...(input.ConfigurationInfo != null && {
2927
- configurationInfo: se_ConfigurationInfo(input.ConfigurationInfo, context),
2928
- }),
2929
- ...(input.EncryptionInfo != null && { encryptionInfo: se_EncryptionInfo(input.EncryptionInfo, context) }),
2930
- ...(input.EnhancedMonitoring != null && { enhancedMonitoring: input.EnhancedMonitoring }),
2931
- ...(input.KafkaVersion != null && { kafkaVersion: input.KafkaVersion }),
2932
- ...(input.LoggingInfo != null && { loggingInfo: se_LoggingInfo(input.LoggingInfo, context) }),
2933
- ...(input.NumberOfBrokerNodes != null && { numberOfBrokerNodes: input.NumberOfBrokerNodes }),
2934
- ...(input.OpenMonitoring != null && { openMonitoring: se_OpenMonitoringInfo(input.OpenMonitoring, context) }),
2935
- ...(input.StorageMode != null && { storageMode: input.StorageMode }),
2936
- };
2775
+ return (0, smithy_client_1.take)(input, {
2776
+ brokerNodeGroupInfo: [, (_) => se_BrokerNodeGroupInfo(_, context), `BrokerNodeGroupInfo`],
2777
+ clientAuthentication: [, (_) => se_ClientAuthentication(_, context), `ClientAuthentication`],
2778
+ configurationInfo: [, (_) => se_ConfigurationInfo(_, context), `ConfigurationInfo`],
2779
+ encryptionInfo: [, (_) => se_EncryptionInfo(_, context), `EncryptionInfo`],
2780
+ enhancedMonitoring: [, , `EnhancedMonitoring`],
2781
+ kafkaVersion: [, , `KafkaVersion`],
2782
+ loggingInfo: [, (_) => se_LoggingInfo(_, context), `LoggingInfo`],
2783
+ numberOfBrokerNodes: [, , `NumberOfBrokerNodes`],
2784
+ openMonitoring: [, (_) => se_OpenMonitoringInfo(_, context), `OpenMonitoring`],
2785
+ storageMode: [, , `StorageMode`],
2786
+ });
2937
2787
  };
2938
2788
  const se_ProvisionedThroughput = (input, context) => {
2939
- return {
2940
- ...(input.Enabled != null && { enabled: input.Enabled }),
2941
- ...(input.VolumeThroughput != null && { volumeThroughput: input.VolumeThroughput }),
2942
- };
2789
+ return (0, smithy_client_1.take)(input, {
2790
+ enabled: [, , `Enabled`],
2791
+ volumeThroughput: [, , `VolumeThroughput`],
2792
+ });
2943
2793
  };
2944
2794
  const se_PublicAccess = (input, context) => {
2945
- return {
2946
- ...(input.Type != null && { type: input.Type }),
2947
- };
2795
+ return (0, smithy_client_1.take)(input, {
2796
+ type: [, , `Type`],
2797
+ });
2948
2798
  };
2949
2799
  const se_S3 = (input, context) => {
2950
- return {
2951
- ...(input.Bucket != null && { bucket: input.Bucket }),
2952
- ...(input.Enabled != null && { enabled: input.Enabled }),
2953
- ...(input.Prefix != null && { prefix: input.Prefix }),
2954
- };
2800
+ return (0, smithy_client_1.take)(input, {
2801
+ bucket: [, , `Bucket`],
2802
+ enabled: [, , `Enabled`],
2803
+ prefix: [, , `Prefix`],
2804
+ });
2955
2805
  };
2956
2806
  const se_Sasl = (input, context) => {
2957
- return {
2958
- ...(input.Iam != null && { iam: se_Iam(input.Iam, context) }),
2959
- ...(input.Scram != null && { scram: se_Scram(input.Scram, context) }),
2960
- };
2807
+ return (0, smithy_client_1.take)(input, {
2808
+ iam: [, (_) => se_Iam(_, context), `Iam`],
2809
+ scram: [, (_) => se_Scram(_, context), `Scram`],
2810
+ });
2961
2811
  };
2962
2812
  const se_Scram = (input, context) => {
2963
- return {
2964
- ...(input.Enabled != null && { enabled: input.Enabled }),
2965
- };
2813
+ return (0, smithy_client_1.take)(input, {
2814
+ enabled: [, , `Enabled`],
2815
+ });
2966
2816
  };
2967
2817
  const se_ServerlessClientAuthentication = (input, context) => {
2968
- return {
2969
- ...(input.Sasl != null && { sasl: se_ServerlessSasl(input.Sasl, context) }),
2970
- };
2818
+ return (0, smithy_client_1.take)(input, {
2819
+ sasl: [, (_) => se_ServerlessSasl(_, context), `Sasl`],
2820
+ });
2971
2821
  };
2972
2822
  const se_ServerlessRequest = (input, context) => {
2973
- return {
2974
- ...(input.ClientAuthentication != null && {
2975
- clientAuthentication: se_ServerlessClientAuthentication(input.ClientAuthentication, context),
2976
- }),
2977
- ...(input.VpcConfigs != null && { vpcConfigs: se___listOfVpcConfig(input.VpcConfigs, context) }),
2978
- };
2823
+ return (0, smithy_client_1.take)(input, {
2824
+ clientAuthentication: [, (_) => se_ServerlessClientAuthentication(_, context), `ClientAuthentication`],
2825
+ vpcConfigs: [, (_) => se___listOfVpcConfig(_, context), `VpcConfigs`],
2826
+ });
2979
2827
  };
2980
2828
  const se_ServerlessSasl = (input, context) => {
2981
- return {
2982
- ...(input.Iam != null && { iam: se_Iam(input.Iam, context) }),
2983
- };
2829
+ return (0, smithy_client_1.take)(input, {
2830
+ iam: [, (_) => se_Iam(_, context), `Iam`],
2831
+ });
2984
2832
  };
2985
2833
  const se_StorageInfo = (input, context) => {
2986
- return {
2987
- ...(input.EbsStorageInfo != null && { ebsStorageInfo: se_EBSStorageInfo(input.EbsStorageInfo, context) }),
2988
- };
2834
+ return (0, smithy_client_1.take)(input, {
2835
+ ebsStorageInfo: [, (_) => se_EBSStorageInfo(_, context), `EbsStorageInfo`],
2836
+ });
2989
2837
  };
2990
2838
  const se_Tls = (input, context) => {
2991
- return {
2992
- ...(input.CertificateAuthorityArnList != null && {
2993
- certificateAuthorityArnList: se___listOf__string(input.CertificateAuthorityArnList, context),
2994
- }),
2995
- ...(input.Enabled != null && { enabled: input.Enabled }),
2996
- };
2839
+ return (0, smithy_client_1.take)(input, {
2840
+ certificateAuthorityArnList: [, smithy_client_1._json, `CertificateAuthorityArnList`],
2841
+ enabled: [, , `Enabled`],
2842
+ });
2997
2843
  };
2998
2844
  const se_Unauthenticated = (input, context) => {
2999
- return {
3000
- ...(input.Enabled != null && { enabled: input.Enabled }),
3001
- };
2845
+ return (0, smithy_client_1.take)(input, {
2846
+ enabled: [, , `Enabled`],
2847
+ });
3002
2848
  };
3003
2849
  const se_VpcConfig = (input, context) => {
3004
- return {
3005
- ...(input.SecurityGroupIds != null && { securityGroupIds: se___listOf__string(input.SecurityGroupIds, context) }),
3006
- ...(input.SubnetIds != null && { subnetIds: se___listOf__string(input.SubnetIds, context) }),
3007
- };
3008
- };
3009
- const de___listOf__string = (output, context) => {
3010
- const retVal = (output || [])
3011
- .filter((e) => e != null)
3012
- .map((entry) => {
3013
- if (entry === null) {
3014
- return null;
3015
- }
3016
- return (0, smithy_client_1.expectString)(entry);
2850
+ return (0, smithy_client_1.take)(input, {
2851
+ securityGroupIds: [, smithy_client_1._json, `SecurityGroupIds`],
2852
+ subnetIds: [, smithy_client_1._json, `SubnetIds`],
3017
2853
  });
3018
- return retVal;
3019
2854
  };
3020
2855
  const de___listOfBrokerEBSVolumeInfo = (output, context) => {
3021
2856
  const retVal = (output || [])
3022
2857
  .filter((e) => e != null)
3023
2858
  .map((entry) => {
3024
- if (entry === null) {
3025
- return null;
3026
- }
3027
2859
  return de_BrokerEBSVolumeInfo(entry, context);
3028
2860
  });
3029
2861
  return retVal;
@@ -3032,9 +2864,6 @@ const de___listOfCluster = (output, context) => {
3032
2864
  const retVal = (output || [])
3033
2865
  .filter((e) => e != null)
3034
2866
  .map((entry) => {
3035
- if (entry === null) {
3036
- return null;
3037
- }
3038
2867
  return de_Cluster(entry, context);
3039
2868
  });
3040
2869
  return retVal;
@@ -3043,9 +2872,6 @@ const de___listOfClusterInfo = (output, context) => {
3043
2872
  const retVal = (output || [])
3044
2873
  .filter((e) => e != null)
3045
2874
  .map((entry) => {
3046
- if (entry === null) {
3047
- return null;
3048
- }
3049
2875
  return de_ClusterInfo(entry, context);
3050
2876
  });
3051
2877
  return retVal;
@@ -3054,9 +2880,6 @@ const de___listOfClusterOperationInfo = (output, context) => {
3054
2880
  const retVal = (output || [])
3055
2881
  .filter((e) => e != null)
3056
2882
  .map((entry) => {
3057
- if (entry === null) {
3058
- return null;
3059
- }
3060
2883
  return de_ClusterOperationInfo(entry, context);
3061
2884
  });
3062
2885
  return retVal;
@@ -3065,9 +2888,6 @@ const de___listOfClusterOperationStep = (output, context) => {
3065
2888
  const retVal = (output || [])
3066
2889
  .filter((e) => e != null)
3067
2890
  .map((entry) => {
3068
- if (entry === null) {
3069
- return null;
3070
- }
3071
2891
  return de_ClusterOperationStep(entry, context);
3072
2892
  });
3073
2893
  return retVal;
@@ -3076,9 +2896,6 @@ const de___listOfCompatibleKafkaVersion = (output, context) => {
3076
2896
  const retVal = (output || [])
3077
2897
  .filter((e) => e != null)
3078
2898
  .map((entry) => {
3079
- if (entry === null) {
3080
- return null;
3081
- }
3082
2899
  return de_CompatibleKafkaVersion(entry, context);
3083
2900
  });
3084
2901
  return retVal;
@@ -3087,9 +2904,6 @@ const de___listOfConfiguration = (output, context) => {
3087
2904
  const retVal = (output || [])
3088
2905
  .filter((e) => e != null)
3089
2906
  .map((entry) => {
3090
- if (entry === null) {
3091
- return null;
3092
- }
3093
2907
  return de_Configuration(entry, context);
3094
2908
  });
3095
2909
  return retVal;
@@ -3098,9 +2912,6 @@ const de___listOfConfigurationRevision = (output, context) => {
3098
2912
  const retVal = (output || [])
3099
2913
  .filter((e) => e != null)
3100
2914
  .map((entry) => {
3101
- if (entry === null) {
3102
- return null;
3103
- }
3104
2915
  return de_ConfigurationRevision(entry, context);
3105
2916
  });
3106
2917
  return retVal;
@@ -3109,9 +2920,6 @@ const de___listOfKafkaVersion = (output, context) => {
3109
2920
  const retVal = (output || [])
3110
2921
  .filter((e) => e != null)
3111
2922
  .map((entry) => {
3112
- if (entry === null) {
3113
- return null;
3114
- }
3115
2923
  return de_KafkaVersion(entry, context);
3116
2924
  });
3117
2925
  return retVal;
@@ -3120,9 +2928,6 @@ const de___listOfNodeInfo = (output, context) => {
3120
2928
  const retVal = (output || [])
3121
2929
  .filter((e) => e != null)
3122
2930
  .map((entry) => {
3123
- if (entry === null) {
3124
- return null;
3125
- }
3126
2931
  return de_NodeInfo(entry, context);
3127
2932
  });
3128
2933
  return retVal;
@@ -3131,9 +2936,6 @@ const de___listOfUnprocessedScramSecret = (output, context) => {
3131
2936
  const retVal = (output || [])
3132
2937
  .filter((e) => e != null)
3133
2938
  .map((entry) => {
3134
- if (entry === null) {
3135
- return null;
3136
- }
3137
2939
  return de_UnprocessedScramSecret(entry, context);
3138
2940
  });
3139
2941
  return retVal;
@@ -3142,413 +2944,385 @@ const de___listOfVpcConfig = (output, context) => {
3142
2944
  const retVal = (output || [])
3143
2945
  .filter((e) => e != null)
3144
2946
  .map((entry) => {
3145
- if (entry === null) {
3146
- return null;
3147
- }
3148
2947
  return de_VpcConfig(entry, context);
3149
2948
  });
3150
2949
  return retVal;
3151
2950
  };
3152
- const de___mapOf__string = (output, context) => {
3153
- return Object.entries(output).reduce((acc, [key, value]) => {
3154
- if (value === null) {
3155
- return acc;
3156
- }
3157
- acc[key] = (0, smithy_client_1.expectString)(value);
3158
- return acc;
3159
- }, {});
3160
- };
3161
2951
  const de_BrokerEBSVolumeInfo = (output, context) => {
3162
- return {
3163
- KafkaBrokerNodeId: (0, smithy_client_1.expectString)(output.kafkaBrokerNodeId),
3164
- ProvisionedThroughput: output.provisionedThroughput != null
3165
- ? de_ProvisionedThroughput(output.provisionedThroughput, context)
3166
- : undefined,
3167
- VolumeSizeGB: (0, smithy_client_1.expectInt32)(output.volumeSizeGB),
3168
- };
2952
+ return (0, smithy_client_1.take)(output, {
2953
+ KafkaBrokerNodeId: [, smithy_client_1.expectString, `kafkaBrokerNodeId`],
2954
+ ProvisionedThroughput: (_) => [, de_ProvisionedThroughput(_, context), `provisionedThroughput`],
2955
+ VolumeSizeGB: [, smithy_client_1.expectInt32, `volumeSizeGB`],
2956
+ });
3169
2957
  };
3170
2958
  const de_BrokerLogs = (output, context) => {
3171
- return {
3172
- CloudWatchLogs: output.cloudWatchLogs != null ? de_CloudWatchLogs(output.cloudWatchLogs, context) : undefined,
3173
- Firehose: output.firehose != null ? de_Firehose(output.firehose, context) : undefined,
3174
- S3: output.s3 != null ? de_S3(output.s3, context) : undefined,
3175
- };
2959
+ return (0, smithy_client_1.take)(output, {
2960
+ CloudWatchLogs: (_) => [, de_CloudWatchLogs(_, context), `cloudWatchLogs`],
2961
+ Firehose: (_) => [, de_Firehose(_, context), `firehose`],
2962
+ S3: (_) => [, de_S3(_, context), `s3`],
2963
+ });
3176
2964
  };
3177
2965
  const de_BrokerNodeGroupInfo = (output, context) => {
3178
- return {
3179
- BrokerAZDistribution: (0, smithy_client_1.expectString)(output.brokerAZDistribution),
3180
- ClientSubnets: output.clientSubnets != null ? de___listOf__string(output.clientSubnets, context) : undefined,
3181
- ConnectivityInfo: output.connectivityInfo != null ? de_ConnectivityInfo(output.connectivityInfo, context) : undefined,
3182
- InstanceType: (0, smithy_client_1.expectString)(output.instanceType),
3183
- SecurityGroups: output.securityGroups != null ? de___listOf__string(output.securityGroups, context) : undefined,
3184
- StorageInfo: output.storageInfo != null ? de_StorageInfo(output.storageInfo, context) : undefined,
3185
- };
2966
+ return (0, smithy_client_1.take)(output, {
2967
+ BrokerAZDistribution: [, smithy_client_1.expectString, `brokerAZDistribution`],
2968
+ ClientSubnets: [, smithy_client_1._json, `clientSubnets`],
2969
+ ConnectivityInfo: (_) => [, de_ConnectivityInfo(_, context), `connectivityInfo`],
2970
+ InstanceType: [, smithy_client_1.expectString, `instanceType`],
2971
+ SecurityGroups: [, smithy_client_1._json, `securityGroups`],
2972
+ StorageInfo: (_) => [, de_StorageInfo(_, context), `storageInfo`],
2973
+ });
3186
2974
  };
3187
2975
  const de_BrokerNodeInfo = (output, context) => {
3188
- return {
3189
- AttachedENIId: (0, smithy_client_1.expectString)(output.attachedENIId),
3190
- BrokerId: (0, smithy_client_1.limitedParseDouble)(output.brokerId),
3191
- ClientSubnet: (0, smithy_client_1.expectString)(output.clientSubnet),
3192
- ClientVpcIpAddress: (0, smithy_client_1.expectString)(output.clientVpcIpAddress),
3193
- CurrentBrokerSoftwareInfo: output.currentBrokerSoftwareInfo != null
3194
- ? de_BrokerSoftwareInfo(output.currentBrokerSoftwareInfo, context)
3195
- : undefined,
3196
- Endpoints: output.endpoints != null ? de___listOf__string(output.endpoints, context) : undefined,
3197
- };
2976
+ return (0, smithy_client_1.take)(output, {
2977
+ AttachedENIId: [, smithy_client_1.expectString, `attachedENIId`],
2978
+ BrokerId: [, smithy_client_1.limitedParseDouble, `brokerId`],
2979
+ ClientSubnet: [, smithy_client_1.expectString, `clientSubnet`],
2980
+ ClientVpcIpAddress: [, smithy_client_1.expectString, `clientVpcIpAddress`],
2981
+ CurrentBrokerSoftwareInfo: (_) => [, de_BrokerSoftwareInfo(_, context), `currentBrokerSoftwareInfo`],
2982
+ Endpoints: [, smithy_client_1._json, `endpoints`],
2983
+ });
3198
2984
  };
3199
2985
  const de_BrokerSoftwareInfo = (output, context) => {
3200
- return {
3201
- ConfigurationArn: (0, smithy_client_1.expectString)(output.configurationArn),
3202
- ConfigurationRevision: (0, smithy_client_1.expectLong)(output.configurationRevision),
3203
- KafkaVersion: (0, smithy_client_1.expectString)(output.kafkaVersion),
3204
- };
2986
+ return (0, smithy_client_1.take)(output, {
2987
+ ConfigurationArn: [, smithy_client_1.expectString, `configurationArn`],
2988
+ ConfigurationRevision: [, smithy_client_1.expectLong, `configurationRevision`],
2989
+ KafkaVersion: [, smithy_client_1.expectString, `kafkaVersion`],
2990
+ });
3205
2991
  };
3206
2992
  const de_ClientAuthentication = (output, context) => {
3207
- return {
3208
- Sasl: output.sasl != null ? de_Sasl(output.sasl, context) : undefined,
3209
- Tls: output.tls != null ? de_Tls(output.tls, context) : undefined,
3210
- Unauthenticated: output.unauthenticated != null ? de_Unauthenticated(output.unauthenticated, context) : undefined,
3211
- };
2993
+ return (0, smithy_client_1.take)(output, {
2994
+ Sasl: (_) => [, de_Sasl(_, context), `sasl`],
2995
+ Tls: (_) => [, de_Tls(_, context), `tls`],
2996
+ Unauthenticated: (_) => [, de_Unauthenticated(_, context), `unauthenticated`],
2997
+ });
3212
2998
  };
3213
2999
  const de_CloudWatchLogs = (output, context) => {
3214
- return {
3215
- Enabled: (0, smithy_client_1.expectBoolean)(output.enabled),
3216
- LogGroup: (0, smithy_client_1.expectString)(output.logGroup),
3217
- };
3000
+ return (0, smithy_client_1.take)(output, {
3001
+ Enabled: [, smithy_client_1.expectBoolean, `enabled`],
3002
+ LogGroup: [, smithy_client_1.expectString, `logGroup`],
3003
+ });
3218
3004
  };
3219
3005
  const de_Cluster = (output, context) => {
3220
- return {
3221
- ActiveOperationArn: (0, smithy_client_1.expectString)(output.activeOperationArn),
3222
- ClusterArn: (0, smithy_client_1.expectString)(output.clusterArn),
3223
- ClusterName: (0, smithy_client_1.expectString)(output.clusterName),
3224
- ClusterType: (0, smithy_client_1.expectString)(output.clusterType),
3225
- CreationTime: output.creationTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.creationTime)) : undefined,
3226
- CurrentVersion: (0, smithy_client_1.expectString)(output.currentVersion),
3227
- Provisioned: output.provisioned != null ? de_Provisioned(output.provisioned, context) : undefined,
3228
- Serverless: output.serverless != null ? de_Serverless(output.serverless, context) : undefined,
3229
- State: (0, smithy_client_1.expectString)(output.state),
3230
- StateInfo: output.stateInfo != null ? de_StateInfo(output.stateInfo, context) : undefined,
3231
- Tags: output.tags != null ? de___mapOf__string(output.tags, context) : undefined,
3232
- };
3006
+ return (0, smithy_client_1.take)(output, {
3007
+ ActiveOperationArn: [, smithy_client_1.expectString, `activeOperationArn`],
3008
+ ClusterArn: [, smithy_client_1.expectString, `clusterArn`],
3009
+ ClusterName: [, smithy_client_1.expectString, `clusterName`],
3010
+ ClusterType: [, smithy_client_1.expectString, `clusterType`],
3011
+ CreationTime: (_) => [, (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)), `creationTime`],
3012
+ CurrentVersion: [, smithy_client_1.expectString, `currentVersion`],
3013
+ Provisioned: (_) => [, de_Provisioned(_, context), `provisioned`],
3014
+ Serverless: (_) => [, de_Serverless(_, context), `serverless`],
3015
+ State: [, smithy_client_1.expectString, `state`],
3016
+ StateInfo: (_) => [, de_StateInfo(_, context), `stateInfo`],
3017
+ Tags: [, smithy_client_1._json, `tags`],
3018
+ });
3233
3019
  };
3234
3020
  const de_ClusterInfo = (output, context) => {
3235
- return {
3236
- ActiveOperationArn: (0, smithy_client_1.expectString)(output.activeOperationArn),
3237
- BrokerNodeGroupInfo: output.brokerNodeGroupInfo != null ? de_BrokerNodeGroupInfo(output.brokerNodeGroupInfo, context) : undefined,
3238
- ClientAuthentication: output.clientAuthentication != null ? de_ClientAuthentication(output.clientAuthentication, context) : undefined,
3239
- ClusterArn: (0, smithy_client_1.expectString)(output.clusterArn),
3240
- ClusterName: (0, smithy_client_1.expectString)(output.clusterName),
3241
- CreationTime: output.creationTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.creationTime)) : undefined,
3242
- CurrentBrokerSoftwareInfo: output.currentBrokerSoftwareInfo != null
3243
- ? de_BrokerSoftwareInfo(output.currentBrokerSoftwareInfo, context)
3244
- : undefined,
3245
- CurrentVersion: (0, smithy_client_1.expectString)(output.currentVersion),
3246
- EncryptionInfo: output.encryptionInfo != null ? de_EncryptionInfo(output.encryptionInfo, context) : undefined,
3247
- EnhancedMonitoring: (0, smithy_client_1.expectString)(output.enhancedMonitoring),
3248
- LoggingInfo: output.loggingInfo != null ? de_LoggingInfo(output.loggingInfo, context) : undefined,
3249
- NumberOfBrokerNodes: (0, smithy_client_1.expectInt32)(output.numberOfBrokerNodes),
3250
- OpenMonitoring: output.openMonitoring != null ? de_OpenMonitoring(output.openMonitoring, context) : undefined,
3251
- State: (0, smithy_client_1.expectString)(output.state),
3252
- StateInfo: output.stateInfo != null ? de_StateInfo(output.stateInfo, context) : undefined,
3253
- StorageMode: (0, smithy_client_1.expectString)(output.storageMode),
3254
- Tags: output.tags != null ? de___mapOf__string(output.tags, context) : undefined,
3255
- ZookeeperConnectString: (0, smithy_client_1.expectString)(output.zookeeperConnectString),
3256
- ZookeeperConnectStringTls: (0, smithy_client_1.expectString)(output.zookeeperConnectStringTls),
3257
- };
3021
+ return (0, smithy_client_1.take)(output, {
3022
+ ActiveOperationArn: [, smithy_client_1.expectString, `activeOperationArn`],
3023
+ BrokerNodeGroupInfo: (_) => [, de_BrokerNodeGroupInfo(_, context), `brokerNodeGroupInfo`],
3024
+ ClientAuthentication: (_) => [, de_ClientAuthentication(_, context), `clientAuthentication`],
3025
+ ClusterArn: [, smithy_client_1.expectString, `clusterArn`],
3026
+ ClusterName: [, smithy_client_1.expectString, `clusterName`],
3027
+ CreationTime: (_) => [, (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)), `creationTime`],
3028
+ CurrentBrokerSoftwareInfo: (_) => [, de_BrokerSoftwareInfo(_, context), `currentBrokerSoftwareInfo`],
3029
+ CurrentVersion: [, smithy_client_1.expectString, `currentVersion`],
3030
+ EncryptionInfo: (_) => [, de_EncryptionInfo(_, context), `encryptionInfo`],
3031
+ EnhancedMonitoring: [, smithy_client_1.expectString, `enhancedMonitoring`],
3032
+ LoggingInfo: (_) => [, de_LoggingInfo(_, context), `loggingInfo`],
3033
+ NumberOfBrokerNodes: [, smithy_client_1.expectInt32, `numberOfBrokerNodes`],
3034
+ OpenMonitoring: (_) => [, de_OpenMonitoring(_, context), `openMonitoring`],
3035
+ State: [, smithy_client_1.expectString, `state`],
3036
+ StateInfo: (_) => [, de_StateInfo(_, context), `stateInfo`],
3037
+ StorageMode: [, smithy_client_1.expectString, `storageMode`],
3038
+ Tags: [, smithy_client_1._json, `tags`],
3039
+ ZookeeperConnectString: [, smithy_client_1.expectString, `zookeeperConnectString`],
3040
+ ZookeeperConnectStringTls: [, smithy_client_1.expectString, `zookeeperConnectStringTls`],
3041
+ });
3258
3042
  };
3259
3043
  const de_ClusterOperationInfo = (output, context) => {
3260
- return {
3261
- ClientRequestId: (0, smithy_client_1.expectString)(output.clientRequestId),
3262
- ClusterArn: (0, smithy_client_1.expectString)(output.clusterArn),
3263
- CreationTime: output.creationTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.creationTime)) : undefined,
3264
- EndTime: output.endTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.endTime)) : undefined,
3265
- ErrorInfo: output.errorInfo != null ? de_ErrorInfo(output.errorInfo, context) : undefined,
3266
- OperationArn: (0, smithy_client_1.expectString)(output.operationArn),
3267
- OperationState: (0, smithy_client_1.expectString)(output.operationState),
3268
- OperationSteps: output.operationSteps != null ? de___listOfClusterOperationStep(output.operationSteps, context) : undefined,
3269
- OperationType: (0, smithy_client_1.expectString)(output.operationType),
3270
- SourceClusterInfo: output.sourceClusterInfo != null ? de_MutableClusterInfo(output.sourceClusterInfo, context) : undefined,
3271
- TargetClusterInfo: output.targetClusterInfo != null ? de_MutableClusterInfo(output.targetClusterInfo, context) : undefined,
3272
- };
3044
+ return (0, smithy_client_1.take)(output, {
3045
+ ClientRequestId: [, smithy_client_1.expectString, `clientRequestId`],
3046
+ ClusterArn: [, smithy_client_1.expectString, `clusterArn`],
3047
+ CreationTime: (_) => [, (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)), `creationTime`],
3048
+ EndTime: (_) => [, (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)), `endTime`],
3049
+ ErrorInfo: (_) => [, de_ErrorInfo(_, context), `errorInfo`],
3050
+ OperationArn: [, smithy_client_1.expectString, `operationArn`],
3051
+ OperationState: [, smithy_client_1.expectString, `operationState`],
3052
+ OperationSteps: (_) => [, de___listOfClusterOperationStep(_, context), `operationSteps`],
3053
+ OperationType: [, smithy_client_1.expectString, `operationType`],
3054
+ SourceClusterInfo: (_) => [, de_MutableClusterInfo(_, context), `sourceClusterInfo`],
3055
+ TargetClusterInfo: (_) => [, de_MutableClusterInfo(_, context), `targetClusterInfo`],
3056
+ });
3273
3057
  };
3274
3058
  const de_ClusterOperationStep = (output, context) => {
3275
- return {
3276
- StepInfo: output.stepInfo != null ? de_ClusterOperationStepInfo(output.stepInfo, context) : undefined,
3277
- StepName: (0, smithy_client_1.expectString)(output.stepName),
3278
- };
3059
+ return (0, smithy_client_1.take)(output, {
3060
+ StepInfo: (_) => [, de_ClusterOperationStepInfo(_, context), `stepInfo`],
3061
+ StepName: [, smithy_client_1.expectString, `stepName`],
3062
+ });
3279
3063
  };
3280
3064
  const de_ClusterOperationStepInfo = (output, context) => {
3281
- return {
3282
- StepStatus: (0, smithy_client_1.expectString)(output.stepStatus),
3283
- };
3065
+ return (0, smithy_client_1.take)(output, {
3066
+ StepStatus: [, smithy_client_1.expectString, `stepStatus`],
3067
+ });
3284
3068
  };
3285
3069
  const de_CompatibleKafkaVersion = (output, context) => {
3286
- return {
3287
- SourceVersion: (0, smithy_client_1.expectString)(output.sourceVersion),
3288
- TargetVersions: output.targetVersions != null ? de___listOf__string(output.targetVersions, context) : undefined,
3289
- };
3070
+ return (0, smithy_client_1.take)(output, {
3071
+ SourceVersion: [, smithy_client_1.expectString, `sourceVersion`],
3072
+ TargetVersions: [, smithy_client_1._json, `targetVersions`],
3073
+ });
3290
3074
  };
3291
3075
  const de_Configuration = (output, context) => {
3292
- return {
3293
- Arn: (0, smithy_client_1.expectString)(output.arn),
3294
- CreationTime: output.creationTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.creationTime)) : undefined,
3295
- Description: (0, smithy_client_1.expectString)(output.description),
3296
- KafkaVersions: output.kafkaVersions != null ? de___listOf__string(output.kafkaVersions, context) : undefined,
3297
- LatestRevision: output.latestRevision != null ? de_ConfigurationRevision(output.latestRevision, context) : undefined,
3298
- Name: (0, smithy_client_1.expectString)(output.name),
3299
- State: (0, smithy_client_1.expectString)(output.state),
3300
- };
3076
+ return (0, smithy_client_1.take)(output, {
3077
+ Arn: [, smithy_client_1.expectString, `arn`],
3078
+ CreationTime: (_) => [, (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)), `creationTime`],
3079
+ Description: [, smithy_client_1.expectString, `description`],
3080
+ KafkaVersions: [, smithy_client_1._json, `kafkaVersions`],
3081
+ LatestRevision: (_) => [, de_ConfigurationRevision(_, context), `latestRevision`],
3082
+ Name: [, smithy_client_1.expectString, `name`],
3083
+ State: [, smithy_client_1.expectString, `state`],
3084
+ });
3301
3085
  };
3302
3086
  const de_ConfigurationInfo = (output, context) => {
3303
- return {
3304
- Arn: (0, smithy_client_1.expectString)(output.arn),
3305
- Revision: (0, smithy_client_1.expectLong)(output.revision),
3306
- };
3087
+ return (0, smithy_client_1.take)(output, {
3088
+ Arn: [, smithy_client_1.expectString, `arn`],
3089
+ Revision: [, smithy_client_1.expectLong, `revision`],
3090
+ });
3307
3091
  };
3308
3092
  const de_ConfigurationRevision = (output, context) => {
3309
- return {
3310
- CreationTime: output.creationTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.creationTime)) : undefined,
3311
- Description: (0, smithy_client_1.expectString)(output.description),
3312
- Revision: (0, smithy_client_1.expectLong)(output.revision),
3313
- };
3093
+ return (0, smithy_client_1.take)(output, {
3094
+ CreationTime: (_) => [, (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)), `creationTime`],
3095
+ Description: [, smithy_client_1.expectString, `description`],
3096
+ Revision: [, smithy_client_1.expectLong, `revision`],
3097
+ });
3314
3098
  };
3315
3099
  const de_ConnectivityInfo = (output, context) => {
3316
- return {
3317
- PublicAccess: output.publicAccess != null ? de_PublicAccess(output.publicAccess, context) : undefined,
3318
- };
3100
+ return (0, smithy_client_1.take)(output, {
3101
+ PublicAccess: (_) => [, de_PublicAccess(_, context), `publicAccess`],
3102
+ });
3319
3103
  };
3320
3104
  const de_EBSStorageInfo = (output, context) => {
3321
- return {
3322
- ProvisionedThroughput: output.provisionedThroughput != null
3323
- ? de_ProvisionedThroughput(output.provisionedThroughput, context)
3324
- : undefined,
3325
- VolumeSize: (0, smithy_client_1.expectInt32)(output.volumeSize),
3326
- };
3105
+ return (0, smithy_client_1.take)(output, {
3106
+ ProvisionedThroughput: (_) => [, de_ProvisionedThroughput(_, context), `provisionedThroughput`],
3107
+ VolumeSize: [, smithy_client_1.expectInt32, `volumeSize`],
3108
+ });
3327
3109
  };
3328
3110
  const de_EncryptionAtRest = (output, context) => {
3329
- return {
3330
- DataVolumeKMSKeyId: (0, smithy_client_1.expectString)(output.dataVolumeKMSKeyId),
3331
- };
3111
+ return (0, smithy_client_1.take)(output, {
3112
+ DataVolumeKMSKeyId: [, smithy_client_1.expectString, `dataVolumeKMSKeyId`],
3113
+ });
3332
3114
  };
3333
3115
  const de_EncryptionInfo = (output, context) => {
3334
- return {
3335
- EncryptionAtRest: output.encryptionAtRest != null ? de_EncryptionAtRest(output.encryptionAtRest, context) : undefined,
3336
- EncryptionInTransit: output.encryptionInTransit != null ? de_EncryptionInTransit(output.encryptionInTransit, context) : undefined,
3337
- };
3116
+ return (0, smithy_client_1.take)(output, {
3117
+ EncryptionAtRest: (_) => [, de_EncryptionAtRest(_, context), `encryptionAtRest`],
3118
+ EncryptionInTransit: (_) => [, de_EncryptionInTransit(_, context), `encryptionInTransit`],
3119
+ });
3338
3120
  };
3339
3121
  const de_EncryptionInTransit = (output, context) => {
3340
- return {
3341
- ClientBroker: (0, smithy_client_1.expectString)(output.clientBroker),
3342
- InCluster: (0, smithy_client_1.expectBoolean)(output.inCluster),
3343
- };
3122
+ return (0, smithy_client_1.take)(output, {
3123
+ ClientBroker: [, smithy_client_1.expectString, `clientBroker`],
3124
+ InCluster: [, smithy_client_1.expectBoolean, `inCluster`],
3125
+ });
3344
3126
  };
3345
3127
  const de_ErrorInfo = (output, context) => {
3346
- return {
3347
- ErrorCode: (0, smithy_client_1.expectString)(output.errorCode),
3348
- ErrorString: (0, smithy_client_1.expectString)(output.errorString),
3349
- };
3128
+ return (0, smithy_client_1.take)(output, {
3129
+ ErrorCode: [, smithy_client_1.expectString, `errorCode`],
3130
+ ErrorString: [, smithy_client_1.expectString, `errorString`],
3131
+ });
3350
3132
  };
3351
3133
  const de_Firehose = (output, context) => {
3352
- return {
3353
- DeliveryStream: (0, smithy_client_1.expectString)(output.deliveryStream),
3354
- Enabled: (0, smithy_client_1.expectBoolean)(output.enabled),
3355
- };
3134
+ return (0, smithy_client_1.take)(output, {
3135
+ DeliveryStream: [, smithy_client_1.expectString, `deliveryStream`],
3136
+ Enabled: [, smithy_client_1.expectBoolean, `enabled`],
3137
+ });
3356
3138
  };
3357
3139
  const de_Iam = (output, context) => {
3358
- return {
3359
- Enabled: (0, smithy_client_1.expectBoolean)(output.enabled),
3360
- };
3140
+ return (0, smithy_client_1.take)(output, {
3141
+ Enabled: [, smithy_client_1.expectBoolean, `enabled`],
3142
+ });
3361
3143
  };
3362
3144
  const de_JmxExporter = (output, context) => {
3363
- return {
3364
- EnabledInBroker: (0, smithy_client_1.expectBoolean)(output.enabledInBroker),
3365
- };
3145
+ return (0, smithy_client_1.take)(output, {
3146
+ EnabledInBroker: [, smithy_client_1.expectBoolean, `enabledInBroker`],
3147
+ });
3366
3148
  };
3367
3149
  const de_JmxExporterInfo = (output, context) => {
3368
- return {
3369
- EnabledInBroker: (0, smithy_client_1.expectBoolean)(output.enabledInBroker),
3370
- };
3150
+ return (0, smithy_client_1.take)(output, {
3151
+ EnabledInBroker: [, smithy_client_1.expectBoolean, `enabledInBroker`],
3152
+ });
3371
3153
  };
3372
3154
  const de_KafkaVersion = (output, context) => {
3373
- return {
3374
- Status: (0, smithy_client_1.expectString)(output.status),
3375
- Version: (0, smithy_client_1.expectString)(output.version),
3376
- };
3155
+ return (0, smithy_client_1.take)(output, {
3156
+ Status: [, smithy_client_1.expectString, `status`],
3157
+ Version: [, smithy_client_1.expectString, `version`],
3158
+ });
3377
3159
  };
3378
3160
  const de_LoggingInfo = (output, context) => {
3379
- return {
3380
- BrokerLogs: output.brokerLogs != null ? de_BrokerLogs(output.brokerLogs, context) : undefined,
3381
- };
3161
+ return (0, smithy_client_1.take)(output, {
3162
+ BrokerLogs: (_) => [, de_BrokerLogs(_, context), `brokerLogs`],
3163
+ });
3382
3164
  };
3383
3165
  const de_MutableClusterInfo = (output, context) => {
3384
- return {
3385
- BrokerEBSVolumeInfo: output.brokerEBSVolumeInfo != null
3386
- ? de___listOfBrokerEBSVolumeInfo(output.brokerEBSVolumeInfo, context)
3387
- : undefined,
3388
- ClientAuthentication: output.clientAuthentication != null ? de_ClientAuthentication(output.clientAuthentication, context) : undefined,
3389
- ConfigurationInfo: output.configurationInfo != null ? de_ConfigurationInfo(output.configurationInfo, context) : undefined,
3390
- ConnectivityInfo: output.connectivityInfo != null ? de_ConnectivityInfo(output.connectivityInfo, context) : undefined,
3391
- EncryptionInfo: output.encryptionInfo != null ? de_EncryptionInfo(output.encryptionInfo, context) : undefined,
3392
- EnhancedMonitoring: (0, smithy_client_1.expectString)(output.enhancedMonitoring),
3393
- InstanceType: (0, smithy_client_1.expectString)(output.instanceType),
3394
- KafkaVersion: (0, smithy_client_1.expectString)(output.kafkaVersion),
3395
- LoggingInfo: output.loggingInfo != null ? de_LoggingInfo(output.loggingInfo, context) : undefined,
3396
- NumberOfBrokerNodes: (0, smithy_client_1.expectInt32)(output.numberOfBrokerNodes),
3397
- OpenMonitoring: output.openMonitoring != null ? de_OpenMonitoring(output.openMonitoring, context) : undefined,
3398
- StorageMode: (0, smithy_client_1.expectString)(output.storageMode),
3399
- };
3166
+ return (0, smithy_client_1.take)(output, {
3167
+ BrokerEBSVolumeInfo: (_) => [, de___listOfBrokerEBSVolumeInfo(_, context), `brokerEBSVolumeInfo`],
3168
+ ClientAuthentication: (_) => [, de_ClientAuthentication(_, context), `clientAuthentication`],
3169
+ ConfigurationInfo: (_) => [, de_ConfigurationInfo(_, context), `configurationInfo`],
3170
+ ConnectivityInfo: (_) => [, de_ConnectivityInfo(_, context), `connectivityInfo`],
3171
+ EncryptionInfo: (_) => [, de_EncryptionInfo(_, context), `encryptionInfo`],
3172
+ EnhancedMonitoring: [, smithy_client_1.expectString, `enhancedMonitoring`],
3173
+ InstanceType: [, smithy_client_1.expectString, `instanceType`],
3174
+ KafkaVersion: [, smithy_client_1.expectString, `kafkaVersion`],
3175
+ LoggingInfo: (_) => [, de_LoggingInfo(_, context), `loggingInfo`],
3176
+ NumberOfBrokerNodes: [, smithy_client_1.expectInt32, `numberOfBrokerNodes`],
3177
+ OpenMonitoring: (_) => [, de_OpenMonitoring(_, context), `openMonitoring`],
3178
+ StorageMode: [, smithy_client_1.expectString, `storageMode`],
3179
+ });
3400
3180
  };
3401
3181
  const de_NodeExporter = (output, context) => {
3402
- return {
3403
- EnabledInBroker: (0, smithy_client_1.expectBoolean)(output.enabledInBroker),
3404
- };
3182
+ return (0, smithy_client_1.take)(output, {
3183
+ EnabledInBroker: [, smithy_client_1.expectBoolean, `enabledInBroker`],
3184
+ });
3405
3185
  };
3406
3186
  const de_NodeExporterInfo = (output, context) => {
3407
- return {
3408
- EnabledInBroker: (0, smithy_client_1.expectBoolean)(output.enabledInBroker),
3409
- };
3187
+ return (0, smithy_client_1.take)(output, {
3188
+ EnabledInBroker: [, smithy_client_1.expectBoolean, `enabledInBroker`],
3189
+ });
3410
3190
  };
3411
3191
  const de_NodeInfo = (output, context) => {
3412
- return {
3413
- AddedToClusterTime: (0, smithy_client_1.expectString)(output.addedToClusterTime),
3414
- BrokerNodeInfo: output.brokerNodeInfo != null ? de_BrokerNodeInfo(output.brokerNodeInfo, context) : undefined,
3415
- InstanceType: (0, smithy_client_1.expectString)(output.instanceType),
3416
- NodeARN: (0, smithy_client_1.expectString)(output.nodeARN),
3417
- NodeType: (0, smithy_client_1.expectString)(output.nodeType),
3418
- ZookeeperNodeInfo: output.zookeeperNodeInfo != null ? de_ZookeeperNodeInfo(output.zookeeperNodeInfo, context) : undefined,
3419
- };
3192
+ return (0, smithy_client_1.take)(output, {
3193
+ AddedToClusterTime: [, smithy_client_1.expectString, `addedToClusterTime`],
3194
+ BrokerNodeInfo: (_) => [, de_BrokerNodeInfo(_, context), `brokerNodeInfo`],
3195
+ InstanceType: [, smithy_client_1.expectString, `instanceType`],
3196
+ NodeARN: [, smithy_client_1.expectString, `nodeARN`],
3197
+ NodeType: [, smithy_client_1.expectString, `nodeType`],
3198
+ ZookeeperNodeInfo: (_) => [, de_ZookeeperNodeInfo(_, context), `zookeeperNodeInfo`],
3199
+ });
3420
3200
  };
3421
3201
  const de_OpenMonitoring = (output, context) => {
3422
- return {
3423
- Prometheus: output.prometheus != null ? de_Prometheus(output.prometheus, context) : undefined,
3424
- };
3202
+ return (0, smithy_client_1.take)(output, {
3203
+ Prometheus: (_) => [, de_Prometheus(_, context), `prometheus`],
3204
+ });
3425
3205
  };
3426
3206
  const de_OpenMonitoringInfo = (output, context) => {
3427
- return {
3428
- Prometheus: output.prometheus != null ? de_PrometheusInfo(output.prometheus, context) : undefined,
3429
- };
3207
+ return (0, smithy_client_1.take)(output, {
3208
+ Prometheus: (_) => [, de_PrometheusInfo(_, context), `prometheus`],
3209
+ });
3430
3210
  };
3431
3211
  const de_Prometheus = (output, context) => {
3432
- return {
3433
- JmxExporter: output.jmxExporter != null ? de_JmxExporter(output.jmxExporter, context) : undefined,
3434
- NodeExporter: output.nodeExporter != null ? de_NodeExporter(output.nodeExporter, context) : undefined,
3435
- };
3212
+ return (0, smithy_client_1.take)(output, {
3213
+ JmxExporter: (_) => [, de_JmxExporter(_, context), `jmxExporter`],
3214
+ NodeExporter: (_) => [, de_NodeExporter(_, context), `nodeExporter`],
3215
+ });
3436
3216
  };
3437
3217
  const de_PrometheusInfo = (output, context) => {
3438
- return {
3439
- JmxExporter: output.jmxExporter != null ? de_JmxExporterInfo(output.jmxExporter, context) : undefined,
3440
- NodeExporter: output.nodeExporter != null ? de_NodeExporterInfo(output.nodeExporter, context) : undefined,
3441
- };
3218
+ return (0, smithy_client_1.take)(output, {
3219
+ JmxExporter: (_) => [, de_JmxExporterInfo(_, context), `jmxExporter`],
3220
+ NodeExporter: (_) => [, de_NodeExporterInfo(_, context), `nodeExporter`],
3221
+ });
3442
3222
  };
3443
3223
  const de_Provisioned = (output, context) => {
3444
- return {
3445
- BrokerNodeGroupInfo: output.brokerNodeGroupInfo != null ? de_BrokerNodeGroupInfo(output.brokerNodeGroupInfo, context) : undefined,
3446
- ClientAuthentication: output.clientAuthentication != null ? de_ClientAuthentication(output.clientAuthentication, context) : undefined,
3447
- CurrentBrokerSoftwareInfo: output.currentBrokerSoftwareInfo != null
3448
- ? de_BrokerSoftwareInfo(output.currentBrokerSoftwareInfo, context)
3449
- : undefined,
3450
- EncryptionInfo: output.encryptionInfo != null ? de_EncryptionInfo(output.encryptionInfo, context) : undefined,
3451
- EnhancedMonitoring: (0, smithy_client_1.expectString)(output.enhancedMonitoring),
3452
- LoggingInfo: output.loggingInfo != null ? de_LoggingInfo(output.loggingInfo, context) : undefined,
3453
- NumberOfBrokerNodes: (0, smithy_client_1.expectInt32)(output.numberOfBrokerNodes),
3454
- OpenMonitoring: output.openMonitoring != null ? de_OpenMonitoringInfo(output.openMonitoring, context) : undefined,
3455
- StorageMode: (0, smithy_client_1.expectString)(output.storageMode),
3456
- ZookeeperConnectString: (0, smithy_client_1.expectString)(output.zookeeperConnectString),
3457
- ZookeeperConnectStringTls: (0, smithy_client_1.expectString)(output.zookeeperConnectStringTls),
3458
- };
3224
+ return (0, smithy_client_1.take)(output, {
3225
+ BrokerNodeGroupInfo: (_) => [, de_BrokerNodeGroupInfo(_, context), `brokerNodeGroupInfo`],
3226
+ ClientAuthentication: (_) => [, de_ClientAuthentication(_, context), `clientAuthentication`],
3227
+ CurrentBrokerSoftwareInfo: (_) => [, de_BrokerSoftwareInfo(_, context), `currentBrokerSoftwareInfo`],
3228
+ EncryptionInfo: (_) => [, de_EncryptionInfo(_, context), `encryptionInfo`],
3229
+ EnhancedMonitoring: [, smithy_client_1.expectString, `enhancedMonitoring`],
3230
+ LoggingInfo: (_) => [, de_LoggingInfo(_, context), `loggingInfo`],
3231
+ NumberOfBrokerNodes: [, smithy_client_1.expectInt32, `numberOfBrokerNodes`],
3232
+ OpenMonitoring: (_) => [, de_OpenMonitoringInfo(_, context), `openMonitoring`],
3233
+ StorageMode: [, smithy_client_1.expectString, `storageMode`],
3234
+ ZookeeperConnectString: [, smithy_client_1.expectString, `zookeeperConnectString`],
3235
+ ZookeeperConnectStringTls: [, smithy_client_1.expectString, `zookeeperConnectStringTls`],
3236
+ });
3459
3237
  };
3460
3238
  const de_ProvisionedThroughput = (output, context) => {
3461
- return {
3462
- Enabled: (0, smithy_client_1.expectBoolean)(output.enabled),
3463
- VolumeThroughput: (0, smithy_client_1.expectInt32)(output.volumeThroughput),
3464
- };
3239
+ return (0, smithy_client_1.take)(output, {
3240
+ Enabled: [, smithy_client_1.expectBoolean, `enabled`],
3241
+ VolumeThroughput: [, smithy_client_1.expectInt32, `volumeThroughput`],
3242
+ });
3465
3243
  };
3466
3244
  const de_PublicAccess = (output, context) => {
3467
- return {
3468
- Type: (0, smithy_client_1.expectString)(output.type),
3469
- };
3245
+ return (0, smithy_client_1.take)(output, {
3246
+ Type: [, smithy_client_1.expectString, `type`],
3247
+ });
3470
3248
  };
3471
3249
  const de_S3 = (output, context) => {
3472
- return {
3473
- Bucket: (0, smithy_client_1.expectString)(output.bucket),
3474
- Enabled: (0, smithy_client_1.expectBoolean)(output.enabled),
3475
- Prefix: (0, smithy_client_1.expectString)(output.prefix),
3476
- };
3250
+ return (0, smithy_client_1.take)(output, {
3251
+ Bucket: [, smithy_client_1.expectString, `bucket`],
3252
+ Enabled: [, smithy_client_1.expectBoolean, `enabled`],
3253
+ Prefix: [, smithy_client_1.expectString, `prefix`],
3254
+ });
3477
3255
  };
3478
3256
  const de_Sasl = (output, context) => {
3479
- return {
3480
- Iam: output.iam != null ? de_Iam(output.iam, context) : undefined,
3481
- Scram: output.scram != null ? de_Scram(output.scram, context) : undefined,
3482
- };
3257
+ return (0, smithy_client_1.take)(output, {
3258
+ Iam: (_) => [, de_Iam(_, context), `iam`],
3259
+ Scram: (_) => [, de_Scram(_, context), `scram`],
3260
+ });
3483
3261
  };
3484
3262
  const de_Scram = (output, context) => {
3485
- return {
3486
- Enabled: (0, smithy_client_1.expectBoolean)(output.enabled),
3487
- };
3263
+ return (0, smithy_client_1.take)(output, {
3264
+ Enabled: [, smithy_client_1.expectBoolean, `enabled`],
3265
+ });
3488
3266
  };
3489
3267
  const de_Serverless = (output, context) => {
3490
- return {
3491
- ClientAuthentication: output.clientAuthentication != null
3492
- ? de_ServerlessClientAuthentication(output.clientAuthentication, context)
3493
- : undefined,
3494
- VpcConfigs: output.vpcConfigs != null ? de___listOfVpcConfig(output.vpcConfigs, context) : undefined,
3495
- };
3268
+ return (0, smithy_client_1.take)(output, {
3269
+ ClientAuthentication: (_) => [, de_ServerlessClientAuthentication(_, context), `clientAuthentication`],
3270
+ VpcConfigs: (_) => [, de___listOfVpcConfig(_, context), `vpcConfigs`],
3271
+ });
3496
3272
  };
3497
3273
  const de_ServerlessClientAuthentication = (output, context) => {
3498
- return {
3499
- Sasl: output.sasl != null ? de_ServerlessSasl(output.sasl, context) : undefined,
3500
- };
3274
+ return (0, smithy_client_1.take)(output, {
3275
+ Sasl: (_) => [, de_ServerlessSasl(_, context), `sasl`],
3276
+ });
3501
3277
  };
3502
3278
  const de_ServerlessSasl = (output, context) => {
3503
- return {
3504
- Iam: output.iam != null ? de_Iam(output.iam, context) : undefined,
3505
- };
3279
+ return (0, smithy_client_1.take)(output, {
3280
+ Iam: (_) => [, de_Iam(_, context), `iam`],
3281
+ });
3506
3282
  };
3507
3283
  const de_StateInfo = (output, context) => {
3508
- return {
3509
- Code: (0, smithy_client_1.expectString)(output.code),
3510
- Message: (0, smithy_client_1.expectString)(output.message),
3511
- };
3284
+ return (0, smithy_client_1.take)(output, {
3285
+ Code: [, smithy_client_1.expectString, `code`],
3286
+ Message: [, smithy_client_1.expectString, `message`],
3287
+ });
3512
3288
  };
3513
3289
  const de_StorageInfo = (output, context) => {
3514
- return {
3515
- EbsStorageInfo: output.ebsStorageInfo != null ? de_EBSStorageInfo(output.ebsStorageInfo, context) : undefined,
3516
- };
3290
+ return (0, smithy_client_1.take)(output, {
3291
+ EbsStorageInfo: (_) => [, de_EBSStorageInfo(_, context), `ebsStorageInfo`],
3292
+ });
3517
3293
  };
3518
3294
  const de_Tls = (output, context) => {
3519
- return {
3520
- CertificateAuthorityArnList: output.certificateAuthorityArnList != null
3521
- ? de___listOf__string(output.certificateAuthorityArnList, context)
3522
- : undefined,
3523
- Enabled: (0, smithy_client_1.expectBoolean)(output.enabled),
3524
- };
3295
+ return (0, smithy_client_1.take)(output, {
3296
+ CertificateAuthorityArnList: [, smithy_client_1._json, `certificateAuthorityArnList`],
3297
+ Enabled: [, smithy_client_1.expectBoolean, `enabled`],
3298
+ });
3525
3299
  };
3526
3300
  const de_Unauthenticated = (output, context) => {
3527
- return {
3528
- Enabled: (0, smithy_client_1.expectBoolean)(output.enabled),
3529
- };
3301
+ return (0, smithy_client_1.take)(output, {
3302
+ Enabled: [, smithy_client_1.expectBoolean, `enabled`],
3303
+ });
3530
3304
  };
3531
3305
  const de_UnprocessedScramSecret = (output, context) => {
3532
- return {
3533
- ErrorCode: (0, smithy_client_1.expectString)(output.errorCode),
3534
- ErrorMessage: (0, smithy_client_1.expectString)(output.errorMessage),
3535
- SecretArn: (0, smithy_client_1.expectString)(output.secretArn),
3536
- };
3306
+ return (0, smithy_client_1.take)(output, {
3307
+ ErrorCode: [, smithy_client_1.expectString, `errorCode`],
3308
+ ErrorMessage: [, smithy_client_1.expectString, `errorMessage`],
3309
+ SecretArn: [, smithy_client_1.expectString, `secretArn`],
3310
+ });
3537
3311
  };
3538
3312
  const de_VpcConfig = (output, context) => {
3539
- return {
3540
- SecurityGroupIds: output.securityGroupIds != null ? de___listOf__string(output.securityGroupIds, context) : undefined,
3541
- SubnetIds: output.subnetIds != null ? de___listOf__string(output.subnetIds, context) : undefined,
3542
- };
3313
+ return (0, smithy_client_1.take)(output, {
3314
+ SecurityGroupIds: [, smithy_client_1._json, `securityGroupIds`],
3315
+ SubnetIds: [, smithy_client_1._json, `subnetIds`],
3316
+ });
3543
3317
  };
3544
3318
  const de_ZookeeperNodeInfo = (output, context) => {
3545
- return {
3546
- AttachedENIId: (0, smithy_client_1.expectString)(output.attachedENIId),
3547
- ClientVpcIpAddress: (0, smithy_client_1.expectString)(output.clientVpcIpAddress),
3548
- Endpoints: output.endpoints != null ? de___listOf__string(output.endpoints, context) : undefined,
3549
- ZookeeperId: (0, smithy_client_1.limitedParseDouble)(output.zookeeperId),
3550
- ZookeeperVersion: (0, smithy_client_1.expectString)(output.zookeeperVersion),
3551
- };
3319
+ return (0, smithy_client_1.take)(output, {
3320
+ AttachedENIId: [, smithy_client_1.expectString, `attachedENIId`],
3321
+ ClientVpcIpAddress: [, smithy_client_1.expectString, `clientVpcIpAddress`],
3322
+ Endpoints: [, smithy_client_1._json, `endpoints`],
3323
+ ZookeeperId: [, smithy_client_1.limitedParseDouble, `zookeeperId`],
3324
+ ZookeeperVersion: [, smithy_client_1.expectString, `zookeeperVersion`],
3325
+ });
3552
3326
  };
3553
3327
  const deserializeMetadata = (output) => ({
3554
3328
  httpStatusCode: output.statusCode,