@aws-sdk/client-mq 3.312.0 → 3.315.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
- import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map as __map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
2
+ import { _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, take, withBaseException, } from "@aws-sdk/smithy-client";
3
3
  import { v4 as generateIdempotencyToken } from "uuid";
4
4
  import { BadRequestException, ConflictException, ForbiddenException, InternalServerErrorException, NotFoundException, UnauthorizedException, } from "../models/models_0";
5
5
  import { MqServiceException as __BaseException } from "../models/MqServiceException";
@@ -10,33 +10,27 @@ export const se_CreateBrokerCommand = async (input, context) => {
10
10
  };
11
11
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/brokers";
12
12
  let body;
13
- body = JSON.stringify({
14
- ...(input.AuthenticationStrategy != null && { authenticationStrategy: input.AuthenticationStrategy }),
15
- ...(input.AutoMinorVersionUpgrade != null && { autoMinorVersionUpgrade: input.AutoMinorVersionUpgrade }),
16
- ...(input.BrokerName != null && { brokerName: input.BrokerName }),
17
- ...(input.Configuration != null && { configuration: se_ConfigurationId(input.Configuration, context) }),
18
- creatorRequestId: input.CreatorRequestId ?? generateIdempotencyToken(),
19
- ...(input.DeploymentMode != null && { deploymentMode: input.DeploymentMode }),
20
- ...(input.EncryptionOptions != null && {
21
- encryptionOptions: se_EncryptionOptions(input.EncryptionOptions, context),
22
- }),
23
- ...(input.EngineType != null && { engineType: input.EngineType }),
24
- ...(input.EngineVersion != null && { engineVersion: input.EngineVersion }),
25
- ...(input.HostInstanceType != null && { hostInstanceType: input.HostInstanceType }),
26
- ...(input.LdapServerMetadata != null && {
27
- ldapServerMetadata: se_LdapServerMetadataInput(input.LdapServerMetadata, context),
28
- }),
29
- ...(input.Logs != null && { logs: se_Logs(input.Logs, context) }),
30
- ...(input.MaintenanceWindowStartTime != null && {
31
- maintenanceWindowStartTime: se_WeeklyStartTime(input.MaintenanceWindowStartTime, context),
32
- }),
33
- ...(input.PubliclyAccessible != null && { publiclyAccessible: input.PubliclyAccessible }),
34
- ...(input.SecurityGroups != null && { securityGroups: se___listOf__string(input.SecurityGroups, context) }),
35
- ...(input.StorageType != null && { storageType: input.StorageType }),
36
- ...(input.SubnetIds != null && { subnetIds: se___listOf__string(input.SubnetIds, context) }),
37
- ...(input.Tags != null && { tags: se___mapOf__string(input.Tags, context) }),
38
- ...(input.Users != null && { users: se___listOfUser(input.Users, context) }),
39
- });
13
+ body = JSON.stringify(take(input, {
14
+ authenticationStrategy: [, , `AuthenticationStrategy`],
15
+ autoMinorVersionUpgrade: [, , `AutoMinorVersionUpgrade`],
16
+ brokerName: [, , `BrokerName`],
17
+ configuration: [, (_) => se_ConfigurationId(_, context), `Configuration`],
18
+ creatorRequestId: [, (_) => _ ?? generateIdempotencyToken(), `CreatorRequestId`],
19
+ deploymentMode: [, , `DeploymentMode`],
20
+ encryptionOptions: [, (_) => se_EncryptionOptions(_, context), `EncryptionOptions`],
21
+ engineType: [, , `EngineType`],
22
+ engineVersion: [, , `EngineVersion`],
23
+ hostInstanceType: [, , `HostInstanceType`],
24
+ ldapServerMetadata: [, (_) => se_LdapServerMetadataInput(_, context), `LdapServerMetadata`],
25
+ logs: [, (_) => se_Logs(_, context), `Logs`],
26
+ maintenanceWindowStartTime: [, (_) => se_WeeklyStartTime(_, context), `MaintenanceWindowStartTime`],
27
+ publiclyAccessible: [, , `PubliclyAccessible`],
28
+ securityGroups: [, (_) => _json(_), `SecurityGroups`],
29
+ storageType: [, , `StorageType`],
30
+ subnetIds: [, (_) => _json(_), `SubnetIds`],
31
+ tags: [, (_) => _json(_), `Tags`],
32
+ users: [, (_) => se___listOfUser(_, context), `Users`],
33
+ }));
40
34
  return new __HttpRequest({
41
35
  protocol,
42
36
  hostname,
@@ -54,13 +48,13 @@ export const se_CreateConfigurationCommand = async (input, context) => {
54
48
  };
55
49
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/configurations";
56
50
  let body;
57
- body = JSON.stringify({
58
- ...(input.AuthenticationStrategy != null && { authenticationStrategy: input.AuthenticationStrategy }),
59
- ...(input.EngineType != null && { engineType: input.EngineType }),
60
- ...(input.EngineVersion != null && { engineVersion: input.EngineVersion }),
61
- ...(input.Name != null && { name: input.Name }),
62
- ...(input.Tags != null && { tags: se___mapOf__string(input.Tags, context) }),
63
- });
51
+ body = JSON.stringify(take(input, {
52
+ authenticationStrategy: [, , `AuthenticationStrategy`],
53
+ engineType: [, , `EngineType`],
54
+ engineVersion: [, , `EngineVersion`],
55
+ name: [, , `Name`],
56
+ tags: [, (_) => _json(_), `Tags`],
57
+ }));
64
58
  return new __HttpRequest({
65
59
  protocol,
66
60
  hostname,
@@ -79,9 +73,9 @@ export const se_CreateTagsCommand = async (input, context) => {
79
73
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/tags/{ResourceArn}";
80
74
  resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
81
75
  let body;
82
- body = JSON.stringify({
83
- ...(input.Tags != null && { tags: se___mapOf__string(input.Tags, context) }),
84
- });
76
+ body = JSON.stringify(take(input, {
77
+ tags: [, (_) => _json(_), `Tags`],
78
+ }));
85
79
  return new __HttpRequest({
86
80
  protocol,
87
81
  hostname,
@@ -101,11 +95,11 @@ export const se_CreateUserCommand = async (input, context) => {
101
95
  resolvedPath = __resolvedPath(resolvedPath, input, "BrokerId", () => input.BrokerId, "{BrokerId}", false);
102
96
  resolvedPath = __resolvedPath(resolvedPath, input, "Username", () => input.Username, "{Username}", false);
103
97
  let body;
104
- body = JSON.stringify({
105
- ...(input.ConsoleAccess != null && { consoleAccess: input.ConsoleAccess }),
106
- ...(input.Groups != null && { groups: se___listOf__string(input.Groups, context) }),
107
- ...(input.Password != null && { password: input.Password }),
108
- });
98
+ body = JSON.stringify(take(input, {
99
+ consoleAccess: [, , `ConsoleAccess`],
100
+ groups: [, (_) => _json(_), `Groups`],
101
+ password: [, , `Password`],
102
+ }));
109
103
  return new __HttpRequest({
110
104
  protocol,
111
105
  hostname,
@@ -406,21 +400,17 @@ export const se_UpdateBrokerCommand = async (input, context) => {
406
400
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/brokers/{BrokerId}";
407
401
  resolvedPath = __resolvedPath(resolvedPath, input, "BrokerId", () => input.BrokerId, "{BrokerId}", false);
408
402
  let body;
409
- body = JSON.stringify({
410
- ...(input.AuthenticationStrategy != null && { authenticationStrategy: input.AuthenticationStrategy }),
411
- ...(input.AutoMinorVersionUpgrade != null && { autoMinorVersionUpgrade: input.AutoMinorVersionUpgrade }),
412
- ...(input.Configuration != null && { configuration: se_ConfigurationId(input.Configuration, context) }),
413
- ...(input.EngineVersion != null && { engineVersion: input.EngineVersion }),
414
- ...(input.HostInstanceType != null && { hostInstanceType: input.HostInstanceType }),
415
- ...(input.LdapServerMetadata != null && {
416
- ldapServerMetadata: se_LdapServerMetadataInput(input.LdapServerMetadata, context),
417
- }),
418
- ...(input.Logs != null && { logs: se_Logs(input.Logs, context) }),
419
- ...(input.MaintenanceWindowStartTime != null && {
420
- maintenanceWindowStartTime: se_WeeklyStartTime(input.MaintenanceWindowStartTime, context),
421
- }),
422
- ...(input.SecurityGroups != null && { securityGroups: se___listOf__string(input.SecurityGroups, context) }),
423
- });
403
+ body = JSON.stringify(take(input, {
404
+ authenticationStrategy: [, , `AuthenticationStrategy`],
405
+ autoMinorVersionUpgrade: [, , `AutoMinorVersionUpgrade`],
406
+ configuration: [, (_) => se_ConfigurationId(_, context), `Configuration`],
407
+ engineVersion: [, , `EngineVersion`],
408
+ hostInstanceType: [, , `HostInstanceType`],
409
+ ldapServerMetadata: [, (_) => se_LdapServerMetadataInput(_, context), `LdapServerMetadata`],
410
+ logs: [, (_) => se_Logs(_, context), `Logs`],
411
+ maintenanceWindowStartTime: [, (_) => se_WeeklyStartTime(_, context), `MaintenanceWindowStartTime`],
412
+ securityGroups: [, (_) => _json(_), `SecurityGroups`],
413
+ }));
424
414
  return new __HttpRequest({
425
415
  protocol,
426
416
  hostname,
@@ -439,10 +429,10 @@ export const se_UpdateConfigurationCommand = async (input, context) => {
439
429
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/configurations/{ConfigurationId}";
440
430
  resolvedPath = __resolvedPath(resolvedPath, input, "ConfigurationId", () => input.ConfigurationId, "{ConfigurationId}", false);
441
431
  let body;
442
- body = JSON.stringify({
443
- ...(input.Data != null && { data: input.Data }),
444
- ...(input.Description != null && { description: input.Description }),
445
- });
432
+ body = JSON.stringify(take(input, {
433
+ data: [, , `Data`],
434
+ description: [, , `Description`],
435
+ }));
446
436
  return new __HttpRequest({
447
437
  protocol,
448
438
  hostname,
@@ -462,11 +452,11 @@ export const se_UpdateUserCommand = async (input, context) => {
462
452
  resolvedPath = __resolvedPath(resolvedPath, input, "BrokerId", () => input.BrokerId, "{BrokerId}", false);
463
453
  resolvedPath = __resolvedPath(resolvedPath, input, "Username", () => input.Username, "{Username}", false);
464
454
  let body;
465
- body = JSON.stringify({
466
- ...(input.ConsoleAccess != null && { consoleAccess: input.ConsoleAccess }),
467
- ...(input.Groups != null && { groups: se___listOf__string(input.Groups, context) }),
468
- ...(input.Password != null && { password: input.Password }),
469
- });
455
+ body = JSON.stringify(take(input, {
456
+ consoleAccess: [, , `ConsoleAccess`],
457
+ groups: [, (_) => _json(_), `Groups`],
458
+ password: [, , `Password`],
459
+ }));
470
460
  return new __HttpRequest({
471
461
  protocol,
472
462
  hostname,
@@ -485,12 +475,11 @@ export const de_CreateBrokerCommand = async (output, context) => {
485
475
  $metadata: deserializeMetadata(output),
486
476
  });
487
477
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
488
- if (data.brokerArn != null) {
489
- contents.BrokerArn = __expectString(data.brokerArn);
490
- }
491
- if (data.brokerId != null) {
492
- contents.BrokerId = __expectString(data.brokerId);
493
- }
478
+ const doc = take(data, {
479
+ BrokerArn: [, __expectString, `brokerArn`],
480
+ BrokerId: [, __expectString, `brokerId`],
481
+ });
482
+ Object.assign(contents, doc);
494
483
  return contents;
495
484
  };
496
485
  const de_CreateBrokerCommandError = async (output, context) => {
@@ -517,10 +506,9 @@ const de_CreateBrokerCommandError = async (output, context) => {
517
506
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
518
507
  default:
519
508
  const parsedBody = parsedOutput.body;
520
- throwDefaultError({
509
+ return throwDefaultError({
521
510
  output,
522
511
  parsedBody,
523
- exceptionCtor: __BaseException,
524
512
  errorCode,
525
513
  });
526
514
  }
@@ -533,24 +521,15 @@ export const de_CreateConfigurationCommand = async (output, context) => {
533
521
  $metadata: deserializeMetadata(output),
534
522
  });
535
523
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
536
- if (data.arn != null) {
537
- contents.Arn = __expectString(data.arn);
538
- }
539
- if (data.authenticationStrategy != null) {
540
- contents.AuthenticationStrategy = __expectString(data.authenticationStrategy);
541
- }
542
- if (data.created != null) {
543
- contents.Created = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.created));
544
- }
545
- if (data.id != null) {
546
- contents.Id = __expectString(data.id);
547
- }
548
- if (data.latestRevision != null) {
549
- contents.LatestRevision = de_ConfigurationRevision(data.latestRevision, context);
550
- }
551
- if (data.name != null) {
552
- contents.Name = __expectString(data.name);
553
- }
524
+ const doc = take(data, {
525
+ Arn: [, __expectString, `arn`],
526
+ AuthenticationStrategy: [, __expectString, `authenticationStrategy`],
527
+ Created: [, (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `created`],
528
+ Id: [, __expectString, `id`],
529
+ LatestRevision: [, (_) => de_ConfigurationRevision(_, context), `latestRevision`],
530
+ Name: [, __expectString, `name`],
531
+ });
532
+ Object.assign(contents, doc);
554
533
  return contents;
555
534
  };
556
535
  const de_CreateConfigurationCommandError = async (output, context) => {
@@ -574,10 +553,9 @@ const de_CreateConfigurationCommandError = async (output, context) => {
574
553
  throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
575
554
  default:
576
555
  const parsedBody = parsedOutput.body;
577
- throwDefaultError({
556
+ return throwDefaultError({
578
557
  output,
579
558
  parsedBody,
580
- exceptionCtor: __BaseException,
581
559
  errorCode,
582
560
  });
583
561
  }
@@ -613,10 +591,9 @@ const de_CreateTagsCommandError = async (output, context) => {
613
591
  throw await de_NotFoundExceptionRes(parsedOutput, context);
614
592
  default:
615
593
  const parsedBody = parsedOutput.body;
616
- throwDefaultError({
594
+ return throwDefaultError({
617
595
  output,
618
596
  parsedBody,
619
- exceptionCtor: __BaseException,
620
597
  errorCode,
621
598
  });
622
599
  }
@@ -655,10 +632,9 @@ const de_CreateUserCommandError = async (output, context) => {
655
632
  throw await de_NotFoundExceptionRes(parsedOutput, context);
656
633
  default:
657
634
  const parsedBody = parsedOutput.body;
658
- throwDefaultError({
635
+ return throwDefaultError({
659
636
  output,
660
637
  parsedBody,
661
- exceptionCtor: __BaseException,
662
638
  errorCode,
663
639
  });
664
640
  }
@@ -671,9 +647,10 @@ export const de_DeleteBrokerCommand = async (output, context) => {
671
647
  $metadata: deserializeMetadata(output),
672
648
  });
673
649
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
674
- if (data.brokerId != null) {
675
- contents.BrokerId = __expectString(data.brokerId);
676
- }
650
+ const doc = take(data, {
651
+ BrokerId: [, __expectString, `brokerId`],
652
+ });
653
+ Object.assign(contents, doc);
677
654
  return contents;
678
655
  };
679
656
  const de_DeleteBrokerCommandError = async (output, context) => {
@@ -697,10 +674,9 @@ const de_DeleteBrokerCommandError = async (output, context) => {
697
674
  throw await de_NotFoundExceptionRes(parsedOutput, context);
698
675
  default:
699
676
  const parsedBody = parsedOutput.body;
700
- throwDefaultError({
677
+ return throwDefaultError({
701
678
  output,
702
679
  parsedBody,
703
- exceptionCtor: __BaseException,
704
680
  errorCode,
705
681
  });
706
682
  }
@@ -736,10 +712,9 @@ const de_DeleteTagsCommandError = async (output, context) => {
736
712
  throw await de_NotFoundExceptionRes(parsedOutput, context);
737
713
  default:
738
714
  const parsedBody = parsedOutput.body;
739
- throwDefaultError({
715
+ return throwDefaultError({
740
716
  output,
741
717
  parsedBody,
742
- exceptionCtor: __BaseException,
743
718
  errorCode,
744
719
  });
745
720
  }
@@ -775,10 +750,9 @@ const de_DeleteUserCommandError = async (output, context) => {
775
750
  throw await de_NotFoundExceptionRes(parsedOutput, context);
776
751
  default:
777
752
  const parsedBody = parsedOutput.body;
778
- throwDefaultError({
753
+ return throwDefaultError({
779
754
  output,
780
755
  parsedBody,
781
- exceptionCtor: __BaseException,
782
756
  errorCode,
783
757
  });
784
758
  }
@@ -791,93 +765,38 @@ export const de_DescribeBrokerCommand = async (output, context) => {
791
765
  $metadata: deserializeMetadata(output),
792
766
  });
793
767
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
794
- if (data.actionsRequired != null) {
795
- contents.ActionsRequired = de___listOfActionRequired(data.actionsRequired, context);
796
- }
797
- if (data.authenticationStrategy != null) {
798
- contents.AuthenticationStrategy = __expectString(data.authenticationStrategy);
799
- }
800
- if (data.autoMinorVersionUpgrade != null) {
801
- contents.AutoMinorVersionUpgrade = __expectBoolean(data.autoMinorVersionUpgrade);
802
- }
803
- if (data.brokerArn != null) {
804
- contents.BrokerArn = __expectString(data.brokerArn);
805
- }
806
- if (data.brokerId != null) {
807
- contents.BrokerId = __expectString(data.brokerId);
808
- }
809
- if (data.brokerInstances != null) {
810
- contents.BrokerInstances = de___listOfBrokerInstance(data.brokerInstances, context);
811
- }
812
- if (data.brokerName != null) {
813
- contents.BrokerName = __expectString(data.brokerName);
814
- }
815
- if (data.brokerState != null) {
816
- contents.BrokerState = __expectString(data.brokerState);
817
- }
818
- if (data.configurations != null) {
819
- contents.Configurations = de_Configurations(data.configurations, context);
820
- }
821
- if (data.created != null) {
822
- contents.Created = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.created));
823
- }
824
- if (data.deploymentMode != null) {
825
- contents.DeploymentMode = __expectString(data.deploymentMode);
826
- }
827
- if (data.encryptionOptions != null) {
828
- contents.EncryptionOptions = de_EncryptionOptions(data.encryptionOptions, context);
829
- }
830
- if (data.engineType != null) {
831
- contents.EngineType = __expectString(data.engineType);
832
- }
833
- if (data.engineVersion != null) {
834
- contents.EngineVersion = __expectString(data.engineVersion);
835
- }
836
- if (data.hostInstanceType != null) {
837
- contents.HostInstanceType = __expectString(data.hostInstanceType);
838
- }
839
- if (data.ldapServerMetadata != null) {
840
- contents.LdapServerMetadata = de_LdapServerMetadataOutput(data.ldapServerMetadata, context);
841
- }
842
- if (data.logs != null) {
843
- contents.Logs = de_LogsSummary(data.logs, context);
844
- }
845
- if (data.maintenanceWindowStartTime != null) {
846
- contents.MaintenanceWindowStartTime = de_WeeklyStartTime(data.maintenanceWindowStartTime, context);
847
- }
848
- if (data.pendingAuthenticationStrategy != null) {
849
- contents.PendingAuthenticationStrategy = __expectString(data.pendingAuthenticationStrategy);
850
- }
851
- if (data.pendingEngineVersion != null) {
852
- contents.PendingEngineVersion = __expectString(data.pendingEngineVersion);
853
- }
854
- if (data.pendingHostInstanceType != null) {
855
- contents.PendingHostInstanceType = __expectString(data.pendingHostInstanceType);
856
- }
857
- if (data.pendingLdapServerMetadata != null) {
858
- contents.PendingLdapServerMetadata = de_LdapServerMetadataOutput(data.pendingLdapServerMetadata, context);
859
- }
860
- if (data.pendingSecurityGroups != null) {
861
- contents.PendingSecurityGroups = de___listOf__string(data.pendingSecurityGroups, context);
862
- }
863
- if (data.publiclyAccessible != null) {
864
- contents.PubliclyAccessible = __expectBoolean(data.publiclyAccessible);
865
- }
866
- if (data.securityGroups != null) {
867
- contents.SecurityGroups = de___listOf__string(data.securityGroups, context);
868
- }
869
- if (data.storageType != null) {
870
- contents.StorageType = __expectString(data.storageType);
871
- }
872
- if (data.subnetIds != null) {
873
- contents.SubnetIds = de___listOf__string(data.subnetIds, context);
874
- }
875
- if (data.tags != null) {
876
- contents.Tags = de___mapOf__string(data.tags, context);
877
- }
878
- if (data.users != null) {
879
- contents.Users = de___listOfUserSummary(data.users, context);
880
- }
768
+ const doc = take(data, {
769
+ ActionsRequired: [, (_) => de___listOfActionRequired(_, context), `actionsRequired`],
770
+ AuthenticationStrategy: [, __expectString, `authenticationStrategy`],
771
+ AutoMinorVersionUpgrade: [, __expectBoolean, `autoMinorVersionUpgrade`],
772
+ BrokerArn: [, __expectString, `brokerArn`],
773
+ BrokerId: [, __expectString, `brokerId`],
774
+ BrokerInstances: [, (_) => de___listOfBrokerInstance(_, context), `brokerInstances`],
775
+ BrokerName: [, __expectString, `brokerName`],
776
+ BrokerState: [, __expectString, `brokerState`],
777
+ Configurations: [, (_) => de_Configurations(_, context), `configurations`],
778
+ Created: [, (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `created`],
779
+ DeploymentMode: [, __expectString, `deploymentMode`],
780
+ EncryptionOptions: [, (_) => de_EncryptionOptions(_, context), `encryptionOptions`],
781
+ EngineType: [, __expectString, `engineType`],
782
+ EngineVersion: [, __expectString, `engineVersion`],
783
+ HostInstanceType: [, __expectString, `hostInstanceType`],
784
+ LdapServerMetadata: [, (_) => de_LdapServerMetadataOutput(_, context), `ldapServerMetadata`],
785
+ Logs: [, (_) => de_LogsSummary(_, context), `logs`],
786
+ MaintenanceWindowStartTime: [, (_) => de_WeeklyStartTime(_, context), `maintenanceWindowStartTime`],
787
+ PendingAuthenticationStrategy: [, __expectString, `pendingAuthenticationStrategy`],
788
+ PendingEngineVersion: [, __expectString, `pendingEngineVersion`],
789
+ PendingHostInstanceType: [, __expectString, `pendingHostInstanceType`],
790
+ PendingLdapServerMetadata: [, (_) => de_LdapServerMetadataOutput(_, context), `pendingLdapServerMetadata`],
791
+ PendingSecurityGroups: [, _json, `pendingSecurityGroups`],
792
+ PubliclyAccessible: [, __expectBoolean, `publiclyAccessible`],
793
+ SecurityGroups: [, _json, `securityGroups`],
794
+ StorageType: [, __expectString, `storageType`],
795
+ SubnetIds: [, _json, `subnetIds`],
796
+ Tags: [, _json, `tags`],
797
+ Users: [, (_) => de___listOfUserSummary(_, context), `users`],
798
+ });
799
+ Object.assign(contents, doc);
881
800
  return contents;
882
801
  };
883
802
  const de_DescribeBrokerCommandError = async (output, context) => {
@@ -901,10 +820,9 @@ const de_DescribeBrokerCommandError = async (output, context) => {
901
820
  throw await de_NotFoundExceptionRes(parsedOutput, context);
902
821
  default:
903
822
  const parsedBody = parsedOutput.body;
904
- throwDefaultError({
823
+ return throwDefaultError({
905
824
  output,
906
825
  parsedBody,
907
- exceptionCtor: __BaseException,
908
826
  errorCode,
909
827
  });
910
828
  }
@@ -917,15 +835,12 @@ export const de_DescribeBrokerEngineTypesCommand = async (output, context) => {
917
835
  $metadata: deserializeMetadata(output),
918
836
  });
919
837
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
920
- if (data.brokerEngineTypes != null) {
921
- contents.BrokerEngineTypes = de___listOfBrokerEngineType(data.brokerEngineTypes, context);
922
- }
923
- if (data.maxResults != null) {
924
- contents.MaxResults = __expectInt32(data.maxResults);
925
- }
926
- if (data.nextToken != null) {
927
- contents.NextToken = __expectString(data.nextToken);
928
- }
838
+ const doc = take(data, {
839
+ BrokerEngineTypes: [, (_) => de___listOfBrokerEngineType(_, context), `brokerEngineTypes`],
840
+ MaxResults: [, __expectInt32, `maxResults`],
841
+ NextToken: [, __expectString, `nextToken`],
842
+ });
843
+ Object.assign(contents, doc);
929
844
  return contents;
930
845
  };
931
846
  const de_DescribeBrokerEngineTypesCommandError = async (output, context) => {
@@ -946,10 +861,9 @@ const de_DescribeBrokerEngineTypesCommandError = async (output, context) => {
946
861
  throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
947
862
  default:
948
863
  const parsedBody = parsedOutput.body;
949
- throwDefaultError({
864
+ return throwDefaultError({
950
865
  output,
951
866
  parsedBody,
952
- exceptionCtor: __BaseException,
953
867
  errorCode,
954
868
  });
955
869
  }
@@ -962,15 +876,12 @@ export const de_DescribeBrokerInstanceOptionsCommand = async (output, context) =
962
876
  $metadata: deserializeMetadata(output),
963
877
  });
964
878
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
965
- if (data.brokerInstanceOptions != null) {
966
- contents.BrokerInstanceOptions = de___listOfBrokerInstanceOption(data.brokerInstanceOptions, context);
967
- }
968
- if (data.maxResults != null) {
969
- contents.MaxResults = __expectInt32(data.maxResults);
970
- }
971
- if (data.nextToken != null) {
972
- contents.NextToken = __expectString(data.nextToken);
973
- }
879
+ const doc = take(data, {
880
+ BrokerInstanceOptions: [, (_) => de___listOfBrokerInstanceOption(_, context), `brokerInstanceOptions`],
881
+ MaxResults: [, __expectInt32, `maxResults`],
882
+ NextToken: [, __expectString, `nextToken`],
883
+ });
884
+ Object.assign(contents, doc);
974
885
  return contents;
975
886
  };
976
887
  const de_DescribeBrokerInstanceOptionsCommandError = async (output, context) => {
@@ -991,10 +902,9 @@ const de_DescribeBrokerInstanceOptionsCommandError = async (output, context) =>
991
902
  throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
992
903
  default:
993
904
  const parsedBody = parsedOutput.body;
994
- throwDefaultError({
905
+ return throwDefaultError({
995
906
  output,
996
907
  parsedBody,
997
- exceptionCtor: __BaseException,
998
908
  errorCode,
999
909
  });
1000
910
  }
@@ -1007,36 +917,19 @@ export const de_DescribeConfigurationCommand = async (output, context) => {
1007
917
  $metadata: deserializeMetadata(output),
1008
918
  });
1009
919
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1010
- if (data.arn != null) {
1011
- contents.Arn = __expectString(data.arn);
1012
- }
1013
- if (data.authenticationStrategy != null) {
1014
- contents.AuthenticationStrategy = __expectString(data.authenticationStrategy);
1015
- }
1016
- if (data.created != null) {
1017
- contents.Created = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.created));
1018
- }
1019
- if (data.description != null) {
1020
- contents.Description = __expectString(data.description);
1021
- }
1022
- if (data.engineType != null) {
1023
- contents.EngineType = __expectString(data.engineType);
1024
- }
1025
- if (data.engineVersion != null) {
1026
- contents.EngineVersion = __expectString(data.engineVersion);
1027
- }
1028
- if (data.id != null) {
1029
- contents.Id = __expectString(data.id);
1030
- }
1031
- if (data.latestRevision != null) {
1032
- contents.LatestRevision = de_ConfigurationRevision(data.latestRevision, context);
1033
- }
1034
- if (data.name != null) {
1035
- contents.Name = __expectString(data.name);
1036
- }
1037
- if (data.tags != null) {
1038
- contents.Tags = de___mapOf__string(data.tags, context);
1039
- }
920
+ const doc = take(data, {
921
+ Arn: [, __expectString, `arn`],
922
+ AuthenticationStrategy: [, __expectString, `authenticationStrategy`],
923
+ Created: [, (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `created`],
924
+ Description: [, __expectString, `description`],
925
+ EngineType: [, __expectString, `engineType`],
926
+ EngineVersion: [, __expectString, `engineVersion`],
927
+ Id: [, __expectString, `id`],
928
+ LatestRevision: [, (_) => de_ConfigurationRevision(_, context), `latestRevision`],
929
+ Name: [, __expectString, `name`],
930
+ Tags: [, _json, `tags`],
931
+ });
932
+ Object.assign(contents, doc);
1040
933
  return contents;
1041
934
  };
1042
935
  const de_DescribeConfigurationCommandError = async (output, context) => {
@@ -1060,10 +953,9 @@ const de_DescribeConfigurationCommandError = async (output, context) => {
1060
953
  throw await de_NotFoundExceptionRes(parsedOutput, context);
1061
954
  default:
1062
955
  const parsedBody = parsedOutput.body;
1063
- throwDefaultError({
956
+ return throwDefaultError({
1064
957
  output,
1065
958
  parsedBody,
1066
- exceptionCtor: __BaseException,
1067
959
  errorCode,
1068
960
  });
1069
961
  }
@@ -1076,18 +968,13 @@ export const de_DescribeConfigurationRevisionCommand = async (output, context) =
1076
968
  $metadata: deserializeMetadata(output),
1077
969
  });
1078
970
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1079
- if (data.configurationId != null) {
1080
- contents.ConfigurationId = __expectString(data.configurationId);
1081
- }
1082
- if (data.created != null) {
1083
- contents.Created = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.created));
1084
- }
1085
- if (data.data != null) {
1086
- contents.Data = __expectString(data.data);
1087
- }
1088
- if (data.description != null) {
1089
- contents.Description = __expectString(data.description);
1090
- }
971
+ const doc = take(data, {
972
+ ConfigurationId: [, __expectString, `configurationId`],
973
+ Created: [, (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `created`],
974
+ Data: [, __expectString, `data`],
975
+ Description: [, __expectString, `description`],
976
+ });
977
+ Object.assign(contents, doc);
1091
978
  return contents;
1092
979
  };
1093
980
  const de_DescribeConfigurationRevisionCommandError = async (output, context) => {
@@ -1111,10 +998,9 @@ const de_DescribeConfigurationRevisionCommandError = async (output, context) =>
1111
998
  throw await de_NotFoundExceptionRes(parsedOutput, context);
1112
999
  default:
1113
1000
  const parsedBody = parsedOutput.body;
1114
- throwDefaultError({
1001
+ return throwDefaultError({
1115
1002
  output,
1116
1003
  parsedBody,
1117
- exceptionCtor: __BaseException,
1118
1004
  errorCode,
1119
1005
  });
1120
1006
  }
@@ -1127,21 +1013,14 @@ export const de_DescribeUserCommand = async (output, context) => {
1127
1013
  $metadata: deserializeMetadata(output),
1128
1014
  });
1129
1015
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1130
- if (data.brokerId != null) {
1131
- contents.BrokerId = __expectString(data.brokerId);
1132
- }
1133
- if (data.consoleAccess != null) {
1134
- contents.ConsoleAccess = __expectBoolean(data.consoleAccess);
1135
- }
1136
- if (data.groups != null) {
1137
- contents.Groups = de___listOf__string(data.groups, context);
1138
- }
1139
- if (data.pending != null) {
1140
- contents.Pending = de_UserPendingChanges(data.pending, context);
1141
- }
1142
- if (data.username != null) {
1143
- contents.Username = __expectString(data.username);
1144
- }
1016
+ const doc = take(data, {
1017
+ BrokerId: [, __expectString, `brokerId`],
1018
+ ConsoleAccess: [, __expectBoolean, `consoleAccess`],
1019
+ Groups: [, _json, `groups`],
1020
+ Pending: [, (_) => de_UserPendingChanges(_, context), `pending`],
1021
+ Username: [, __expectString, `username`],
1022
+ });
1023
+ Object.assign(contents, doc);
1145
1024
  return contents;
1146
1025
  };
1147
1026
  const de_DescribeUserCommandError = async (output, context) => {
@@ -1165,10 +1044,9 @@ const de_DescribeUserCommandError = async (output, context) => {
1165
1044
  throw await de_NotFoundExceptionRes(parsedOutput, context);
1166
1045
  default:
1167
1046
  const parsedBody = parsedOutput.body;
1168
- throwDefaultError({
1047
+ return throwDefaultError({
1169
1048
  output,
1170
1049
  parsedBody,
1171
- exceptionCtor: __BaseException,
1172
1050
  errorCode,
1173
1051
  });
1174
1052
  }
@@ -1181,12 +1059,11 @@ export const de_ListBrokersCommand = async (output, context) => {
1181
1059
  $metadata: deserializeMetadata(output),
1182
1060
  });
1183
1061
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1184
- if (data.brokerSummaries != null) {
1185
- contents.BrokerSummaries = de___listOfBrokerSummary(data.brokerSummaries, context);
1186
- }
1187
- if (data.nextToken != null) {
1188
- contents.NextToken = __expectString(data.nextToken);
1189
- }
1062
+ const doc = take(data, {
1063
+ BrokerSummaries: [, (_) => de___listOfBrokerSummary(_, context), `brokerSummaries`],
1064
+ NextToken: [, __expectString, `nextToken`],
1065
+ });
1066
+ Object.assign(contents, doc);
1190
1067
  return contents;
1191
1068
  };
1192
1069
  const de_ListBrokersCommandError = async (output, context) => {
@@ -1207,10 +1084,9 @@ const de_ListBrokersCommandError = async (output, context) => {
1207
1084
  throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1208
1085
  default:
1209
1086
  const parsedBody = parsedOutput.body;
1210
- throwDefaultError({
1087
+ return throwDefaultError({
1211
1088
  output,
1212
1089
  parsedBody,
1213
- exceptionCtor: __BaseException,
1214
1090
  errorCode,
1215
1091
  });
1216
1092
  }
@@ -1223,18 +1099,13 @@ export const de_ListConfigurationRevisionsCommand = async (output, context) => {
1223
1099
  $metadata: deserializeMetadata(output),
1224
1100
  });
1225
1101
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1226
- if (data.configurationId != null) {
1227
- contents.ConfigurationId = __expectString(data.configurationId);
1228
- }
1229
- if (data.maxResults != null) {
1230
- contents.MaxResults = __expectInt32(data.maxResults);
1231
- }
1232
- if (data.nextToken != null) {
1233
- contents.NextToken = __expectString(data.nextToken);
1234
- }
1235
- if (data.revisions != null) {
1236
- contents.Revisions = de___listOfConfigurationRevision(data.revisions, context);
1237
- }
1102
+ const doc = take(data, {
1103
+ ConfigurationId: [, __expectString, `configurationId`],
1104
+ MaxResults: [, __expectInt32, `maxResults`],
1105
+ NextToken: [, __expectString, `nextToken`],
1106
+ Revisions: [, (_) => de___listOfConfigurationRevision(_, context), `revisions`],
1107
+ });
1108
+ Object.assign(contents, doc);
1238
1109
  return contents;
1239
1110
  };
1240
1111
  const de_ListConfigurationRevisionsCommandError = async (output, context) => {
@@ -1258,10 +1129,9 @@ const de_ListConfigurationRevisionsCommandError = async (output, context) => {
1258
1129
  throw await de_NotFoundExceptionRes(parsedOutput, context);
1259
1130
  default:
1260
1131
  const parsedBody = parsedOutput.body;
1261
- throwDefaultError({
1132
+ return throwDefaultError({
1262
1133
  output,
1263
1134
  parsedBody,
1264
- exceptionCtor: __BaseException,
1265
1135
  errorCode,
1266
1136
  });
1267
1137
  }
@@ -1274,15 +1144,12 @@ export const de_ListConfigurationsCommand = async (output, context) => {
1274
1144
  $metadata: deserializeMetadata(output),
1275
1145
  });
1276
1146
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1277
- if (data.configurations != null) {
1278
- contents.Configurations = de___listOfConfiguration(data.configurations, context);
1279
- }
1280
- if (data.maxResults != null) {
1281
- contents.MaxResults = __expectInt32(data.maxResults);
1282
- }
1283
- if (data.nextToken != null) {
1284
- contents.NextToken = __expectString(data.nextToken);
1285
- }
1147
+ const doc = take(data, {
1148
+ Configurations: [, (_) => de___listOfConfiguration(_, context), `configurations`],
1149
+ MaxResults: [, __expectInt32, `maxResults`],
1150
+ NextToken: [, __expectString, `nextToken`],
1151
+ });
1152
+ Object.assign(contents, doc);
1286
1153
  return contents;
1287
1154
  };
1288
1155
  const de_ListConfigurationsCommandError = async (output, context) => {
@@ -1303,10 +1170,9 @@ const de_ListConfigurationsCommandError = async (output, context) => {
1303
1170
  throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1304
1171
  default:
1305
1172
  const parsedBody = parsedOutput.body;
1306
- throwDefaultError({
1173
+ return throwDefaultError({
1307
1174
  output,
1308
1175
  parsedBody,
1309
- exceptionCtor: __BaseException,
1310
1176
  errorCode,
1311
1177
  });
1312
1178
  }
@@ -1319,9 +1185,10 @@ export const de_ListTagsCommand = async (output, context) => {
1319
1185
  $metadata: deserializeMetadata(output),
1320
1186
  });
1321
1187
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1322
- if (data.tags != null) {
1323
- contents.Tags = de___mapOf__string(data.tags, context);
1324
- }
1188
+ const doc = take(data, {
1189
+ Tags: [, _json, `tags`],
1190
+ });
1191
+ Object.assign(contents, doc);
1325
1192
  return contents;
1326
1193
  };
1327
1194
  const de_ListTagsCommandError = async (output, context) => {
@@ -1345,10 +1212,9 @@ const de_ListTagsCommandError = async (output, context) => {
1345
1212
  throw await de_NotFoundExceptionRes(parsedOutput, context);
1346
1213
  default:
1347
1214
  const parsedBody = parsedOutput.body;
1348
- throwDefaultError({
1215
+ return throwDefaultError({
1349
1216
  output,
1350
1217
  parsedBody,
1351
- exceptionCtor: __BaseException,
1352
1218
  errorCode,
1353
1219
  });
1354
1220
  }
@@ -1361,18 +1227,13 @@ export const de_ListUsersCommand = async (output, context) => {
1361
1227
  $metadata: deserializeMetadata(output),
1362
1228
  });
1363
1229
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1364
- if (data.brokerId != null) {
1365
- contents.BrokerId = __expectString(data.brokerId);
1366
- }
1367
- if (data.maxResults != null) {
1368
- contents.MaxResults = __expectInt32(data.maxResults);
1369
- }
1370
- if (data.nextToken != null) {
1371
- contents.NextToken = __expectString(data.nextToken);
1372
- }
1373
- if (data.users != null) {
1374
- contents.Users = de___listOfUserSummary(data.users, context);
1375
- }
1230
+ const doc = take(data, {
1231
+ BrokerId: [, __expectString, `brokerId`],
1232
+ MaxResults: [, __expectInt32, `maxResults`],
1233
+ NextToken: [, __expectString, `nextToken`],
1234
+ Users: [, (_) => de___listOfUserSummary(_, context), `users`],
1235
+ });
1236
+ Object.assign(contents, doc);
1376
1237
  return contents;
1377
1238
  };
1378
1239
  const de_ListUsersCommandError = async (output, context) => {
@@ -1396,10 +1257,9 @@ const de_ListUsersCommandError = async (output, context) => {
1396
1257
  throw await de_NotFoundExceptionRes(parsedOutput, context);
1397
1258
  default:
1398
1259
  const parsedBody = parsedOutput.body;
1399
- throwDefaultError({
1260
+ return throwDefaultError({
1400
1261
  output,
1401
1262
  parsedBody,
1402
- exceptionCtor: __BaseException,
1403
1263
  errorCode,
1404
1264
  });
1405
1265
  }
@@ -1435,10 +1295,9 @@ const de_RebootBrokerCommandError = async (output, context) => {
1435
1295
  throw await de_NotFoundExceptionRes(parsedOutput, context);
1436
1296
  default:
1437
1297
  const parsedBody = parsedOutput.body;
1438
- throwDefaultError({
1298
+ return throwDefaultError({
1439
1299
  output,
1440
1300
  parsedBody,
1441
- exceptionCtor: __BaseException,
1442
1301
  errorCode,
1443
1302
  });
1444
1303
  }
@@ -1451,36 +1310,19 @@ export const de_UpdateBrokerCommand = async (output, context) => {
1451
1310
  $metadata: deserializeMetadata(output),
1452
1311
  });
1453
1312
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1454
- if (data.authenticationStrategy != null) {
1455
- contents.AuthenticationStrategy = __expectString(data.authenticationStrategy);
1456
- }
1457
- if (data.autoMinorVersionUpgrade != null) {
1458
- contents.AutoMinorVersionUpgrade = __expectBoolean(data.autoMinorVersionUpgrade);
1459
- }
1460
- if (data.brokerId != null) {
1461
- contents.BrokerId = __expectString(data.brokerId);
1462
- }
1463
- if (data.configuration != null) {
1464
- contents.Configuration = de_ConfigurationId(data.configuration, context);
1465
- }
1466
- if (data.engineVersion != null) {
1467
- contents.EngineVersion = __expectString(data.engineVersion);
1468
- }
1469
- if (data.hostInstanceType != null) {
1470
- contents.HostInstanceType = __expectString(data.hostInstanceType);
1471
- }
1472
- if (data.ldapServerMetadata != null) {
1473
- contents.LdapServerMetadata = de_LdapServerMetadataOutput(data.ldapServerMetadata, context);
1474
- }
1475
- if (data.logs != null) {
1476
- contents.Logs = de_Logs(data.logs, context);
1477
- }
1478
- if (data.maintenanceWindowStartTime != null) {
1479
- contents.MaintenanceWindowStartTime = de_WeeklyStartTime(data.maintenanceWindowStartTime, context);
1480
- }
1481
- if (data.securityGroups != null) {
1482
- contents.SecurityGroups = de___listOf__string(data.securityGroups, context);
1483
- }
1313
+ const doc = take(data, {
1314
+ AuthenticationStrategy: [, __expectString, `authenticationStrategy`],
1315
+ AutoMinorVersionUpgrade: [, __expectBoolean, `autoMinorVersionUpgrade`],
1316
+ BrokerId: [, __expectString, `brokerId`],
1317
+ Configuration: [, (_) => de_ConfigurationId(_, context), `configuration`],
1318
+ EngineVersion: [, __expectString, `engineVersion`],
1319
+ HostInstanceType: [, __expectString, `hostInstanceType`],
1320
+ LdapServerMetadata: [, (_) => de_LdapServerMetadataOutput(_, context), `ldapServerMetadata`],
1321
+ Logs: [, (_) => de_Logs(_, context), `logs`],
1322
+ MaintenanceWindowStartTime: [, (_) => de_WeeklyStartTime(_, context), `maintenanceWindowStartTime`],
1323
+ SecurityGroups: [, _json, `securityGroups`],
1324
+ });
1325
+ Object.assign(contents, doc);
1484
1326
  return contents;
1485
1327
  };
1486
1328
  const de_UpdateBrokerCommandError = async (output, context) => {
@@ -1507,10 +1349,9 @@ const de_UpdateBrokerCommandError = async (output, context) => {
1507
1349
  throw await de_NotFoundExceptionRes(parsedOutput, context);
1508
1350
  default:
1509
1351
  const parsedBody = parsedOutput.body;
1510
- throwDefaultError({
1352
+ return throwDefaultError({
1511
1353
  output,
1512
1354
  parsedBody,
1513
- exceptionCtor: __BaseException,
1514
1355
  errorCode,
1515
1356
  });
1516
1357
  }
@@ -1523,24 +1364,15 @@ export const de_UpdateConfigurationCommand = async (output, context) => {
1523
1364
  $metadata: deserializeMetadata(output),
1524
1365
  });
1525
1366
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1526
- if (data.arn != null) {
1527
- contents.Arn = __expectString(data.arn);
1528
- }
1529
- if (data.created != null) {
1530
- contents.Created = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.created));
1531
- }
1532
- if (data.id != null) {
1533
- contents.Id = __expectString(data.id);
1534
- }
1535
- if (data.latestRevision != null) {
1536
- contents.LatestRevision = de_ConfigurationRevision(data.latestRevision, context);
1537
- }
1538
- if (data.name != null) {
1539
- contents.Name = __expectString(data.name);
1540
- }
1541
- if (data.warnings != null) {
1542
- contents.Warnings = de___listOfSanitizationWarning(data.warnings, context);
1543
- }
1367
+ const doc = take(data, {
1368
+ Arn: [, __expectString, `arn`],
1369
+ Created: [, (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `created`],
1370
+ Id: [, __expectString, `id`],
1371
+ LatestRevision: [, (_) => de_ConfigurationRevision(_, context), `latestRevision`],
1372
+ Name: [, __expectString, `name`],
1373
+ Warnings: [, (_) => de___listOfSanitizationWarning(_, context), `warnings`],
1374
+ });
1375
+ Object.assign(contents, doc);
1544
1376
  return contents;
1545
1377
  };
1546
1378
  const de_UpdateConfigurationCommandError = async (output, context) => {
@@ -1567,10 +1399,9 @@ const de_UpdateConfigurationCommandError = async (output, context) => {
1567
1399
  throw await de_NotFoundExceptionRes(parsedOutput, context);
1568
1400
  default:
1569
1401
  const parsedBody = parsedOutput.body;
1570
- throwDefaultError({
1402
+ return throwDefaultError({
1571
1403
  output,
1572
1404
  parsedBody,
1573
- exceptionCtor: __BaseException,
1574
1405
  errorCode,
1575
1406
  });
1576
1407
  }
@@ -1609,24 +1440,22 @@ const de_UpdateUserCommandError = async (output, context) => {
1609
1440
  throw await de_NotFoundExceptionRes(parsedOutput, context);
1610
1441
  default:
1611
1442
  const parsedBody = parsedOutput.body;
1612
- throwDefaultError({
1443
+ return throwDefaultError({
1613
1444
  output,
1614
1445
  parsedBody,
1615
- exceptionCtor: __BaseException,
1616
1446
  errorCode,
1617
1447
  });
1618
1448
  }
1619
1449
  };
1620
- const map = __map;
1450
+ const throwDefaultError = withBaseException(__BaseException);
1621
1451
  const de_BadRequestExceptionRes = async (parsedOutput, context) => {
1622
1452
  const contents = map({});
1623
1453
  const data = parsedOutput.body;
1624
- if (data.errorAttribute != null) {
1625
- contents.ErrorAttribute = __expectString(data.errorAttribute);
1626
- }
1627
- if (data.message != null) {
1628
- contents.Message = __expectString(data.message);
1629
- }
1454
+ const doc = take(data, {
1455
+ ErrorAttribute: [, __expectString, `errorAttribute`],
1456
+ Message: [, __expectString, `message`],
1457
+ });
1458
+ Object.assign(contents, doc);
1630
1459
  const exception = new BadRequestException({
1631
1460
  $metadata: deserializeMetadata(parsedOutput),
1632
1461
  ...contents,
@@ -1636,12 +1465,11 @@ const de_BadRequestExceptionRes = async (parsedOutput, context) => {
1636
1465
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
1637
1466
  const contents = map({});
1638
1467
  const data = parsedOutput.body;
1639
- if (data.errorAttribute != null) {
1640
- contents.ErrorAttribute = __expectString(data.errorAttribute);
1641
- }
1642
- if (data.message != null) {
1643
- contents.Message = __expectString(data.message);
1644
- }
1468
+ const doc = take(data, {
1469
+ ErrorAttribute: [, __expectString, `errorAttribute`],
1470
+ Message: [, __expectString, `message`],
1471
+ });
1472
+ Object.assign(contents, doc);
1645
1473
  const exception = new ConflictException({
1646
1474
  $metadata: deserializeMetadata(parsedOutput),
1647
1475
  ...contents,
@@ -1651,12 +1479,11 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
1651
1479
  const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
1652
1480
  const contents = map({});
1653
1481
  const data = parsedOutput.body;
1654
- if (data.errorAttribute != null) {
1655
- contents.ErrorAttribute = __expectString(data.errorAttribute);
1656
- }
1657
- if (data.message != null) {
1658
- contents.Message = __expectString(data.message);
1659
- }
1482
+ const doc = take(data, {
1483
+ ErrorAttribute: [, __expectString, `errorAttribute`],
1484
+ Message: [, __expectString, `message`],
1485
+ });
1486
+ Object.assign(contents, doc);
1660
1487
  const exception = new ForbiddenException({
1661
1488
  $metadata: deserializeMetadata(parsedOutput),
1662
1489
  ...contents,
@@ -1666,12 +1493,11 @@ const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
1666
1493
  const de_InternalServerErrorExceptionRes = async (parsedOutput, context) => {
1667
1494
  const contents = map({});
1668
1495
  const data = parsedOutput.body;
1669
- if (data.errorAttribute != null) {
1670
- contents.ErrorAttribute = __expectString(data.errorAttribute);
1671
- }
1672
- if (data.message != null) {
1673
- contents.Message = __expectString(data.message);
1674
- }
1496
+ const doc = take(data, {
1497
+ ErrorAttribute: [, __expectString, `errorAttribute`],
1498
+ Message: [, __expectString, `message`],
1499
+ });
1500
+ Object.assign(contents, doc);
1675
1501
  const exception = new InternalServerErrorException({
1676
1502
  $metadata: deserializeMetadata(parsedOutput),
1677
1503
  ...contents,
@@ -1681,12 +1507,11 @@ const de_InternalServerErrorExceptionRes = async (parsedOutput, context) => {
1681
1507
  const de_NotFoundExceptionRes = async (parsedOutput, context) => {
1682
1508
  const contents = map({});
1683
1509
  const data = parsedOutput.body;
1684
- if (data.errorAttribute != null) {
1685
- contents.ErrorAttribute = __expectString(data.errorAttribute);
1686
- }
1687
- if (data.message != null) {
1688
- contents.Message = __expectString(data.message);
1689
- }
1510
+ const doc = take(data, {
1511
+ ErrorAttribute: [, __expectString, `errorAttribute`],
1512
+ Message: [, __expectString, `message`],
1513
+ });
1514
+ Object.assign(contents, doc);
1690
1515
  const exception = new NotFoundException({
1691
1516
  $metadata: deserializeMetadata(parsedOutput),
1692
1517
  ...contents,
@@ -1696,25 +1521,17 @@ const de_NotFoundExceptionRes = async (parsedOutput, context) => {
1696
1521
  const de_UnauthorizedExceptionRes = async (parsedOutput, context) => {
1697
1522
  const contents = map({});
1698
1523
  const data = parsedOutput.body;
1699
- if (data.errorAttribute != null) {
1700
- contents.ErrorAttribute = __expectString(data.errorAttribute);
1701
- }
1702
- if (data.message != null) {
1703
- contents.Message = __expectString(data.message);
1704
- }
1524
+ const doc = take(data, {
1525
+ ErrorAttribute: [, __expectString, `errorAttribute`],
1526
+ Message: [, __expectString, `message`],
1527
+ });
1528
+ Object.assign(contents, doc);
1705
1529
  const exception = new UnauthorizedException({
1706
1530
  $metadata: deserializeMetadata(parsedOutput),
1707
1531
  ...contents,
1708
1532
  });
1709
1533
  return __decorateServiceException(exception, parsedOutput.body);
1710
1534
  };
1711
- const se___listOf__string = (input, context) => {
1712
- return input
1713
- .filter((e) => e != null)
1714
- .map((entry) => {
1715
- return entry;
1716
- });
1717
- };
1718
1535
  const se___listOfUser = (input, context) => {
1719
1536
  return input
1720
1537
  .filter((e) => e != null)
@@ -1722,81 +1539,58 @@ const se___listOfUser = (input, context) => {
1722
1539
  return se_User(entry, context);
1723
1540
  });
1724
1541
  };
1725
- const se___mapOf__string = (input, context) => {
1726
- return Object.entries(input).reduce((acc, [key, value]) => {
1727
- if (value === null) {
1728
- return acc;
1729
- }
1730
- acc[key] = value;
1731
- return acc;
1732
- }, {});
1733
- };
1734
1542
  const se_ConfigurationId = (input, context) => {
1735
- return {
1736
- ...(input.Id != null && { id: input.Id }),
1737
- ...(input.Revision != null && { revision: input.Revision }),
1738
- };
1543
+ return take(input, {
1544
+ id: [, , `Id`],
1545
+ revision: [, , `Revision`],
1546
+ });
1739
1547
  };
1740
1548
  const se_EncryptionOptions = (input, context) => {
1741
- return {
1742
- ...(input.KmsKeyId != null && { kmsKeyId: input.KmsKeyId }),
1743
- ...(input.UseAwsOwnedKey != null && { useAwsOwnedKey: input.UseAwsOwnedKey }),
1744
- };
1549
+ return take(input, {
1550
+ kmsKeyId: [, , `KmsKeyId`],
1551
+ useAwsOwnedKey: [, , `UseAwsOwnedKey`],
1552
+ });
1745
1553
  };
1746
1554
  const se_LdapServerMetadataInput = (input, context) => {
1747
- return {
1748
- ...(input.Hosts != null && { hosts: se___listOf__string(input.Hosts, context) }),
1749
- ...(input.RoleBase != null && { roleBase: input.RoleBase }),
1750
- ...(input.RoleName != null && { roleName: input.RoleName }),
1751
- ...(input.RoleSearchMatching != null && { roleSearchMatching: input.RoleSearchMatching }),
1752
- ...(input.RoleSearchSubtree != null && { roleSearchSubtree: input.RoleSearchSubtree }),
1753
- ...(input.ServiceAccountPassword != null && { serviceAccountPassword: input.ServiceAccountPassword }),
1754
- ...(input.ServiceAccountUsername != null && { serviceAccountUsername: input.ServiceAccountUsername }),
1755
- ...(input.UserBase != null && { userBase: input.UserBase }),
1756
- ...(input.UserRoleName != null && { userRoleName: input.UserRoleName }),
1757
- ...(input.UserSearchMatching != null && { userSearchMatching: input.UserSearchMatching }),
1758
- ...(input.UserSearchSubtree != null && { userSearchSubtree: input.UserSearchSubtree }),
1759
- };
1555
+ return take(input, {
1556
+ hosts: [, _json, `Hosts`],
1557
+ roleBase: [, , `RoleBase`],
1558
+ roleName: [, , `RoleName`],
1559
+ roleSearchMatching: [, , `RoleSearchMatching`],
1560
+ roleSearchSubtree: [, , `RoleSearchSubtree`],
1561
+ serviceAccountPassword: [, , `ServiceAccountPassword`],
1562
+ serviceAccountUsername: [, , `ServiceAccountUsername`],
1563
+ userBase: [, , `UserBase`],
1564
+ userRoleName: [, , `UserRoleName`],
1565
+ userSearchMatching: [, , `UserSearchMatching`],
1566
+ userSearchSubtree: [, , `UserSearchSubtree`],
1567
+ });
1760
1568
  };
1761
1569
  const se_Logs = (input, context) => {
1762
- return {
1763
- ...(input.Audit != null && { audit: input.Audit }),
1764
- ...(input.General != null && { general: input.General }),
1765
- };
1570
+ return take(input, {
1571
+ audit: [, , `Audit`],
1572
+ general: [, , `General`],
1573
+ });
1766
1574
  };
1767
1575
  const se_User = (input, context) => {
1768
- return {
1769
- ...(input.ConsoleAccess != null && { consoleAccess: input.ConsoleAccess }),
1770
- ...(input.Groups != null && { groups: se___listOf__string(input.Groups, context) }),
1771
- ...(input.Password != null && { password: input.Password }),
1772
- ...(input.Username != null && { username: input.Username }),
1773
- };
1576
+ return take(input, {
1577
+ consoleAccess: [, , `ConsoleAccess`],
1578
+ groups: [, _json, `Groups`],
1579
+ password: [, , `Password`],
1580
+ username: [, , `Username`],
1581
+ });
1774
1582
  };
1775
1583
  const se_WeeklyStartTime = (input, context) => {
1776
- return {
1777
- ...(input.DayOfWeek != null && { dayOfWeek: input.DayOfWeek }),
1778
- ...(input.TimeOfDay != null && { timeOfDay: input.TimeOfDay }),
1779
- ...(input.TimeZone != null && { timeZone: input.TimeZone }),
1780
- };
1781
- };
1782
- const de___listOf__string = (output, context) => {
1783
- const retVal = (output || [])
1784
- .filter((e) => e != null)
1785
- .map((entry) => {
1786
- if (entry === null) {
1787
- return null;
1788
- }
1789
- return __expectString(entry);
1584
+ return take(input, {
1585
+ dayOfWeek: [, , `DayOfWeek`],
1586
+ timeOfDay: [, , `TimeOfDay`],
1587
+ timeZone: [, , `TimeZone`],
1790
1588
  });
1791
- return retVal;
1792
1589
  };
1793
1590
  const de___listOfActionRequired = (output, context) => {
1794
1591
  const retVal = (output || [])
1795
1592
  .filter((e) => e != null)
1796
1593
  .map((entry) => {
1797
- if (entry === null) {
1798
- return null;
1799
- }
1800
1594
  return de_ActionRequired(entry, context);
1801
1595
  });
1802
1596
  return retVal;
@@ -1805,9 +1599,6 @@ const de___listOfAvailabilityZone = (output, context) => {
1805
1599
  const retVal = (output || [])
1806
1600
  .filter((e) => e != null)
1807
1601
  .map((entry) => {
1808
- if (entry === null) {
1809
- return null;
1810
- }
1811
1602
  return de_AvailabilityZone(entry, context);
1812
1603
  });
1813
1604
  return retVal;
@@ -1816,9 +1607,6 @@ const de___listOfBrokerEngineType = (output, context) => {
1816
1607
  const retVal = (output || [])
1817
1608
  .filter((e) => e != null)
1818
1609
  .map((entry) => {
1819
- if (entry === null) {
1820
- return null;
1821
- }
1822
1610
  return de_BrokerEngineType(entry, context);
1823
1611
  });
1824
1612
  return retVal;
@@ -1827,9 +1615,6 @@ const de___listOfBrokerInstance = (output, context) => {
1827
1615
  const retVal = (output || [])
1828
1616
  .filter((e) => e != null)
1829
1617
  .map((entry) => {
1830
- if (entry === null) {
1831
- return null;
1832
- }
1833
1618
  return de_BrokerInstance(entry, context);
1834
1619
  });
1835
1620
  return retVal;
@@ -1838,9 +1623,6 @@ const de___listOfBrokerInstanceOption = (output, context) => {
1838
1623
  const retVal = (output || [])
1839
1624
  .filter((e) => e != null)
1840
1625
  .map((entry) => {
1841
- if (entry === null) {
1842
- return null;
1843
- }
1844
1626
  return de_BrokerInstanceOption(entry, context);
1845
1627
  });
1846
1628
  return retVal;
@@ -1849,9 +1631,6 @@ const de___listOfBrokerSummary = (output, context) => {
1849
1631
  const retVal = (output || [])
1850
1632
  .filter((e) => e != null)
1851
1633
  .map((entry) => {
1852
- if (entry === null) {
1853
- return null;
1854
- }
1855
1634
  return de_BrokerSummary(entry, context);
1856
1635
  });
1857
1636
  return retVal;
@@ -1860,9 +1639,6 @@ const de___listOfConfiguration = (output, context) => {
1860
1639
  const retVal = (output || [])
1861
1640
  .filter((e) => e != null)
1862
1641
  .map((entry) => {
1863
- if (entry === null) {
1864
- return null;
1865
- }
1866
1642
  return de_Configuration(entry, context);
1867
1643
  });
1868
1644
  return retVal;
@@ -1871,9 +1647,6 @@ const de___listOfConfigurationId = (output, context) => {
1871
1647
  const retVal = (output || [])
1872
1648
  .filter((e) => e != null)
1873
1649
  .map((entry) => {
1874
- if (entry === null) {
1875
- return null;
1876
- }
1877
1650
  return de_ConfigurationId(entry, context);
1878
1651
  });
1879
1652
  return retVal;
@@ -1882,31 +1655,14 @@ const de___listOfConfigurationRevision = (output, context) => {
1882
1655
  const retVal = (output || [])
1883
1656
  .filter((e) => e != null)
1884
1657
  .map((entry) => {
1885
- if (entry === null) {
1886
- return null;
1887
- }
1888
1658
  return de_ConfigurationRevision(entry, context);
1889
1659
  });
1890
1660
  return retVal;
1891
1661
  };
1892
- const de___listOfDeploymentMode = (output, context) => {
1893
- const retVal = (output || [])
1894
- .filter((e) => e != null)
1895
- .map((entry) => {
1896
- if (entry === null) {
1897
- return null;
1898
- }
1899
- return __expectString(entry);
1900
- });
1901
- return retVal;
1902
- };
1903
1662
  const de___listOfEngineVersion = (output, context) => {
1904
1663
  const retVal = (output || [])
1905
1664
  .filter((e) => e != null)
1906
1665
  .map((entry) => {
1907
- if (entry === null) {
1908
- return null;
1909
- }
1910
1666
  return de_EngineVersion(entry, context);
1911
1667
  });
1912
1668
  return retVal;
@@ -1915,9 +1671,6 @@ const de___listOfSanitizationWarning = (output, context) => {
1915
1671
  const retVal = (output || [])
1916
1672
  .filter((e) => e != null)
1917
1673
  .map((entry) => {
1918
- if (entry === null) {
1919
- return null;
1920
- }
1921
1674
  return de_SanitizationWarning(entry, context);
1922
1675
  });
1923
1676
  return retVal;
@@ -1926,176 +1679,162 @@ const de___listOfUserSummary = (output, context) => {
1926
1679
  const retVal = (output || [])
1927
1680
  .filter((e) => e != null)
1928
1681
  .map((entry) => {
1929
- if (entry === null) {
1930
- return null;
1931
- }
1932
1682
  return de_UserSummary(entry, context);
1933
1683
  });
1934
1684
  return retVal;
1935
1685
  };
1936
- const de___mapOf__string = (output, context) => {
1937
- return Object.entries(output).reduce((acc, [key, value]) => {
1938
- if (value === null) {
1939
- return acc;
1940
- }
1941
- acc[key] = __expectString(value);
1942
- return acc;
1943
- }, {});
1944
- };
1945
1686
  const de_ActionRequired = (output, context) => {
1946
- return {
1947
- ActionRequiredCode: __expectString(output.actionRequiredCode),
1948
- ActionRequiredInfo: __expectString(output.actionRequiredInfo),
1949
- };
1687
+ return take(output, {
1688
+ ActionRequiredCode: [, __expectString, `actionRequiredCode`],
1689
+ ActionRequiredInfo: [, __expectString, `actionRequiredInfo`],
1690
+ });
1950
1691
  };
1951
1692
  const de_AvailabilityZone = (output, context) => {
1952
- return {
1953
- Name: __expectString(output.name),
1954
- };
1693
+ return take(output, {
1694
+ Name: [, __expectString, `name`],
1695
+ });
1955
1696
  };
1956
1697
  const de_BrokerEngineType = (output, context) => {
1957
- return {
1958
- EngineType: __expectString(output.engineType),
1959
- EngineVersions: output.engineVersions != null ? de___listOfEngineVersion(output.engineVersions, context) : undefined,
1960
- };
1698
+ return take(output, {
1699
+ EngineType: [, __expectString, `engineType`],
1700
+ EngineVersions: (_) => [, de___listOfEngineVersion(_, context), `engineVersions`],
1701
+ });
1961
1702
  };
1962
1703
  const de_BrokerInstance = (output, context) => {
1963
- return {
1964
- ConsoleURL: __expectString(output.consoleURL),
1965
- Endpoints: output.endpoints != null ? de___listOf__string(output.endpoints, context) : undefined,
1966
- IpAddress: __expectString(output.ipAddress),
1967
- };
1704
+ return take(output, {
1705
+ ConsoleURL: [, __expectString, `consoleURL`],
1706
+ Endpoints: [, _json, `endpoints`],
1707
+ IpAddress: [, __expectString, `ipAddress`],
1708
+ });
1968
1709
  };
1969
1710
  const de_BrokerInstanceOption = (output, context) => {
1970
- return {
1971
- AvailabilityZones: output.availabilityZones != null ? de___listOfAvailabilityZone(output.availabilityZones, context) : undefined,
1972
- EngineType: __expectString(output.engineType),
1973
- HostInstanceType: __expectString(output.hostInstanceType),
1974
- StorageType: __expectString(output.storageType),
1975
- SupportedDeploymentModes: output.supportedDeploymentModes != null
1976
- ? de___listOfDeploymentMode(output.supportedDeploymentModes, context)
1977
- : undefined,
1978
- SupportedEngineVersions: output.supportedEngineVersions != null ? de___listOf__string(output.supportedEngineVersions, context) : undefined,
1979
- };
1711
+ return take(output, {
1712
+ AvailabilityZones: (_) => [, de___listOfAvailabilityZone(_, context), `availabilityZones`],
1713
+ EngineType: [, __expectString, `engineType`],
1714
+ HostInstanceType: [, __expectString, `hostInstanceType`],
1715
+ StorageType: [, __expectString, `storageType`],
1716
+ SupportedDeploymentModes: [, _json, `supportedDeploymentModes`],
1717
+ SupportedEngineVersions: [, _json, `supportedEngineVersions`],
1718
+ });
1980
1719
  };
1981
1720
  const de_BrokerSummary = (output, context) => {
1982
- return {
1983
- BrokerArn: __expectString(output.brokerArn),
1984
- BrokerId: __expectString(output.brokerId),
1985
- BrokerName: __expectString(output.brokerName),
1986
- BrokerState: __expectString(output.brokerState),
1987
- Created: output.created != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.created)) : undefined,
1988
- DeploymentMode: __expectString(output.deploymentMode),
1989
- EngineType: __expectString(output.engineType),
1990
- HostInstanceType: __expectString(output.hostInstanceType),
1991
- };
1721
+ return take(output, {
1722
+ BrokerArn: [, __expectString, `brokerArn`],
1723
+ BrokerId: [, __expectString, `brokerId`],
1724
+ BrokerName: [, __expectString, `brokerName`],
1725
+ BrokerState: [, __expectString, `brokerState`],
1726
+ Created: (_) => [, __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `created`],
1727
+ DeploymentMode: [, __expectString, `deploymentMode`],
1728
+ EngineType: [, __expectString, `engineType`],
1729
+ HostInstanceType: [, __expectString, `hostInstanceType`],
1730
+ });
1992
1731
  };
1993
1732
  const de_Configuration = (output, context) => {
1994
- return {
1995
- Arn: __expectString(output.arn),
1996
- AuthenticationStrategy: __expectString(output.authenticationStrategy),
1997
- Created: output.created != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.created)) : undefined,
1998
- Description: __expectString(output.description),
1999
- EngineType: __expectString(output.engineType),
2000
- EngineVersion: __expectString(output.engineVersion),
2001
- Id: __expectString(output.id),
2002
- LatestRevision: output.latestRevision != null ? de_ConfigurationRevision(output.latestRevision, context) : undefined,
2003
- Name: __expectString(output.name),
2004
- Tags: output.tags != null ? de___mapOf__string(output.tags, context) : undefined,
2005
- };
1733
+ return take(output, {
1734
+ Arn: [, __expectString, `arn`],
1735
+ AuthenticationStrategy: [, __expectString, `authenticationStrategy`],
1736
+ Created: (_) => [, __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `created`],
1737
+ Description: [, __expectString, `description`],
1738
+ EngineType: [, __expectString, `engineType`],
1739
+ EngineVersion: [, __expectString, `engineVersion`],
1740
+ Id: [, __expectString, `id`],
1741
+ LatestRevision: (_) => [, de_ConfigurationRevision(_, context), `latestRevision`],
1742
+ Name: [, __expectString, `name`],
1743
+ Tags: [, _json, `tags`],
1744
+ });
2006
1745
  };
2007
1746
  const de_ConfigurationId = (output, context) => {
2008
- return {
2009
- Id: __expectString(output.id),
2010
- Revision: __expectInt32(output.revision),
2011
- };
1747
+ return take(output, {
1748
+ Id: [, __expectString, `id`],
1749
+ Revision: [, __expectInt32, `revision`],
1750
+ });
2012
1751
  };
2013
1752
  const de_ConfigurationRevision = (output, context) => {
2014
- return {
2015
- Created: output.created != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.created)) : undefined,
2016
- Description: __expectString(output.description),
2017
- Revision: __expectInt32(output.revision),
2018
- };
1753
+ return take(output, {
1754
+ Created: (_) => [, __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `created`],
1755
+ Description: [, __expectString, `description`],
1756
+ Revision: [, __expectInt32, `revision`],
1757
+ });
2019
1758
  };
2020
1759
  const de_Configurations = (output, context) => {
2021
- return {
2022
- Current: output.current != null ? de_ConfigurationId(output.current, context) : undefined,
2023
- History: output.history != null ? de___listOfConfigurationId(output.history, context) : undefined,
2024
- Pending: output.pending != null ? de_ConfigurationId(output.pending, context) : undefined,
2025
- };
1760
+ return take(output, {
1761
+ Current: (_) => [, de_ConfigurationId(_, context), `current`],
1762
+ History: (_) => [, de___listOfConfigurationId(_, context), `history`],
1763
+ Pending: (_) => [, de_ConfigurationId(_, context), `pending`],
1764
+ });
2026
1765
  };
2027
1766
  const de_EncryptionOptions = (output, context) => {
2028
- return {
2029
- KmsKeyId: __expectString(output.kmsKeyId),
2030
- UseAwsOwnedKey: __expectBoolean(output.useAwsOwnedKey),
2031
- };
1767
+ return take(output, {
1768
+ KmsKeyId: [, __expectString, `kmsKeyId`],
1769
+ UseAwsOwnedKey: [, __expectBoolean, `useAwsOwnedKey`],
1770
+ });
2032
1771
  };
2033
1772
  const de_EngineVersion = (output, context) => {
2034
- return {
2035
- Name: __expectString(output.name),
2036
- };
1773
+ return take(output, {
1774
+ Name: [, __expectString, `name`],
1775
+ });
2037
1776
  };
2038
1777
  const de_LdapServerMetadataOutput = (output, context) => {
2039
- return {
2040
- Hosts: output.hosts != null ? de___listOf__string(output.hosts, context) : undefined,
2041
- RoleBase: __expectString(output.roleBase),
2042
- RoleName: __expectString(output.roleName),
2043
- RoleSearchMatching: __expectString(output.roleSearchMatching),
2044
- RoleSearchSubtree: __expectBoolean(output.roleSearchSubtree),
2045
- ServiceAccountUsername: __expectString(output.serviceAccountUsername),
2046
- UserBase: __expectString(output.userBase),
2047
- UserRoleName: __expectString(output.userRoleName),
2048
- UserSearchMatching: __expectString(output.userSearchMatching),
2049
- UserSearchSubtree: __expectBoolean(output.userSearchSubtree),
2050
- };
1778
+ return take(output, {
1779
+ Hosts: [, _json, `hosts`],
1780
+ RoleBase: [, __expectString, `roleBase`],
1781
+ RoleName: [, __expectString, `roleName`],
1782
+ RoleSearchMatching: [, __expectString, `roleSearchMatching`],
1783
+ RoleSearchSubtree: [, __expectBoolean, `roleSearchSubtree`],
1784
+ ServiceAccountUsername: [, __expectString, `serviceAccountUsername`],
1785
+ UserBase: [, __expectString, `userBase`],
1786
+ UserRoleName: [, __expectString, `userRoleName`],
1787
+ UserSearchMatching: [, __expectString, `userSearchMatching`],
1788
+ UserSearchSubtree: [, __expectBoolean, `userSearchSubtree`],
1789
+ });
2051
1790
  };
2052
1791
  const de_Logs = (output, context) => {
2053
- return {
2054
- Audit: __expectBoolean(output.audit),
2055
- General: __expectBoolean(output.general),
2056
- };
1792
+ return take(output, {
1793
+ Audit: [, __expectBoolean, `audit`],
1794
+ General: [, __expectBoolean, `general`],
1795
+ });
2057
1796
  };
2058
1797
  const de_LogsSummary = (output, context) => {
2059
- return {
2060
- Audit: __expectBoolean(output.audit),
2061
- AuditLogGroup: __expectString(output.auditLogGroup),
2062
- General: __expectBoolean(output.general),
2063
- GeneralLogGroup: __expectString(output.generalLogGroup),
2064
- Pending: output.pending != null ? de_PendingLogs(output.pending, context) : undefined,
2065
- };
1798
+ return take(output, {
1799
+ Audit: [, __expectBoolean, `audit`],
1800
+ AuditLogGroup: [, __expectString, `auditLogGroup`],
1801
+ General: [, __expectBoolean, `general`],
1802
+ GeneralLogGroup: [, __expectString, `generalLogGroup`],
1803
+ Pending: (_) => [, de_PendingLogs(_, context), `pending`],
1804
+ });
2066
1805
  };
2067
1806
  const de_PendingLogs = (output, context) => {
2068
- return {
2069
- Audit: __expectBoolean(output.audit),
2070
- General: __expectBoolean(output.general),
2071
- };
1807
+ return take(output, {
1808
+ Audit: [, __expectBoolean, `audit`],
1809
+ General: [, __expectBoolean, `general`],
1810
+ });
2072
1811
  };
2073
1812
  const de_SanitizationWarning = (output, context) => {
2074
- return {
2075
- AttributeName: __expectString(output.attributeName),
2076
- ElementName: __expectString(output.elementName),
2077
- Reason: __expectString(output.reason),
2078
- };
1813
+ return take(output, {
1814
+ AttributeName: [, __expectString, `attributeName`],
1815
+ ElementName: [, __expectString, `elementName`],
1816
+ Reason: [, __expectString, `reason`],
1817
+ });
2079
1818
  };
2080
1819
  const de_UserPendingChanges = (output, context) => {
2081
- return {
2082
- ConsoleAccess: __expectBoolean(output.consoleAccess),
2083
- Groups: output.groups != null ? de___listOf__string(output.groups, context) : undefined,
2084
- PendingChange: __expectString(output.pendingChange),
2085
- };
1820
+ return take(output, {
1821
+ ConsoleAccess: [, __expectBoolean, `consoleAccess`],
1822
+ Groups: [, _json, `groups`],
1823
+ PendingChange: [, __expectString, `pendingChange`],
1824
+ });
2086
1825
  };
2087
1826
  const de_UserSummary = (output, context) => {
2088
- return {
2089
- PendingChange: __expectString(output.pendingChange),
2090
- Username: __expectString(output.username),
2091
- };
1827
+ return take(output, {
1828
+ PendingChange: [, __expectString, `pendingChange`],
1829
+ Username: [, __expectString, `username`],
1830
+ });
2092
1831
  };
2093
1832
  const de_WeeklyStartTime = (output, context) => {
2094
- return {
2095
- DayOfWeek: __expectString(output.dayOfWeek),
2096
- TimeOfDay: __expectString(output.timeOfDay),
2097
- TimeZone: __expectString(output.timeZone),
2098
- };
1833
+ return take(output, {
1834
+ DayOfWeek: [, __expectString, `dayOfWeek`],
1835
+ TimeOfDay: [, __expectString, `timeOfDay`],
1836
+ TimeZone: [, __expectString, `timeZone`],
1837
+ });
2099
1838
  };
2100
1839
  const deserializeMetadata = (output) => ({
2101
1840
  httpStatusCode: output.statusCode,